diff --git a/gdk4-macos/src/auto/versions.txt b/gdk4-macos/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-macos/sys/versions.txt b/gdk4-macos/sys/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4/src/auto/enums.rs b/gdk4/src/auto/enums.rs index dde7ed038d88..7d23f0bfa74f 100644 --- a/gdk4/src/auto/enums.rs +++ b/gdk4/src/auto/enums.rs @@ -1848,6 +1848,42 @@ pub enum MemoryFormat { #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] #[doc(alias = "GDK_MEMORY_B8G8R8G8_422")] B8g8r8g8422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X6G10_X6B10_X6R10_420")] + X6g10X6b10X6r10420, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X6G10_X6B10_X6R10_422")] + X6g10X6b10X6r10422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X6G10_X6B10_X6R10_444")] + X6g10X6b10X6r10444, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X4G12_X4B12_X4R12_420")] + X4g12X4b12X4r12420, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X4G12_X4B12_X4R12_422")] + X4g12X4b12X4r12422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_X4G12_X4B12_X4R12_444")] + X4g12X4b12X4r12444, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_G16_B16_R16_420")] + G16B16R16420, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_G16_B16_R16_422")] + G16B16R16422, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_MEMORY_G16_B16_R16_444")] + G16B16R16444, #[doc(hidden)] __Unknown(i32), } @@ -1965,6 +2001,24 @@ impl IntoGlib for MemoryFormat { Self::R8g8b8g8422 => ffi::GDK_MEMORY_R8G8B8G8_422, #[cfg(feature = "v4_20")] Self::B8g8r8g8422 => ffi::GDK_MEMORY_B8G8R8G8_422, + #[cfg(feature = "v4_20")] + Self::X6g10X6b10X6r10420 => ffi::GDK_MEMORY_X6G10_X6B10_X6R10_420, + #[cfg(feature = "v4_20")] + Self::X6g10X6b10X6r10422 => ffi::GDK_MEMORY_X6G10_X6B10_X6R10_422, + #[cfg(feature = "v4_20")] + Self::X6g10X6b10X6r10444 => ffi::GDK_MEMORY_X6G10_X6B10_X6R10_444, + #[cfg(feature = "v4_20")] + Self::X4g12X4b12X4r12420 => ffi::GDK_MEMORY_X4G12_X4B12_X4R12_420, + #[cfg(feature = "v4_20")] + Self::X4g12X4b12X4r12422 => ffi::GDK_MEMORY_X4G12_X4B12_X4R12_422, + #[cfg(feature = "v4_20")] + Self::X4g12X4b12X4r12444 => ffi::GDK_MEMORY_X4G12_X4B12_X4R12_444, + #[cfg(feature = "v4_20")] + Self::G16B16R16420 => ffi::GDK_MEMORY_G16_B16_R16_420, + #[cfg(feature = "v4_20")] + Self::G16B16R16422 => ffi::GDK_MEMORY_G16_B16_R16_422, + #[cfg(feature = "v4_20")] + Self::G16B16R16444 => ffi::GDK_MEMORY_G16_B16_R16_444, Self::__Unknown(value) => value, } } @@ -2083,6 +2137,24 @@ impl FromGlib for MemoryFormat { ffi::GDK_MEMORY_R8G8B8G8_422 => Self::R8g8b8g8422, #[cfg(feature = "v4_20")] ffi::GDK_MEMORY_B8G8R8G8_422 => Self::B8g8r8g8422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X6G10_X6B10_X6R10_420 => Self::X6g10X6b10X6r10420, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X6G10_X6B10_X6R10_422 => Self::X6g10X6b10X6r10422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X6G10_X6B10_X6R10_444 => Self::X6g10X6b10X6r10444, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X4G12_X4B12_X4R12_420 => Self::X4g12X4b12X4r12420, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X4G12_X4B12_X4R12_422 => Self::X4g12X4b12X4r12422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_X4G12_X4B12_X4R12_444 => Self::X4g12X4b12X4r12444, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_G16_B16_R16_420 => Self::G16B16R16420, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_G16_B16_R16_422 => Self::G16B16R16422, + #[cfg(feature = "v4_20")] + ffi::GDK_MEMORY_G16_B16_R16_444 => Self::G16B16R16444, value => Self::__Unknown(value), } } diff --git a/gdk4/src/auto/flags.rs b/gdk4/src/auto/flags.rs index 1b6e683cef63..255a94bf3128 100644 --- a/gdk4/src/auto/flags.rs +++ b/gdk4/src/auto/flags.rs @@ -213,6 +213,10 @@ bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "GdkDragAction")] pub struct DragAction: u32 { + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GDK_ACTION_NONE")] + const NONE = ffi::GDK_ACTION_NONE as _; #[doc(alias = "GDK_ACTION_COPY")] const COPY = ffi::GDK_ACTION_COPY as _; #[doc(alias = "GDK_ACTION_MOVE")] diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gdk4/sys/src/lib.rs b/gdk4/sys/src/lib.rs index 95e531eb8881..2d09956f8737 100644 --- a/gdk4/sys/src/lib.rs +++ b/gdk4/sys/src/lib.rs @@ -308,7 +308,34 @@ pub const GDK_MEMORY_R8G8B8G8_422: GdkMemoryFormat = 54; #[cfg(feature = "v4_20")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] pub const GDK_MEMORY_B8G8R8G8_422: GdkMemoryFormat = 55; -pub const GDK_MEMORY_N_FORMATS: GdkMemoryFormat = 56; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X6G10_X6B10_X6R10_420: GdkMemoryFormat = 56; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X6G10_X6B10_X6R10_422: GdkMemoryFormat = 57; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X6G10_X6B10_X6R10_444: GdkMemoryFormat = 58; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X4G12_X4B12_X4R12_420: GdkMemoryFormat = 59; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X4G12_X4B12_X4R12_422: GdkMemoryFormat = 60; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_X4G12_X4B12_X4R12_444: GdkMemoryFormat = 61; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_G16_B16_R16_420: GdkMemoryFormat = 62; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_G16_B16_R16_422: GdkMemoryFormat = 63; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_MEMORY_G16_B16_R16_444: GdkMemoryFormat = 64; +pub const GDK_MEMORY_N_FORMATS: GdkMemoryFormat = 65; pub type GdkNotifyType = c_int; pub const GDK_NOTIFY_ANCESTOR: GdkNotifyType = 0; @@ -2855,6 +2882,9 @@ pub const GDK_AXIS_FLAG_ROTATION: GdkAxisFlags = 1024; pub const GDK_AXIS_FLAG_SLIDER: GdkAxisFlags = 2048; pub type GdkDragAction = c_uint; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GDK_ACTION_NONE: GdkDragAction = 0; pub const GDK_ACTION_COPY: GdkDragAction = 1; pub const GDK_ACTION_MOVE: GdkDragAction = 2; pub const GDK_ACTION_LINK: GdkDragAction = 4; diff --git a/gdk4/sys/tests/abi.rs b/gdk4/sys/tests/abi.rs index 2dbfff8e117d..ae3a7251746e 100644 --- a/gdk4/sys/tests/abi.rs +++ b/gdk4/sys/tests/abi.rs @@ -496,6 +496,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GDK_ACTION_COPY", "1"), ("(guint) GDK_ACTION_LINK", "4"), ("(guint) GDK_ACTION_MOVE", "2"), + ("(guint) GDK_ACTION_NONE", "0"), ("(guint) GDK_ALT_MASK", "8"), ("(guint) GDK_ANCHOR_FLIP", "3"), ("(guint) GDK_ANCHOR_FLIP_X", "1"), @@ -3085,6 +3086,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_MEMORY_G16A16", "22"), ("(gint) GDK_MEMORY_G16A16_PREMULTIPLIED", "21"), ("(gint) GDK_MEMORY_G16_B16R16_420", "41"), + ("(gint) GDK_MEMORY_G16_B16_R16_420", "62"), + ("(gint) GDK_MEMORY_G16_B16_R16_422", "63"), + ("(gint) GDK_MEMORY_G16_B16_R16_444", "64"), ("(gint) GDK_MEMORY_G8", "20"), ("(gint) GDK_MEMORY_G8A8", "19"), ("(gint) GDK_MEMORY_G8A8_PREMULTIPLIED", "18"), @@ -3106,7 +3110,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_MEMORY_G8_R8_B8_420", "47"), ("(gint) GDK_MEMORY_G8_R8_B8_422", "49"), ("(gint) GDK_MEMORY_G8_R8_B8_444", "51"), - ("(gint) GDK_MEMORY_N_FORMATS", "56"), + ("(gint) GDK_MEMORY_N_FORMATS", "65"), ("(gint) GDK_MEMORY_R16G16B16", "9"), ("(gint) GDK_MEMORY_R16G16B16A16", "11"), ("(gint) GDK_MEMORY_R16G16B16A16_FLOAT", "14"), @@ -3121,6 +3125,12 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GDK_MEMORY_R8G8B8A8_PREMULTIPLIED", "2"), ("(gint) GDK_MEMORY_R8G8B8G8_422", "54"), ("(gint) GDK_MEMORY_R8G8B8X8", "31"), + ("(gint) GDK_MEMORY_X4G12_X4B12_X4R12_420", "59"), + ("(gint) GDK_MEMORY_X4G12_X4B12_X4R12_422", "60"), + ("(gint) GDK_MEMORY_X4G12_X4B12_X4R12_444", "61"), + ("(gint) GDK_MEMORY_X6G10_X6B10_X6R10_420", "56"), + ("(gint) GDK_MEMORY_X6G10_X6B10_X6R10_422", "57"), + ("(gint) GDK_MEMORY_X6G10_X6B10_X6R10_444", "58"), ("(gint) GDK_MEMORY_X8B8G8R8", "32"), ("(gint) GDK_MEMORY_X8R8G8B8", "30"), ("(guint) GDK_META_MASK", "268435456"), diff --git a/gdk4/sys/tests/constant.c b/gdk4/sys/tests/constant.c index 95b9af354998..eda105bc1abd 100644 --- a/gdk4/sys/tests/constant.c +++ b/gdk4/sys/tests/constant.c @@ -33,6 +33,7 @@ int main() { PRINT_CONSTANT((guint) GDK_ACTION_COPY); PRINT_CONSTANT((guint) GDK_ACTION_LINK); PRINT_CONSTANT((guint) GDK_ACTION_MOVE); + PRINT_CONSTANT((guint) GDK_ACTION_NONE); PRINT_CONSTANT((guint) GDK_ALT_MASK); PRINT_CONSTANT((guint) GDK_ANCHOR_FLIP); PRINT_CONSTANT((guint) GDK_ANCHOR_FLIP_X); @@ -2622,6 +2623,9 @@ int main() { PRINT_CONSTANT((gint) GDK_MEMORY_G16A16); PRINT_CONSTANT((gint) GDK_MEMORY_G16A16_PREMULTIPLIED); PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16R16_420); + PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16_R16_420); + PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16_R16_422); + PRINT_CONSTANT((gint) GDK_MEMORY_G16_B16_R16_444); PRINT_CONSTANT((gint) GDK_MEMORY_G8); PRINT_CONSTANT((gint) GDK_MEMORY_G8A8); PRINT_CONSTANT((gint) GDK_MEMORY_G8A8_PREMULTIPLIED); @@ -2658,6 +2662,12 @@ int main() { PRINT_CONSTANT((gint) GDK_MEMORY_R8G8B8A8_PREMULTIPLIED); PRINT_CONSTANT((gint) GDK_MEMORY_R8G8B8G8_422); PRINT_CONSTANT((gint) GDK_MEMORY_R8G8B8X8); + PRINT_CONSTANT((gint) GDK_MEMORY_X4G12_X4B12_X4R12_420); + PRINT_CONSTANT((gint) GDK_MEMORY_X4G12_X4B12_X4R12_422); + PRINT_CONSTANT((gint) GDK_MEMORY_X4G12_X4B12_X4R12_444); + PRINT_CONSTANT((gint) GDK_MEMORY_X6G10_X6B10_X6R10_420); + PRINT_CONSTANT((gint) GDK_MEMORY_X6G10_X6B10_X6R10_422); + PRINT_CONSTANT((gint) GDK_MEMORY_X6G10_X6B10_X6R10_444); PRINT_CONSTANT((gint) GDK_MEMORY_X8B8G8R8); PRINT_CONSTANT((gint) GDK_MEMORY_X8R8G8B8); PRINT_CONSTANT((guint) GDK_META_MASK); diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index a451446a36bf..442fad27e16b 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gir b/gir index b3d444a058cf..59e3912ac141 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit b3d444a058cfe63f628adf221249a1a332044549 +Subproject commit 59e3912ac141eba46e022a31a53ed938dcdb80f4 diff --git a/gir-files b/gir-files index 5c1e490fe50a..a79d23cd6a42 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 5c1e490fe50a56dae5ee72e39c410aa9d9a0a1ae +Subproject commit a79d23cd6a42a10ed7d2d817b59ab7ebf179f8c9 diff --git a/gsk4/src/auto/broadway_renderer.rs b/gsk4/src/auto/broadway_renderer.rs index cfbe41525229..cd4b10f637fa 100644 --- a/gsk4/src/auto/broadway_renderer.rs +++ b/gsk4/src/auto/broadway_renderer.rs @@ -1,6 +1,7 @@ // This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#![allow(deprecated)] use crate::{ffi, Renderer}; use glib::{prelude::*, translate::*}; @@ -15,6 +16,8 @@ glib::wrapper! { } impl BroadwayRenderer { + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[allow(deprecated)] #[doc(alias = "gsk_broadway_renderer_new")] pub fn new() -> BroadwayRenderer { assert_initialized_main_thread!(); diff --git a/gsk4/src/auto/enums.rs b/gsk4/src/auto/enums.rs index ecb1bd50b0c9..ffb21556d5e1 100644 --- a/gsk4/src/auto/enums.rs +++ b/gsk4/src/auto/enums.rs @@ -1310,6 +1310,10 @@ pub enum RenderNodeType { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(alias = "GSK_SUBSURFACE_NODE")] SubsurfaceNode, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GSK_COMPONENT_TRANSFER_NODE")] + ComponentTransferNode, #[doc(hidden)] __Unknown(i32), } @@ -1356,6 +1360,8 @@ impl IntoGlib for RenderNodeType { Self::StrokeNode => ffi::GSK_STROKE_NODE, #[cfg(feature = "v4_14")] Self::SubsurfaceNode => ffi::GSK_SUBSURFACE_NODE, + #[cfg(feature = "v4_20")] + Self::ComponentTransferNode => ffi::GSK_COMPONENT_TRANSFER_NODE, Self::__Unknown(value) => value, } } @@ -1403,6 +1409,8 @@ impl FromGlib for RenderNodeType { ffi::GSK_STROKE_NODE => Self::StrokeNode, #[cfg(feature = "v4_14")] ffi::GSK_SUBSURFACE_NODE => Self::SubsurfaceNode, + #[cfg(feature = "v4_20")] + ffi::GSK_COMPONENT_TRANSFER_NODE => Self::ComponentTransferNode, value => Self::__Unknown(value), } } diff --git a/gsk4/src/auto/transform.rs b/gsk4/src/auto/transform.rs index c8f512bba421..ceb46816811c 100644 --- a/gsk4/src/auto/transform.rs +++ b/gsk4/src/auto/transform.rs @@ -50,6 +50,32 @@ impl Transform { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gsk_transform_matrix_2d")] + #[must_use] + pub fn matrix_2d( + self, + xx: f32, + yx: f32, + xy: f32, + yy: f32, + dx: f32, + dy: f32, + ) -> Option { + unsafe { + from_glib_full(ffi::gsk_transform_matrix_2d( + self.into_glib_ptr(), + xx, + yx, + xy, + yy, + dx, + dy, + )) + } + } + #[doc(alias = "gsk_transform_perspective")] #[must_use] pub fn perspective(self, depth: f32) -> Transform { diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gsk4/sys/src/lib.rs b/gsk4/sys/src/lib.rs index 7120561667c3..3f416b9dea43 100644 --- a/gsk4/sys/src/lib.rs +++ b/gsk4/sys/src/lib.rs @@ -148,6 +148,9 @@ pub const GSK_STROKE_NODE: GskRenderNodeType = 29; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub const GSK_SUBSURFACE_NODE: GskRenderNodeType = 30; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GSK_COMPONENT_TRANSFER_NODE: GskRenderNodeType = 31; pub type GskScalingFilter = c_int; pub const GSK_SCALING_FILTER_LINEAR: GskScalingFilter = 0; @@ -262,6 +265,20 @@ impl ::std::fmt::Debug for GskColorStop { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GskComponentTransfer { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GskComponentTransfer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GskComponentTransfer @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct _GskGLRendererClass { @@ -604,6 +621,20 @@ impl ::std::fmt::Debug for GskColorNode { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GskComponentTransferNode { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GskComponentTransferNode { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GskComponentTransferNode @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GskConicGradientNode { @@ -1102,6 +1133,52 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gsk_path_foreach_flags_get_type() -> GType; + //========================================================================= + // GskComponentTransfer + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_get_type() -> GType; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_discrete( + n: c_uint, + values: *mut c_float, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_gamma( + amp: c_float, + exp: c_float, + ofs: c_float, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_identity() -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_levels(n: c_float) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_linear(m: c_float, b: c_float) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_new_table( + n: c_uint, + values: *mut c_float, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_copy( + other: *const GskComponentTransfer, + ) -> *mut GskComponentTransfer; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_free(self_: *mut GskComponentTransfer); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_equal(self_: gconstpointer, other: gconstpointer) -> gboolean; + //========================================================================= // GskPath //========================================================================= @@ -1659,6 +1736,17 @@ extern "C" { next: *mut GskTransform, matrix: *const graphene::graphene_matrix_t, ) -> *mut GskTransform; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_transform_matrix_2d( + next: *mut GskTransform, + xx: c_float, + yx: c_float, + xy: c_float, + yy: c_float, + dx: c_float, + dy: c_float, + ) -> *mut GskTransform; pub fn gsk_transform_perspective(next: *mut GskTransform, depth: c_float) -> *mut GskTransform; pub fn gsk_transform_print(self_: *mut GskTransform, string: *mut glib::GString); pub fn gsk_transform_ref(self_: *mut GskTransform) -> *mut GskTransform; @@ -1848,6 +1936,31 @@ extern "C" { ) -> *mut GskColorNode; pub fn gsk_color_node_get_color(node: *const GskColorNode) -> *const gdk::GdkRGBA; + //========================================================================= + // GskComponentTransferNode + //========================================================================= + pub fn gsk_component_transfer_node_get_type() -> GType; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_new( + child: *mut GskRenderNode, + r: *const GskComponentTransfer, + g: *const GskComponentTransfer, + b: *const GskComponentTransfer, + a: *const GskComponentTransfer, + ) -> *mut GskComponentTransferNode; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_get_child( + node: *const GskComponentTransferNode, + ) -> *mut GskRenderNode; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gsk_component_transfer_node_get_transfer( + node: *const GskComponentTransferNode, + component: c_uint, + ) -> *const GskComponentTransfer; + //========================================================================= // GskConicGradientNode //========================================================================= diff --git a/gsk4/sys/tests/abi.rs b/gsk4/sys/tests/abi.rs index 1f3b7f12e526..bc7350dfb488 100644 --- a/gsk4/sys/tests/abi.rs +++ b/gsk4/sys/tests/abi.rs @@ -374,6 +374,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GSK_CLIP_NODE", "17"), ("(gint) GSK_COLOR_MATRIX_NODE", "15"), ("(gint) GSK_COLOR_NODE", "3"), + ("(gint) GSK_COMPONENT_TRANSFER_NODE", "31"), ("(gint) GSK_CONIC_GRADIENT_NODE", "8"), ("(gint) GSK_CONTAINER_NODE", "1"), ("(gint) GSK_CORNER_BOTTOM_LEFT", "3"), diff --git a/gsk4/sys/tests/constant.c b/gsk4/sys/tests/constant.c index c0520332e1a2..71e6e4cb707e 100644 --- a/gsk4/sys/tests/constant.c +++ b/gsk4/sys/tests/constant.c @@ -51,6 +51,7 @@ int main() { PRINT_CONSTANT((gint) GSK_CLIP_NODE); PRINT_CONSTANT((gint) GSK_COLOR_MATRIX_NODE); PRINT_CONSTANT((gint) GSK_COLOR_NODE); + PRINT_CONSTANT((gint) GSK_COMPONENT_TRANSFER_NODE); PRINT_CONSTANT((gint) GSK_CONIC_GRADIENT_NODE); PRINT_CONSTANT((gint) GSK_CONTAINER_NODE); PRINT_CONSTANT((gint) GSK_CORNER_BOTTOM_LEFT); diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index a451446a36bf..442fad27e16b 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gtk4/src/auto/application.rs b/gtk4/src/auto/application.rs index 555ac6a811ea..77adc40089f6 100644 --- a/gtk4/src/auto/application.rs +++ b/gtk4/src/auto/application.rs @@ -54,6 +54,7 @@ impl ApplicationBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn register_session(self, register_session: bool) -> Self { Self { builder: self.builder.property("register-session", register_session), @@ -261,11 +262,13 @@ pub trait GtkApplicationExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[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")] #[doc(alias = "register-session")] fn set_register_session(&self, register_session: bool) { ObjectExt::set_property(self.as_ref(), "register-session", register_session) @@ -405,6 +408,7 @@ pub trait GtkApplicationExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "register-session")] fn connect_register_session_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_register_session_trampoline< diff --git a/gtk4/src/auto/css_provider.rs b/gtk4/src/auto/css_provider.rs index 76b257ba2b91..dccfc3755bde 100644 --- a/gtk4/src/auto/css_provider.rs +++ b/gtk4/src/auto/css_provider.rs @@ -28,6 +28,14 @@ impl CssProvider { unsafe { from_glib_full(ffi::gtk_css_provider_new()) } } + // rustdoc-stripper-ignore-next + /// Creates a new builder-pattern struct instance to construct [`CssProvider`] objects. + /// + /// This method returns an instance of [`CssProviderBuilder`](crate::builders::CssProviderBuilder) which can be used to create [`CssProvider`] objects. + pub fn builder() -> CssProviderBuilder { + CssProviderBuilder::new() + } + #[cfg(feature = "v4_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] #[doc(alias = "gtk_css_provider_load_from_bytes")] @@ -90,6 +98,8 @@ impl CssProvider { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] + #[allow(deprecated)] #[doc(alias = "gtk_css_provider_load_named")] pub fn load_named(&self, name: &str, variant: Option<&str>) { unsafe { @@ -107,6 +117,34 @@ impl CssProvider { unsafe { from_glib_full(ffi::gtk_css_provider_to_string(self.to_glib_none().0)) } } + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "prefers-color-scheme")] + //pub fn prefers_color_scheme(&self) -> /*Ignored*/InterfaceColorScheme { + // ObjectExt::property(self, "prefers-color-scheme") + //} + + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "prefers-color-scheme")] + //pub fn set_prefers_color_scheme(&self, prefers_color_scheme: /*Ignored*/InterfaceColorScheme) { + // ObjectExt::set_property(self,"prefers-color-scheme", prefers_color_scheme) + //} + + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "prefers-contrast")] + //pub fn prefers_contrast(&self) -> /*Ignored*/InterfaceContrast { + // ObjectExt::property(self, "prefers-contrast") + //} + + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "prefers-contrast")] + //pub fn set_prefers_contrast(&self, prefers_contrast: /*Ignored*/InterfaceContrast) { + // ObjectExt::set_property(self,"prefers-contrast", prefers_contrast) + //} + #[doc(alias = "parsing-error")] pub fn connect_parsing_error( &self, @@ -139,6 +177,61 @@ impl CssProvider { ) } } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-color-scheme")] + pub fn connect_prefers_color_scheme_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_prefers_color_scheme_trampoline< + F: Fn(&CssProvider) + 'static, + >( + this: *mut ffi::GtkCssProvider, + _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::prefers-color-scheme".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_prefers_color_scheme_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "prefers-contrast")] + pub fn connect_prefers_contrast_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_prefers_contrast_trampoline( + this: *mut ffi::GtkCssProvider, + _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::prefers-contrast".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_prefers_contrast_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } impl Default for CssProvider { @@ -153,3 +246,40 @@ impl std::fmt::Display for CssProvider { f.write_str(&self.to_str()) } } + +// rustdoc-stripper-ignore-next +/// A [builder-pattern] type to construct [`CssProvider`] 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 CssProviderBuilder { + builder: glib::object::ObjectBuilder<'static, CssProvider>, +} + +impl CssProviderBuilder { + fn new() -> Self { + Self { + builder: glib::object::Object::builder(), + } + } + + // #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //pub fn prefers_color_scheme(self, prefers_color_scheme: /*Ignored*/InterfaceColorScheme) -> Self { + // Self { builder: self.builder.property("prefers-color-scheme", prefers_color_scheme), } + //} + + // #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //pub fn prefers_contrast(self, prefers_contrast: /*Ignored*/InterfaceContrast) -> Self { + // Self { builder: self.builder.property("prefers-contrast", prefers_contrast), } + //} + + // rustdoc-stripper-ignore-next + /// Build the [`CssProvider`]. + #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] + pub fn build(self) -> CssProvider { + assert_initialized_main_thread!(); + self.builder.build() + } +} diff --git a/gtk4/src/auto/entry.rs b/gtk4/src/auto/entry.rs index 69adf9ad6150..6f85a8de091f 100644 --- a/gtk4/src/auto/entry.rs +++ b/gtk4/src/auto/entry.rs @@ -164,6 +164,34 @@ impl EntryBuilder { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn menu_entry_icon_primary_text( + self, + menu_entry_icon_primary_text: impl Into, + ) -> Self { + Self { + builder: self.builder.property( + "menu-entry-icon-primary-text", + menu_entry_icon_primary_text.into(), + ), + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn menu_entry_icon_secondary_text( + self, + menu_entry_icon_secondary_text: impl Into, + ) -> Self { + Self { + builder: self.builder.property( + "menu-entry-icon-secondary-text", + menu_entry_icon_secondary_text.into(), + ), + } + } + pub fn overwrite_mode(self, overwrite_mode: bool) -> Self { Self { builder: self.builder.property("overwrite-mode", overwrite_mode), @@ -804,6 +832,19 @@ pub trait EntryExt: IsA + 'static { unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) } } + #[cfg(feature = "v4_19")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_19")))] + #[doc(alias = "gtk_entry_get_menu_entry_icon_text")] + #[doc(alias = "get_menu_entry_icon_text")] + fn menu_entry_icon_text(&self, icon_pos: EntryIconPosition) -> Option { + unsafe { + from_glib_none(ffi::gtk_entry_get_menu_entry_icon_text( + self.as_ref().to_glib_none().0, + icon_pos.into_glib(), + )) + } + } + #[doc(alias = "gtk_entry_get_overwrite_mode")] #[doc(alias = "get_overwrite_mode")] #[doc(alias = "overwrite-mode")] @@ -1086,6 +1127,19 @@ pub trait EntryExt: IsA + 'static { } } + #[cfg(feature = "v4_19")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_19")))] + #[doc(alias = "gtk_entry_set_menu_entry_icon_text")] + fn set_menu_entry_icon_text(&self, icon_pos: EntryIconPosition, text: &str) { + unsafe { + ffi::gtk_entry_set_menu_entry_icon_text( + self.as_ref().to_glib_none().0, + icon_pos.into_glib(), + text.to_glib_none().0, + ); + } + } + #[doc(alias = "gtk_entry_set_overwrite_mode")] #[doc(alias = "overwrite-mode")] fn set_overwrite_mode(&self, overwrite: bool) { @@ -1179,6 +1233,42 @@ pub trait EntryExt: IsA + 'static { ObjectExt::property(self.as_ref(), "invisible-char-set") } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-primary-text")] + fn menu_entry_icon_primary_text(&self) -> Option { + ObjectExt::property(self.as_ref(), "menu-entry-icon-primary-text") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-primary-text")] + fn set_menu_entry_icon_primary_text(&self, menu_entry_icon_primary_text: Option<&str>) { + ObjectExt::set_property( + self.as_ref(), + "menu-entry-icon-primary-text", + menu_entry_icon_primary_text, + ) + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-secondary-text")] + fn menu_entry_icon_secondary_text(&self) -> Option { + ObjectExt::property(self.as_ref(), "menu-entry-icon-secondary-text") + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-secondary-text")] + fn set_menu_entry_icon_secondary_text(&self, menu_entry_icon_secondary_text: Option<&str>) { + ObjectExt::set_property( + self.as_ref(), + "menu-entry-icon-secondary-text", + menu_entry_icon_secondary_text, + ) + } + #[doc(alias = "primary-icon-activatable")] fn is_primary_icon_activatable(&self) -> bool { ObjectExt::property(self.as_ref(), "primary-icon-activatable") @@ -1805,6 +1895,68 @@ pub trait EntryExt: IsA + 'static { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-primary-text")] + fn connect_menu_entry_icon_primary_text_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_menu_entry_icon_primary_text_trampoline< + P: IsA, + F: Fn(&P) + 'static, + >( + this: *mut ffi::GtkEntry, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(Entry::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + c"notify::menu-entry-icon-primary-text".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_menu_entry_icon_primary_text_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "menu-entry-icon-secondary-text")] + fn connect_menu_entry_icon_secondary_text_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_menu_entry_icon_secondary_text_trampoline< + P: IsA, + F: Fn(&P) + 'static, + >( + this: *mut ffi::GtkEntry, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) { + let f: &F = &*(f as *const F); + f(Entry::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + c"notify::menu-entry-icon-secondary-text".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_menu_entry_icon_secondary_text_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + #[doc(alias = "overwrite-mode")] fn connect_overwrite_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_overwrite_mode_trampoline< diff --git a/gtk4/src/auto/enums.rs b/gtk4/src/auto/enums.rs index d8e44c1b3460..68cc8b818078 100644 --- a/gtk4/src/auto/enums.rs +++ b/gtk4/src/auto/enums.rs @@ -4715,6 +4715,18 @@ pub enum FilterChange { LessStrict, #[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT")] MoreStrict, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_FILTER_CHANGE_DIFFERENT_REWATCH")] + DifferentRewatch, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_FILTER_CHANGE_LESS_STRICT_REWATCH")] + LessStrictRewatch, + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "GTK_FILTER_CHANGE_MORE_STRICT_REWATCH")] + MoreStrictRewatch, #[doc(hidden)] __Unknown(i32), } @@ -4729,6 +4741,12 @@ impl IntoGlib for FilterChange { Self::Different => ffi::GTK_FILTER_CHANGE_DIFFERENT, Self::LessStrict => ffi::GTK_FILTER_CHANGE_LESS_STRICT, Self::MoreStrict => ffi::GTK_FILTER_CHANGE_MORE_STRICT, + #[cfg(feature = "v4_20")] + Self::DifferentRewatch => ffi::GTK_FILTER_CHANGE_DIFFERENT_REWATCH, + #[cfg(feature = "v4_20")] + Self::LessStrictRewatch => ffi::GTK_FILTER_CHANGE_LESS_STRICT_REWATCH, + #[cfg(feature = "v4_20")] + Self::MoreStrictRewatch => ffi::GTK_FILTER_CHANGE_MORE_STRICT_REWATCH, Self::__Unknown(value) => value, } } @@ -4744,6 +4762,12 @@ impl FromGlib for FilterChange { ffi::GTK_FILTER_CHANGE_DIFFERENT => Self::Different, ffi::GTK_FILTER_CHANGE_LESS_STRICT => Self::LessStrict, ffi::GTK_FILTER_CHANGE_MORE_STRICT => Self::MoreStrict, + #[cfg(feature = "v4_20")] + ffi::GTK_FILTER_CHANGE_DIFFERENT_REWATCH => Self::DifferentRewatch, + #[cfg(feature = "v4_20")] + ffi::GTK_FILTER_CHANGE_LESS_STRICT_REWATCH => Self::LessStrictRewatch, + #[cfg(feature = "v4_20")] + ffi::GTK_FILTER_CHANGE_MORE_STRICT_REWATCH => Self::MoreStrictRewatch, value => Self::__Unknown(value), } } diff --git a/gtk4/src/auto/filter_list_model.rs b/gtk4/src/auto/filter_list_model.rs index 21c7d7257dde..f1c3c3918d51 100644 --- a/gtk4/src/auto/filter_list_model.rs +++ b/gtk4/src/auto/filter_list_model.rs @@ -86,6 +86,19 @@ impl FilterListModel { unsafe { ffi::gtk_filter_list_model_get_pending(self.to_glib_none().0) } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_filter_list_model_get_watch_items")] + #[doc(alias = "get_watch_items")] + #[doc(alias = "watch-items")] + pub fn is_watch_items(&self) -> bool { + unsafe { + from_glib(ffi::gtk_filter_list_model_get_watch_items( + self.to_glib_none().0, + )) + } + } + #[doc(alias = "gtk_filter_list_model_set_filter")] #[doc(alias = "filter")] pub fn set_filter(&self, filter: Option<&impl IsA>) { @@ -119,6 +132,19 @@ impl FilterListModel { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk_filter_list_model_set_watch_items")] + #[doc(alias = "watch-items")] + pub fn set_watch_items(&self, watch_items: bool) { + unsafe { + ffi::gtk_filter_list_model_set_watch_items( + self.to_glib_none().0, + watch_items.into_glib(), + ); + } + } + #[doc(alias = "filter")] pub fn connect_filter_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_filter_trampoline( @@ -210,6 +236,31 @@ impl FilterListModel { ) } } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "watch-items")] + pub fn connect_watch_items_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_watch_items_trampoline( + this: *mut ffi::GtkFilterListModel, + _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::watch-items".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_watch_items_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } impl Default for FilterListModel { @@ -252,6 +303,14 @@ impl FilterListModelBuilder { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn watch_items(self, watch_items: bool) -> Self { + Self { + builder: self.builder.property("watch-items", watch_items), + } + } + // rustdoc-stripper-ignore-next /// Build the [`FilterListModel`]. #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"] diff --git a/gtk4/src/auto/mod.rs b/gtk4/src/auto/mod.rs index 6eab0f8ee095..35f62ab729cc 100644 --- a/gtk4/src/auto/mod.rs +++ b/gtk4/src/auto/mod.rs @@ -1650,6 +1650,7 @@ pub(crate) mod builders { pub use super::combo_box_text::ComboBoxTextBuilder; pub use super::constraint::ConstraintBuilder; pub use super::constraint_guide::ConstraintGuideBuilder; + pub use super::css_provider::CssProviderBuilder; #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")] pub use super::dialog::DialogBuilder; pub use super::drag_source::DragSourceBuilder; diff --git a/gtk4/src/auto/settings.rs b/gtk4/src/auto/settings.rs index 55efaa8b81f4..15a50c2294bf 100644 --- a/gtk4/src/auto/settings.rs +++ b/gtk4/src/auto/settings.rs @@ -66,11 +66,13 @@ impl Settings { ) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-application-prefer-dark-theme")] pub fn is_gtk_application_prefer_dark_theme(&self) -> bool { ObjectExt::property(self, "gtk-application-prefer-dark-theme") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-application-prefer-dark-theme")] pub fn set_gtk_application_prefer_dark_theme(&self, gtk_application_prefer_dark_theme: bool) { ObjectExt::set_property( @@ -346,6 +348,34 @@ impl Settings { ObjectExt::set_property(self, "gtk-im-module", gtk_im_module) } + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "gtk-interface-color-scheme")] + //pub fn gtk_interface_color_scheme(&self) -> /*Ignored*/InterfaceColorScheme { + // ObjectExt::property(self, "gtk-interface-color-scheme") + //} + + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "gtk-interface-color-scheme")] + //pub fn set_gtk_interface_color_scheme(&self, gtk_interface_color_scheme: /*Ignored*/InterfaceColorScheme) { + // ObjectExt::set_property(self,"gtk-interface-color-scheme", gtk_interface_color_scheme) + //} + + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "gtk-interface-contrast")] + //pub fn gtk_interface_contrast(&self) -> /*Ignored*/InterfaceContrast { + // ObjectExt::property(self, "gtk-interface-contrast") + //} + + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "gtk-interface-contrast")] + //pub fn set_gtk_interface_contrast(&self, gtk_interface_contrast: /*Ignored*/InterfaceContrast) { + // ObjectExt::set_property(self,"gtk-interface-contrast", gtk_interface_contrast) + //} + #[doc(alias = "gtk-keynav-use-caret")] pub fn is_gtk_keynav_use_caret(&self) -> bool { ObjectExt::property(self, "gtk-keynav-use-caret") @@ -440,31 +470,37 @@ impl Settings { ObjectExt::set_property(self, "gtk-recent-files-max-age", gtk_recent_files_max_age) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-app-menu")] pub fn is_gtk_shell_shows_app_menu(&self) -> bool { ObjectExt::property(self, "gtk-shell-shows-app-menu") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-app-menu")] pub fn set_gtk_shell_shows_app_menu(&self, gtk_shell_shows_app_menu: bool) { ObjectExt::set_property(self, "gtk-shell-shows-app-menu", gtk_shell_shows_app_menu) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-desktop")] pub fn is_gtk_shell_shows_desktop(&self) -> bool { ObjectExt::property(self, "gtk-shell-shows-desktop") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-desktop")] pub fn set_gtk_shell_shows_desktop(&self, gtk_shell_shows_desktop: bool) { ObjectExt::set_property(self, "gtk-shell-shows-desktop", gtk_shell_shows_desktop) } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-menubar")] pub fn is_gtk_shell_shows_menubar(&self) -> bool { ObjectExt::property(self, "gtk-shell-shows-menubar") } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-menubar")] pub fn set_gtk_shell_shows_menubar(&self, gtk_shell_shows_menubar: bool) { ObjectExt::set_property(self, "gtk-shell-shows-menubar", gtk_shell_shows_menubar) @@ -669,6 +705,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-application-prefer-dark-theme")] pub fn connect_gtk_application_prefer_dark_theme_notify( &self, @@ -1361,6 +1398,66 @@ impl Settings { } } + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-color-scheme")] + pub fn connect_gtk_interface_color_scheme_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_gtk_interface_color_scheme_trampoline< + F: Fn(&Settings) + 'static, + >( + this: *mut ffi::GtkSettings, + _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::gtk-interface-color-scheme".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_gtk_interface_color_scheme_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + #[doc(alias = "gtk-interface-contrast")] + pub fn connect_gtk_interface_contrast_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_gtk_interface_contrast_trampoline< + F: Fn(&Settings) + 'static, + >( + this: *mut ffi::GtkSettings, + _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::gtk-interface-contrast".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_gtk_interface_contrast_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + #[doc(alias = "gtk-keynav-use-caret")] pub fn connect_gtk_keynav_use_caret_notify( &self, @@ -1605,6 +1702,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-app-menu")] pub fn connect_gtk_shell_shows_app_menu_notify( &self, @@ -1633,6 +1731,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-desktop")] pub fn connect_gtk_shell_shows_desktop_notify( &self, @@ -1661,6 +1760,7 @@ impl Settings { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] #[doc(alias = "gtk-shell-shows-menubar")] pub fn connect_gtk_shell_shows_menubar_notify( &self, @@ -2029,6 +2129,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_application_prefer_dark_theme( self, gtk_application_prefer_dark_theme: bool, @@ -2239,6 +2340,18 @@ impl SettingsBuilder { } } + // #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //pub fn gtk_interface_color_scheme(self, gtk_interface_color_scheme: /*Ignored*/InterfaceColorScheme) -> Self { + // Self { builder: self.builder.property("gtk-interface-color-scheme", gtk_interface_color_scheme), } + //} + + // #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //pub fn gtk_interface_contrast(self, gtk_interface_contrast: /*Ignored*/InterfaceContrast) -> Self { + // Self { builder: self.builder.property("gtk-interface-contrast", gtk_interface_contrast), } + //} + pub fn gtk_keynav_use_caret(self, gtk_keynav_use_caret: bool) -> Self { Self { builder: self @@ -2316,6 +2429,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_shell_shows_app_menu(self, gtk_shell_shows_app_menu: bool) -> Self { Self { builder: self @@ -2324,6 +2438,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_shell_shows_desktop(self, gtk_shell_shows_desktop: bool) -> Self { Self { builder: self @@ -2332,6 +2447,7 @@ impl SettingsBuilder { } } + #[cfg_attr(feature = "v4_20", deprecated = "Since 4.20")] pub fn gtk_shell_shows_menubar(self, gtk_shell_shows_menubar: bool) -> Self { Self { builder: self diff --git a/gtk4/src/auto/snapshot.rs b/gtk4/src/auto/snapshot.rs index 83b8acdceb92..61b4c49edadc 100644 --- a/gtk4/src/auto/snapshot.rs +++ b/gtk4/src/auto/snapshot.rs @@ -371,6 +371,13 @@ pub trait SnapshotExt: IsA + 'static { } } + //#[cfg(feature = "v4_20")] + //#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + //#[doc(alias = "gtk_snapshot_push_component_transfer")] + //fn push_component_transfer(&self, red: /*Ignored*/&gsk::ComponentTransfer, green: /*Ignored*/&gsk::ComponentTransfer, blue: /*Ignored*/&gsk::ComponentTransfer, alpha: /*Ignored*/&gsk::ComponentTransfer) { + // unsafe { TODO: call ffi:gtk_snapshot_push_component_transfer() } + //} + #[doc(alias = "gtk_snapshot_push_cross_fade")] fn push_cross_fade(&self, progress: f64) { unsafe { diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index a451446a36bf..442fad27e16b 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 @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42) diff --git a/gtk4/sys/Cargo.toml b/gtk4/sys/Cargo.toml index 03e242977ff9..8a9adb8a5eae 100644 --- a/gtk4/sys/Cargo.toml +++ b/gtk4/sys/Cargo.toml @@ -64,6 +64,9 @@ version = "4.18" [package.metadata.system-deps.gtk4.v4_20] version = "4.19" +[package.metadata.system-deps.gtk4.v4_19] +version = "4.19" + [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] @@ -82,7 +85,8 @@ v4_12 = ["v4_10"] v4_14 = ["v4_12"] v4_16 = ["v4_14"] v4_18 = ["v4_16"] -v4_20 = ["v4_18"] +v4_20 = ["v4_19"] +v4_19 = ["v4_18"] [dependencies] libc = "0.2" diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index 827784ad80f1..e049c7b3d43d 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -459,6 +459,15 @@ pub type GtkFilterChange = c_int; pub const GTK_FILTER_CHANGE_DIFFERENT: GtkFilterChange = 0; pub const GTK_FILTER_CHANGE_LESS_STRICT: GtkFilterChange = 1; pub const GTK_FILTER_CHANGE_MORE_STRICT: GtkFilterChange = 2; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_FILTER_CHANGE_DIFFERENT_REWATCH: GtkFilterChange = 3; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_FILTER_CHANGE_LESS_STRICT_REWATCH: GtkFilterChange = 4; +#[cfg(feature = "v4_20")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] +pub const GTK_FILTER_CHANGE_MORE_STRICT_REWATCH: GtkFilterChange = 5; pub type GtkFilterMatch = c_int; pub const GTK_FILTER_MATCH_SOME: GtkFilterMatch = 0; @@ -521,6 +530,18 @@ pub const GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START: GtkInscriptionOverflow = 1; pub const GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE: GtkInscriptionOverflow = 2; pub const GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END: GtkInscriptionOverflow = 3; +pub type GtkInterfaceColorScheme = c_int; +pub const GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED: GtkInterfaceColorScheme = 0; +pub const GTK_INTERFACE_COLOR_SCHEME_DEFAULT: GtkInterfaceColorScheme = 1; +pub const GTK_INTERFACE_COLOR_SCHEME_DARK: GtkInterfaceColorScheme = 2; +pub const GTK_INTERFACE_COLOR_SCHEME_LIGHT: GtkInterfaceColorScheme = 3; + +pub type GtkInterfaceContrast = c_int; +pub const GTK_INTERFACE_CONTRAST_UNSUPPORTED: GtkInterfaceContrast = 0; +pub const GTK_INTERFACE_CONTRAST_NO_PREFERENCE: GtkInterfaceContrast = 1; +pub const GTK_INTERFACE_CONTRAST_MORE: GtkInterfaceContrast = 2; +pub const GTK_INTERFACE_CONTRAST_LESS: GtkInterfaceContrast = 3; + pub type GtkJustification = c_int; pub const GTK_JUSTIFY_LEFT: GtkJustification = 0; pub const GTK_JUSTIFY_RIGHT: GtkJustification = 1; @@ -10163,6 +10184,20 @@ extern "C" { #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))] pub fn gtk_inscription_overflow_get_type() -> GType; + //========================================================================= + // GtkInterfaceColorScheme + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_interface_color_scheme_get_type() -> GType; + + //========================================================================= + // GtkInterfaceContrast + //========================================================================= + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_interface_contrast_get_type() -> GType; + //========================================================================= // GtkJustification //========================================================================= @@ -13610,6 +13645,12 @@ extern "C" { pub fn gtk_entry_get_input_purpose(entry: *mut GtkEntry) -> GtkInputPurpose; pub fn gtk_entry_get_invisible_char(entry: *mut GtkEntry) -> u32; pub fn gtk_entry_get_max_length(entry: *mut GtkEntry) -> c_int; + #[cfg(feature = "v4_19")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_19")))] + pub fn gtk_entry_get_menu_entry_icon_text( + entry: *mut GtkEntry, + icon_pos: GtkEntryIconPosition, + ) -> *const c_char; pub fn gtk_entry_get_overwrite_mode(entry: *mut GtkEntry) -> gboolean; pub fn gtk_entry_get_placeholder_text(entry: *mut GtkEntry) -> *const c_char; pub fn gtk_entry_get_progress_fraction(entry: *mut GtkEntry) -> c_double; @@ -13672,6 +13713,13 @@ extern "C" { pub fn gtk_entry_set_input_purpose(entry: *mut GtkEntry, purpose: GtkInputPurpose); pub fn gtk_entry_set_invisible_char(entry: *mut GtkEntry, ch: u32); pub fn gtk_entry_set_max_length(entry: *mut GtkEntry, max: c_int); + #[cfg(feature = "v4_19")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_19")))] + pub fn gtk_entry_set_menu_entry_icon_text( + entry: *mut GtkEntry, + icon_pos: GtkEntryIconPosition, + text: *const c_char, + ); pub fn gtk_entry_set_overwrite_mode(entry: *mut GtkEntry, overwrite: gboolean); pub fn gtk_entry_set_placeholder_text(entry: *mut GtkEntry, text: *const c_char); pub fn gtk_entry_set_progress_fraction(entry: *mut GtkEntry, fraction: c_double); @@ -14286,6 +14334,9 @@ extern "C" { pub fn gtk_filter_list_model_get_incremental(self_: *mut GtkFilterListModel) -> gboolean; pub fn gtk_filter_list_model_get_model(self_: *mut GtkFilterListModel) -> *mut gio::GListModel; pub fn gtk_filter_list_model_get_pending(self_: *mut GtkFilterListModel) -> c_uint; + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_filter_list_model_get_watch_items(self_: *mut GtkFilterListModel) -> gboolean; pub fn gtk_filter_list_model_set_filter(self_: *mut GtkFilterListModel, filter: *mut GtkFilter); pub fn gtk_filter_list_model_set_incremental( self_: *mut GtkFilterListModel, @@ -14295,6 +14346,12 @@ extern "C" { self_: *mut GtkFilterListModel, model: *mut gio::GListModel, ); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_filter_list_model_set_watch_items( + self_: *mut GtkFilterListModel, + watch_items: gboolean, + ); //========================================================================= // GtkFixed @@ -18170,6 +18227,15 @@ extern "C" { color_matrix: *const graphene::graphene_matrix_t, color_offset: *const graphene::graphene_vec4_t, ); + #[cfg(feature = "v4_20")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))] + pub fn gtk_snapshot_push_component_transfer( + snapshot: *mut GtkSnapshot, + red: *const gsk::GskComponentTransfer, + green: *const gsk::GskComponentTransfer, + blue: *const gsk::GskComponentTransfer, + alpha: *const gsk::GskComponentTransfer, + ); pub fn gtk_snapshot_push_cross_fade(snapshot: *mut GtkSnapshot, progress: c_double); pub fn gtk_snapshot_push_debug(snapshot: *mut GtkSnapshot, message: *const c_char, ...); #[cfg(feature = "v4_14")] diff --git a/gtk4/sys/tests/abi.rs b/gtk4/sys/tests/abi.rs index 879ff9048d9c..39a1d3d7c1b4 100644 --- a/gtk4/sys/tests/abi.rs +++ b/gtk4/sys/tests/abi.rs @@ -1321,6 +1321,20 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GtkInterfaceColorScheme", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GtkInterfaceContrast", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GtkJustification", Layout { @@ -2998,8 +3012,11 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME", "3"), ("(gint) GTK_FILE_CHOOSER_ERROR_NONEXISTENT", "0"), ("(gint) GTK_FILTER_CHANGE_DIFFERENT", "0"), + ("(gint) GTK_FILTER_CHANGE_DIFFERENT_REWATCH", "3"), ("(gint) GTK_FILTER_CHANGE_LESS_STRICT", "1"), + ("(gint) GTK_FILTER_CHANGE_LESS_STRICT_REWATCH", "4"), ("(gint) GTK_FILTER_CHANGE_MORE_STRICT", "2"), + ("(gint) GTK_FILTER_CHANGE_MORE_STRICT_REWATCH", "5"), ("(gint) GTK_FILTER_MATCH_ALL", "2"), ("(gint) GTK_FILTER_MATCH_NONE", "1"), ("(gint) GTK_FILTER_MATCH_SOME", "0"), @@ -3065,6 +3082,14 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END", "3"), ("(gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE", "2"), ("(gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START", "1"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_DARK", "2"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_DEFAULT", "1"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_LIGHT", "3"), + ("(gint) GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED", "0"), + ("(gint) GTK_INTERFACE_CONTRAST_LESS", "3"), + ("(gint) GTK_INTERFACE_CONTRAST_MORE", "2"), + ("(gint) GTK_INTERFACE_CONTRAST_NO_PREFERENCE", "1"), + ("(gint) GTK_INTERFACE_CONTRAST_UNSUPPORTED", "0"), ("GTK_INVALID_LIST_POSITION", "4294967295"), ("(gint) GTK_JUSTIFY_CENTER", "2"), ("(gint) GTK_JUSTIFY_FILL", "3"), diff --git a/gtk4/sys/tests/constant.c b/gtk4/sys/tests/constant.c index e71f5a63e74c..90d25daa2133 100644 --- a/gtk4/sys/tests/constant.c +++ b/gtk4/sys/tests/constant.c @@ -413,8 +413,11 @@ int main() { PRINT_CONSTANT((gint) GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME); PRINT_CONSTANT((gint) GTK_FILE_CHOOSER_ERROR_NONEXISTENT); PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_DIFFERENT); + PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_DIFFERENT_REWATCH); PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_LESS_STRICT); + PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_LESS_STRICT_REWATCH); PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_MORE_STRICT); + PRINT_CONSTANT((gint) GTK_FILTER_CHANGE_MORE_STRICT_REWATCH); PRINT_CONSTANT((gint) GTK_FILTER_MATCH_ALL); PRINT_CONSTANT((gint) GTK_FILTER_MATCH_NONE); PRINT_CONSTANT((gint) GTK_FILTER_MATCH_SOME); @@ -480,6 +483,14 @@ int main() { PRINT_CONSTANT((gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END); PRINT_CONSTANT((gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE); PRINT_CONSTANT((gint) GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_DARK); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_DEFAULT); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_LIGHT); + PRINT_CONSTANT((gint) GTK_INTERFACE_COLOR_SCHEME_UNSUPPORTED); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_LESS); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_MORE); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_NO_PREFERENCE); + PRINT_CONSTANT((gint) GTK_INTERFACE_CONTRAST_UNSUPPORTED); PRINT_CONSTANT(GTK_INVALID_LIST_POSITION); PRINT_CONSTANT((gint) GTK_JUSTIFY_CENTER); PRINT_CONSTANT((gint) GTK_JUSTIFY_FILL); diff --git a/gtk4/sys/tests/layout.c b/gtk4/sys/tests/layout.c index 481e15202086..7d090a1a9eea 100644 --- a/gtk4/sys/tests/layout.c +++ b/gtk4/sys/tests/layout.c @@ -167,6 +167,8 @@ int main() { printf("%s;%zu;%zu\n", "GtkInputPurpose", sizeof(GtkInputPurpose), alignof(GtkInputPurpose)); printf("%s;%zu;%zu\n", "GtkInscriptionClass", sizeof(GtkInscriptionClass), alignof(GtkInscriptionClass)); printf("%s;%zu;%zu\n", "GtkInscriptionOverflow", sizeof(GtkInscriptionOverflow), alignof(GtkInscriptionOverflow)); + printf("%s;%zu;%zu\n", "GtkInterfaceColorScheme", sizeof(GtkInterfaceColorScheme), alignof(GtkInterfaceColorScheme)); + printf("%s;%zu;%zu\n", "GtkInterfaceContrast", sizeof(GtkInterfaceContrast), alignof(GtkInterfaceContrast)); printf("%s;%zu;%zu\n", "GtkJustification", sizeof(GtkJustification), alignof(GtkJustification)); printf("%s;%zu;%zu\n", "GtkLayoutChild", sizeof(GtkLayoutChild), alignof(GtkLayoutChild)); printf("%s;%zu;%zu\n", "GtkLayoutChildClass", sizeof(GtkLayoutChildClass), alignof(GtkLayoutChildClass)); diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index a451446a36bf..442fad27e16b 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ b3d444a058cf) -from gir-files (https://github.com/gtk-rs/gir-files @ 5c1e490fe50a) +Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141) +from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)