gdk-pixbuf-sys-0.14.0/.cargo_vcs_info.json0000644000000001120000000000100137640ustar { "git": { "sha1": "42ede59a403dc217ef13fbf7ba2371915f49e645" } } gdk-pixbuf-sys-0.14.0/Cargo.toml0000644000000031550000000000100117740ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] edition = "2018" name = "gdk-pixbuf-sys" version = "0.14.0" authors = ["The gtk-rs Project Developers"] build = "build.rs" links = "gdk_pixbuf-2.0" description = "FFI bindings to libgdk_pixbuf-2.0" homepage = "http://gtk-rs.org/" keywords = ["gdk-pixbuf", "ffi", "gtk-rs", "gnome"] license = "MIT" repository = "https://github.com/gtk-rs/gtk-rs-core" [package.metadata.docs.rs] features = ["dox"] [package.metadata.system-deps.gdk_pixbuf_2_0] name = "gdk-pixbuf-2.0" version = "2.32" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_36] version = "2.36" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_36_8] version = "2.36.8" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_40] version = "2.40" [lib] name = "gdk_pixbuf_sys" [dependencies.gio-sys] version = "0.14.0" [dependencies.glib-sys] version = "0.14.0" [dependencies.gobject-sys] version = "0.14.0" [dependencies.libc] version = "0.2" [dev-dependencies.shell-words] version = "1.0.0" [dev-dependencies.tempfile] version = "3" [build-dependencies.system-deps] version = "3" [features] dox = [] v2_36 = [] v2_36_8 = ["v2_36"] v2_40 = ["v2_36_8"] gdk-pixbuf-sys-0.14.0/Cargo.toml.orig000064400000000000000000000020610072674642500155000ustar 00000000000000[build-dependencies] system-deps = "3" [dependencies] libc = "0.2" [dependencies.gio-sys] version = "0.14.0" [dependencies.glib-sys] version = "0.14.0" [dependencies.gobject-sys] version = "0.14.0" [dev-dependencies] shell-words = "1.0.0" tempfile = "3" [features] v2_36 = [] v2_36_8 = ["v2_36"] v2_40 = ["v2_36_8"] dox = [] [lib] name = "gdk_pixbuf_sys" [package] authors = ["The gtk-rs Project Developers"] build = "build.rs" description = "FFI bindings to libgdk_pixbuf-2.0" homepage = "http://gtk-rs.org/" keywords = ["gdk-pixbuf", "ffi", "gtk-rs", "gnome"] license = "MIT" links = "gdk_pixbuf-2.0" name = "gdk-pixbuf-sys" repository = "https://github.com/gtk-rs/gtk-rs-core" version = "0.14.0" edition = "2018" [package.metadata.docs.rs] features = ["dox"] [package.metadata.system-deps.gdk_pixbuf_2_0] name = "gdk-pixbuf-2.0" version = "2.32" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_36] version = "2.36" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_36_8] version = "2.36.8" [package.metadata.system-deps.gdk_pixbuf_2_0.v2_40] version = "2.40" gdk-pixbuf-sys-0.14.0/Gir.toml000064400000000000000000000014750072674642500142370ustar 00000000000000[options] work_mode = "sys" library = "GdkPixbuf" version = "2.0" min_cfg_version = "2.32" single_version_file = "." girs_directories = ["../../gir-files"] external_libraries = [ "GLib", "GObject", "Gio", ] ignore = [ "GdkPixbuf.PIXBUF_FEATURES_H", "GdkPixbuf.PIXBUF_MAJOR", "GdkPixbuf.PIXBUF_MICRO", "GdkPixbuf.PIXBUF_MINOR", "GdkPixbuf.PIXBUF_VERSION", ] [[object]] name = "GdkPixbuf.Pixbuf" status = "generate" [[object.function]] pattern = "new_from_file.*" is_windows_utf8 = true [[object.function]] pattern = "savev?" is_windows_utf8 = true [[object.function]] name = "new_from_file" is_windows_utf8 = true [[object]] name = "GdkPixbuf.PixbufAnimation" status = "generate" [[object.function]] name = "new_from_file" is_windows_utf8 = true gdk-pixbuf-sys-0.14.0/build.rs000064400000000000000000000007110072674642500142560ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #[cfg(not(feature = "dox"))] use std::process; #[cfg(feature = "dox")] fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { println!("cargo:warning={}", s); process::exit(1); } } gdk-pixbuf-sys-0.14.0/src/lib.rs000064400000000000000000001047120072674642500145220ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow( clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal, clippy::upper_case_acronyms )] #![cfg_attr(feature = "dox", feature(doc_cfg))] use gio_sys as gio; use glib_sys as glib; use gobject_sys as gobject; #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, }; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; // Enums pub type GdkColorspace = c_int; pub const GDK_COLORSPACE_RGB: GdkColorspace = 0; pub type GdkInterpType = c_int; pub const GDK_INTERP_NEAREST: GdkInterpType = 0; pub const GDK_INTERP_TILES: GdkInterpType = 1; pub const GDK_INTERP_BILINEAR: GdkInterpType = 2; pub const GDK_INTERP_HYPER: GdkInterpType = 3; pub type GdkPixbufAlphaMode = c_int; pub const GDK_PIXBUF_ALPHA_BILEVEL: GdkPixbufAlphaMode = 0; pub const GDK_PIXBUF_ALPHA_FULL: GdkPixbufAlphaMode = 1; pub type GdkPixbufError = c_int; pub const GDK_PIXBUF_ERROR_CORRUPT_IMAGE: GdkPixbufError = 0; pub const GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY: GdkPixbufError = 1; pub const GDK_PIXBUF_ERROR_BAD_OPTION: GdkPixbufError = 2; pub const GDK_PIXBUF_ERROR_UNKNOWN_TYPE: GdkPixbufError = 3; pub const GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION: GdkPixbufError = 4; pub const GDK_PIXBUF_ERROR_FAILED: GdkPixbufError = 5; pub const GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION: GdkPixbufError = 6; pub type GdkPixbufRotation = c_int; pub const GDK_PIXBUF_ROTATE_NONE: GdkPixbufRotation = 0; pub const GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE: GdkPixbufRotation = 90; pub const GDK_PIXBUF_ROTATE_UPSIDEDOWN: GdkPixbufRotation = 180; pub const GDK_PIXBUF_ROTATE_CLOCKWISE: GdkPixbufRotation = 270; // Constants // Flags pub type GdkPixbufFormatFlags = c_uint; pub const GDK_PIXBUF_FORMAT_WRITABLE: GdkPixbufFormatFlags = 1; pub const GDK_PIXBUF_FORMAT_SCALABLE: GdkPixbufFormatFlags = 2; pub const GDK_PIXBUF_FORMAT_THREADSAFE: GdkPixbufFormatFlags = 4; // Callbacks pub type GdkPixbufDestroyNotify = Option; pub type GdkPixbufModuleFillInfoFunc = Option; pub type GdkPixbufModuleFillVtableFunc = Option; pub type GdkPixbufModulePreparedFunc = Option; pub type GdkPixbufModuleSizeFunc = Option; pub type GdkPixbufModuleUpdatedFunc = Option; pub type GdkPixbufSaveFunc = Option gboolean>; // Records #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufAnimationClass { pub parent_class: gobject::GObjectClass, pub is_static_image: Option gboolean>, pub get_static_image: Option *mut GdkPixbuf>, pub get_size: Option, pub get_iter: Option< unsafe extern "C" fn( *mut GdkPixbufAnimation, *const glib::GTimeVal, ) -> *mut GdkPixbufAnimationIter, >, } impl ::std::fmt::Debug for GdkPixbufAnimationClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufAnimationClass @ {:p}", self)) .field("parent_class", &self.parent_class) .field("is_static_image", &self.is_static_image) .field("get_static_image", &self.get_static_image) .field("get_size", &self.get_size) .field("get_iter", &self.get_iter) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufAnimationIterClass { pub parent_class: gobject::GObjectClass, pub get_delay_time: Option c_int>, pub get_pixbuf: Option *mut GdkPixbuf>, pub on_currently_loading_frame: Option gboolean>, pub advance: Option< unsafe extern "C" fn(*mut GdkPixbufAnimationIter, *const glib::GTimeVal) -> gboolean, >, } impl ::std::fmt::Debug for GdkPixbufAnimationIterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufAnimationIterClass @ {:p}", self)) .field("parent_class", &self.parent_class) .field("get_delay_time", &self.get_delay_time) .field("get_pixbuf", &self.get_pixbuf) .field( "on_currently_loading_frame", &self.on_currently_loading_frame, ) .field("advance", &self.advance) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufFormat { pub name: *mut c_char, pub signature: *mut GdkPixbufModulePattern, pub domain: *mut c_char, pub description: *mut c_char, pub mime_types: *mut *mut c_char, pub extensions: *mut *mut c_char, pub flags: u32, pub disabled: gboolean, pub license: *mut c_char, } impl ::std::fmt::Debug for GdkPixbufFormat { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufFormat @ {:p}", self)) .field("name", &self.name) .field("signature", &self.signature) .field("domain", &self.domain) .field("description", &self.description) .field("mime_types", &self.mime_types) .field("extensions", &self.extensions) .field("flags", &self.flags) .field("disabled", &self.disabled) .field("license", &self.license) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufLoaderClass { pub parent_class: gobject::GObjectClass, pub size_prepared: Option, pub area_prepared: Option, pub area_updated: Option, pub closed: Option, } impl ::std::fmt::Debug for GdkPixbufLoaderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufLoaderClass @ {:p}", self)) .field("parent_class", &self.parent_class) .field("size_prepared", &self.size_prepared) .field("area_prepared", &self.area_prepared) .field("area_updated", &self.area_updated) .field("closed", &self.closed) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufModule { pub module_name: *mut c_char, pub module_path: *mut c_char, pub module: gpointer, pub info: *mut GdkPixbufFormat, pub load: Option *mut GdkPixbuf>, pub load_xpm_data: Option *mut GdkPixbuf>, pub begin_load: Option< unsafe extern "C" fn( GdkPixbufModuleSizeFunc, GdkPixbufModulePreparedFunc, GdkPixbufModuleUpdatedFunc, gpointer, *mut *mut glib::GError, ) -> gpointer, >, pub stop_load: Option gboolean>, pub load_increment: Option< unsafe extern "C" fn(gpointer, *const u8, c_uint, *mut *mut glib::GError) -> gboolean, >, pub load_animation: Option *mut GdkPixbufAnimation>, pub save: Option< unsafe extern "C" fn( *mut FILE, *mut GdkPixbuf, *mut *mut c_char, *mut *mut c_char, *mut *mut glib::GError, ) -> gboolean, >, pub save_to_callback: Option< unsafe extern "C" fn( GdkPixbufSaveFunc, gpointer, *mut GdkPixbuf, *mut *mut c_char, *mut *mut c_char, *mut *mut glib::GError, ) -> gboolean, >, pub is_save_option_supported: Option gboolean>, pub _reserved1: Option, pub _reserved2: Option, pub _reserved3: Option, pub _reserved4: Option, } impl ::std::fmt::Debug for GdkPixbufModule { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufModule @ {:p}", self)) .field("module_name", &self.module_name) .field("module_path", &self.module_path) .field("module", &self.module) .field("info", &self.info) .field("load", &self.load) .field("load_xpm_data", &self.load_xpm_data) .field("begin_load", &self.begin_load) .field("stop_load", &self.stop_load) .field("load_increment", &self.load_increment) .field("load_animation", &self.load_animation) .field("save", &self.save) .field("save_to_callback", &self.save_to_callback) .field("is_save_option_supported", &self.is_save_option_supported) .field("_reserved1", &self._reserved1) .field("_reserved2", &self._reserved2) .field("_reserved3", &self._reserved3) .field("_reserved4", &self._reserved4) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufModulePattern { pub prefix: *mut c_char, pub mask: *mut c_char, pub relevance: c_int, } impl ::std::fmt::Debug for GdkPixbufModulePattern { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufModulePattern @ {:p}", self)) .field("prefix", &self.prefix) .field("mask", &self.mask) .field("relevance", &self.relevance) .finish() } } #[repr(C)] pub struct _GdkPixbufSimpleAnimClass(c_void); pub type GdkPixbufSimpleAnimClass = *mut _GdkPixbufSimpleAnimClass; // Classes #[repr(C)] pub struct GdkPixbuf(c_void); impl ::std::fmt::Debug for GdkPixbuf { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbuf @ {:p}", self)).finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufAnimation { pub parent_instance: gobject::GObject, } impl ::std::fmt::Debug for GdkPixbufAnimation { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufAnimation @ {:p}", self)) .field("parent_instance", &self.parent_instance) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufAnimationIter { pub parent_instance: gobject::GObject, } impl ::std::fmt::Debug for GdkPixbufAnimationIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufAnimationIter @ {:p}", self)) .field("parent_instance", &self.parent_instance) .finish() } } #[repr(C)] #[derive(Copy, Clone)] pub struct GdkPixbufLoader { pub parent_instance: gobject::GObject, pub priv_: gpointer, } impl ::std::fmt::Debug for GdkPixbufLoader { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufLoader @ {:p}", self)) .field("parent_instance", &self.parent_instance) .finish() } } #[repr(C)] pub struct GdkPixbufNonAnim(c_void); impl ::std::fmt::Debug for GdkPixbufNonAnim { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufNonAnim @ {:p}", self)) .finish() } } #[repr(C)] pub struct GdkPixbufSimpleAnim(c_void); impl ::std::fmt::Debug for GdkPixbufSimpleAnim { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufSimpleAnim @ {:p}", self)) .finish() } } #[repr(C)] pub struct GdkPixbufSimpleAnimIter(c_void); impl ::std::fmt::Debug for GdkPixbufSimpleAnimIter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GdkPixbufSimpleAnimIter @ {:p}", self)) .finish() } } #[link(name = "gdk_pixbuf-2.0")] extern "C" { //========================================================================= // GdkColorspace //========================================================================= pub fn gdk_colorspace_get_type() -> GType; //========================================================================= // GdkInterpType //========================================================================= pub fn gdk_interp_type_get_type() -> GType; //========================================================================= // GdkPixbufAlphaMode //========================================================================= pub fn gdk_pixbuf_alpha_mode_get_type() -> GType; //========================================================================= // GdkPixbufError //========================================================================= pub fn gdk_pixbuf_error_get_type() -> GType; pub fn gdk_pixbuf_error_quark() -> glib::GQuark; //========================================================================= // GdkPixbufRotation //========================================================================= pub fn gdk_pixbuf_rotation_get_type() -> GType; //========================================================================= // GdkPixbufFormat //========================================================================= pub fn gdk_pixbuf_format_get_type() -> GType; pub fn gdk_pixbuf_format_copy(format: *const GdkPixbufFormat) -> *mut GdkPixbufFormat; pub fn gdk_pixbuf_format_free(format: *mut GdkPixbufFormat); pub fn gdk_pixbuf_format_get_description(format: *mut GdkPixbufFormat) -> *mut c_char; pub fn gdk_pixbuf_format_get_extensions(format: *mut GdkPixbufFormat) -> *mut *mut c_char; pub fn gdk_pixbuf_format_get_license(format: *mut GdkPixbufFormat) -> *mut c_char; pub fn gdk_pixbuf_format_get_mime_types(format: *mut GdkPixbufFormat) -> *mut *mut c_char; pub fn gdk_pixbuf_format_get_name(format: *mut GdkPixbufFormat) -> *mut c_char; pub fn gdk_pixbuf_format_is_disabled(format: *mut GdkPixbufFormat) -> gboolean; #[cfg(any(feature = "v2_36", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_36")))] pub fn gdk_pixbuf_format_is_save_option_supported( format: *mut GdkPixbufFormat, option_key: *const c_char, ) -> gboolean; pub fn gdk_pixbuf_format_is_scalable(format: *mut GdkPixbufFormat) -> gboolean; pub fn gdk_pixbuf_format_is_writable(format: *mut GdkPixbufFormat) -> gboolean; pub fn gdk_pixbuf_format_set_disabled(format: *mut GdkPixbufFormat, disabled: gboolean); //========================================================================= // GdkPixbuf //========================================================================= pub fn gdk_pixbuf_get_type() -> GType; pub fn gdk_pixbuf_new( colorspace: GdkColorspace, has_alpha: gboolean, bits_per_sample: c_int, width: c_int, height: c_int, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_bytes( data: *mut glib::GBytes, colorspace: GdkColorspace, has_alpha: gboolean, bits_per_sample: c_int, width: c_int, height: c_int, rowstride: c_int, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_data( data: *const u8, colorspace: GdkColorspace, has_alpha: gboolean, bits_per_sample: c_int, width: c_int, height: c_int, rowstride: c_int, destroy_fn: GdkPixbufDestroyNotify, destroy_fn_data: gpointer, ) -> *mut GdkPixbuf; #[cfg(any(windows, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(windows)))] pub fn gdk_pixbuf_new_from_file_utf8( filename: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_file( filename: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; #[cfg(any(windows, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(windows)))] pub fn gdk_pixbuf_new_from_file_at_scale_utf8( filename: *const c_char, width: c_int, height: c_int, preserve_aspect_ratio: gboolean, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_file_at_scale( filename: *const c_char, width: c_int, height: c_int, preserve_aspect_ratio: gboolean, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; #[cfg(any(windows, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(windows)))] pub fn gdk_pixbuf_new_from_file_at_size_utf8( filename: *const c_char, width: c_int, height: c_int, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_file_at_size( filename: *const c_char, width: c_int, height: c_int, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_inline( data_length: c_int, data: *const u8, copy_pixels: gboolean, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_resource( resource_path: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_resource_at_scale( resource_path: *const c_char, width: c_int, height: c_int, preserve_aspect_ratio: gboolean, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_stream( stream: *mut gio::GInputStream, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_stream_at_scale( stream: *mut gio::GInputStream, width: c_int, height: c_int, preserve_aspect_ratio: gboolean, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_stream_finish( async_result: *mut gio::GAsyncResult, error: *mut *mut glib::GError, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_new_from_xpm_data(data: *mut *const c_char) -> *mut GdkPixbuf; #[cfg(any(feature = "v2_36_8", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_36_8")))] pub fn gdk_pixbuf_calculate_rowstride( colorspace: GdkColorspace, has_alpha: gboolean, bits_per_sample: c_int, width: c_int, height: c_int, ) -> c_int; pub fn gdk_pixbuf_get_file_info( filename: *const c_char, width: *mut c_int, height: *mut c_int, ) -> *mut GdkPixbufFormat; pub fn gdk_pixbuf_get_file_info_async( filename: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ); pub fn gdk_pixbuf_get_file_info_finish( async_result: *mut gio::GAsyncResult, width: *mut c_int, height: *mut c_int, error: *mut *mut glib::GError, ) -> *mut GdkPixbufFormat; pub fn gdk_pixbuf_get_formats() -> *mut glib::GSList; #[cfg(any(feature = "v2_40", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_40")))] pub fn gdk_pixbuf_init_modules(path: *const c_char, error: *mut *mut glib::GError) -> gboolean; pub fn gdk_pixbuf_new_from_stream_async( stream: *mut gio::GInputStream, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ); pub fn gdk_pixbuf_new_from_stream_at_scale_async( stream: *mut gio::GInputStream, width: c_int, height: c_int, preserve_aspect_ratio: gboolean, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ); pub fn gdk_pixbuf_save_to_stream_finish( async_result: *mut gio::GAsyncResult, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_add_alpha( pixbuf: *const GdkPixbuf, substitute_color: gboolean, r: c_uchar, g: c_uchar, b: c_uchar, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_apply_embedded_orientation(src: *mut GdkPixbuf) -> *mut GdkPixbuf; pub fn gdk_pixbuf_composite( src: *const GdkPixbuf, dest: *mut GdkPixbuf, dest_x: c_int, dest_y: c_int, dest_width: c_int, dest_height: c_int, offset_x: c_double, offset_y: c_double, scale_x: c_double, scale_y: c_double, interp_type: GdkInterpType, overall_alpha: c_int, ); pub fn gdk_pixbuf_composite_color( src: *const GdkPixbuf, dest: *mut GdkPixbuf, dest_x: c_int, dest_y: c_int, dest_width: c_int, dest_height: c_int, offset_x: c_double, offset_y: c_double, scale_x: c_double, scale_y: c_double, interp_type: GdkInterpType, overall_alpha: c_int, check_x: c_int, check_y: c_int, check_size: c_int, color1: u32, color2: u32, ); pub fn gdk_pixbuf_composite_color_simple( src: *const GdkPixbuf, dest_width: c_int, dest_height: c_int, interp_type: GdkInterpType, overall_alpha: c_int, check_size: c_int, color1: u32, color2: u32, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_copy(pixbuf: *const GdkPixbuf) -> *mut GdkPixbuf; pub fn gdk_pixbuf_copy_area( src_pixbuf: *const GdkPixbuf, src_x: c_int, src_y: c_int, width: c_int, height: c_int, dest_pixbuf: *mut GdkPixbuf, dest_x: c_int, dest_y: c_int, ); #[cfg(any(feature = "v2_36", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_36")))] pub fn gdk_pixbuf_copy_options( src_pixbuf: *mut GdkPixbuf, dest_pixbuf: *mut GdkPixbuf, ) -> gboolean; pub fn gdk_pixbuf_fill(pixbuf: *mut GdkPixbuf, pixel: u32); pub fn gdk_pixbuf_flip(src: *const GdkPixbuf, horizontal: gboolean) -> *mut GdkPixbuf; pub fn gdk_pixbuf_get_bits_per_sample(pixbuf: *const GdkPixbuf) -> c_int; pub fn gdk_pixbuf_get_byte_length(pixbuf: *const GdkPixbuf) -> size_t; pub fn gdk_pixbuf_get_colorspace(pixbuf: *const GdkPixbuf) -> GdkColorspace; pub fn gdk_pixbuf_get_has_alpha(pixbuf: *const GdkPixbuf) -> gboolean; pub fn gdk_pixbuf_get_height(pixbuf: *const GdkPixbuf) -> c_int; pub fn gdk_pixbuf_get_n_channels(pixbuf: *const GdkPixbuf) -> c_int; pub fn gdk_pixbuf_get_option(pixbuf: *mut GdkPixbuf, key: *const c_char) -> *const c_char; pub fn gdk_pixbuf_get_options(pixbuf: *mut GdkPixbuf) -> *mut glib::GHashTable; pub fn gdk_pixbuf_get_pixels(pixbuf: *const GdkPixbuf) -> *mut u8; pub fn gdk_pixbuf_get_pixels_with_length( pixbuf: *const GdkPixbuf, length: *mut c_uint, ) -> *mut u8; pub fn gdk_pixbuf_get_rowstride(pixbuf: *const GdkPixbuf) -> c_int; pub fn gdk_pixbuf_get_width(pixbuf: *const GdkPixbuf) -> c_int; pub fn gdk_pixbuf_new_subpixbuf( src_pixbuf: *mut GdkPixbuf, src_x: c_int, src_y: c_int, width: c_int, height: c_int, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_read_pixel_bytes(pixbuf: *const GdkPixbuf) -> *mut glib::GBytes; pub fn gdk_pixbuf_read_pixels(pixbuf: *const GdkPixbuf) -> *const u8; pub fn gdk_pixbuf_ref(pixbuf: *mut GdkPixbuf) -> *mut GdkPixbuf; #[cfg(any(feature = "v2_36", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_36")))] pub fn gdk_pixbuf_remove_option(pixbuf: *mut GdkPixbuf, key: *const c_char) -> gboolean; pub fn gdk_pixbuf_rotate_simple( src: *const GdkPixbuf, angle: GdkPixbufRotation, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_saturate_and_pixelate( src: *const GdkPixbuf, dest: *mut GdkPixbuf, saturation: c_float, pixelate: gboolean, ); #[cfg(any(windows, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(windows)))] pub fn gdk_pixbuf_save_utf8( pixbuf: *mut GdkPixbuf, filename: *const c_char, type_: *const c_char, error: *mut *mut glib::GError, ... ) -> gboolean; pub fn gdk_pixbuf_save( pixbuf: *mut GdkPixbuf, filename: *const c_char, type_: *const c_char, error: *mut *mut glib::GError, ... ) -> gboolean; pub fn gdk_pixbuf_save_to_buffer( pixbuf: *mut GdkPixbuf, buffer: *mut *mut u8, buffer_size: *mut size_t, type_: *const c_char, error: *mut *mut glib::GError, ... ) -> gboolean; pub fn gdk_pixbuf_save_to_bufferv( pixbuf: *mut GdkPixbuf, buffer: *mut *mut u8, buffer_size: *mut size_t, type_: *const c_char, option_keys: *mut *mut c_char, option_values: *mut *mut c_char, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_save_to_callback( pixbuf: *mut GdkPixbuf, save_func: GdkPixbufSaveFunc, user_data: gpointer, type_: *const c_char, error: *mut *mut glib::GError, ... ) -> gboolean; pub fn gdk_pixbuf_save_to_callbackv( pixbuf: *mut GdkPixbuf, save_func: GdkPixbufSaveFunc, user_data: gpointer, type_: *const c_char, option_keys: *mut *mut c_char, option_values: *mut *mut c_char, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_save_to_stream( pixbuf: *mut GdkPixbuf, stream: *mut gio::GOutputStream, type_: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError, ... ) -> gboolean; pub fn gdk_pixbuf_save_to_stream_async( pixbuf: *mut GdkPixbuf, stream: *mut gio::GOutputStream, type_: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ... ); #[cfg(any(feature = "v2_36", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_36")))] pub fn gdk_pixbuf_save_to_streamv( pixbuf: *mut GdkPixbuf, stream: *mut gio::GOutputStream, type_: *const c_char, option_keys: *mut *mut c_char, option_values: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError, ) -> gboolean; #[cfg(any(feature = "v2_36", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_36")))] pub fn gdk_pixbuf_save_to_streamv_async( pixbuf: *mut GdkPixbuf, stream: *mut gio::GOutputStream, type_: *const c_char, option_keys: *mut *mut c_char, option_values: *mut *mut c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ); #[cfg(any(windows, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(windows)))] pub fn gdk_pixbuf_savev_utf8( pixbuf: *mut GdkPixbuf, filename: *const c_char, type_: *const c_char, option_keys: *mut *mut c_char, option_values: *mut *mut c_char, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_savev( pixbuf: *mut GdkPixbuf, filename: *const c_char, type_: *const c_char, option_keys: *mut *mut c_char, option_values: *mut *mut c_char, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_scale( src: *const GdkPixbuf, dest: *mut GdkPixbuf, dest_x: c_int, dest_y: c_int, dest_width: c_int, dest_height: c_int, offset_x: c_double, offset_y: c_double, scale_x: c_double, scale_y: c_double, interp_type: GdkInterpType, ); pub fn gdk_pixbuf_scale_simple( src: *const GdkPixbuf, dest_width: c_int, dest_height: c_int, interp_type: GdkInterpType, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_set_option( pixbuf: *mut GdkPixbuf, key: *const c_char, value: *const c_char, ) -> gboolean; pub fn gdk_pixbuf_unref(pixbuf: *mut GdkPixbuf); //========================================================================= // GdkPixbufAnimation //========================================================================= pub fn gdk_pixbuf_animation_get_type() -> GType; #[cfg(any(windows, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(windows)))] pub fn gdk_pixbuf_animation_new_from_file_utf8( filename: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_animation_new_from_file( filename: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_animation_new_from_resource( resource_path: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_animation_new_from_stream( stream: *mut gio::GInputStream, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError, ) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_animation_new_from_stream_finish( async_result: *mut gio::GAsyncResult, error: *mut *mut glib::GError, ) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_animation_new_from_stream_async( stream: *mut gio::GInputStream, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer, ); pub fn gdk_pixbuf_animation_get_height(animation: *mut GdkPixbufAnimation) -> c_int; pub fn gdk_pixbuf_animation_get_iter( animation: *mut GdkPixbufAnimation, start_time: *const glib::GTimeVal, ) -> *mut GdkPixbufAnimationIter; pub fn gdk_pixbuf_animation_get_static_image( animation: *mut GdkPixbufAnimation, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_animation_get_width(animation: *mut GdkPixbufAnimation) -> c_int; pub fn gdk_pixbuf_animation_is_static_image(animation: *mut GdkPixbufAnimation) -> gboolean; pub fn gdk_pixbuf_animation_ref(animation: *mut GdkPixbufAnimation) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_animation_unref(animation: *mut GdkPixbufAnimation); //========================================================================= // GdkPixbufAnimationIter //========================================================================= pub fn gdk_pixbuf_animation_iter_get_type() -> GType; pub fn gdk_pixbuf_animation_iter_advance( iter: *mut GdkPixbufAnimationIter, current_time: *const glib::GTimeVal, ) -> gboolean; pub fn gdk_pixbuf_animation_iter_get_delay_time(iter: *mut GdkPixbufAnimationIter) -> c_int; pub fn gdk_pixbuf_animation_iter_get_pixbuf( iter: *mut GdkPixbufAnimationIter, ) -> *mut GdkPixbuf; pub fn gdk_pixbuf_animation_iter_on_currently_loading_frame( iter: *mut GdkPixbufAnimationIter, ) -> gboolean; //========================================================================= // GdkPixbufLoader //========================================================================= pub fn gdk_pixbuf_loader_get_type() -> GType; pub fn gdk_pixbuf_loader_new() -> *mut GdkPixbufLoader; pub fn gdk_pixbuf_loader_new_with_mime_type( mime_type: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbufLoader; pub fn gdk_pixbuf_loader_new_with_type( image_type: *const c_char, error: *mut *mut glib::GError, ) -> *mut GdkPixbufLoader; pub fn gdk_pixbuf_loader_close( loader: *mut GdkPixbufLoader, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_loader_get_animation(loader: *mut GdkPixbufLoader) -> *mut GdkPixbufAnimation; pub fn gdk_pixbuf_loader_get_format(loader: *mut GdkPixbufLoader) -> *mut GdkPixbufFormat; pub fn gdk_pixbuf_loader_get_pixbuf(loader: *mut GdkPixbufLoader) -> *mut GdkPixbuf; pub fn gdk_pixbuf_loader_set_size(loader: *mut GdkPixbufLoader, width: c_int, height: c_int); pub fn gdk_pixbuf_loader_write( loader: *mut GdkPixbufLoader, buf: *const u8, count: size_t, error: *mut *mut glib::GError, ) -> gboolean; pub fn gdk_pixbuf_loader_write_bytes( loader: *mut GdkPixbufLoader, buffer: *mut glib::GBytes, error: *mut *mut glib::GError, ) -> gboolean; //========================================================================= // GdkPixbufNonAnim //========================================================================= pub fn gdk_pixbuf_non_anim_get_type() -> GType; pub fn gdk_pixbuf_non_anim_new(pixbuf: *mut GdkPixbuf) -> *mut GdkPixbufAnimation; //========================================================================= // GdkPixbufSimpleAnim //========================================================================= pub fn gdk_pixbuf_simple_anim_get_type() -> GType; pub fn gdk_pixbuf_simple_anim_new( width: c_int, height: c_int, rate: c_float, ) -> *mut GdkPixbufSimpleAnim; pub fn gdk_pixbuf_simple_anim_add_frame( animation: *mut GdkPixbufSimpleAnim, pixbuf: *mut GdkPixbuf, ); pub fn gdk_pixbuf_simple_anim_get_loop(animation: *mut GdkPixbufSimpleAnim) -> gboolean; pub fn gdk_pixbuf_simple_anim_set_loop(animation: *mut GdkPixbufSimpleAnim, loop_: gboolean); //========================================================================= // GdkPixbufSimpleAnimIter //========================================================================= pub fn gdk_pixbuf_simple_anim_iter_get_type() -> GType; } gdk-pixbuf-sys-0.14.0/tests/abi.rs000064400000000000000000000234270072674642500150650ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use gdk_pixbuf_sys::*; use std::env; use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; use std::process::Command; use std::str; use tempfile::Builder; static PACKAGES: &[&str] = &["gdk-pixbuf-2.0"]; #[derive(Clone, Debug)] struct Compiler { pub args: Vec, } impl Compiler { pub fn new() -> Result> { let mut args = get_var("CC", "cc")?; args.push("-Wno-deprecated-declarations".to_owned()); // For _Generic args.push("-std=c11".to_owned()); // For %z support in printf when using MinGW. args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); args.extend(get_var("CFLAGS", "")?); args.extend(get_var("CPPFLAGS", "")?); args.extend(pkg_config_cflags(PACKAGES)?); Ok(Self { args }) } pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { let mut cmd = self.to_command(); cmd.arg(src); cmd.arg("-o"); cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } fn to_command(&self) -> Command { let mut cmd = Command::new(&self.args[0]); cmd.args(&self.args[1..]); cmd } } fn get_var(name: &str, default: &str) -> Result, Box> { match env::var(name) { Ok(value) => Ok(shell_words::split(&value)?), Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), Err(err) => Err(format!("{} {}", name, err).into()), } } fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { if packages.is_empty() { return Ok(Vec::new()); } let pkg_config = env::var_os("PKG_CONFIG").unwrap_or_else(|| OsString::from("pkg-config")); let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); let out = cmd.output()?; if !out.status.success() { return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, alignment: usize, } #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] struct Results { /// Number of successfully completed tests. passed: usize, /// Total number of failed tests (including those that failed to compile). failed: usize, } impl Results { fn record_passed(&mut self) { self.passed += 1; } fn record_failed(&mut self) { self.failed += 1; } fn summary(&self) -> String { format!("{} passed; {} failed", self.passed, self.failed) } fn expect_total_success(&self) { if self.failed == 0 { println!("OK: {}", self.summary()); } else { panic!("FAILED: {}", self.summary()); }; } } #[test] fn cross_validate_constants_with_c() { let mut c_constants: Vec<(String, String)> = Vec::new(); for l in get_c_output("constant").unwrap().lines() { let mut words = l.trim().split(';'); let name = words.next().expect("Failed to parse name").to_owned(); let value = words .next() .and_then(|s| s.parse().ok()) .expect("Failed to parse value"); c_constants.push((name, value)); } let mut results = Results::default(); for ((rust_name, rust_value), (c_name, c_value)) in RUST_CONSTANTS.iter().zip(c_constants.iter()) { if rust_name != c_name { results.record_failed(); eprintln!("Name mismatch:\nRust: {:?}\nC: {:?}", rust_name, c_name,); continue; } if rust_value != c_value { results.record_failed(); eprintln!( "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", rust_name, rust_value, &c_value ); continue; } results.record_passed(); } results.expect_total_success(); } #[test] fn cross_validate_layout_with_c() { let mut c_layouts = Vec::new(); for l in get_c_output("layout").unwrap().lines() { let mut words = l.trim().split(';'); let name = words.next().expect("Failed to parse name").to_owned(); let size = words .next() .and_then(|s| s.parse().ok()) .expect("Failed to parse size"); let alignment = words .next() .and_then(|s| s.parse().ok()) .expect("Failed to parse alignment"); c_layouts.push((name, Layout { size, alignment })); } let mut results = Results::default(); for ((rust_name, rust_layout), (c_name, c_layout)) in RUST_LAYOUTS.iter().zip(c_layouts.iter()) { if rust_name != c_name { results.record_failed(); eprintln!("Name mismatch:\nRust: {:?}\nC: {:?}", rust_name, c_name,); continue; } if rust_layout != c_layout { results.record_failed(); eprintln!( "Layout mismatch for {}\nRust: {:?}\nC: {:?}", rust_name, rust_layout, &c_layout ); continue; } results.record_passed(); } results.expect_total_success(); } fn get_c_output(name: &str) -> Result> { let tmpdir = Builder::new().prefix("abi").tempdir()?; let exe = tmpdir.path().join(name); let c_file = Path::new("tests").join(name).with_extension("c"); let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; let mut abi_cmd = Command::new(exe); let output = abi_cmd.output()?; if !output.status.success() { return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); } Ok(String::from_utf8(output.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ ( "GdkColorspace", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkInterpType", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufAlphaMode", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufAnimation", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufAnimationClass", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufAnimationIter", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufAnimationIterClass", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufError", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufFormat", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufFormatFlags", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufLoader", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufLoaderClass", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufModule", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufModulePattern", Layout { size: size_of::(), alignment: align_of::(), }, ), ( "GdkPixbufRotation", Layout { size: size_of::(), alignment: align_of::(), }, ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_COLORSPACE_RGB", "0"), ("(gint) GDK_INTERP_BILINEAR", "2"), ("(gint) GDK_INTERP_HYPER", "3"), ("(gint) GDK_INTERP_NEAREST", "0"), ("(gint) GDK_INTERP_TILES", "1"), ("(gint) GDK_PIXBUF_ALPHA_BILEVEL", "0"), ("(gint) GDK_PIXBUF_ALPHA_FULL", "1"), ("(gint) GDK_PIXBUF_ERROR_BAD_OPTION", "2"), ("(gint) GDK_PIXBUF_ERROR_CORRUPT_IMAGE", "0"), ("(gint) GDK_PIXBUF_ERROR_FAILED", "5"), ("(gint) GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION", "6"), ("(gint) GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY", "1"), ("(gint) GDK_PIXBUF_ERROR_UNKNOWN_TYPE", "3"), ("(gint) GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION", "4"), ("(guint) GDK_PIXBUF_FORMAT_SCALABLE", "2"), ("(guint) GDK_PIXBUF_FORMAT_THREADSAFE", "4"), ("(guint) GDK_PIXBUF_FORMAT_WRITABLE", "1"), ("(gint) GDK_PIXBUF_ROTATE_CLOCKWISE", "270"), ("(gint) GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE", "90"), ("(gint) GDK_PIXBUF_ROTATE_NONE", "0"), ("(gint) GDK_PIXBUF_ROTATE_UPSIDEDOWN", "180"), ]; gdk-pixbuf-sys-0.14.0/tests/constant.c000064400000000000000000000041760072674642500157610ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #include "manual.h" #include #define PRINT_CONSTANT(CONSTANT_NAME) \ printf("%s;", #CONSTANT_NAME); \ printf(_Generic((CONSTANT_NAME), \ char *: "%s", \ const char *: "%s", \ char: "%c", \ signed char: "%hhd", \ unsigned char: "%hhu", \ short int: "%hd", \ unsigned short int: "%hu", \ int: "%d", \ unsigned int: "%u", \ long: "%ld", \ unsigned long: "%lu", \ long long: "%lld", \ unsigned long long: "%llu", \ float: "%f", \ double: "%f", \ long double: "%ld"), \ CONSTANT_NAME); \ printf("\n"); int main() { PRINT_CONSTANT((gint) GDK_COLORSPACE_RGB); PRINT_CONSTANT((gint) GDK_INTERP_BILINEAR); PRINT_CONSTANT((gint) GDK_INTERP_HYPER); PRINT_CONSTANT((gint) GDK_INTERP_NEAREST); PRINT_CONSTANT((gint) GDK_INTERP_TILES); PRINT_CONSTANT((gint) GDK_PIXBUF_ALPHA_BILEVEL); PRINT_CONSTANT((gint) GDK_PIXBUF_ALPHA_FULL); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_BAD_OPTION); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_CORRUPT_IMAGE); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_FAILED); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_UNKNOWN_TYPE); PRINT_CONSTANT((gint) GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION); PRINT_CONSTANT((guint) GDK_PIXBUF_FORMAT_SCALABLE); PRINT_CONSTANT((guint) GDK_PIXBUF_FORMAT_THREADSAFE); PRINT_CONSTANT((guint) GDK_PIXBUF_FORMAT_WRITABLE); PRINT_CONSTANT((gint) GDK_PIXBUF_ROTATE_CLOCKWISE); PRINT_CONSTANT((gint) GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); PRINT_CONSTANT((gint) GDK_PIXBUF_ROTATE_NONE); PRINT_CONSTANT((gint) GDK_PIXBUF_ROTATE_UPSIDEDOWN); return 0; } gdk-pixbuf-sys-0.14.0/tests/layout.c000064400000000000000000000034600072674642500154400ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT #include "manual.h" #include #include int main() { printf("%s;%zu;%zu\n", "GdkColorspace", sizeof(GdkColorspace), alignof(GdkColorspace)); printf("%s;%zu;%zu\n", "GdkInterpType", sizeof(GdkInterpType), alignof(GdkInterpType)); printf("%s;%zu;%zu\n", "GdkPixbufAlphaMode", sizeof(GdkPixbufAlphaMode), alignof(GdkPixbufAlphaMode)); printf("%s;%zu;%zu\n", "GdkPixbufAnimation", sizeof(GdkPixbufAnimation), alignof(GdkPixbufAnimation)); printf("%s;%zu;%zu\n", "GdkPixbufAnimationClass", sizeof(GdkPixbufAnimationClass), alignof(GdkPixbufAnimationClass)); printf("%s;%zu;%zu\n", "GdkPixbufAnimationIter", sizeof(GdkPixbufAnimationIter), alignof(GdkPixbufAnimationIter)); printf("%s;%zu;%zu\n", "GdkPixbufAnimationIterClass", sizeof(GdkPixbufAnimationIterClass), alignof(GdkPixbufAnimationIterClass)); printf("%s;%zu;%zu\n", "GdkPixbufError", sizeof(GdkPixbufError), alignof(GdkPixbufError)); printf("%s;%zu;%zu\n", "GdkPixbufFormat", sizeof(GdkPixbufFormat), alignof(GdkPixbufFormat)); printf("%s;%zu;%zu\n", "GdkPixbufFormatFlags", sizeof(GdkPixbufFormatFlags), alignof(GdkPixbufFormatFlags)); printf("%s;%zu;%zu\n", "GdkPixbufLoader", sizeof(GdkPixbufLoader), alignof(GdkPixbufLoader)); printf("%s;%zu;%zu\n", "GdkPixbufLoaderClass", sizeof(GdkPixbufLoaderClass), alignof(GdkPixbufLoaderClass)); printf("%s;%zu;%zu\n", "GdkPixbufModule", sizeof(GdkPixbufModule), alignof(GdkPixbufModule)); printf("%s;%zu;%zu\n", "GdkPixbufModulePattern", sizeof(GdkPixbufModulePattern), alignof(GdkPixbufModulePattern)); printf("%s;%zu;%zu\n", "GdkPixbufRotation", sizeof(GdkPixbufRotation), alignof(GdkPixbufRotation)); return 0; } gdk-pixbuf-sys-0.14.0/tests/manual.h000064400000000000000000000003620072674642500154030ustar 00000000000000// Feel free to edit this file, it won't be regenerated by gir generator unless removed. // The bindings include the pixbuf loader API #define GDK_PIXBUF_ENABLE_BACKEND #include #include gdk-pixbuf-sys-0.14.0/versions.txt000064400000000000000000000001720072674642500152230ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ 6ed30fc) from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)