libglycin-rebind-0.0.1/.cargo_vcs_info.json0000644000000001770000000000100142540ustar { "git": { "sha1": "fbb5e5d630e7430bd73ce6a97bc31abd0d7752f0" }, "path_in_vcs": "libglycin-rebind/libglycin-rebind" }libglycin-rebind-0.0.1/Cargo.lock0000644000000253630000000000100122330ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "bitflags" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "cfg-expr" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9acd0bdbbf4b2612d09f52ba61da432140cb10930354079d0d53fafc12968726" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-io" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "futures-task" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-macro", "futures-task", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "gio" version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daeff3dd716d1ba91850b976b76a1c2d28f99ef6c1602cd8fdaa8fab8017fd9c" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys", "glib", "libc", "pin-project-lite", "smallvec", ] [[package]] name = "gio-sys" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "171ed2f6dd927abbe108cfd9eebff2052c335013f5879d55bab0dc1dee19b706" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", "windows-sys", ] [[package]] name = "glib" version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b9dbecb1c33e483a98be4acfea2ab369e1c28f517c6eadb674537409c25c4b2" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", "memchr", "smallvec", ] [[package]] name = "glib-macros" version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "880e524e0085f3546cfb38532b2c202c0d64741d9977a6e4aa24704bfc9f19fb" dependencies = [ "heck", "proc-macro-crate", "proc-macro2", "quote", "syn", ] [[package]] name = "glib-sys" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d09d3d0fddf7239521674e57b0465dfbd844632fec54f059f7f56112e3f927e1" dependencies = [ "libc", "system-deps", ] [[package]] name = "gobject-sys" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "538e41d8776173ec107e7b0f2aceced60abc368d7e1d81c1f0e2ecd35f59080d" dependencies = [ "glib-sys", "libc", "system-deps", ] [[package]] name = "hashbrown" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indexmap" version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "libc" version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libglycin-rebind" version = "0.0.1" dependencies = [ "gio", "glib", "libc", "libglycin-rebind-sys", ] [[package]] name = "libglycin-rebind-sys" version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ae06a1ecd58360e16a9fae683452585e3aaad4a446377b3c93a49ea0918d8e6" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", "system-deps", ] [[package]] name = "memchr" version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "pin-project-lite" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "proc-macro-crate" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] name = "serde_core" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_spanned" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ "serde_core", ] [[package]] name = "slab" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "syn" version = "2.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "7.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c8f33736f986f16d69b6cb8b03f55ddcad5c41acc4ccc39dd88e84aa805e7f" dependencies = [ "cfg-expr", "heck", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "toml" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ "indexmap", "serde_core", "serde_spanned", "toml_datetime", "toml_parser", "toml_writer", "winnow", ] [[package]] name = "toml_datetime" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" version = "0.23.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" dependencies = [ "indexmap", "toml_datetime", "toml_parser", "winnow", ] [[package]] name = "toml_parser" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ "winnow", ] [[package]] name = "toml_writer" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "version-compare" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-sys" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ "windows-link", ] [[package]] name = "winnow" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] libglycin-rebind-0.0.1/Cargo.toml0000644000000025470000000000100122550ustar # 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 are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" rust-version = "1.85" name = "libglycin-rebind" version = "0.0.1" authors = ["Maximiliano Sandoval "] build = false exclude = ["Gir.toml"] autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Safe bindings for libglycin" homepage = "https://gnome.pages.gitlab.gnome.org/glycin/" readme = "README.md" keywords = [ "gnome", "glycin", ] categories = ["api-bindings"] license = "MIT" repository = "https://gitlab.gnome.org/GNOME/glycin" [package.metadata.docs.rs] all-features = true rustc-args = [ "--cfg", "docsrs", ] rustdoc-args = [ "--cfg", "docsrs", ] [lib] name = "libglycin_rebind" path = "src/lib.rs" [dependencies.ffi] version = "0.0.1" package = "libglycin-rebind-sys" [dependencies.gio] version = "0.21" [dependencies.glib] version = "0.21" [dependencies.libc] version = "0.2" libglycin-rebind-0.0.1/Cargo.toml.orig000064400000000000000000000013211046102023000157230ustar 00000000000000[package] name = "libglycin-rebind" version = "0.0.1" authors = ["Maximiliano Sandoval "] edition.workspace = true rust-version.workspace = true readme = "../README.md" description = "Safe bindings for libglycin" license = "MIT" # TODO # documentation = "" homepage.workspace = true repository.workspace = true categories = ["api-bindings"] keywords = ["gnome", "glycin"] exclude = ["Gir.toml"] [package.metadata.docs.rs] all-features = true rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] [dependencies] libc = '0.2' [dependencies.glib] version = "0.21" [dependencies.gio] version = "0.21" [dependencies.ffi] package = "libglycin-rebind-sys" path = './sys' version = "0.0.1" libglycin-rebind-0.0.1/LICENSE000064400000000000000000000017771046102023000140600ustar 00000000000000Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. libglycin-rebind-0.0.1/README.md000064400000000000000000000012451046102023000143200ustar 00000000000000# Rust libglycin bindings The Rust bindings for [libglycin](https://gitlab.gnome.org/GNOME/glycin). This package contains safe Rust bindings for the libglycin C library. Since glycin is written in Rust, the native [`glycin`] crate is available to use the same features. One of the main purposes of *libglycin-rebind* is to reduce the binary sice. To use this package, the *libglycin-2* library has to be available on the system. If you use the native [`glycin`] crate, this is not required. libglycin-rebind-0.0.1/src/auto/cicp.rs000064400000000000000000000006111046102023000160600ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use glib::translate::*; use crate::ffi; glib::wrapper! { pub struct Cicp(BoxedInline); match fn { copy => |ptr| ffi::gly_cicp_copy(mut_override(ptr)), free => |ptr| ffi::gly_cicp_free(ptr), type_ => || ffi::gly_cicp_get_type(), } } libglycin-rebind-0.0.1/src/auto/creator.rs000064400000000000000000000222001046102023000165770ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use std::boxed::Box as Box_; use std::pin::Pin; use glib::prelude::*; use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; use crate::{ffi, EncodedImage, MemoryFormat, NewFrame, SandboxSelector}; glib::wrapper! { #[doc(alias = "GlyCreator")] pub struct Creator(Object); match fn { type_ => || ffi::gly_creator_get_type(), } } impl Creator { #[doc(alias = "gly_creator_new")] pub fn new(mime_type: &str) -> Result { assert_initialized_main_thread!(); unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_creator_new(mime_type.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } // rustdoc-stripper-ignore-next /// Creates a new builder-pattern struct instance to construct [`Creator`] /// objects. /// /// This method returns an instance of /// [`CreatorBuilder`](crate::builders::CreatorBuilder) which can be used to /// create [`Creator`] objects. pub fn builder() -> CreatorBuilder { CreatorBuilder::new() } #[doc(alias = "gly_creator_add_frame")] pub fn add_frame( &self, width: u32, height: u32, memory_format: MemoryFormat, texture: &glib::Bytes, ) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_creator_add_frame( self.to_glib_none().0, width, height, memory_format.into_glib(), texture.to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gly_creator_add_frame_with_stride")] pub fn add_frame_with_stride( &self, width: u32, height: u32, stride: u32, memory_format: MemoryFormat, texture: &glib::Bytes, ) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_creator_add_frame_with_stride( self.to_glib_none().0, width, height, stride, memory_format.into_glib(), texture.to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gly_creator_add_metadata_key_value")] pub fn add_metadata_key_value(&self, key: &str, value: &str) -> bool { unsafe { from_glib(ffi::gly_creator_add_metadata_key_value( self.to_glib_none().0, key.to_glib_none().0, value.to_glib_none().0, )) } } #[doc(alias = "gly_creator_create")] pub fn create(&self) -> Result, glib::Error> { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_creator_create(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gly_creator_create_async")] pub fn create_async) + 'static>( &self, cancellable: Option<&impl IsA>, callback: P, ) { let main_context = glib::MainContext::ref_thread_default(); let is_main_context_owner = main_context.is_owner(); let has_acquired_main_context = (!is_main_context_owner) .then(|| main_context.acquire().ok()) .flatten(); assert!( is_main_context_owner || has_acquired_main_context.is_some(), "Async operations only allowed if the thread is owning the MainContext" ); let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn create_async_trampoline< P: FnOnce(Result) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { let mut error = std::ptr::null_mut(); let ret = ffi::gly_creator_create_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; let callback: Box_> = Box_::from_raw(user_data as *mut _); let callback: P = callback.into_inner(); callback(result); } let callback = create_async_trampoline::

; unsafe { ffi::gly_creator_create_async( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _, ); } } pub fn create_future( &self, ) -> Pin> + 'static>> { Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { obj.create_async(Some(cancellable), move |res| { send.resolve(res); }); })) } #[doc(alias = "gly_creator_set_encoding_compression")] pub fn set_encoding_compression(&self, compression: u8) -> bool { unsafe { from_glib(ffi::gly_creator_set_encoding_compression( self.to_glib_none().0, compression, )) } } #[doc(alias = "gly_creator_set_encoding_quality")] pub fn set_encoding_quality(&self, quality: u8) -> bool { unsafe { from_glib(ffi::gly_creator_set_encoding_quality( self.to_glib_none().0, quality, )) } } #[doc(alias = "gly_creator_set_sandbox_selector")] #[doc(alias = "sandbox-selector")] pub fn set_sandbox_selector(&self, sandbox_selector: SandboxSelector) -> bool { unsafe { from_glib(ffi::gly_creator_set_sandbox_selector( self.to_glib_none().0, sandbox_selector.into_glib(), )) } } #[doc(alias = "mime-type")] pub fn mime_type(&self) -> Option { ObjectExt::property(self, "mime-type") } #[doc(alias = "sandbox-selector")] pub fn sandbox_selector(&self) -> SandboxSelector { ObjectExt::property(self, "sandbox-selector") } #[doc(alias = "sandbox-selector")] pub fn connect_sandbox_selector_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_sandbox_selector_trampoline( this: *mut ffi::GlyCreator, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::sandbox-selector".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_sandbox_selector_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } // rustdoc-stripper-ignore-next /// A [builder-pattern] type to construct [`Creator`] objects. /// /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html #[must_use = "The builder must be built to be used"] pub struct CreatorBuilder { builder: glib::object::ObjectBuilder<'static, Creator>, } impl CreatorBuilder { fn new() -> Self { Self { builder: glib::object::Object::builder(), } } pub fn mime_type(self, mime_type: impl Into) -> Self { Self { builder: self.builder.property("mime-type", mime_type.into()), } } pub fn sandbox_selector(self, sandbox_selector: SandboxSelector) -> Self { Self { builder: self.builder.property("sandbox-selector", sandbox_selector), } } // rustdoc-stripper-ignore-next /// Build the [`Creator`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] pub fn build(self) -> Creator { assert_initialized_main_thread!(); self.builder.build() } } libglycin-rebind-0.0.1/src/auto/encoded_image.rs000064400000000000000000000030161046102023000177070ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use std::boxed::Box as Box_; use glib::prelude::*; use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; use crate::ffi; glib::wrapper! { #[doc(alias = "GlyEncodedImage")] pub struct EncodedImage(Object); match fn { type_ => || ffi::gly_encoded_image_get_type(), } } impl EncodedImage { #[doc(alias = "gly_encoded_image_get_data")] #[doc(alias = "get_data")] pub fn data(&self) -> glib::Bytes { unsafe { from_glib_full(ffi::gly_encoded_image_get_data(self.to_glib_none().0)) } } #[doc(alias = "data")] pub fn connect_data_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_data_trampoline( this: *mut ffi::GlyEncodedImage, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::data".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_data_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } libglycin-rebind-0.0.1/src/auto/enums.rs000064400000000000000000000242311046102023000162750ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use glib::prelude::*; use glib::translate::*; use crate::ffi; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GlyMemoryFormat")] pub enum MemoryFormat { #[doc(alias = "GLY_MEMORY_B8G8R8A8_PREMULTIPLIED")] B8g8r8a8Premultiplied, #[doc(alias = "GLY_MEMORY_A8R8G8B8_PREMULTIPLIED")] A8r8g8b8Premultiplied, #[doc(alias = "GLY_MEMORY_R8G8B8A8_PREMULTIPLIED")] R8g8b8a8Premultiplied, #[doc(alias = "GLY_MEMORY_B8G8R8A8")] B8g8r8a8, #[doc(alias = "GLY_MEMORY_A8R8G8B8")] A8r8g8b8, #[doc(alias = "GLY_MEMORY_R8G8B8A8")] R8g8b8a8, #[doc(alias = "GLY_MEMORY_A8B8G8R8")] A8b8g8r8, #[doc(alias = "GLY_MEMORY_R8G8B8")] R8g8b8, #[doc(alias = "GLY_MEMORY_B8G8R8")] B8g8r8, #[doc(alias = "GLY_MEMORY_R16G16B16")] R16g16b16, #[doc(alias = "GLY_MEMORY_R16G16B16A16_PREMULTIPLIED")] R16g16b16a16Premultiplied, #[doc(alias = "GLY_MEMORY_R16G16B16A16")] R16g16b16a16, #[doc(alias = "GLY_MEMORY_R16G16B16_FLOAT")] R16g16b16Float, #[doc(alias = "GLY_MEMORY_R16G16B16A16_FLOAT")] R16g16b16a16Float, #[doc(alias = "GLY_MEMORY_R32G32B32_FLOAT")] R32g32b32Float, #[doc(alias = "GLY_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED")] R32g32b32a32FloatPremultiplied, #[doc(alias = "GLY_MEMORY_R32G32B32A32_FLOAT")] R32g32b32a32Float, #[doc(alias = "GLY_MEMORY_G8A8_PREMULTIPLIED")] G8a8Premultiplied, #[doc(alias = "GLY_MEMORY_G8A8")] G8a8, #[doc(alias = "GLY_MEMORY_G8")] G8, #[doc(alias = "GLY_MEMORY_G16A16_PREMULTIPLIED")] G16a16Premultiplied, #[doc(alias = "GLY_MEMORY_G16A16")] G16a16, #[doc(alias = "GLY_MEMORY_G16")] G16, #[doc(hidden)] __Unknown(i32), } impl MemoryFormat { #[doc(alias = "gly_memory_format_has_alpha")] pub fn has_alpha(self) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gly_memory_format_has_alpha(self.into_glib())) } } #[doc(alias = "gly_memory_format_is_premultiplied")] pub fn is_premultiplied(self) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gly_memory_format_is_premultiplied(self.into_glib())) } } } #[doc(hidden)] impl IntoGlib for MemoryFormat { type GlibType = ffi::GlyMemoryFormat; fn into_glib(self) -> ffi::GlyMemoryFormat { match self { Self::B8g8r8a8Premultiplied => ffi::GLY_MEMORY_B8G8R8A8_PREMULTIPLIED, Self::A8r8g8b8Premultiplied => ffi::GLY_MEMORY_A8R8G8B8_PREMULTIPLIED, Self::R8g8b8a8Premultiplied => ffi::GLY_MEMORY_R8G8B8A8_PREMULTIPLIED, Self::B8g8r8a8 => ffi::GLY_MEMORY_B8G8R8A8, Self::A8r8g8b8 => ffi::GLY_MEMORY_A8R8G8B8, Self::R8g8b8a8 => ffi::GLY_MEMORY_R8G8B8A8, Self::A8b8g8r8 => ffi::GLY_MEMORY_A8B8G8R8, Self::R8g8b8 => ffi::GLY_MEMORY_R8G8B8, Self::B8g8r8 => ffi::GLY_MEMORY_B8G8R8, Self::R16g16b16 => ffi::GLY_MEMORY_R16G16B16, Self::R16g16b16a16Premultiplied => ffi::GLY_MEMORY_R16G16B16A16_PREMULTIPLIED, Self::R16g16b16a16 => ffi::GLY_MEMORY_R16G16B16A16, Self::R16g16b16Float => ffi::GLY_MEMORY_R16G16B16_FLOAT, Self::R16g16b16a16Float => ffi::GLY_MEMORY_R16G16B16A16_FLOAT, Self::R32g32b32Float => ffi::GLY_MEMORY_R32G32B32_FLOAT, Self::R32g32b32a32FloatPremultiplied => { ffi::GLY_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED } Self::R32g32b32a32Float => ffi::GLY_MEMORY_R32G32B32A32_FLOAT, Self::G8a8Premultiplied => ffi::GLY_MEMORY_G8A8_PREMULTIPLIED, Self::G8a8 => ffi::GLY_MEMORY_G8A8, Self::G8 => ffi::GLY_MEMORY_G8, Self::G16a16Premultiplied => ffi::GLY_MEMORY_G16A16_PREMULTIPLIED, Self::G16a16 => ffi::GLY_MEMORY_G16A16, Self::G16 => ffi::GLY_MEMORY_G16, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for MemoryFormat { unsafe fn from_glib(value: ffi::GlyMemoryFormat) -> Self { skip_assert_initialized!(); match value { ffi::GLY_MEMORY_B8G8R8A8_PREMULTIPLIED => Self::B8g8r8a8Premultiplied, ffi::GLY_MEMORY_A8R8G8B8_PREMULTIPLIED => Self::A8r8g8b8Premultiplied, ffi::GLY_MEMORY_R8G8B8A8_PREMULTIPLIED => Self::R8g8b8a8Premultiplied, ffi::GLY_MEMORY_B8G8R8A8 => Self::B8g8r8a8, ffi::GLY_MEMORY_A8R8G8B8 => Self::A8r8g8b8, ffi::GLY_MEMORY_R8G8B8A8 => Self::R8g8b8a8, ffi::GLY_MEMORY_A8B8G8R8 => Self::A8b8g8r8, ffi::GLY_MEMORY_R8G8B8 => Self::R8g8b8, ffi::GLY_MEMORY_B8G8R8 => Self::B8g8r8, ffi::GLY_MEMORY_R16G16B16 => Self::R16g16b16, ffi::GLY_MEMORY_R16G16B16A16_PREMULTIPLIED => Self::R16g16b16a16Premultiplied, ffi::GLY_MEMORY_R16G16B16A16 => Self::R16g16b16a16, ffi::GLY_MEMORY_R16G16B16_FLOAT => Self::R16g16b16Float, ffi::GLY_MEMORY_R16G16B16A16_FLOAT => Self::R16g16b16a16Float, ffi::GLY_MEMORY_R32G32B32_FLOAT => Self::R32g32b32Float, ffi::GLY_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED => { Self::R32g32b32a32FloatPremultiplied } ffi::GLY_MEMORY_R32G32B32A32_FLOAT => Self::R32g32b32a32Float, ffi::GLY_MEMORY_G8A8_PREMULTIPLIED => Self::G8a8Premultiplied, ffi::GLY_MEMORY_G8A8 => Self::G8a8, ffi::GLY_MEMORY_G8 => Self::G8, ffi::GLY_MEMORY_G16A16_PREMULTIPLIED => Self::G16a16Premultiplied, ffi::GLY_MEMORY_G16A16 => Self::G16a16, ffi::GLY_MEMORY_G16 => Self::G16, value => Self::__Unknown(value), } } } impl StaticType for MemoryFormat { #[inline] #[doc(alias = "gly_memory_format_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gly_memory_format_get_type()) } } } impl glib::HasParamSpec for MemoryFormat { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for MemoryFormat { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for MemoryFormat { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for MemoryFormat { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: MemoryFormat) -> Self { skip_assert_initialized!(); ToValue::to_value(&v) } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GlySandboxSelector")] pub enum SandboxSelector { #[doc(alias = "GLY_SANDBOX_SELECTOR_AUTO")] Auto, #[doc(alias = "GLY_SANDBOX_SELECTOR_BWRAP")] Bwrap, #[doc(alias = "GLY_SANDBOX_SELECTOR_FLATPAK_SPAWN")] FlatpakSpawn, #[doc(alias = "GLY_SANDBOX_SELECTOR_NOT_SANDBOXED")] NotSandboxed, #[doc(hidden)] __Unknown(i32), } #[doc(hidden)] impl IntoGlib for SandboxSelector { type GlibType = ffi::GlySandboxSelector; #[inline] fn into_glib(self) -> ffi::GlySandboxSelector { match self { Self::Auto => ffi::GLY_SANDBOX_SELECTOR_AUTO, Self::Bwrap => ffi::GLY_SANDBOX_SELECTOR_BWRAP, Self::FlatpakSpawn => ffi::GLY_SANDBOX_SELECTOR_FLATPAK_SPAWN, Self::NotSandboxed => ffi::GLY_SANDBOX_SELECTOR_NOT_SANDBOXED, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for SandboxSelector { #[inline] unsafe fn from_glib(value: ffi::GlySandboxSelector) -> Self { skip_assert_initialized!(); match value { ffi::GLY_SANDBOX_SELECTOR_AUTO => Self::Auto, ffi::GLY_SANDBOX_SELECTOR_BWRAP => Self::Bwrap, ffi::GLY_SANDBOX_SELECTOR_FLATPAK_SPAWN => Self::FlatpakSpawn, ffi::GLY_SANDBOX_SELECTOR_NOT_SANDBOXED => Self::NotSandboxed, value => Self::__Unknown(value), } } } impl StaticType for SandboxSelector { #[inline] #[doc(alias = "gly_sandbox_selector_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gly_sandbox_selector_get_type()) } } } impl glib::HasParamSpec for SandboxSelector { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder_with_default } } impl glib::value::ValueType for SandboxSelector { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for SandboxSelector { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for SandboxSelector { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: SandboxSelector) -> Self { skip_assert_initialized!(); ToValue::to_value(&v) } } libglycin-rebind-0.0.1/src/auto/flags.rs000064400000000000000000000126311046102023000162430ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use glib::bitflags::bitflags; use glib::prelude::*; use glib::translate::*; use crate::ffi; bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "GlyMemoryFormatSelection")] pub struct MemoryFormatSelection: u32 { #[doc(alias = "GLY_MEMORY_SELECTION_B8G8R8A8_PREMULTIPLIED")] const B8G8R8A8_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_B8G8R8A8_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_A8R8G8B8_PREMULTIPLIED")] const A8R8G8B8_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_A8R8G8B8_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_R8G8B8A8_PREMULTIPLIED")] const R8G8B8A8_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_R8G8B8A8_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_B8G8R8A8")] const B8G8R8A8 = ffi::GLY_MEMORY_SELECTION_B8G8R8A8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_A8R8G8B8")] const A8R8G8B8 = ffi::GLY_MEMORY_SELECTION_A8R8G8B8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_R8G8B8A8")] const R8G8B8A8 = ffi::GLY_MEMORY_SELECTION_R8G8B8A8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_A8B8G8R8")] const A8B8G8R8 = ffi::GLY_MEMORY_SELECTION_A8B8G8R8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_R8G8B8")] const R8G8B8 = ffi::GLY_MEMORY_SELECTION_R8G8B8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_B8G8R8")] const B8G8R8 = ffi::GLY_MEMORY_SELECTION_B8G8R8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_R16G16B16")] const R16G16B16 = ffi::GLY_MEMORY_SELECTION_R16G16B16 as _; #[doc(alias = "GLY_MEMORY_SELECTION_R16G16B16A16_PREMULTIPLIED")] const R16G16B16A16_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_R16G16B16A16_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_R16G16B16A16")] const R16G16B16A16 = ffi::GLY_MEMORY_SELECTION_R16G16B16A16 as _; #[doc(alias = "GLY_MEMORY_SELECTION_R16G16B16_FLOAT")] const R16G16B16_FLOAT = ffi::GLY_MEMORY_SELECTION_R16G16B16_FLOAT as _; #[doc(alias = "GLY_MEMORY_SELECTION_R16G16B16A16_FLOAT")] const R16G16B16A16_FLOAT = ffi::GLY_MEMORY_SELECTION_R16G16B16A16_FLOAT as _; #[doc(alias = "GLY_MEMORY_SELECTION_R32G32B32_FLOAT")] const R32G32B32_FLOAT = ffi::GLY_MEMORY_SELECTION_R32G32B32_FLOAT as _; #[doc(alias = "GLY_MEMORY_SELECTION_R32G32B32A32_FLOAT_PREMULTIPLIED")] const R32G32B32A32_FLOAT_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_R32G32B32A32_FLOAT_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_R32G32B32A32_FLOAT")] const R32G32B32A32_FLOAT = ffi::GLY_MEMORY_SELECTION_R32G32B32A32_FLOAT as _; #[doc(alias = "GLY_MEMORY_SELECTION_G8A8_PREMULTIPLIED")] const G8A8_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_G8A8_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_G8A8")] const G8A8 = ffi::GLY_MEMORY_SELECTION_G8A8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_G8")] const G8 = ffi::GLY_MEMORY_SELECTION_G8 as _; #[doc(alias = "GLY_MEMORY_SELECTION_G16A16_PREMULTIPLIED")] const G16A16_PREMULTIPLIED = ffi::GLY_MEMORY_SELECTION_G16A16_PREMULTIPLIED as _; #[doc(alias = "GLY_MEMORY_SELECTION_G16A16")] const G16A16 = ffi::GLY_MEMORY_SELECTION_G16A16 as _; #[doc(alias = "GLY_MEMORY_SELECTION_G16")] const G16 = ffi::GLY_MEMORY_SELECTION_G16 as _; } } #[doc(hidden)] impl IntoGlib for MemoryFormatSelection { type GlibType = ffi::GlyMemoryFormatSelection; #[inline] fn into_glib(self) -> ffi::GlyMemoryFormatSelection { self.bits() } } #[doc(hidden)] impl FromGlib for MemoryFormatSelection { #[inline] unsafe fn from_glib(value: ffi::GlyMemoryFormatSelection) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for MemoryFormatSelection { #[inline] #[doc(alias = "gly_memory_format_selection_get_type")] fn static_type() -> glib::Type { unsafe { from_glib(ffi::gly_memory_format_selection_get_type()) } } } impl glib::HasParamSpec for MemoryFormatSelection { type ParamSpec = glib::ParamSpecFlags; type SetValue = Self; type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; fn param_spec_builder() -> Self::BuilderFn { Self::ParamSpec::builder } } impl glib::value::ValueType for MemoryFormatSelection { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for MemoryFormatSelection { type Checker = glib::value::GenericValueTypeChecker; #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for MemoryFormatSelection { #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } } impl From for glib::Value { #[inline] fn from(v: MemoryFormatSelection) -> Self { skip_assert_initialized!(); ToValue::to_value(&v) } } libglycin-rebind-0.0.1/src/auto/frame.rs000064400000000000000000000033671046102023000162470ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use glib::translate::*; use crate::{ffi, Cicp, MemoryFormat}; glib::wrapper! { #[doc(alias = "GlyFrame")] pub struct Frame(Object); match fn { type_ => || ffi::gly_frame_get_type(), } } impl Frame { #[doc(alias = "gly_frame_get_buf_bytes")] #[doc(alias = "get_buf_bytes")] pub fn buf_bytes(&self) -> glib::Bytes { unsafe { from_glib_none(ffi::gly_frame_get_buf_bytes(self.to_glib_none().0)) } } #[doc(alias = "gly_frame_get_color_cicp")] #[doc(alias = "get_color_cicp")] pub fn color_cicp(&self) -> Option { unsafe { from_glib_full(ffi::gly_frame_get_color_cicp(self.to_glib_none().0)) } } #[doc(alias = "gly_frame_get_delay")] #[doc(alias = "get_delay")] pub fn delay(&self) -> i64 { unsafe { ffi::gly_frame_get_delay(self.to_glib_none().0) } } #[doc(alias = "gly_frame_get_height")] #[doc(alias = "get_height")] pub fn height(&self) -> u32 { unsafe { ffi::gly_frame_get_height(self.to_glib_none().0) } } #[doc(alias = "gly_frame_get_memory_format")] #[doc(alias = "get_memory_format")] pub fn memory_format(&self) -> MemoryFormat { unsafe { from_glib(ffi::gly_frame_get_memory_format(self.to_glib_none().0)) } } #[doc(alias = "gly_frame_get_stride")] #[doc(alias = "get_stride")] pub fn stride(&self) -> u32 { unsafe { ffi::gly_frame_get_stride(self.to_glib_none().0) } } #[doc(alias = "gly_frame_get_width")] #[doc(alias = "get_width")] pub fn width(&self) -> u32 { unsafe { ffi::gly_frame_get_width(self.to_glib_none().0) } } } libglycin-rebind-0.0.1/src/auto/frame_request.rs000064400000000000000000000132011046102023000200030ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use std::boxed::Box as Box_; use glib::prelude::*; use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; use crate::ffi; glib::wrapper! { #[doc(alias = "GlyFrameRequest")] pub struct FrameRequest(Object); match fn { type_ => || ffi::gly_frame_request_get_type(), } } impl FrameRequest { #[doc(alias = "gly_frame_request_new")] pub fn new() -> FrameRequest { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gly_frame_request_new()) } } // rustdoc-stripper-ignore-next /// Creates a new builder-pattern struct instance to construct /// [`FrameRequest`] objects. /// /// This method returns an instance of /// [`FrameRequestBuilder`](crate::builders::FrameRequestBuilder) which can /// be used to create [`FrameRequest`] objects. pub fn builder() -> FrameRequestBuilder { FrameRequestBuilder::new() } #[doc(alias = "gly_frame_request_set_loop_animation")] #[doc(alias = "loop-animation")] pub fn set_loop_animation(&self, loop_animation: bool) { unsafe { ffi::gly_frame_request_set_loop_animation( self.to_glib_none().0, loop_animation.into_glib(), ); } } #[doc(alias = "gly_frame_request_set_scale")] pub fn set_scale(&self, width: u32, height: u32) { unsafe { ffi::gly_frame_request_set_scale(self.to_glib_none().0, width, height); } } #[doc(alias = "loop-animation")] pub fn is_loop_animation(&self) -> bool { ObjectExt::property(self, "loop-animation") } #[doc(alias = "scale-height")] pub fn scale_height(&self) -> u32 { ObjectExt::property(self, "scale-height") } #[doc(alias = "scale-width")] pub fn scale_width(&self) -> u32 { ObjectExt::property(self, "scale-width") } #[doc(alias = "loop-animation")] pub fn connect_loop_animation_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_loop_animation_trampoline( this: *mut ffi::GlyFrameRequest, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::loop-animation".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_loop_animation_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "scale-height")] pub fn connect_scale_height_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_scale_height_trampoline( this: *mut ffi::GlyFrameRequest, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::scale-height".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_scale_height_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "scale-width")] pub fn connect_scale_width_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_scale_width_trampoline( this: *mut ffi::GlyFrameRequest, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::scale-width".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_scale_width_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl Default for FrameRequest { fn default() -> Self { Self::new() } } // rustdoc-stripper-ignore-next /// A [builder-pattern] type to construct [`FrameRequest`] objects. /// /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html #[must_use = "The builder must be built to be used"] pub struct FrameRequestBuilder { builder: glib::object::ObjectBuilder<'static, FrameRequest>, } impl FrameRequestBuilder { fn new() -> Self { Self { builder: glib::object::Object::builder(), } } pub fn loop_animation(self, loop_animation: bool) -> Self { Self { builder: self.builder.property("loop-animation", loop_animation), } } // rustdoc-stripper-ignore-next /// Build the [`FrameRequest`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] pub fn build(self) -> FrameRequest { assert_initialized_main_thread!(); self.builder.build() } } libglycin-rebind-0.0.1/src/auto/image.rs000064400000000000000000000174511046102023000162360ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use std::boxed::Box as Box_; use std::pin::Pin; use glib::prelude::*; use glib::translate::*; use crate::{ffi, Frame, FrameRequest}; glib::wrapper! { #[doc(alias = "GlyImage")] pub struct Image(Object); match fn { type_ => || ffi::gly_image_get_type(), } } impl Image { #[doc(alias = "gly_image_get_height")] #[doc(alias = "get_height")] pub fn height(&self) -> u32 { unsafe { ffi::gly_image_get_height(self.to_glib_none().0) } } #[doc(alias = "gly_image_get_metadata_key_value")] #[doc(alias = "get_metadata_key_value")] pub fn metadata_key_value(&self, key: &str) -> Option { unsafe { from_glib_full(ffi::gly_image_get_metadata_key_value( self.to_glib_none().0, key.to_glib_none().0, )) } } #[doc(alias = "gly_image_get_metadata_keys")] #[doc(alias = "get_metadata_keys")] pub fn metadata_keys(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gly_image_get_metadata_keys( self.to_glib_none().0, )) } } #[doc(alias = "gly_image_get_mime_type")] #[doc(alias = "get_mime_type")] pub fn mime_type(&self) -> glib::GString { unsafe { from_glib_none(ffi::gly_image_get_mime_type(self.to_glib_none().0)) } } #[doc(alias = "gly_image_get_specific_frame")] #[doc(alias = "get_specific_frame")] pub fn specific_frame(&self, frame_request: &FrameRequest) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_image_get_specific_frame( self.to_glib_none().0, frame_request.to_glib_none().0, &mut error, ); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gly_image_get_specific_frame_async")] #[doc(alias = "get_specific_frame_async")] pub fn specific_frame_async) + 'static>( &self, frame_request: &FrameRequest, cancellable: Option<&impl IsA>, callback: P, ) { let main_context = glib::MainContext::ref_thread_default(); let is_main_context_owner = main_context.is_owner(); let has_acquired_main_context = (!is_main_context_owner) .then(|| main_context.acquire().ok()) .flatten(); assert!( is_main_context_owner || has_acquired_main_context.is_some(), "Async operations only allowed if the thread is owning the MainContext" ); let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn specific_frame_async_trampoline< P: FnOnce(Result) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { let mut error = std::ptr::null_mut(); let ret = ffi::gly_image_get_specific_frame_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; let callback: Box_> = Box_::from_raw(user_data as *mut _); let callback: P = callback.into_inner(); callback(result); } let callback = specific_frame_async_trampoline::

; unsafe { ffi::gly_image_get_specific_frame_async( self.to_glib_none().0, frame_request.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _, ); } } pub fn specific_frame_future( &self, frame_request: &FrameRequest, ) -> Pin> + 'static>> { let frame_request = frame_request.clone(); Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { obj.specific_frame_async(&frame_request, Some(cancellable), move |res| { send.resolve(res); }); })) } #[doc(alias = "gly_image_get_transformation_orientation")] #[doc(alias = "get_transformation_orientation")] pub fn transformation_orientation(&self) -> u16 { unsafe { ffi::gly_image_get_transformation_orientation(self.to_glib_none().0) } } #[doc(alias = "gly_image_get_width")] #[doc(alias = "get_width")] pub fn width(&self) -> u32 { unsafe { ffi::gly_image_get_width(self.to_glib_none().0) } } #[doc(alias = "gly_image_next_frame")] pub fn next_frame(&self) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_image_next_frame(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gly_image_next_frame_async")] pub fn next_frame_async) + 'static>( &self, cancellable: Option<&impl IsA>, callback: P, ) { let main_context = glib::MainContext::ref_thread_default(); let is_main_context_owner = main_context.is_owner(); let has_acquired_main_context = (!is_main_context_owner) .then(|| main_context.acquire().ok()) .flatten(); assert!( is_main_context_owner || has_acquired_main_context.is_some(), "Async operations only allowed if the thread is owning the MainContext" ); let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn next_frame_async_trampoline< P: FnOnce(Result) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { let mut error = std::ptr::null_mut(); let ret = ffi::gly_image_next_frame_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; let callback: Box_> = Box_::from_raw(user_data as *mut _); let callback: P = callback.into_inner(); callback(result); } let callback = next_frame_async_trampoline::

; unsafe { ffi::gly_image_next_frame_async( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _, ); } } pub fn next_frame_future( &self, ) -> Pin> + 'static>> { Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { obj.next_frame_async(Some(cancellable), move |res| { send.resolve(res); }); })) } } libglycin-rebind-0.0.1/src/auto/loader.rs000064400000000000000000000364341046102023000164240ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use std::boxed::Box as Box_; use std::pin::Pin; use glib::prelude::*; use glib::signal::{connect_raw, SignalHandlerId}; use glib::translate::*; use crate::{ffi, Image, MemoryFormatSelection, SandboxSelector}; glib::wrapper! { #[doc(alias = "GlyLoader")] pub struct Loader(Object); match fn { type_ => || ffi::gly_loader_get_type(), } } impl Loader { #[doc(alias = "gly_loader_new")] pub fn new(file: &impl IsA) -> Loader { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gly_loader_new(file.as_ref().to_glib_none().0)) } } #[doc(alias = "gly_loader_new_for_bytes")] #[doc(alias = "new_for_bytes")] pub fn for_bytes(bytes: &glib::Bytes) -> Loader { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gly_loader_new_for_bytes(bytes.to_glib_none().0)) } } #[doc(alias = "gly_loader_new_for_stream")] #[doc(alias = "new_for_stream")] pub fn for_stream(stream: &impl IsA) -> Loader { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gly_loader_new_for_stream( stream.as_ref().to_glib_none().0, )) } } // rustdoc-stripper-ignore-next /// Creates a new builder-pattern struct instance to construct [`Loader`] /// objects. /// /// This method returns an instance of /// [`LoaderBuilder`](crate::builders::LoaderBuilder) which can be used to /// create [`Loader`] objects. pub fn builder() -> LoaderBuilder { LoaderBuilder::new() } #[doc(alias = "gly_loader_load")] pub fn load(&self) -> Result { unsafe { let mut error = std::ptr::null_mut(); let ret = ffi::gly_loader_load(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gly_loader_load_async")] pub fn load_async) + 'static>( &self, cancellable: Option<&impl IsA>, callback: P, ) { let main_context = glib::MainContext::ref_thread_default(); let is_main_context_owner = main_context.is_owner(); let has_acquired_main_context = (!is_main_context_owner) .then(|| main_context.acquire().ok()) .flatten(); assert!( is_main_context_owner || has_acquired_main_context.is_some(), "Async operations only allowed if the thread is owning the MainContext" ); let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn load_async_trampoline< P: FnOnce(Result) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { let mut error = std::ptr::null_mut(); let ret = ffi::gly_loader_load_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; let callback: Box_> = Box_::from_raw(user_data as *mut _); let callback: P = callback.into_inner(); callback(result); } let callback = load_async_trampoline::

; unsafe { ffi::gly_loader_load_async( self.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _, ); } } pub fn load_future( &self, ) -> Pin> + 'static>> { Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { obj.load_async(Some(cancellable), move |res| { send.resolve(res); }); })) } #[doc(alias = "gly_loader_set_accepted_memory_formats")] pub fn set_accepted_memory_formats(&self, memory_format_selection: MemoryFormatSelection) { unsafe { ffi::gly_loader_set_accepted_memory_formats( self.to_glib_none().0, memory_format_selection.into_glib(), ); } } #[doc(alias = "gly_loader_set_apply_transformations")] pub fn set_apply_transformations(&self, apply_transformations: bool) { unsafe { ffi::gly_loader_set_apply_transformations( self.to_glib_none().0, apply_transformations.into_glib(), ); } } #[doc(alias = "gly_loader_set_sandbox_selector")] #[doc(alias = "sandbox-selector")] pub fn set_sandbox_selector(&self, sandbox_selector: SandboxSelector) { unsafe { ffi::gly_loader_set_sandbox_selector( self.to_glib_none().0, sandbox_selector.into_glib(), ); } } #[doc(alias = "apply-transformation")] pub fn is_apply_transformation(&self) -> bool { ObjectExt::property(self, "apply-transformation") } #[doc(alias = "apply-transformation")] pub fn set_apply_transformation(&self, apply_transformation: bool) { ObjectExt::set_property(self, "apply-transformation", apply_transformation) } pub fn bytes(&self) -> Option { ObjectExt::property(self, "bytes") } pub fn cancellable(&self) -> Option { ObjectExt::property(self, "cancellable") } pub fn set_cancellable>(&self, cancellable: Option<&P>) { ObjectExt::set_property(self, "cancellable", cancellable) } pub fn file(&self) -> Option { ObjectExt::property(self, "file") } #[doc(alias = "memory-format-selection")] pub fn memory_format_selection(&self) -> MemoryFormatSelection { ObjectExt::property(self, "memory-format-selection") } #[doc(alias = "memory-format-selection")] pub fn set_memory_format_selection(&self, memory_format_selection: MemoryFormatSelection) { ObjectExt::set_property(self, "memory-format-selection", memory_format_selection) } #[doc(alias = "sandbox-selector")] pub fn sandbox_selector(&self) -> SandboxSelector { ObjectExt::property(self, "sandbox-selector") } pub fn stream(&self) -> Option { ObjectExt::property(self, "stream") } #[doc(alias = "gly_loader_get_mime_types")] #[doc(alias = "get_mime_types")] pub fn mime_types() -> Vec { assert_initialized_main_thread!(); unsafe { FromGlibPtrContainer::from_glib_full(ffi::gly_loader_get_mime_types()) } } #[doc(alias = "gly_loader_get_mime_types_async")] #[doc(alias = "get_mime_types_async")] pub fn mime_types_async, glib::Error>) + 'static>( cancellable: Option<&impl IsA>, callback: P, ) { assert_initialized_main_thread!(); let main_context = glib::MainContext::ref_thread_default(); let is_main_context_owner = main_context.is_owner(); let has_acquired_main_context = (!is_main_context_owner) .then(|| main_context.acquire().ok()) .flatten(); assert!( is_main_context_owner || has_acquired_main_context.is_some(), "Async operations only allowed if the thread is owning the MainContext" ); let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn mime_types_async_trampoline< P: FnOnce(Result, glib::Error>) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, user_data: glib::ffi::gpointer, ) { let mut error = std::ptr::null_mut(); let ret = ffi::gly_loader_get_mime_types_finish(res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; let callback: Box_> = Box_::from_raw(user_data as *mut _); let callback: P = callback.into_inner(); callback(result); } let callback = mime_types_async_trampoline::

; unsafe { ffi::gly_loader_get_mime_types_async( cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box_::into_raw(user_data) as *mut _, ); } } pub fn mime_types_future() -> Pin< Box_, glib::Error>> + 'static>, > { skip_assert_initialized!(); Box_::pin(gio::GioFuture::new(&(), move |_obj, cancellable, send| { Self::mime_types_async(Some(cancellable), move |res| { send.resolve(res); }); })) } #[doc(alias = "apply-transformation")] pub fn connect_apply_transformation_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_apply_transformation_trampoline( this: *mut ffi::GlyLoader, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::apply-transformation".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_apply_transformation_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "cancellable")] pub fn connect_cancellable_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_cancellable_trampoline( this: *mut ffi::GlyLoader, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::cancellable".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_cancellable_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "memory-format-selection")] pub fn connect_memory_format_selection_notify( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_memory_format_selection_trampoline( this: *mut ffi::GlyLoader, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::memory-format-selection".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_memory_format_selection_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "sandbox-selector")] pub fn connect_sandbox_selector_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_sandbox_selector_trampoline( this: *mut ffi::GlyLoader, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, c"notify::sandbox-selector".as_ptr() as *const _, Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( notify_sandbox_selector_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl Default for Loader { fn default() -> Self { glib::object::Object::new::() } } // rustdoc-stripper-ignore-next /// A [builder-pattern] type to construct [`Loader`] objects. /// /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html #[must_use = "The builder must be built to be used"] pub struct LoaderBuilder { builder: glib::object::ObjectBuilder<'static, Loader>, } impl LoaderBuilder { fn new() -> Self { Self { builder: glib::object::Object::builder(), } } pub fn apply_transformation(self, apply_transformation: bool) -> Self { Self { builder: self .builder .property("apply-transformation", apply_transformation), } } pub fn bytes(self, bytes: &glib::Bytes) -> Self { Self { builder: self.builder.property("bytes", bytes.clone()), } } pub fn cancellable(self, cancellable: &impl IsA) -> Self { Self { builder: self .builder .property("cancellable", cancellable.clone().upcast()), } } pub fn file(self, file: &impl IsA) -> Self { Self { builder: self.builder.property("file", file.clone().upcast()), } } pub fn memory_format_selection(self, memory_format_selection: MemoryFormatSelection) -> Self { Self { builder: self .builder .property("memory-format-selection", memory_format_selection), } } pub fn sandbox_selector(self, sandbox_selector: SandboxSelector) -> Self { Self { builder: self.builder.property("sandbox-selector", sandbox_selector), } } pub fn stream(self, stream: &impl IsA) -> Self { Self { builder: self.builder.property("stream", stream.clone().upcast()), } } // rustdoc-stripper-ignore-next /// Build the [`Loader`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] pub fn build(self) -> Loader { assert_initialized_main_thread!(); self.builder.build() } } libglycin-rebind-0.0.1/src/auto/mod.rs000064400000000000000000000014161046102023000157250ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT mod creator; pub use self::creator::Creator; mod encoded_image; pub use self::encoded_image::EncodedImage; mod frame; pub use self::frame::Frame; mod frame_request; pub use self::frame_request::FrameRequest; mod image; pub use self::image::Image; mod loader; pub use self::loader::Loader; mod new_frame; pub use self::new_frame::NewFrame; mod cicp; pub use self::cicp::Cicp; mod enums; pub use self::enums::{MemoryFormat, SandboxSelector}; mod flags; pub use self::flags::MemoryFormatSelection; pub(crate) mod builders { pub use super::creator::CreatorBuilder; pub use super::frame_request::FrameRequestBuilder; pub use super::loader::LoaderBuilder; } libglycin-rebind-0.0.1/src/auto/new_frame.rs000064400000000000000000000012751046102023000171140ustar 00000000000000// This file was generated by gir (https://github.com/gtk-rs/gir) // from // from gir-files // DO NOT EDIT use glib::translate::*; use crate::ffi; glib::wrapper! { #[doc(alias = "GlyNewFrame")] pub struct NewFrame(Object); match fn { type_ => || ffi::gly_new_frame_get_type(), } } impl NewFrame { #[doc(alias = "gly_new_frame_set_color_icc_profile")] pub fn set_color_icc_profile(&self, icc_profile: &glib::Bytes) -> bool { unsafe { from_glib(ffi::gly_new_frame_set_color_icc_profile( self.to_glib_none().0, icc_profile.to_glib_none().0, )) } } } libglycin-rebind-0.0.1/src/auto/versions.txt000064400000000000000000000001701046102023000172050ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from (@ 9ebb5d4f5f61+) from gir-files (@ b87d34dc3455) libglycin-rebind-0.0.1/src/cicp.rs000064400000000000000000000007151046102023000151150ustar 00000000000000use crate::Cicp; impl Cicp { #[inline] pub fn color_primaries(&self) -> u8 { self.inner.color_primaries } #[inline] pub fn transfer_characteristics(&self) -> u8 { self.inner.transfer_characteristics } #[inline] pub fn matrix_coefficients(&self) -> u8 { self.inner.matrix_coefficients } #[inline] pub fn video_full_range_flag(&self) -> u8 { self.inner.video_full_range_flag } } libglycin-rebind-0.0.1/src/lib.rs000064400000000000000000000011021046102023000147340ustar 00000000000000#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::needless_doctest_main)] //! # Rust Glycin bindings //! //! This library contains safe Rust bindings for [Glycin](https://gitlab.gnome.org/GNOME/glycin). // Re-export the -sys bindings pub use {ffi, gio, glib}; macro_rules! assert_initialized_main_thread { () => {}; } macro_rules! skip_assert_initialized { () => {}; } #[allow(unused_imports)] #[allow(clippy::let_and_return)] #[allow(clippy::type_complexity)] mod auto; pub use auto::*; pub mod builders { pub use super::auto::builders::*; } mod cicp;