From b3cb540176caa361181bd9ffedf004d8921faf4f Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 31 May 2024 10:30:27 +0200 Subject: [PATCH] Regenerate with latest gir-files --- gdk4-wayland/src/auto/versions.txt | 2 +- gdk4-wayland/sys/versions.txt | 2 +- gdk4-win32/src/auto/versions.txt | 2 +- gdk4-win32/sys/versions.txt | 2 +- gdk4-x11/src/auto/versions.txt | 2 +- gdk4-x11/sys/versions.txt | 2 +- gdk4/src/auto/versions.txt | 2 +- gdk4/sys/versions.txt | 2 +- gsk4/src/auto/versions.txt | 2 +- gsk4/sys/versions.txt | 2 +- gtk4/src/auto/css_section.rs | 29 +++++++++++++++++++++++++++++ gtk4/src/auto/enums.rs | 8 ++++++++ gtk4/src/auto/flags.rs | 4 ++++ gtk4/src/auto/print_dialog.rs | 25 ++++++++++--------------- gtk4/src/auto/print_setup.rs | 4 ++-- gtk4/src/auto/versions.txt | 2 +- gtk4/sys/src/lib.rs | 17 +++++++++++++++++ gtk4/sys/tests/abi.rs | 2 ++ gtk4/sys/tests/constant.c | 2 ++ gtk4/sys/versions.txt | 2 +- 20 files changed, 86 insertions(+), 29 deletions(-) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4-wayland/src/auto/versions.txt +++ b/gdk4-wayland/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4-wayland/sys/versions.txt +++ b/gdk4-wayland/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4-win32/src/auto/versions.txt +++ b/gdk4-win32/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4-win32/sys/versions.txt +++ b/gdk4-win32/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4-x11/src/auto/versions.txt +++ b/gdk4-x11/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4-x11/sys/versions.txt +++ b/gdk4-x11/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4/src/auto/versions.txt +++ b/gdk4/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gsk4/src/auto/versions.txt +++ b/gsk4/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gtk4/src/auto/css_section.rs b/gtk4/src/auto/css_section.rs index 7db86f73275d..ba73142a5311 100644 --- a/gtk4/src/auto/css_section.rs +++ b/gtk4/src/auto/css_section.rs @@ -33,6 +33,35 @@ impl CssSection { } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gtk_css_section_new_with_bytes")] + #[doc(alias = "new_with_bytes")] + pub fn with_bytes( + file: Option<&impl IsA>, + bytes: Option<&glib::Bytes>, + start: &CssLocation, + end: &CssLocation, + ) -> CssSection { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(ffi::gtk_css_section_new_with_bytes( + file.map(|p| p.as_ref()).to_glib_none().0, + bytes.to_glib_none().0, + start.to_glib_none().0, + end.to_glib_none().0, + )) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gtk_css_section_get_bytes")] + #[doc(alias = "get_bytes")] + pub fn bytes(&self) -> Option { + unsafe { from_glib_none(ffi::gtk_css_section_get_bytes(self.to_glib_none().0)) } + } + #[doc(alias = "gtk_css_section_get_end_location")] #[doc(alias = "get_end_location")] pub fn end_location(&self) -> CssLocation { diff --git a/gtk4/src/auto/enums.rs b/gtk4/src/auto/enums.rs index b35aeeba881a..9a6a5a8a00b6 100644 --- a/gtk4/src/auto/enums.rs +++ b/gtk4/src/auto/enums.rs @@ -490,6 +490,10 @@ pub enum AccessibleProperty { ValueNow, #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT")] ValueText, + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "GTK_ACCESSIBLE_PROPERTY_HELP_TEXT")] + HelpText, #[doc(hidden)] __Unknown(i32), } @@ -529,6 +533,8 @@ impl IntoGlib for AccessibleProperty { Self::ValueMin => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN, Self::ValueNow => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, Self::ValueText => ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, + #[cfg(feature = "v4_16")] + Self::HelpText => ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT, Self::__Unknown(value) => value, } } @@ -559,6 +565,8 @@ impl FromGlib for AccessibleProperty { ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_MIN => Self::ValueMin, ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_NOW => Self::ValueNow, ffi::GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT => Self::ValueText, + #[cfg(feature = "v4_16")] + ffi::GTK_ACCESSIBLE_PROPERTY_HELP_TEXT => Self::HelpText, value => Self::__Unknown(value), } } diff --git a/gtk4/src/auto/flags.rs b/gtk4/src/auto/flags.rs index 3d555d241241..d5bd53276d97 100644 --- a/gtk4/src/auto/flags.rs +++ b/gtk4/src/auto/flags.rs @@ -320,6 +320,10 @@ bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] #[doc(alias = "GTK_DEBUG_INVERT_TEXT_DIR")] const INVERT_TEXT_DIR = ffi::GTK_DEBUG_INVERT_TEXT_DIR as _; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "GTK_DEBUG_CSS")] + const CSS = ffi::GTK_DEBUG_CSS as _; } } diff --git a/gtk4/src/auto/print_dialog.rs b/gtk4/src/auto/print_dialog.rs index 2c51a747c7c0..8a7fd26905b5 100644 --- a/gtk4/src/auto/print_dialog.rs +++ b/gtk4/src/auto/print_dialog.rs @@ -52,13 +52,13 @@ impl PrintDialog { #[doc(alias = "gtk_print_dialog_get_page_setup")] #[doc(alias = "get_page_setup")] - pub fn page_setup(&self) -> PageSetup { + pub fn page_setup(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_dialog_get_page_setup(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_dialog_get_print_settings")] #[doc(alias = "get_print_settings")] - pub fn print_settings(&self) -> PrintSettings { + pub fn print_settings(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_dialog_get_print_settings( self.to_glib_none().0, @@ -73,7 +73,7 @@ impl PrintDialog { } #[doc(alias = "gtk_print_dialog_print")] - pub fn print, glib::Error>) + 'static>( + pub fn print) + 'static>( &self, parent: Option<&impl IsA>, setup: Option<&PrintSetup>, @@ -93,7 +93,7 @@ impl PrintDialog { let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn print_trampoline< - P: FnOnce(Result, glib::Error>) + 'static, + P: FnOnce(Result) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, @@ -128,12 +128,8 @@ impl PrintDialog { &self, parent: Option<&(impl IsA + Clone + 'static)>, setup: Option<&PrintSetup>, - ) -> Pin< - Box_< - dyn std::future::Future, glib::Error>> - + 'static, - >, - > { + ) -> Pin> + 'static>> + { let parent = parent.map(ToOwned::to_owned); let setup = setup.map(ToOwned::to_owned); Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { @@ -268,7 +264,7 @@ impl PrintDialog { } #[doc(alias = "gtk_print_dialog_setup")] - pub fn setup, glib::Error>) + 'static>( + pub fn setup) + 'static>( &self, parent: Option<&impl IsA>, cancellable: Option<&impl IsA>, @@ -287,7 +283,7 @@ impl PrintDialog { let user_data: Box_> = Box_::new(glib::thread_guard::ThreadGuard::new(callback)); unsafe extern "C" fn setup_trampoline< - P: FnOnce(Result, glib::Error>) + 'static, + P: FnOnce(Result) + 'static, >( _source_object: *mut glib::gobject_ffi::GObject, res: *mut gio::ffi::GAsyncResult, @@ -320,9 +316,8 @@ impl PrintDialog { pub fn setup_future( &self, parent: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin< - Box_, glib::Error>> + 'static>, - > { + ) -> Pin> + 'static>> + { let parent = parent.map(ToOwned::to_owned); Box_::pin(gio::GioFuture::new(self, move |obj, cancellable, send| { obj.setup( diff --git a/gtk4/src/auto/print_setup.rs b/gtk4/src/auto/print_setup.rs index ec6fdc08c8e5..c0f86575c7a9 100644 --- a/gtk4/src/auto/print_setup.rs +++ b/gtk4/src/auto/print_setup.rs @@ -19,13 +19,13 @@ glib::wrapper! { impl PrintSetup { #[doc(alias = "gtk_print_setup_get_page_setup")] #[doc(alias = "get_page_setup")] - pub fn page_setup(&self) -> Option { + pub fn page_setup(&self) -> PageSetup { unsafe { from_glib_none(ffi::gtk_print_setup_get_page_setup(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_setup_get_print_settings")] #[doc(alias = "get_print_settings")] - pub fn print_settings(&self) -> Option { + pub fn print_settings(&self) -> PrintSettings { unsafe { from_glib_none(ffi::gtk_print_setup_get_print_settings( self.to_glib_none().0, diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gtk4/src/auto/versions.txt +++ b/gtk4/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d) diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index a6495783df9d..d419f1c7c049 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -81,6 +81,9 @@ pub const GTK_ACCESSIBLE_PROPERTY_VALUE_MAX: GtkAccessibleProperty = 15; pub const GTK_ACCESSIBLE_PROPERTY_VALUE_MIN: GtkAccessibleProperty = 16; pub const GTK_ACCESSIBLE_PROPERTY_VALUE_NOW: GtkAccessibleProperty = 17; pub const GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT: GtkAccessibleProperty = 18; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub const GTK_ACCESSIBLE_PROPERTY_HELP_TEXT: GtkAccessibleProperty = 19; pub type GtkAccessibleRelation = c_int; pub const GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT: GtkAccessibleRelation = 0; @@ -1041,6 +1044,9 @@ pub const GTK_DEBUG_ICONFALLBACK: GtkDebugFlags = 262144; #[cfg(feature = "v4_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] pub const GTK_DEBUG_INVERT_TEXT_DIR: GtkDebugFlags = 524288; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub const GTK_DEBUG_CSS: GtkDebugFlags = 1048576; pub type GtkDialogFlags = c_uint; pub const GTK_DIALOG_MODAL: GtkDialogFlags = 1; @@ -10308,6 +10314,17 @@ extern "C" { start: *const GtkCssLocation, end: *const GtkCssLocation, ) -> *mut GtkCssSection; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gtk_css_section_new_with_bytes( + file: *mut gio::GFile, + bytes: *mut glib::GBytes, + start: *const GtkCssLocation, + end: *const GtkCssLocation, + ) -> *mut GtkCssSection; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gtk_css_section_get_bytes(section: *const GtkCssSection) -> *mut glib::GBytes; pub fn gtk_css_section_get_end_location(section: *const GtkCssSection) -> *const GtkCssLocation; pub fn gtk_css_section_get_file(section: *const GtkCssSection) -> *mut gio::GFile; diff --git a/gtk4/sys/tests/abi.rs b/gtk4/sys/tests/abi.rs index 3ab1fd3b6137..b69a014cf484 100644 --- a/gtk4/sys/tests/abi.rs +++ b/gtk4/sys/tests/abi.rs @@ -2635,6 +2635,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE", "0"), ("(gint) GTK_ACCESSIBLE_PROPERTY_DESCRIPTION", "1"), ("(gint) GTK_ACCESSIBLE_PROPERTY_HAS_POPUP", "2"), + ("(gint) GTK_ACCESSIBLE_PROPERTY_HELP_TEXT", "19"), ("(gint) GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS", "3"), ("(gint) GTK_ACCESSIBLE_PROPERTY_LABEL", "4"), ("(gint) GTK_ACCESSIBLE_PROPERTY_LEVEL", "5"), @@ -2905,6 +2906,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GTK_DEBUG_BUILDER", "128"), ("(guint) GTK_DEBUG_BUILDER_OBJECTS", "65536"), ("(guint) GTK_DEBUG_CONSTRAINTS", "32768"), + ("(guint) GTK_DEBUG_CSS", "1048576"), ("(guint) GTK_DEBUG_GEOMETRY", "16"), ("(guint) GTK_DEBUG_ICONFALLBACK", "262144"), ("(guint) GTK_DEBUG_ICONTHEME", "32"), diff --git a/gtk4/sys/tests/constant.c b/gtk4/sys/tests/constant.c index 840bc2a6d1e0..c88d3c1cc0e1 100644 --- a/gtk4/sys/tests/constant.c +++ b/gtk4/sys/tests/constant.c @@ -80,6 +80,7 @@ int main() { PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE); PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_DESCRIPTION); PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_HAS_POPUP); + PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_HELP_TEXT); PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS); PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_LABEL); PRINT_CONSTANT((gint) GTK_ACCESSIBLE_PROPERTY_LEVEL); @@ -341,6 +342,7 @@ int main() { PRINT_CONSTANT((guint) GTK_DEBUG_BUILDER); PRINT_CONSTANT((guint) GTK_DEBUG_BUILDER_OBJECTS); PRINT_CONSTANT((guint) GTK_DEBUG_CONSTRAINTS); + PRINT_CONSTANT((guint) GTK_DEBUG_CSS); PRINT_CONSTANT((guint) GTK_DEBUG_GEOMETRY); PRINT_CONSTANT((guint) GTK_DEBUG_ICONFALLBACK); PRINT_CONSTANT((guint) GTK_DEBUG_ICONTHEME); diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index 5d74aaf931ce..4a36b94f29b0 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 839b834456d2) -from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109) +from gir-files (https://github.com/gtk-rs/gir-files @ 74aa91d9063d)