From 1eea00f2fe78763c8165d99effd5d1768f41af78 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Nov 2025 07:32:13 +0000 Subject: [PATCH 1/4] Update gir --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index be9aa145267c..85fe8474df07 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit be9aa145267cb915b3c79c4ae6d896beecc061ee +Subproject commit 85fe8474df07eadcd3b63074d2251a01db9ec67c From 724ad5180940f679b390407523e0c497e7da3694 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Nov 2025 07:33:02 +0000 Subject: [PATCH 2/4] Regenerate with latest gir --- gdk4-macos/src/auto/versions.txt | 2 +- gdk4-macos/sys/versions.txt | 2 +- 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/versions.txt | 2 +- gtk4/sys/versions.txt | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gdk4-macos/src/auto/versions.txt b/gdk4-macos/src/auto/versions.txt index a9408cdf7100..0188387c116f 100644 --- a/gdk4-macos/src/auto/versions.txt +++ b/gdk4-macos/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-macos/sys/versions.txt b/gdk4-macos/sys/versions.txt index a9408cdf7100..0188387c116f 100644 --- a/gdk4-macos/sys/versions.txt +++ b/gdk4-macos/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index a9408cdf7100..0188387c116f 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index a9408cdf7100..0188387c116f 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index a9408cdf7100..0188387c116f 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 @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index a9408cdf7100..0188387c116f 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c) +Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) From bb29cfb2c67f76f224daba479372f7e5e44b6ce8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Nov 2025 07:33:02 +0000 Subject: [PATCH 3/4] Update gir-files --- gir-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir-files b/gir-files index e121d92cee84..7f4d93e87b6e 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit e121d92cee84f498c5d69611326b5b17208db067 +Subproject commit 7f4d93e87b6ed00548dbca4d87d65f164a2b0d71 From b26b64ed65845f1c57cdf5a285573488b9260a2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Nov 2025 07:33:09 +0000 Subject: [PATCH 4/4] Regenerate with latest gir-files --- gdk4-macos/src/auto/versions.txt | 2 +- gdk4-macos/sys/versions.txt | 2 +- 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/flags.rs | 4 +- gdk4/src/auto/rgba.rs | 10 + gdk4/src/auto/scroll_event.rs | 12 +- gdk4/src/auto/versions.txt | 2 +- gdk4/sys/src/lib.rs | 9 +- gdk4/sys/versions.txt | 2 +- gsk4/src/auto/path.rs | 27 ++- gsk4/src/auto/versions.txt | 2 +- gsk4/sys/Cargo.toml | 4 + gsk4/sys/src/lib.rs | 3 + gsk4/sys/versions.txt | 2 +- gtk4/src/auto/application.rs | 97 ++++++++- gtk4/src/auto/application_window.rs | 7 + gtk4/src/auto/builder.rs | 2 +- gtk4/src/auto/drop_target_async.rs | 2 +- gtk4/src/auto/enums.rs | 70 ++++-- gtk4/src/auto/flags.rs | 2 + gtk4/src/auto/mod.rs | 10 - gtk4/src/auto/path_paintable.rs | 189 ---------------- gtk4/src/auto/versions.txt | 2 +- gtk4/sys/src/lib.rs | 327 +++++++++++++++++++++++----- gtk4/sys/tests/abi.rs | 57 +++++ gtk4/sys/tests/constant.c | 15 ++ gtk4/sys/tests/layout.c | 6 + gtk4/sys/versions.txt | 2 +- 33 files changed, 572 insertions(+), 309 deletions(-) delete mode 100644 gtk4/src/auto/path_paintable.rs diff --git a/gdk4-macos/src/auto/versions.txt b/gdk4-macos/src/auto/versions.txt index 0188387c116f..bf9649f54698 100644 --- a/gdk4-macos/src/auto/versions.txt +++ b/gdk4-macos/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-macos/sys/versions.txt b/gdk4-macos/sys/versions.txt index 0188387c116f..bf9649f54698 100644 --- a/gdk4-macos/sys/versions.txt +++ b/gdk4-macos/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4/src/auto/flags.rs b/gdk4/src/auto/flags.rs index 255a94bf3128..6d00a9d88914 100644 --- a/gdk4/src/auto/flags.rs +++ b/gdk4/src/auto/flags.rs @@ -628,9 +628,9 @@ bitflags! { #[doc(alias = "GdkPaintableFlags")] pub struct PaintableFlags: u32 { #[doc(alias = "GDK_PAINTABLE_STATIC_SIZE")] - const SIZE = ffi::GDK_PAINTABLE_STATIC_SIZE as _; + const STATIC_SIZE = ffi::GDK_PAINTABLE_STATIC_SIZE as _; #[doc(alias = "GDK_PAINTABLE_STATIC_CONTENTS")] - const CONTENTS = ffi::GDK_PAINTABLE_STATIC_CONTENTS as _; + const STATIC_CONTENTS = ffi::GDK_PAINTABLE_STATIC_CONTENTS as _; } } diff --git a/gdk4/src/auto/rgba.rs b/gdk4/src/auto/rgba.rs index 861fa1cb5938..e6ef9d8cb0e3 100644 --- a/gdk4/src/auto/rgba.rs +++ b/gdk4/src/auto/rgba.rs @@ -45,6 +45,16 @@ impl RGBA { unsafe { from_glib(ffi::gdk_rgba_is_opaque(self.to_glib_none().0)) } } + #[doc(alias = "gdk_rgba_print")] + pub fn print(&self, string: &mut glib::String) -> glib::String { + unsafe { + from_glib_full(ffi::gdk_rgba_print( + self.to_glib_none().0, + string.to_glib_none_mut().0, + )) + } + } + #[doc(alias = "gdk_rgba_to_string")] #[doc(alias = "to_string")] pub fn to_str(&self) -> glib::GString { diff --git a/gdk4/src/auto/scroll_event.rs b/gdk4/src/auto/scroll_event.rs index aead96e88655..e6ecee708dda 100644 --- a/gdk4/src/auto/scroll_event.rs +++ b/gdk4/src/auto/scroll_event.rs @@ -2,13 +2,13 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +use crate::ScrollRelativeDirection; #[cfg(feature = "v4_8")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] use crate::ScrollUnit; use crate::{ffi, ScrollDirection}; -#[cfg(feature = "v4_20")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] -use crate::{Event, ScrollRelativeDirection}; use glib::{prelude::*, translate::*}; glib::wrapper! { @@ -66,11 +66,11 @@ impl ScrollEvent { #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] #[doc(alias = "gdk_scroll_event_get_relative_direction")] #[doc(alias = "get_relative_direction")] - pub fn relative_direction(event: impl AsRef) -> ScrollRelativeDirection { - skip_assert_initialized!(); + pub fn relative_direction(event: ScrollRelativeDirection) -> ScrollRelativeDirection { + assert_initialized_main_thread!(); unsafe { from_glib(ffi::gdk_scroll_event_get_relative_direction( - event.as_ref().to_glib_none().0, + event.into_glib(), )) } } diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gdk4/sys/src/lib.rs b/gdk4/sys/src/lib.rs index 1a8410006a16..f0178937def7 100644 --- a/gdk4/sys/src/lib.rs +++ b/gdk4/sys/src/lib.rs @@ -4609,6 +4609,7 @@ extern "C" { pub fn gdk_rgba_is_clear(rgba: *const GdkRGBA) -> gboolean; pub fn gdk_rgba_is_opaque(rgba: *const GdkRGBA) -> gboolean; pub fn gdk_rgba_parse(rgba: *mut GdkRGBA, spec: *const c_char) -> gboolean; + pub fn gdk_rgba_print(rgba: *const GdkRGBA, string: *mut glib::GString) -> *mut glib::GString; pub fn gdk_rgba_to_string(rgba: *const GdkRGBA) -> *mut c_char; //========================================================================= @@ -5893,11 +5894,9 @@ extern "C" { // GdkScrollEvent //========================================================================= pub fn gdk_scroll_event_get_type() -> GType; - #[cfg(feature = "v4_20")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] - pub fn gdk_scroll_event_get_relative_direction( - event: *mut GdkEvent, - ) -> GdkScrollRelativeDirection; + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //pub fn gdk_scroll_event_get_relative_direction(event: /*Metadata mismatch*/*mut [c:type mismatch GdkEvent != GdkScrollRelativeDirection of ScrollRelativeDirection]) -> GdkScrollRelativeDirection; pub fn gdk_scroll_event_get_deltas( event: *mut GdkScrollEvent, delta_x: *mut c_double, diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index 0188387c116f..bf9649f54698 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gsk4/src/auto/path.rs b/gsk4/src/auto/path.rs index 8803aa0b00ed..8e7c1cb04039 100644 --- a/gsk4/src/auto/path.rs +++ b/gsk4/src/auto/path.rs @@ -6,7 +6,7 @@ use crate::{ffi, FillRule, PathPoint, Stroke}; use glib::translate::*; glib::wrapper! { - #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + #[derive(Debug, PartialOrd, Ord, Hash)] pub struct Path(Shared); match fn { @@ -17,6 +17,18 @@ glib::wrapper! { } impl Path { + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "gsk_path_equal")] + fn equal(&self, path2: &Path) -> bool { + unsafe { + from_glib(ffi::gsk_path_equal( + self.to_glib_none().0, + path2.to_glib_none().0, + )) + } + } + #[doc(alias = "gsk_path_get_bounds")] #[doc(alias = "get_bounds")] pub fn bounds(&self) -> Option { @@ -155,6 +167,19 @@ impl Path { } } +#[cfg(feature = "v4_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] +impl PartialEq for Path { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.equal(other) + } +} +#[cfg(feature = "v4_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + +impl Eq for Path {} + impl std::fmt::Display for Path { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gsk4/sys/Cargo.toml b/gsk4/sys/Cargo.toml index c7d980a7ed0d..81c390924d6c 100644 --- a/gsk4/sys/Cargo.toml +++ b/gsk4/sys/Cargo.toml @@ -57,6 +57,9 @@ version = "4.18" [package.metadata.system-deps.gtk4.v4_20] version = "4.19" +[package.metadata.system-deps.gtk4.v4_22] +version = "4.22" + [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] @@ -76,6 +79,7 @@ v4_14 = ["v4_10"] v4_16 = ["v4_14"] v4_18 = ["v4_16"] v4_20 = ["v4_18"] +v4_22 = ["v4_20"] [dependencies] libc = "0.2" diff --git a/gsk4/sys/src/lib.rs b/gsk4/sys/src/lib.rs index 0fa2d78b7076..2de9eae0088e 100644 --- a/gsk4/sys/src/lib.rs +++ b/gsk4/sys/src/lib.rs @@ -1185,6 +1185,9 @@ extern "C" { #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_get_type() -> GType; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gsk_path_equal(path1: *const GskPath, path2: *const GskPath) -> gboolean; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_foreach( diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index 0188387c116f..bf9649f54698 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gtk4/src/auto/application.rs b/gtk4/src/auto/application.rs index 77adc40089f6..fde51063bd29 100644 --- a/gtk4/src/auto/application.rs +++ b/gtk4/src/auto/application.rs @@ -54,13 +54,21 @@ impl ApplicationBuilder { } } - #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")] pub fn register_session(self, register_session: bool) -> Self { Self { builder: self.builder.property("register-session", register_session), } } + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn support_save(self, support_save: bool) -> Self { + Self { + builder: self.builder.property("support-save", support_save), + } + } + pub fn application_id(self, application_id: impl Into) -> Self { Self { builder: self @@ -122,6 +130,15 @@ pub trait GtkApplicationExt: IsA + 'static { } } + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "gtk_application_forget")] + fn forget(&self) { + unsafe { + ffi::gtk_application_forget(self.as_ref().to_glib_none().0); + } + } + #[doc(alias = "gtk_application_get_accels_for_action")] #[doc(alias = "get_accels_for_action")] fn accels_for_action(&self, detailed_action_name: &str) -> Vec { @@ -233,6 +250,15 @@ pub trait GtkApplicationExt: IsA + 'static { } } + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "gtk_application_save")] + fn save(&self) { + unsafe { + ffi::gtk_application_save(self.as_ref().to_glib_none().0); + } + } + #[doc(alias = "gtk_application_set_accels_for_action")] fn set_accels_for_action(&self, detailed_action_name: &str, accels: &[&str]) { unsafe { @@ -262,13 +288,13 @@ pub trait GtkApplicationExt: IsA + 'static { } } - #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")] #[doc(alias = "register-session")] fn is_register_session(&self) -> bool { ObjectExt::property(self.as_ref(), "register-session") } - #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")] #[doc(alias = "register-session")] fn set_register_session(&self, register_session: bool) { ObjectExt::set_property(self.as_ref(), "register-session", register_session) @@ -279,6 +305,20 @@ pub trait GtkApplicationExt: IsA + 'static { ObjectExt::property(self.as_ref(), "screensaver-active") } + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "support-save")] + fn supports_save(&self) -> bool { + ObjectExt::property(self.as_ref(), "support-save") + } + + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "support-save")] + fn set_support_save(&self, support_save: bool) { + ObjectExt::set_property(self.as_ref(), "support-save", support_save) + } + #[doc(alias = "query-end")] fn connect_query_end(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn query_end_trampoline, F: Fn(&P) + 'static>( @@ -301,6 +341,27 @@ pub trait GtkApplicationExt: IsA + 'static { } } + //#[cfg(feature = "v4_22")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + //#[doc(alias = "restore-state")] + //fn connect_restore_state(&self, f: F) -> SignalHandlerId { + // Ignored reason: Gtk.RestoreReason + //} + + //#[cfg(feature = "v4_22")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + //#[doc(alias = "restore-window")] + //fn connect_restore_window(&self, f: F) -> SignalHandlerId { + // Ignored reason: Gtk.RestoreReason + //} + + //#[cfg(feature = "v4_22")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + //#[doc(alias = "save-state")] + //fn connect_save_state(&self, f: F) -> SignalHandlerId { + // Ignored dict: GLib.VariantDict + //} + #[doc(alias = "window-added")] fn connect_window_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn window_added_trampoline< @@ -408,7 +469,7 @@ pub trait GtkApplicationExt: IsA + 'static { } } - #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[cfg_attr(feature = "v4_22", deprecated = "Since 4.22")] #[doc(alias = "register-session")] fn connect_register_session_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_register_session_trampoline< @@ -460,6 +521,34 @@ pub trait GtkApplicationExt: IsA + 'static { ) } } + + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "support-save")] + fn connect_support_save_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_support_save_trampoline< + P: IsA, + F: Fn(&P) + 'static, + >( + this: *mut ffi::GtkApplication, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(Application::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + c"notify::support-save".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_support_save_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } impl> GtkApplicationExt for O {} diff --git a/gtk4/src/auto/application_window.rs b/gtk4/src/auto/application_window.rs index 6110648955b7..46f6a94be944 100644 --- a/gtk4/src/auto/application_window.rs +++ b/gtk4/src/auto/application_window.rs @@ -495,6 +495,13 @@ pub trait ApplicationWindowExt: IsA + 'static { } } + //#[cfg(feature = "v4_22")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + //#[doc(alias = "save-state")] + //fn connect_save_state(&self, f: F) -> SignalHandlerId { + // Ignored dict: GLib.VariantDict + //} + #[doc(alias = "show-menubar")] fn connect_show_menubar_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_show_menubar_trampoline< diff --git a/gtk4/src/auto/builder.rs b/gtk4/src/auto/builder.rs index fea67fead0ec..a08d1ba7796e 100644 --- a/gtk4/src/auto/builder.rs +++ b/gtk4/src/auto/builder.rs @@ -176,7 +176,7 @@ impl Builder { &mut error, ); if error.is_null() { - Ok(from_glib_full(ret)) + Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) } diff --git a/gtk4/src/auto/drop_target_async.rs b/gtk4/src/auto/drop_target_async.rs index cf2277205b10..7c9a6d3f7553 100644 --- a/gtk4/src/auto/drop_target_async.rs +++ b/gtk4/src/auto/drop_target_async.rs @@ -54,7 +54,7 @@ impl DropTargetAsync { #[doc(alias = "get_formats")] pub fn formats(&self) -> Option { unsafe { - from_glib_full(ffi::gtk_drop_target_async_get_formats( + from_glib_none(ffi::gtk_drop_target_async_get_formats( self.to_glib_none().0, )) } diff --git a/gtk4/src/auto/enums.rs b/gtk4/src/auto/enums.rs index 62299b989a6b..07d3f01cd2c6 100644 --- a/gtk4/src/auto/enums.rs +++ b/gtk4/src/auto/enums.rs @@ -3296,17 +3296,17 @@ impl From for glib::Value { #[doc(alias = "GtkConstraintVflParserError")] pub enum ConstraintVflParserError { #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL")] - Symbol, + InvalidSymbol, #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE")] - Attribute, + InvalidAttribute, #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW")] - View, + InvalidView, #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC")] - Metric, + InvalidMetric, #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY")] - Priority, + InvalidPriority, #[doc(alias = "GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION")] - Relation, + InvalidRelation, #[doc(hidden)] __Unknown(i32), } @@ -3318,12 +3318,12 @@ impl IntoGlib for ConstraintVflParserError { #[inline] fn into_glib(self) -> ffi::GtkConstraintVflParserError { match self { - Self::Symbol => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL, - Self::Attribute => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE, - Self::View => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW, - Self::Metric => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC, - Self::Priority => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY, - Self::Relation => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION, + Self::InvalidSymbol => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL, + Self::InvalidAttribute => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE, + Self::InvalidView => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW, + Self::InvalidMetric => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC, + Self::InvalidPriority => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY, + Self::InvalidRelation => ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION, Self::__Unknown(value) => value, } } @@ -3336,12 +3336,12 @@ impl FromGlib for ConstraintVflParserError { skip_assert_initialized!(); match value { - ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL => Self::Symbol, - ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE => Self::Attribute, - ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW => Self::View, - ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC => Self::Metric, - ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY => Self::Priority, - ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION => Self::Relation, + ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL => Self::InvalidSymbol, + ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE => Self::InvalidAttribute, + ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW => Self::InvalidView, + ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC => Self::InvalidMetric, + ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY => Self::InvalidPriority, + ffi::GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION => Self::InvalidRelation, value => Self::__Unknown(value), } } @@ -9414,6 +9414,22 @@ pub enum RevealerTransitionType { SwingUp, #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN")] SwingDown, + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_RIGHT")] + FadeSlideRight, + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_LEFT")] + FadeSlideLeft, + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_UP")] + FadeSlideUp, + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + #[doc(alias = "GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_DOWN")] + FadeSlideDown, #[doc(hidden)] __Unknown(i32), } @@ -9422,7 +9438,6 @@ pub enum RevealerTransitionType { impl IntoGlib for RevealerTransitionType { type GlibType = ffi::GtkRevealerTransitionType; - #[inline] fn into_glib(self) -> ffi::GtkRevealerTransitionType { match self { Self::None => ffi::GTK_REVEALER_TRANSITION_TYPE_NONE, @@ -9435,6 +9450,14 @@ impl IntoGlib for RevealerTransitionType { Self::SwingLeft => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT, Self::SwingUp => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_UP, Self::SwingDown => ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN, + #[cfg(feature = "v4_22")] + Self::FadeSlideRight => ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_RIGHT, + #[cfg(feature = "v4_22")] + Self::FadeSlideLeft => ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_LEFT, + #[cfg(feature = "v4_22")] + Self::FadeSlideUp => ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_UP, + #[cfg(feature = "v4_22")] + Self::FadeSlideDown => ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_DOWN, Self::__Unknown(value) => value, } } @@ -9442,7 +9465,6 @@ impl IntoGlib for RevealerTransitionType { #[doc(hidden)] impl FromGlib for RevealerTransitionType { - #[inline] unsafe fn from_glib(value: ffi::GtkRevealerTransitionType) -> Self { skip_assert_initialized!(); @@ -9457,6 +9479,14 @@ impl FromGlib for RevealerTransitionType { ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT => Self::SwingLeft, ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_UP => Self::SwingUp, ffi::GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN => Self::SwingDown, + #[cfg(feature = "v4_22")] + ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_RIGHT => Self::FadeSlideRight, + #[cfg(feature = "v4_22")] + ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_LEFT => Self::FadeSlideLeft, + #[cfg(feature = "v4_22")] + ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_UP => Self::FadeSlideUp, + #[cfg(feature = "v4_22")] + ffi::GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_DOWN => Self::FadeSlideDown, value => Self::__Unknown(value), } } diff --git a/gtk4/src/auto/flags.rs b/gtk4/src/auto/flags.rs index da42afdfc86d..de114217c210 100644 --- a/gtk4/src/auto/flags.rs +++ b/gtk4/src/auto/flags.rs @@ -342,6 +342,8 @@ bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] #[doc(alias = "GTK_DEBUG_BUILDER")] const BUILDER = ffi::GTK_DEBUG_BUILDER as _; + #[doc(alias = "GTK_DEBUG_SESSION")] + const SESSION = ffi::GTK_DEBUG_SESSION as _; } } diff --git a/gtk4/src/auto/mod.rs b/gtk4/src/auto/mod.rs index de129ab3842e..e3f0038965aa 100644 --- a/gtk4/src/auto/mod.rs +++ b/gtk4/src/auto/mod.rs @@ -730,13 +730,6 @@ mod password_entry_buffer; #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] pub use self::password_entry_buffer::PasswordEntryBuffer; -#[cfg(feature = "v4_22")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] -mod path_paintable; -#[cfg(feature = "v4_22")] -#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] -pub use self::path_paintable::PathPaintable; - mod picture; pub use self::picture::Picture; @@ -1762,9 +1755,6 @@ pub(crate) mod builders { #[cfg(feature = "v4_4")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] pub use super::password_entry_buffer::PasswordEntryBufferBuilder; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub use super::path_paintable::PathPaintableBuilder; pub use super::picture::PictureBuilder; pub use super::popover::PopoverBuilder; pub use super::popover_menu::PopoverMenuBuilder; diff --git a/gtk4/src/auto/path_paintable.rs b/gtk4/src/auto/path_paintable.rs deleted file mode 100644 index c0fbb9840c64..000000000000 --- a/gtk4/src/auto/path_paintable.rs +++ /dev/null @@ -1,189 +0,0 @@ -// 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 crate::{ffi, SymbolicPaintable}; -use glib::{ - prelude::*, - signal::{connect_raw, SignalHandlerId}, - translate::*, -}; -use std::boxed::Box as Box_; - -glib::wrapper! { - #[doc(alias = "GtkPathPaintable")] - pub struct PathPaintable(Object) @implements gdk::Paintable, SymbolicPaintable; - - match fn { - type_ => || ffi::gtk_path_paintable_get_type(), - } -} - -impl PathPaintable { - #[doc(alias = "gtk_path_paintable_new_from_bytes")] - #[doc(alias = "new_from_bytes")] - pub fn from_bytes(bytes: &glib::Bytes) -> Result { - assert_initialized_main_thread!(); - unsafe { - let mut error = std::ptr::null_mut(); - let ret = ffi::gtk_path_paintable_new_from_bytes(bytes.to_glib_none().0, &mut error); - if error.is_null() { - Ok(from_glib_full(ret)) - } else { - Err(from_glib_full(error)) - } - } - } - - #[doc(alias = "gtk_path_paintable_new_from_resource")] - #[doc(alias = "new_from_resource")] - pub fn from_resource(path: &str) -> PathPaintable { - assert_initialized_main_thread!(); - unsafe { - from_glib_full(ffi::gtk_path_paintable_new_from_resource( - path.to_glib_none().0, - )) - } - } - - // rustdoc-stripper-ignore-next - /// Creates a new builder-pattern struct instance to construct [`PathPaintable`] objects. - /// - /// This method returns an instance of [`PathPaintableBuilder`](crate::builders::PathPaintableBuilder) which can be used to create [`PathPaintable`] objects. - pub fn builder() -> PathPaintableBuilder { - PathPaintableBuilder::new() - } - - #[doc(alias = "gtk_path_paintable_get_max_state")] - #[doc(alias = "get_max_state")] - pub fn max_state(&self) -> u32 { - unsafe { ffi::gtk_path_paintable_get_max_state(self.to_glib_none().0) } - } - - #[doc(alias = "gtk_path_paintable_get_state")] - #[doc(alias = "get_state")] - pub fn state(&self) -> u32 { - unsafe { ffi::gtk_path_paintable_get_state(self.to_glib_none().0) } - } - - #[doc(alias = "gtk_path_paintable_get_weight")] - #[doc(alias = "get_weight")] - pub fn weight(&self) -> f32 { - unsafe { ffi::gtk_path_paintable_get_weight(self.to_glib_none().0) } - } - - #[doc(alias = "gtk_path_paintable_set_state")] - #[doc(alias = "state")] - pub fn set_state(&self, state: u32) { - unsafe { - ffi::gtk_path_paintable_set_state(self.to_glib_none().0, state); - } - } - - #[doc(alias = "gtk_path_paintable_set_weight")] - #[doc(alias = "weight")] - pub fn set_weight(&self, weight: f32) { - unsafe { - ffi::gtk_path_paintable_set_weight(self.to_glib_none().0, weight); - } - } - - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - #[doc(alias = "state")] - pub fn connect_state_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_state_trampoline( - this: *mut ffi::GtkPathPaintable, - _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::state".as_ptr() as *const _, - Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( - notify_state_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } - - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - #[doc(alias = "weight")] - pub fn connect_weight_notify(&self, f: F) -> SignalHandlerId { - unsafe extern "C" fn notify_weight_trampoline( - this: *mut ffi::GtkPathPaintable, - _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::weight".as_ptr() as *const _, - Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( - notify_weight_trampoline:: as *const (), - )), - Box_::into_raw(f), - ) - } - } -} - -// rustdoc-stripper-ignore-next -/// A [builder-pattern] type to construct [`PathPaintable`] 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 PathPaintableBuilder { - builder: glib::object::ObjectBuilder<'static, PathPaintable>, -} - -impl PathPaintableBuilder { - fn new() -> Self { - Self { - builder: glib::object::Object::builder(), - } - } - - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn resource(self, resource: impl Into) -> Self { - Self { - builder: self.builder.property("resource", resource.into()), - } - } - - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn state(self, state: u32) -> Self { - Self { - builder: self.builder.property("state", state), - } - } - - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn weight(self, weight: f32) -> Self { - Self { - builder: self.builder.property("weight", weight), - } - } - - // rustdoc-stripper-ignore-next - /// Build the [`PathPaintable`]. - #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] - pub fn build(self) -> PathPaintable { - assert_initialized_main_thread!(); - self.builder.build() - } -} diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index 0188387c116f..bf9649f54698 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 @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e) diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index 5eee3b118252..96fda01bc3de 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -746,6 +746,12 @@ pub const GTK_RESPONSE_NO: GtkResponseType = -9; pub const GTK_RESPONSE_APPLY: GtkResponseType = -10; pub const GTK_RESPONSE_HELP: GtkResponseType = -11; +pub type GtkRestoreReason = c_int; +pub const GTK_RESTORE_REASON_PRISTINE: GtkRestoreReason = 0; +pub const GTK_RESTORE_REASON_LAUNCH: GtkRestoreReason = 1; +pub const GTK_RESTORE_REASON_RECOVER: GtkRestoreReason = 2; +pub const GTK_RESTORE_REASON_RESTORE: GtkRestoreReason = 3; + pub type GtkRevealerTransitionType = c_int; pub const GTK_REVEALER_TRANSITION_TYPE_NONE: GtkRevealerTransitionType = 0; pub const GTK_REVEALER_TRANSITION_TYPE_CROSSFADE: GtkRevealerTransitionType = 1; @@ -757,6 +763,18 @@ pub const GTK_REVEALER_TRANSITION_TYPE_SWING_RIGHT: GtkRevealerTransitionType = pub const GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT: GtkRevealerTransitionType = 7; pub const GTK_REVEALER_TRANSITION_TYPE_SWING_UP: GtkRevealerTransitionType = 8; pub const GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN: GtkRevealerTransitionType = 9; +#[cfg(feature = "v4_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] +pub const GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_RIGHT: GtkRevealerTransitionType = 10; +#[cfg(feature = "v4_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] +pub const GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_LEFT: GtkRevealerTransitionType = 11; +#[cfg(feature = "v4_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] +pub const GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_UP: GtkRevealerTransitionType = 12; +#[cfg(feature = "v4_22")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] +pub const GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_DOWN: GtkRevealerTransitionType = 13; pub type GtkScrollStep = c_int; pub const GTK_SCROLL_STEPS: GtkScrollStep = 0; @@ -885,6 +903,14 @@ pub const GTK_STRING_FILTER_MATCH_MODE_EXACT: GtkStringFilterMatchMode = 0; pub const GTK_STRING_FILTER_MATCH_MODE_SUBSTRING: GtkStringFilterMatchMode = 1; pub const GTK_STRING_FILTER_MATCH_MODE_PREFIX: GtkStringFilterMatchMode = 2; +pub type GtkSvgError = c_int; +pub const GTK_SVG_ERROR_INVALID_ELEMENT: GtkSvgError = 0; +pub const GTK_SVG_ERROR_INVALID_ATTRIBUTE: GtkSvgError = 1; +pub const GTK_SVG_ERROR_MISSING_ATTRIBUTE: GtkSvgError = 2; +pub const GTK_SVG_ERROR_INVALID_REFERENCE: GtkSvgError = 3; +pub const GTK_SVG_ERROR_FAILED_UPDATE: GtkSvgError = 4; +pub const GTK_SVG_ERROR_FAILED_RENDERING: GtkSvgError = 5; + pub type GtkSymbolicColor = c_int; pub const GTK_SYMBOLIC_COLOR_FOREGROUND: GtkSymbolicColor = 0; pub const GTK_SYMBOLIC_COLOR_ERROR: GtkSymbolicColor = 1; @@ -1114,6 +1140,7 @@ pub const GTK_DEBUG_CSS: GtkDebugFlags = 1048576; #[cfg(feature = "v4_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] pub const GTK_DEBUG_BUILDER: GtkDebugFlags = 2097152; +pub const GTK_DEBUG_SESSION: GtkDebugFlags = 4194304; pub type GtkDialogFlags = c_uint; pub const GTK_DIALOG_MODAL: GtkDialogFlags = 1; @@ -1404,6 +1431,41 @@ pub struct _GtkATContextClass { pub type GtkATContextClass = _GtkATContextClass; +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GtkAccessibleHyperlinkClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for GtkAccessibleHyperlinkClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GtkAccessibleHyperlinkClass @ {self:p}")) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GtkAccessibleHypertextInterface { + pub g_iface: gobject::GTypeInterface, + pub get_n_links: Option c_uint>, + pub get_link: Option< + unsafe extern "C" fn(*mut GtkAccessibleHypertext, c_uint) -> *mut GtkAccessibleHyperlink, + >, + pub get_link_at: Option c_uint>, +} + +impl ::std::fmt::Debug for GtkAccessibleHypertextInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GtkAccessibleHypertextInterface @ {self:p}")) + .field("get_n_links", &self.get_n_links) + .field("get_link", &self.get_link) + .field("get_link_at", &self.get_link_at) + .finish() + } +} + #[derive(Copy, Clone)] #[repr(C)] pub struct GtkAccessibleInterface { @@ -1670,7 +1732,18 @@ pub struct GtkApplicationClass { pub parent_class: gio::GApplicationClass, pub window_added: Option, pub window_removed: Option, - pub padding: [gpointer; 8], + pub save_state: + Option gboolean>, + pub restore_state: Option< + unsafe extern "C" fn( + *mut GtkApplication, + GtkRestoreReason, + *mut glib::GVariant, + ) -> gboolean, + >, + pub restore_window: + Option, + pub padding: [gpointer; 5], } impl ::std::fmt::Debug for GtkApplicationClass { @@ -1679,6 +1752,9 @@ impl ::std::fmt::Debug for GtkApplicationClass { .field("parent_class", &self.parent_class) .field("window_added", &self.window_added) .field("window_removed", &self.window_removed) + .field("save_state", &self.save_state) + .field("restore_state", &self.restore_state) + .field("restore_window", &self.restore_window) .finish() } } @@ -1687,13 +1763,17 @@ impl ::std::fmt::Debug for GtkApplicationClass { #[repr(C)] pub struct GtkApplicationWindowClass { pub parent_class: GtkWindowClass, - pub padding: [gpointer; 8], + pub save_state: Option< + unsafe extern "C" fn(*mut GtkApplicationWindow, *mut glib::GVariantDict) -> gboolean, + >, + pub padding: [gpointer; 7], } impl ::std::fmt::Debug for GtkApplicationWindowClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GtkApplicationWindowClass @ {self:p}")) .field("parent_class", &self.parent_class) + .field("save_state", &self.save_state) .finish() } } @@ -4233,15 +4313,6 @@ pub struct _GtkPasswordEntryClass { pub type GtkPasswordEntryClass = _GtkPasswordEntryClass; -#[repr(C)] -#[allow(dead_code)] -pub struct _GtkPathPaintableClass { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -pub type GtkPathPaintableClass = _GtkPathPaintableClass; - #[derive(Copy, Clone)] #[repr(C)] pub struct GtkPictureClass { @@ -4985,6 +5056,38 @@ impl ::std::fmt::Debug for GtkStyleContextClass { } } +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GtkSvgClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for GtkSvgClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GtkSvgClass @ {self:p}")) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct GtkSvgLocation { + pub bytes: size_t, + pub lines: size_t, + pub line_chars: size_t, +} + +impl ::std::fmt::Debug for GtkSvgLocation { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GtkSvgLocation @ {self:p}")) + .field("bytes", &self.bytes) + .field("lines", &self.lines) + .field("line_chars", &self.line_chars) + .finish() + } +} + #[derive(Copy, Clone)] #[repr(C)] pub struct GtkSymbolicPaintableInterface { @@ -5944,6 +6047,20 @@ impl ::std::fmt::Debug for GtkAboutDialog { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GtkAccessibleHyperlink { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GtkAccessibleHyperlink { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GtkAccessibleHyperlink @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GtkActionBar { @@ -8413,20 +8530,6 @@ impl ::std::fmt::Debug for GtkPasswordEntryBuffer { } } -#[repr(C)] -#[allow(dead_code)] -pub struct GtkPathPaintable { - _data: [u8; 0], - _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, -} - -impl ::std::fmt::Debug for GtkPathPaintable { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GtkPathPaintable @ {self:p}")) - .finish() - } -} - #[repr(C)] #[allow(dead_code)] pub struct GtkPicture { @@ -9170,6 +9273,19 @@ impl ::std::fmt::Debug for GtkStyleContext { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GtkSvg { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GtkSvg { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GtkSvg @ {self:p}")).finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GtkSwitch { @@ -9611,6 +9727,19 @@ impl ::std::fmt::Debug for GtkAccessible { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GtkAccessibleHypertext { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GtkAccessibleHypertext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GtkAccessibleHypertext @ {self:p}") + } +} + #[repr(C)] #[allow(dead_code)] pub struct GtkAccessibleRange { @@ -10410,6 +10539,13 @@ extern "C" { //========================================================================= pub fn gtk_response_type_get_type() -> GType; + //========================================================================= + // GtkRestoreReason + //========================================================================= + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_restore_reason_get_type() -> GType; + //========================================================================= // GtkRevealerTransitionType //========================================================================= @@ -10495,6 +10631,28 @@ extern "C" { //========================================================================= pub fn gtk_string_filter_match_mode_get_type() -> GType; + //========================================================================= + // GtkSvgError + //========================================================================= + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_error_get_type() -> GType; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_error_get_attribute(error: *const glib::GError) -> *const c_char; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_error_get_element(error: *const glib::GError) -> *const c_char; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_error_get_end(error: *const glib::GError) -> *const GtkSvgLocation; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_error_get_start(error: *const glib::GError) -> *const GtkSvgLocation; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_error_quark() -> glib::GQuark; + //========================================================================= // GtkSymbolicColor //========================================================================= @@ -11435,6 +11593,28 @@ extern "C" { ); pub fn gtk_about_dialog_set_wrap_license(about: *mut GtkAboutDialog, wrap_license: gboolean); + //========================================================================= + // GtkAccessibleHyperlink + //========================================================================= + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_accessible_hyperlink_get_type() -> GType; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_accessible_hyperlink_new( + parent: *mut GtkAccessibleHypertext, + index: c_uint, + uri: *const c_char, + bounds: *mut GtkAccessibleTextRange, + ) -> *mut GtkAccessibleHyperlink; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_accessible_hyperlink_set_platform_state( + self_: *mut GtkAccessibleHyperlink, + state: GtkAccessiblePlatformState, + enabled: gboolean, + ); + //========================================================================= // GtkActionBar //========================================================================= @@ -11692,6 +11872,9 @@ extern "C" { flags: gio::GApplicationFlags, ) -> *mut GtkApplication; pub fn gtk_application_add_window(application: *mut GtkApplication, window: *mut GtkWindow); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_application_forget(application: *mut GtkApplication); pub fn gtk_application_get_accels_for_action( application: *mut GtkApplication, detailed_action_name: *const c_char, @@ -11721,6 +11904,9 @@ extern "C" { application: *mut GtkApplication, ) -> *mut *mut c_char; pub fn gtk_application_remove_window(application: *mut GtkApplication, window: *mut GtkWindow); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_application_save(application: *mut GtkApplication); pub fn gtk_application_set_accels_for_action( application: *mut GtkApplication, detailed_action_name: *const c_char, @@ -16818,37 +17004,6 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))] pub fn gtk_password_entry_buffer_new() -> *mut GtkEntryBuffer; - //========================================================================= - // GtkPathPaintable - //========================================================================= - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_get_type() -> GType; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_new_from_bytes( - bytes: *mut glib::GBytes, - error: *mut *mut glib::GError, - ) -> *mut GtkPathPaintable; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_new_from_resource(path: *const c_char) -> *mut GtkPathPaintable; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_get_max_state(self_: *mut GtkPathPaintable) -> c_uint; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_get_state(self_: *mut GtkPathPaintable) -> c_uint; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_get_weight(self_: *mut GtkPathPaintable) -> c_float; - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_set_state(self_: *mut GtkPathPaintable, state: c_uint); - #[cfg(feature = "v4_22")] - #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] - pub fn gtk_path_paintable_set_weight(self_: *mut GtkPathPaintable, weight: c_float); - //========================================================================= // GtkPicture //========================================================================= @@ -18781,6 +18936,59 @@ extern "C" { flags: GtkStyleContextPrintFlags, ) -> *mut c_char; + //========================================================================= + // GtkSvg + //========================================================================= + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_get_type() -> GType; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_new() -> *mut GtkSvg; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_new_from_bytes(bytes: *mut glib::GBytes) -> *mut GtkSvg; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_new_from_resource(path: *const c_char) -> *mut GtkSvg; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_get_n_states(self_: *mut GtkSvg) -> c_uint; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_get_state(self_: *mut GtkSvg) -> c_uint; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_get_weight(self_: *mut GtkSvg) -> c_double; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_load_from_bytes(self_: *mut GtkSvg, bytes: *mut glib::GBytes); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_pause(self_: *mut GtkSvg); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_play(self_: *mut GtkSvg); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_serialize(self_: *mut GtkSvg) -> *mut glib::GBytes; + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_set_frame_clock(self_: *mut GtkSvg, clock: *mut gdk::GdkFrameClock); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_set_state(self_: *mut GtkSvg, state: c_uint); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_set_weight(self_: *mut GtkSvg, weight: c_double); + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_svg_write_to_file( + self_: *mut GtkSvg, + filename: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + //========================================================================= // GtkSwitch //========================================================================= @@ -20855,6 +21063,13 @@ extern "C" { values: *const gobject::GValue, ); + //========================================================================= + // GtkAccessibleHypertext + //========================================================================= + #[cfg(feature = "v4_22")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))] + pub fn gtk_accessible_hypertext_get_type() -> GType; + //========================================================================= // GtkAccessibleRange //========================================================================= diff --git a/gtk4/sys/tests/abi.rs b/gtk4/sys/tests/abi.rs index a55d81b73954..6c16ab82533e 100644 --- a/gtk4/sys/tests/abi.rs +++ b/gtk4/sys/tests/abi.rs @@ -215,6 +215,20 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GtkAccessibleHyperlinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GtkAccessibleHypertextInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GtkAccessibleInterface", Layout { @@ -1881,6 +1895,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GtkRestoreReason", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GtkRevealerTransitionType", Layout { @@ -2175,6 +2196,27 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GtkSvgClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GtkSvgError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GtkSvgLocation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GtkSymbolicColor", Layout { @@ -2959,6 +3001,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GTK_DEBUG_MODULES", "8"), ("(guint) GTK_DEBUG_NO_CSS_CACHE", "512"), ("(guint) GTK_DEBUG_PRINTING", "64"), + ("(guint) GTK_DEBUG_SESSION", "4194304"), ("(guint) GTK_DEBUG_SIZE_REQUEST", "256"), ("(guint) GTK_DEBUG_SNAPSHOT", "16384"), ("(guint) GTK_DEBUG_TEXT", "1"), @@ -3335,7 +3378,15 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_RESPONSE_OK", "-5"), ("(gint) GTK_RESPONSE_REJECT", "-2"), ("(gint) GTK_RESPONSE_YES", "-8"), + ("(gint) GTK_RESTORE_REASON_LAUNCH", "1"), + ("(gint) GTK_RESTORE_REASON_PRISTINE", "0"), + ("(gint) GTK_RESTORE_REASON_RECOVER", "2"), + ("(gint) GTK_RESTORE_REASON_RESTORE", "3"), ("(gint) GTK_REVEALER_TRANSITION_TYPE_CROSSFADE", "1"), + ("(gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_DOWN", "13"), + ("(gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_LEFT", "11"), + ("(gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_RIGHT", "10"), + ("(gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_UP", "12"), ("(gint) GTK_REVEALER_TRANSITION_TYPE_NONE", "0"), ("(gint) GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN", "5"), ("(gint) GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT", "3"), @@ -3464,6 +3515,12 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GTK_STYLE_PROVIDER_PRIORITY_SETTINGS", "400"), ("GTK_STYLE_PROVIDER_PRIORITY_THEME", "200"), ("GTK_STYLE_PROVIDER_PRIORITY_USER", "800"), + ("(gint) GTK_SVG_ERROR_FAILED_RENDERING", "5"), + ("(gint) GTK_SVG_ERROR_FAILED_UPDATE", "4"), + ("(gint) GTK_SVG_ERROR_INVALID_ATTRIBUTE", "1"), + ("(gint) GTK_SVG_ERROR_INVALID_ELEMENT", "0"), + ("(gint) GTK_SVG_ERROR_INVALID_REFERENCE", "3"), + ("(gint) GTK_SVG_ERROR_MISSING_ATTRIBUTE", "2"), ("(gint) GTK_SYMBOLIC_COLOR_ACCENT", "4"), ("(gint) GTK_SYMBOLIC_COLOR_ERROR", "1"), ("(gint) GTK_SYMBOLIC_COLOR_FOREGROUND", "0"), diff --git a/gtk4/sys/tests/constant.c b/gtk4/sys/tests/constant.c index 5cac5428f712..b3c745a7a1cd 100644 --- a/gtk4/sys/tests/constant.c +++ b/gtk4/sys/tests/constant.c @@ -360,6 +360,7 @@ int main() { PRINT_CONSTANT((guint) GTK_DEBUG_MODULES); PRINT_CONSTANT((guint) GTK_DEBUG_NO_CSS_CACHE); PRINT_CONSTANT((guint) GTK_DEBUG_PRINTING); + PRINT_CONSTANT((guint) GTK_DEBUG_SESSION); PRINT_CONSTANT((guint) GTK_DEBUG_SIZE_REQUEST); PRINT_CONSTANT((guint) GTK_DEBUG_SNAPSHOT); PRINT_CONSTANT((guint) GTK_DEBUG_TEXT); @@ -700,7 +701,15 @@ int main() { PRINT_CONSTANT((gint) GTK_RESPONSE_OK); PRINT_CONSTANT((gint) GTK_RESPONSE_REJECT); PRINT_CONSTANT((gint) GTK_RESPONSE_YES); + PRINT_CONSTANT((gint) GTK_RESTORE_REASON_LAUNCH); + PRINT_CONSTANT((gint) GTK_RESTORE_REASON_PRISTINE); + PRINT_CONSTANT((gint) GTK_RESTORE_REASON_RECOVER); + PRINT_CONSTANT((gint) GTK_RESTORE_REASON_RESTORE); PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_CROSSFADE); + PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_DOWN); + PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_LEFT); + PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_RIGHT); + PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_FADE_SLIDE_UP); PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_NONE); PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN); PRINT_CONSTANT((gint) GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT); @@ -829,6 +838,12 @@ int main() { PRINT_CONSTANT(GTK_STYLE_PROVIDER_PRIORITY_SETTINGS); PRINT_CONSTANT(GTK_STYLE_PROVIDER_PRIORITY_THEME); PRINT_CONSTANT(GTK_STYLE_PROVIDER_PRIORITY_USER); + PRINT_CONSTANT((gint) GTK_SVG_ERROR_FAILED_RENDERING); + PRINT_CONSTANT((gint) GTK_SVG_ERROR_FAILED_UPDATE); + PRINT_CONSTANT((gint) GTK_SVG_ERROR_INVALID_ATTRIBUTE); + PRINT_CONSTANT((gint) GTK_SVG_ERROR_INVALID_ELEMENT); + PRINT_CONSTANT((gint) GTK_SVG_ERROR_INVALID_REFERENCE); + PRINT_CONSTANT((gint) GTK_SVG_ERROR_MISSING_ATTRIBUTE); PRINT_CONSTANT((gint) GTK_SYMBOLIC_COLOR_ACCENT); PRINT_CONSTANT((gint) GTK_SYMBOLIC_COLOR_ERROR); PRINT_CONSTANT((gint) GTK_SYMBOLIC_COLOR_FOREGROUND); diff --git a/gtk4/sys/tests/layout.c b/gtk4/sys/tests/layout.c index 7d090a1a9eea..8c2e7b7f84fb 100644 --- a/gtk4/sys/tests/layout.c +++ b/gtk4/sys/tests/layout.c @@ -9,6 +9,8 @@ int main() { printf("%s;%zu;%zu\n", "GtkAccessibleAnnouncementPriority", sizeof(GtkAccessibleAnnouncementPriority), alignof(GtkAccessibleAnnouncementPriority)); printf("%s;%zu;%zu\n", "GtkAccessibleAutocomplete", sizeof(GtkAccessibleAutocomplete), alignof(GtkAccessibleAutocomplete)); + printf("%s;%zu;%zu\n", "GtkAccessibleHyperlinkClass", sizeof(GtkAccessibleHyperlinkClass), alignof(GtkAccessibleHyperlinkClass)); + printf("%s;%zu;%zu\n", "GtkAccessibleHypertextInterface", sizeof(GtkAccessibleHypertextInterface), alignof(GtkAccessibleHypertextInterface)); printf("%s;%zu;%zu\n", "GtkAccessibleInterface", sizeof(GtkAccessibleInterface), alignof(GtkAccessibleInterface)); printf("%s;%zu;%zu\n", "GtkAccessibleInvalidState", sizeof(GtkAccessibleInvalidState), alignof(GtkAccessibleInvalidState)); printf("%s;%zu;%zu\n", "GtkAccessiblePlatformState", sizeof(GtkAccessiblePlatformState), alignof(GtkAccessiblePlatformState)); @@ -247,6 +249,7 @@ int main() { printf("%s;%zu;%zu\n", "GtkRequestedSize", sizeof(GtkRequestedSize), alignof(GtkRequestedSize)); printf("%s;%zu;%zu\n", "GtkRequisition", sizeof(GtkRequisition), alignof(GtkRequisition)); printf("%s;%zu;%zu\n", "GtkResponseType", sizeof(GtkResponseType), alignof(GtkResponseType)); + printf("%s;%zu;%zu\n", "GtkRestoreReason", sizeof(GtkRestoreReason), alignof(GtkRestoreReason)); printf("%s;%zu;%zu\n", "GtkRevealerTransitionType", sizeof(GtkRevealerTransitionType), alignof(GtkRevealerTransitionType)); printf("%s;%zu;%zu\n", "GtkScale", sizeof(GtkScale), alignof(GtkScale)); printf("%s;%zu;%zu\n", "GtkScaleButton", sizeof(GtkScaleButton), alignof(GtkScaleButton)); @@ -289,6 +292,9 @@ int main() { printf("%s;%zu;%zu\n", "GtkStyleContext", sizeof(GtkStyleContext), alignof(GtkStyleContext)); printf("%s;%zu;%zu\n", "GtkStyleContextClass", sizeof(GtkStyleContextClass), alignof(GtkStyleContextClass)); printf("%s;%zu;%zu\n", "GtkStyleContextPrintFlags", sizeof(GtkStyleContextPrintFlags), alignof(GtkStyleContextPrintFlags)); + printf("%s;%zu;%zu\n", "GtkSvgClass", sizeof(GtkSvgClass), alignof(GtkSvgClass)); + printf("%s;%zu;%zu\n", "GtkSvgError", sizeof(GtkSvgError), alignof(GtkSvgError)); + printf("%s;%zu;%zu\n", "GtkSvgLocation", sizeof(GtkSvgLocation), alignof(GtkSvgLocation)); printf("%s;%zu;%zu\n", "GtkSymbolicColor", sizeof(GtkSymbolicColor), alignof(GtkSymbolicColor)); printf("%s;%zu;%zu\n", "GtkSymbolicPaintableInterface", sizeof(GtkSymbolicPaintableInterface), alignof(GtkSymbolicPaintableInterface)); printf("%s;%zu;%zu\n", "GtkSystemSetting", sizeof(GtkSystemSetting), alignof(GtkSystemSetting)); diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index 0188387c116f..bf9649f54698 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 85fe8474df07) -from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84) +from gir-files (https://github.com/gtk-rs/gir-files @ 7f4d93e87b6e)