diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/glib/src/auto/enums.rs b/glib/src/auto/enums.rs index 433337a16c51..036d1b61cd93 100644 --- a/glib/src/auto/enums.rs +++ b/glib/src/auto/enums.rs @@ -908,61 +908,6 @@ pub enum UnicodeBreakType { __Unknown(i32), } -impl fmt::Display for UnicodeBreakType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UnicodeBreakType::{}", - match *self { - Self::Mandatory => "Mandatory", - Self::CarriageReturn => "CarriageReturn", - Self::LineFeed => "LineFeed", - Self::CombiningMark => "CombiningMark", - Self::Surrogate => "Surrogate", - Self::ZeroWidthSpace => "ZeroWidthSpace", - Self::Inseparable => "Inseparable", - Self::NonBreakingGlue => "NonBreakingGlue", - Self::Contingent => "Contingent", - Self::Space => "Space", - Self::After => "After", - Self::Before => "Before", - Self::BeforeAndAfter => "BeforeAndAfter", - Self::Hyphen => "Hyphen", - Self::NonStarter => "NonStarter", - Self::OpenPunctuation => "OpenPunctuation", - Self::ClosePunctuation => "ClosePunctuation", - Self::Quotation => "Quotation", - Self::Exclamation => "Exclamation", - Self::Ideographic => "Ideographic", - Self::Numeric => "Numeric", - Self::InfixSeparator => "InfixSeparator", - Self::Symbol => "Symbol", - Self::Alphabetic => "Alphabetic", - Self::Prefix => "Prefix", - Self::Postfix => "Postfix", - Self::ComplexContext => "ComplexContext", - Self::Ambiguous => "Ambiguous", - Self::Unknown => "Unknown", - Self::NextLine => "NextLine", - Self::WordJoiner => "WordJoiner", - Self::HangulLJamo => "HangulLJamo", - Self::HangulVJamo => "HangulVJamo", - Self::HangulTJamo => "HangulTJamo", - Self::HangulLvSyllable => "HangulLvSyllable", - Self::HangulLvtSyllable => "HangulLvtSyllable", - Self::CloseParenthesis => "CloseParenthesis", - Self::ConditionalJapaneseStarter => "ConditionalJapaneseStarter", - Self::HebrewLetter => "HebrewLetter", - Self::RegionalIndicator => "RegionalIndicator", - Self::EmojiBase => "EmojiBase", - Self::EmojiModifier => "EmojiModifier", - Self::ZeroWidthJoiner => "ZeroWidthJoiner", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for UnicodeBreakType { type GlibType = ffi::GUnicodeBreakType; @@ -1861,48 +1806,6 @@ pub enum UnicodeType { __Unknown(i32), } -impl fmt::Display for UnicodeType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "UnicodeType::{}", - match *self { - Self::Control => "Control", - Self::Format => "Format", - Self::Unassigned => "Unassigned", - Self::PrivateUse => "PrivateUse", - Self::Surrogate => "Surrogate", - Self::LowercaseLetter => "LowercaseLetter", - Self::ModifierLetter => "ModifierLetter", - Self::OtherLetter => "OtherLetter", - Self::TitlecaseLetter => "TitlecaseLetter", - Self::UppercaseLetter => "UppercaseLetter", - Self::SpacingMark => "SpacingMark", - Self::EnclosingMark => "EnclosingMark", - Self::NonSpacingMark => "NonSpacingMark", - Self::DecimalNumber => "DecimalNumber", - Self::LetterNumber => "LetterNumber", - Self::OtherNumber => "OtherNumber", - Self::ConnectPunctuation => "ConnectPunctuation", - Self::DashPunctuation => "DashPunctuation", - Self::ClosePunctuation => "ClosePunctuation", - Self::FinalPunctuation => "FinalPunctuation", - Self::InitialPunctuation => "InitialPunctuation", - Self::OtherPunctuation => "OtherPunctuation", - Self::OpenPunctuation => "OpenPunctuation", - Self::CurrencySymbol => "CurrencySymbol", - Self::ModifierSymbol => "ModifierSymbol", - Self::MathSymbol => "MathSymbol", - Self::OtherSymbol => "OtherSymbol", - Self::LineSeparator => "LineSeparator", - Self::ParagraphSeparator => "ParagraphSeparator", - Self::SpaceSeparator => "SpaceSeparator", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for UnicodeType { type GlibType = ffi::GUnicodeType; diff --git a/glib/src/auto/functions.rs b/glib/src/auto/functions.rs index e04d22ec4144..f5baefcd7e87 100644 --- a/glib/src/auto/functions.rs +++ b/glib/src/auto/functions.rs @@ -701,22 +701,25 @@ pub fn spaced_primes_closest(num: u32) -> u32 { } #[doc(alias = "g_spawn_async")] -pub fn spawn_async( +pub fn spawn_async( working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, - child_setup: P, + child_setup: Option>, ) -> Result { - let child_setup_data: Box_

= Box_::new(child_setup); - unsafe extern "C" fn child_setup_func( - data: ffi::gpointer, - ) { - let callback: Box_

= Box_::from_raw(data as *mut _); - (*callback)() - } - let child_setup = Some(child_setup_func::

as _); - let super_callback0: Box_

= child_setup_data; + let child_setup_data: Box_>> = Box_::new(child_setup); + unsafe extern "C" fn child_setup_func(data: ffi::gpointer) { + let callback: Box_>> = Box_::from_raw(data as *mut _); + let callback = (*callback).expect("cannot get closure..."); + callback() + } + let child_setup = if child_setup_data.is_some() { + Some(child_setup_func as _) + } else { + None + }; + let super_callback0: Box_>> = child_setup_data; unsafe { let mut child_pid = std::mem::MaybeUninit::uninit(); let mut error = std::ptr::null_mut(); @@ -746,7 +749,7 @@ pub fn spawn_async( //#[cfg(feature = "v2_68")] //#[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] //#[doc(alias = "g_spawn_async_with_pipes_and_fds")] -//pub fn spawn_async_with_pipes_and_fds(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: P, stdin_fd: i32, stdout_fd: i32, stderr_fd: i32, source_fds: &[i32], target_fds: &[i32], n_fds: usize) -> Result<(Pid, i32, i32, i32), crate::Error> { +//pub fn spawn_async_with_pipes_and_fds(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option>, stdin_fd: i32, stdout_fd: i32, stderr_fd: i32, source_fds: &[i32], target_fds: &[i32], n_fds: usize) -> Result<(Pid, i32, i32, i32), crate::Error> { // unsafe { TODO: call ffi:g_spawn_async_with_pipes_and_fds() } //} @@ -807,7 +810,7 @@ pub fn spawn_command_line_async( //} //#[doc(alias = "g_spawn_sync")] -//pub fn spawn_sync(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: P, standard_output: Vec, standard_error: Vec) -> Result { +//pub fn spawn_sync(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option<&mut dyn (FnMut())>, standard_output: Vec, standard_error: Vec) -> Result { // unsafe { TODO: call ffi:g_spawn_sync() } //} diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index aae97dcfad02..11d16d5b9e77 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939) -from gir-files (https://github.com/gtk-rs/gir-files @ 615ef8fb32f2) +from gir-files (https://github.com/gtk-rs/gir-files @ 326eb5f2d5d8)