diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1bc4c2b346cd..6ecc7cef9407 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -43,7 +43,7 @@ jobs: conf: - { name: "gtk4", - features: "v4_16,xml_validation,blueprint", + features: "v4_18,xml_validation,blueprint", test_sys: false, } - { name: "gsk4", features: "v4_14,broadway,vulkan", test_sys: true } diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e29cd433a447..8f159ac9d402 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -40,12 +40,12 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --features v4_14,xml_validation --manifest-path ./gtk4/Cargo.toml + args: --features v4_16,xml_validation --manifest-path ./gtk4/Cargo.toml - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --features v4_14,xml_validation --manifest-path ./gtk4/Cargo.toml + args: --features v4_16,xml_validation --manifest-path ./gtk4/Cargo.toml # FIXME: renable once https://github.com/gtk-rs/gtk4-rs/issues/1235 is fixed #- name: Tests # uses: actions-rs/cargo@v1 diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml index e350185a3f9c..0980e5523959 100644 --- a/.github/workflows/windows-msvc.yml +++ b/.github/workflows/windows-msvc.yml @@ -33,9 +33,9 @@ jobs: id: cache with: path: c:/gnome - key: ${{ runner.os }}-gtk4-15.4 + key: ${{ runner.os }}-gtk4-17.1 restore-keys: | - ${{ runner.os }}-gtk4-15.4 + ${{ runner.os }}-gtk4-17.1 - name: Set up the PATH environment run: | @@ -94,17 +94,17 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --features v4_16,xml_validation + args: --features v4_18,xml_validation - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --features v4_16,xml_validation + args: --features v4_18,xml_validation - name: Tests uses: actions-rs/cargo@v1 with: command: test - args: --features v4_16,xml_validation + args: --features v4_18,xml_validation - name: Build gdk-win32 uses: actions-rs/cargo@v1 diff --git a/gdk4-wayland/src/auto/versions.txt b/gdk4-wayland/src/auto/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4-wayland/sys/Cargo.toml b/gdk4-wayland/sys/Cargo.toml index d1a9683e3c43..57dc2fb0d069 100644 --- a/gdk4-wayland/sys/Cargo.toml +++ b/gdk4-wayland/sys/Cargo.toml @@ -43,7 +43,7 @@ version = "4.10" version = "4.12" [package.metadata.system-deps.gtk4_wayland.v4_16] -version = "4.15" +version = "4.16" [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] diff --git a/gdk4-wayland/sys/versions.txt b/gdk4-wayland/sys/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4-win32/src/auto/versions.txt b/gdk4-win32/src/auto/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4-win32/sys/versions.txt b/gdk4-win32/sys/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4-x11/src/auto/versions.txt b/gdk4-x11/src/auto/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4-x11/sys/Cargo.toml b/gdk4-x11/sys/Cargo.toml index 073cde7520be..2a46fbf705c1 100644 --- a/gdk4-x11/sys/Cargo.toml +++ b/gdk4-x11/sys/Cargo.toml @@ -40,7 +40,7 @@ version = "4.4" version = "4.10" [package.metadata.system-deps.gtk4_x11.v4_16] -version = "4.15" +version = "4.16" [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] diff --git a/gdk4-x11/sys/versions.txt b/gdk4-x11/sys/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4/Gir.toml b/gdk4/Gir.toml index 963892e0c119..1f5ddef1cc2b 100644 --- a/gdk4/Gir.toml +++ b/gdk4/Gir.toml @@ -19,6 +19,9 @@ generate = [ "Gdk.AxisFlags", "Gdk.ButtonEvent", "Gdk.CairoContext", + "Gdk.CicpParams", + "Gdk.CicpRange", + "Gdk.ColorState", "Gdk.CrossingEvent", "Gdk.CrossingMode", "Gdk.DeleteEvent", diff --git a/gdk4/src/auto/cicp_params.rs b/gdk4/src/auto/cicp_params.rs new file mode 100644 index 000000000000..a6807d7ec998 --- /dev/null +++ b/gdk4/src/auto/cicp_params.rs @@ -0,0 +1,217 @@ +// 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, CicpRange, ColorState}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::boxed::Box as Box_; + +glib::wrapper! { + #[doc(alias = "GdkCicpParams")] + pub struct CicpParams(Object); + + match fn { + type_ => || ffi::gdk_cicp_params_get_type(), + } +} + +impl CicpParams { + #[doc(alias = "gdk_cicp_params_new")] + pub fn new() -> CicpParams { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_cicp_params_new()) } + } + + #[doc(alias = "gdk_cicp_params_build_color_state")] + pub fn build_color_state(&self) -> Result, glib::Error> { + unsafe { + let mut error = std::ptr::null_mut(); + let ret = ffi::gdk_cicp_params_build_color_state(self.to_glib_none().0, &mut error); + if error.is_null() { + Ok(from_glib_full(ret)) + } else { + Err(from_glib_full(error)) + } + } + } + + #[doc(alias = "gdk_cicp_params_get_color_primaries")] + #[doc(alias = "get_color_primaries")] + #[doc(alias = "color-primaries")] + pub fn color_primaries(&self) -> u32 { + unsafe { ffi::gdk_cicp_params_get_color_primaries(self.to_glib_none().0) } + } + + #[doc(alias = "gdk_cicp_params_get_matrix_coefficients")] + #[doc(alias = "get_matrix_coefficients")] + #[doc(alias = "matrix-coefficients")] + pub fn matrix_coefficients(&self) -> u32 { + unsafe { ffi::gdk_cicp_params_get_matrix_coefficients(self.to_glib_none().0) } + } + + #[doc(alias = "gdk_cicp_params_get_range")] + #[doc(alias = "get_range")] + pub fn range(&self) -> CicpRange { + unsafe { from_glib(ffi::gdk_cicp_params_get_range(self.to_glib_none().0)) } + } + + #[doc(alias = "gdk_cicp_params_get_transfer_function")] + #[doc(alias = "get_transfer_function")] + #[doc(alias = "transfer-function")] + pub fn transfer_function(&self) -> u32 { + unsafe { ffi::gdk_cicp_params_get_transfer_function(self.to_glib_none().0) } + } + + #[doc(alias = "gdk_cicp_params_set_color_primaries")] + #[doc(alias = "color-primaries")] + pub fn set_color_primaries(&self, color_primaries: u32) { + unsafe { + ffi::gdk_cicp_params_set_color_primaries(self.to_glib_none().0, color_primaries); + } + } + + #[doc(alias = "gdk_cicp_params_set_matrix_coefficients")] + #[doc(alias = "matrix-coefficients")] + pub fn set_matrix_coefficients(&self, matrix_coefficients: u32) { + unsafe { + ffi::gdk_cicp_params_set_matrix_coefficients( + self.to_glib_none().0, + matrix_coefficients, + ); + } + } + + #[doc(alias = "gdk_cicp_params_set_range")] + #[doc(alias = "range")] + pub fn set_range(&self, range: CicpRange) { + unsafe { + ffi::gdk_cicp_params_set_range(self.to_glib_none().0, range.into_glib()); + } + } + + #[doc(alias = "gdk_cicp_params_set_transfer_function")] + #[doc(alias = "transfer-function")] + pub fn set_transfer_function(&self, transfer_function: u32) { + unsafe { + ffi::gdk_cicp_params_set_transfer_function(self.to_glib_none().0, transfer_function); + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "color-primaries")] + pub fn connect_color_primaries_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_color_primaries_trampoline( + this: *mut ffi::GdkCicpParams, + _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 _, + b"notify::color-primaries\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_color_primaries_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "matrix-coefficients")] + pub fn connect_matrix_coefficients_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_matrix_coefficients_trampoline( + this: *mut ffi::GdkCicpParams, + _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 _, + b"notify::matrix-coefficients\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_matrix_coefficients_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "range")] + pub fn connect_range_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_range_trampoline( + this: *mut ffi::GdkCicpParams, + _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 _, + b"notify::range\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_range_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "transfer-function")] + pub fn connect_transfer_function_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_transfer_function_trampoline( + this: *mut ffi::GdkCicpParams, + _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 _, + b"notify::transfer-function\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_transfer_function_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl Default for CicpParams { + fn default() -> Self { + Self::new() + } +} diff --git a/gdk4/src/auto/color_state.rs b/gdk4/src/auto/color_state.rs new file mode 100644 index 000000000000..0f10dbd1e724 --- /dev/null +++ b/gdk4/src/auto/color_state.rs @@ -0,0 +1,89 @@ +// 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, CicpParams}; +use glib::translate::*; + +glib::wrapper! { + #[derive(Debug, PartialOrd, Ord, Hash)] + pub struct ColorState(Shared); + + match fn { + ref => |ptr| ffi::gdk_color_state_ref(ptr), + unref => |ptr| ffi::gdk_color_state_unref(ptr), + type_ => || ffi::gdk_color_state_get_type(), + } +} + +impl ColorState { + #[doc(alias = "gdk_color_state_create_cicp_params")] + pub fn create_cicp_params(&self) -> Option { + unsafe { + from_glib_full(ffi::gdk_color_state_create_cicp_params( + self.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_color_state_equal")] + fn equal(&self, other: &ColorState) -> bool { + unsafe { + from_glib(ffi::gdk_color_state_equal( + self.to_glib_none().0, + other.to_glib_none().0, + )) + } + } + + #[doc(alias = "gdk_color_state_get_oklab")] + #[doc(alias = "get_oklab")] + pub fn oklab() -> ColorState { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_color_state_get_oklab()) } + } + + #[doc(alias = "gdk_color_state_get_oklch")] + #[doc(alias = "get_oklch")] + pub fn oklch() -> ColorState { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_color_state_get_oklch()) } + } + + #[doc(alias = "gdk_color_state_get_rec2100_linear")] + #[doc(alias = "get_rec2100_linear")] + pub fn rec2100_linear() -> ColorState { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_color_state_get_rec2100_linear()) } + } + + #[doc(alias = "gdk_color_state_get_rec2100_pq")] + #[doc(alias = "get_rec2100_pq")] + pub fn rec2100_pq() -> ColorState { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_color_state_get_rec2100_pq()) } + } + + #[doc(alias = "gdk_color_state_get_srgb")] + #[doc(alias = "get_srgb")] + pub fn srgb() -> ColorState { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_color_state_get_srgb()) } + } + + #[doc(alias = "gdk_color_state_get_srgb_linear")] + #[doc(alias = "get_srgb_linear")] + pub fn srgb_linear() -> ColorState { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gdk_color_state_get_srgb_linear()) } + } +} + +impl PartialEq for ColorState { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.equal(other) + } +} + +impl Eq for ColorState {} diff --git a/gdk4/src/auto/dmabuf_texture_builder.rs b/gdk4/src/auto/dmabuf_texture_builder.rs index a69b0b87e2e6..4320f6eed1d8 100644 --- a/gdk4/src/auto/dmabuf_texture_builder.rs +++ b/gdk4/src/auto/dmabuf_texture_builder.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +use crate::ColorState; use crate::{ffi, Display, Texture}; use glib::{ prelude::*, @@ -26,6 +29,19 @@ impl DmabufTextureBuilder { unsafe { from_glib_full(ffi::gdk_dmabuf_texture_builder_new()) } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_dmabuf_texture_builder_get_color_state")] + #[doc(alias = "get_color_state")] + #[doc(alias = "color-state")] + pub fn color_state(&self) -> Option { + unsafe { + from_glib_full(ffi::gdk_dmabuf_texture_builder_get_color_state( + self.to_glib_none().0, + )) + } + } + #[doc(alias = "gdk_dmabuf_texture_builder_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Display { @@ -118,6 +134,19 @@ impl DmabufTextureBuilder { unsafe { ffi::gdk_dmabuf_texture_builder_get_width(self.to_glib_none().0) } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_dmabuf_texture_builder_set_color_state")] + #[doc(alias = "color-state")] + pub fn set_color_state(&self, color_state: Option<&ColorState>) { + unsafe { + ffi::gdk_dmabuf_texture_builder_set_color_state( + self.to_glib_none().0, + color_state.to_glib_none().0, + ); + } + } + #[doc(alias = "gdk_dmabuf_texture_builder_set_display")] #[doc(alias = "display")] pub fn set_display(&self, display: &impl IsA) { @@ -223,6 +252,33 @@ impl DmabufTextureBuilder { } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "color-state")] + pub fn connect_color_state_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_color_state_trampoline< + F: Fn(&DmabufTextureBuilder) + 'static, + >( + this: *mut ffi::GdkDmabufTextureBuilder, + _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 _, + b"notify::color-state\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_color_state_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } + #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] #[doc(alias = "display")] diff --git a/gdk4/src/auto/draw_context.rs b/gdk4/src/auto/draw_context.rs index d4bfb8ea214b..16db5c32faa3 100644 --- a/gdk4/src/auto/draw_context.rs +++ b/gdk4/src/auto/draw_context.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, Display, Surface}; use glib::{prelude::*, translate::*}; @@ -19,6 +20,8 @@ impl DrawContext { } pub trait DrawContextExt: IsA + 'static { + #[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")] + #[allow(deprecated)] #[doc(alias = "gdk_draw_context_begin_frame")] fn begin_frame(&self, region: &cairo::Region) { unsafe { @@ -29,6 +32,8 @@ pub trait DrawContextExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")] + #[allow(deprecated)] #[doc(alias = "gdk_draw_context_end_frame")] fn end_frame(&self) { unsafe { @@ -56,6 +61,8 @@ pub trait DrawContextExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")] + #[allow(deprecated)] #[doc(alias = "gdk_draw_context_is_in_frame")] fn is_in_frame(&self) -> bool { unsafe { diff --git a/gdk4/src/auto/enums.rs b/gdk4/src/auto/enums.rs index 68b7dbeea6a4..dac4a98e24f1 100644 --- a/gdk4/src/auto/enums.rs +++ b/gdk4/src/auto/enums.rs @@ -141,6 +141,120 @@ impl From for glib::Value { } } +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "GdkCicpRange")] +pub enum CicpRange { + #[doc(alias = "GDK_CICP_RANGE_NARROW")] + Narrow, + #[doc(alias = "GDK_CICP_RANGE_FULL")] + Full, + #[doc(hidden)] + __Unknown(i32), +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +#[doc(hidden)] +impl IntoGlib for CicpRange { + type GlibType = ffi::GdkCicpRange; + + #[inline] + fn into_glib(self) -> ffi::GdkCicpRange { + match self { + Self::Narrow => ffi::GDK_CICP_RANGE_NARROW, + Self::Full => ffi::GDK_CICP_RANGE_FULL, + Self::__Unknown(value) => value, + } + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +#[doc(hidden)] +impl FromGlib for CicpRange { + #[inline] + unsafe fn from_glib(value: ffi::GdkCicpRange) -> Self { + skip_assert_initialized!(); + + match value { + ffi::GDK_CICP_RANGE_NARROW => Self::Narrow, + ffi::GDK_CICP_RANGE_FULL => Self::Full, + value => Self::__Unknown(value), + } + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl StaticType for CicpRange { + #[inline] + #[doc(alias = "gdk_cicp_range_get_type")] + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::gdk_cicp_range_get_type()) } + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl glib::HasParamSpec for CicpRange { + type ParamSpec = glib::ParamSpecEnum; + type SetValue = Self; + type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder; + + fn param_spec_builder() -> Self::BuilderFn { + Self::ParamSpec::builder_with_default + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl glib::value::ValueType for CicpRange { + type Type = Self; +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +unsafe impl<'a> glib::value::FromValue<'a> for CicpRange { + type Checker = glib::value::GenericValueTypeChecker; + + #[inline] + unsafe fn from_value(value: &'a glib::Value) -> Self { + skip_assert_initialized!(); + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl ToValue for CicpRange { + #[inline] + fn to_value(&self) -> glib::Value { + let mut value = glib::Value::for_value_type::(); + unsafe { + glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); + } + value + } + + #[inline] + fn value_type(&self) -> glib::Type { + Self::static_type() + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl From for glib::Value { + #[inline] + fn from(v: CicpRange) -> Self { + skip_assert_initialized!(); + ToValue::to_value(&v) + } +} + #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkCrossingMode")] diff --git a/gdk4/src/auto/gl_texture_builder.rs b/gdk4/src/auto/gl_texture_builder.rs index 4b4c7edead96..c3621efd025a 100644 --- a/gdk4/src/auto/gl_texture_builder.rs +++ b/gdk4/src/auto/gl_texture_builder.rs @@ -2,8 +2,20 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +use crate::ColorState; use crate::{ffi, GLContext, MemoryFormat, Texture}; use glib::translate::*; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, +}; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +use std::boxed::Box as Box_; glib::wrapper! { #[doc(alias = "GdkGLTextureBuilder")] @@ -21,6 +33,19 @@ impl GLTextureBuilder { unsafe { from_glib_full(ffi::gdk_gl_texture_builder_new()) } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_gl_texture_builder_get_color_state")] + #[doc(alias = "get_color_state")] + #[doc(alias = "color-state")] + pub fn color_state(&self) -> ColorState { + unsafe { + from_glib_full(ffi::gdk_gl_texture_builder_get_color_state( + self.to_glib_none().0, + )) + } + } + #[doc(alias = "gdk_gl_texture_builder_get_context")] #[doc(alias = "get_context")] pub fn context(&self) -> Option { @@ -91,6 +116,49 @@ impl GLTextureBuilder { pub fn width(&self) -> i32 { unsafe { ffi::gdk_gl_texture_builder_get_width(self.to_glib_none().0) } } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_gl_texture_builder_set_color_state")] + #[doc(alias = "color-state")] + pub fn set_color_state(&self, color_state: &ColorState) { + unsafe { + ffi::gdk_gl_texture_builder_set_color_state( + self.to_glib_none().0, + color_state.to_glib_none().0, + ); + } + } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "color-state")] + pub fn connect_color_state_notify( + &self, + f: F, + ) -> SignalHandlerId { + unsafe extern "C" fn notify_color_state_trampoline< + F: Fn(&GLTextureBuilder) + Send + Sync + 'static, + >( + this: *mut ffi::GdkGLTextureBuilder, + _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 _, + b"notify::color-state\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_color_state_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } #[cfg(feature = "v4_12")] diff --git a/gdk4/src/auto/mod.rs b/gdk4/src/auto/mod.rs index 187efb18c9dd..a4cee2ff388f 100644 --- a/gdk4/src/auto/mod.rs +++ b/gdk4/src/auto/mod.rs @@ -11,6 +11,13 @@ pub use self::button_event::ButtonEvent; mod cairo_context; pub use self::cairo_context::CairoContext; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +mod cicp_params; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub use self::cicp_params::CicpParams; + mod clipboard; pub use self::clipboard::Clipboard; @@ -154,6 +161,13 @@ mod vulkan_context; #[cfg_attr(feature = "v4_14", deprecated = "Since 4.14")] pub use self::vulkan_context::VulkanContext; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +mod color_state; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub use self::color_state::ColorState; + mod content_formats; pub use self::content_formats::ContentFormats; @@ -201,6 +215,9 @@ pub use self::toplevel_layout::ToplevelLayout; mod enums; pub use self::enums::AxisUse; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub use self::enums::CicpRange; pub use self::enums::CrossingMode; pub use self::enums::DevicePadFeature; pub use self::enums::DeviceToolType; diff --git a/gdk4/src/auto/surface.rs b/gdk4/src/auto/surface.rs index 3a30fe6cba73..f5cba7d9e6db 100644 --- a/gdk4/src/auto/surface.rs +++ b/gdk4/src/auto/surface.rs @@ -255,6 +255,8 @@ pub trait SurfaceExt: IsA + 'static { } } + #[cfg_attr(feature = "v4_16", deprecated = "Since 4.16")] + #[allow(deprecated)] #[doc(alias = "gdk_surface_set_opaque_region")] fn set_opaque_region(&self, region: Option<&cairo::Region>) { unsafe { diff --git a/gdk4/src/auto/texture.rs b/gdk4/src/auto/texture.rs index d0d5880a1446..dda066cfc7b3 100644 --- a/gdk4/src/auto/texture.rs +++ b/gdk4/src/auto/texture.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +use crate::ColorState; #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] use crate::MemoryFormat; @@ -93,6 +96,19 @@ unsafe impl Send for Texture {} unsafe impl Sync for Texture {} pub trait TextureExt: IsA + 'static { + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_texture_get_color_state")] + #[doc(alias = "get_color_state")] + #[doc(alias = "color-state")] + fn color_state(&self) -> ColorState { + unsafe { + from_glib_none(ffi::gdk_texture_get_color_state( + self.as_ref().to_glib_none().0, + )) + } + } + #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] #[doc(alias = "gdk_texture_get_format")] diff --git a/gdk4/src/auto/texture_downloader.rs b/gdk4/src/auto/texture_downloader.rs index 88491a590734..37616be4f799 100644 --- a/gdk4/src/auto/texture_downloader.rs +++ b/gdk4/src/auto/texture_downloader.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +use crate::ColorState; use crate::{ffi, MemoryFormat, Texture}; use glib::{prelude::*, translate::*}; @@ -44,6 +47,18 @@ impl TextureDownloader { // unsafe { TODO: call ffi:gdk_texture_downloader_download_into() } //} + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_texture_downloader_get_color_state")] + #[doc(alias = "get_color_state")] + pub fn color_state(&self) -> ColorState { + unsafe { + from_glib_full(ffi::gdk_texture_downloader_get_color_state( + self.to_glib_none().0, + )) + } + } + #[doc(alias = "gdk_texture_downloader_get_format")] #[doc(alias = "get_format")] pub fn format(&self) -> MemoryFormat { @@ -64,6 +79,18 @@ impl TextureDownloader { } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gdk_texture_downloader_set_color_state")] + pub fn set_color_state(&mut self, color_state: &ColorState) { + unsafe { + ffi::gdk_texture_downloader_set_color_state( + self.to_glib_none_mut().0, + color_state.to_glib_none().0, + ); + } + } + #[doc(alias = "gdk_texture_downloader_set_format")] pub fn set_format(&mut self, format: MemoryFormat) { unsafe { diff --git a/gdk4/src/auto/versions.txt b/gdk4/src/auto/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gdk4/sys/Cargo.toml b/gdk4/sys/Cargo.toml index 1dae2b88d76e..5aea888acac1 100644 --- a/gdk4/sys/Cargo.toml +++ b/gdk4/sys/Cargo.toml @@ -55,7 +55,7 @@ version = "4.12" version = "4.14" [package.metadata.system-deps.gtk4.v4_16] -version = "4.15" +version = "4.16" [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] diff --git a/gdk4/sys/src/lib.rs b/gdk4/sys/src/lib.rs index e500fab14eaf..e023eb5ac9d5 100644 --- a/gdk4/sys/src/lib.rs +++ b/gdk4/sys/src/lib.rs @@ -47,6 +47,10 @@ pub const GDK_AXIS_ROTATION: GdkAxisUse = 10; pub const GDK_AXIS_SLIDER: GdkAxisUse = 11; pub const GDK_AXIS_LAST: GdkAxisUse = 12; +pub type GdkCicpRange = c_int; +pub const GDK_CICP_RANGE_NARROW: GdkCicpRange = 0; +pub const GDK_CICP_RANGE_FULL: GdkCicpRange = 1; + pub type GdkCrossingMode = c_int; pub const GDK_CROSSING_NORMAL: GdkCrossingMode = 0; pub const GDK_CROSSING_GRAB: GdkCrossingMode = 1; @@ -2021,6 +2025,11 @@ pub const GDK_KEY_checkmark: c_int = 2803; pub const GDK_KEY_circle: c_int = 3023; pub const GDK_KEY_club: c_int = 2796; pub const GDK_KEY_colon: c_int = 58; +pub const GDK_KEY_combining_acute: c_int = 16777985; +pub const GDK_KEY_combining_belowdot: c_int = 16778019; +pub const GDK_KEY_combining_grave: c_int = 16777984; +pub const GDK_KEY_combining_hook: c_int = 16777993; +pub const GDK_KEY_combining_tilde: c_int = 16777987; pub const GDK_KEY_comma: c_int = 44; pub const GDK_KEY_containsas: c_int = 16785931; pub const GDK_KEY_copyright: c_int = 169; @@ -2037,6 +2046,7 @@ pub const GDK_KEY_dead_A: c_int = 65153; pub const GDK_KEY_dead_E: c_int = 65155; pub const GDK_KEY_dead_I: c_int = 65157; pub const GDK_KEY_dead_O: c_int = 65159; +pub const GDK_KEY_dead_SCHWA: c_int = 65163; pub const GDK_KEY_dead_U: c_int = 65161; pub const GDK_KEY_dead_a: c_int = 65152; pub const GDK_KEY_dead_abovecomma: c_int = 65124; @@ -2067,6 +2077,7 @@ pub const GDK_KEY_dead_doublegrave: c_int = 65126; pub const GDK_KEY_dead_e: c_int = 65154; pub const GDK_KEY_dead_grave: c_int = 65104; pub const GDK_KEY_dead_greek: c_int = 65164; +pub const GDK_KEY_dead_hamza: c_int = 65165; pub const GDK_KEY_dead_hook: c_int = 65121; pub const GDK_KEY_dead_horn: c_int = 65122; pub const GDK_KEY_dead_i: c_int = 65156; @@ -2079,6 +2090,7 @@ pub const GDK_KEY_dead_o: c_int = 65158; pub const GDK_KEY_dead_ogonek: c_int = 65116; pub const GDK_KEY_dead_perispomeni: c_int = 65107; pub const GDK_KEY_dead_psili: c_int = 65124; +pub const GDK_KEY_dead_schwa: c_int = 65162; pub const GDK_KEY_dead_semivoiced_sound: c_int = 65119; pub const GDK_KEY_dead_small_schwa: c_int = 65162; pub const GDK_KEY_dead_stroke: c_int = 65123; @@ -2173,6 +2185,8 @@ pub const GDK_KEY_gcircumflex: c_int = 760; pub const GDK_KEY_grave: c_int = 96; pub const GDK_KEY_greater: c_int = 62; pub const GDK_KEY_greaterthanequal: c_int = 2238; +pub const GDK_KEY_guillemetleft: c_int = 171; +pub const GDK_KEY_guillemetright: c_int = 187; pub const GDK_KEY_guillemotleft: c_int = 171; pub const GDK_KEY_guillemotright: c_int = 187; pub const GDK_KEY_h: c_int = 104; @@ -2416,6 +2430,7 @@ pub const GDK_KEY_openstar: c_int = 2789; pub const GDK_KEY_opentribulletdown: c_int = 2788; pub const GDK_KEY_opentribulletup: c_int = 2787; pub const GDK_KEY_ordfeminine: c_int = 170; +pub const GDK_KEY_ordmasculine: c_int = 186; pub const GDK_KEY_oslash: c_int = 248; pub const GDK_KEY_otilde: c_int = 245; pub const GDK_KEY_overbar: c_int = 3008; @@ -2676,6 +2691,8 @@ pub const GDK_TOPLEVEL_STATE_BOTTOM_TILED: GdkToplevelState = 4096; pub const GDK_TOPLEVEL_STATE_BOTTOM_RESIZABLE: GdkToplevelState = 8192; pub const GDK_TOPLEVEL_STATE_LEFT_TILED: GdkToplevelState = 16384; pub const GDK_TOPLEVEL_STATE_LEFT_RESIZABLE: GdkToplevelState = 32768; +#[cfg(feature = "v4_12")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] pub const GDK_TOPLEVEL_STATE_SUSPENDED: GdkToplevelState = 65536; // Callbacks @@ -2695,6 +2712,29 @@ pub type GdkCursorGetTextureCallback = Option< >; // Records +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkCicpParamsClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkCicpParamsClass = _GdkCicpParamsClass; + +#[repr(C)] +#[allow(dead_code)] +pub struct GdkColorState { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkColorState { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkColorState @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GdkContentFormats { @@ -2932,6 +2972,15 @@ impl ::std::fmt::Debug for GdkKeymapKey { } } +#[repr(C)] +#[allow(dead_code)] +pub struct _GdkMemoryTextureBuilderClass { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +pub type GdkMemoryTextureBuilderClass = _GdkMemoryTextureBuilderClass; + #[repr(C)] #[allow(dead_code)] pub struct _GdkMemoryTextureClass { @@ -3176,6 +3225,20 @@ impl ::std::fmt::Debug for GdkCairoContext { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GdkCicpParams { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkCicpParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkCicpParams @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GdkClipboard { @@ -3529,6 +3592,20 @@ impl ::std::fmt::Debug for GdkMemoryTexture { } } +#[repr(C)] +#[allow(dead_code)] +pub struct GdkMemoryTextureBuilder { + _data: [u8; 0], + _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>, +} + +impl ::std::fmt::Debug for GdkMemoryTextureBuilder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GdkMemoryTextureBuilder @ {self:p}")) + .finish() + } +} + #[repr(C)] #[allow(dead_code)] pub struct GdkMonitor { @@ -3765,6 +3842,13 @@ extern "C" { //========================================================================= pub fn gdk_axis_use_get_type() -> GType; + //========================================================================= + // GdkCicpRange + //========================================================================= + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_range_get_type() -> GType; + //========================================================================= // GdkCrossingMode //========================================================================= @@ -3934,6 +4018,43 @@ extern "C" { //========================================================================= pub fn gdk_toplevel_state_get_type() -> GType; + //========================================================================= + // GdkColorState + //========================================================================= + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_type() -> GType; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_create_cicp_params(self_: *mut GdkColorState) -> *mut GdkCicpParams; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_equal(self_: *mut GdkColorState, other: *mut GdkColorState) -> gboolean; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_ref(self_: *mut GdkColorState) -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_unref(self_: *mut GdkColorState); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_oklab() -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_oklch() -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_rec2100_linear() -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_rec2100_pq() -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_srgb() -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_color_state_get_srgb_linear() -> *mut GdkColorState; + //========================================================================= // GdkContentFormats //========================================================================= @@ -4222,6 +4343,11 @@ extern "C" { #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] pub fn gdk_texture_downloader_free(self_: *mut GdkTextureDownloader); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_texture_downloader_get_color_state( + self_: *const GdkTextureDownloader, + ) -> *mut GdkColorState; #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] pub fn gdk_texture_downloader_get_format(self_: *const GdkTextureDownloader) @@ -4231,6 +4357,12 @@ extern "C" { pub fn gdk_texture_downloader_get_texture( self_: *const GdkTextureDownloader, ) -> *mut GdkTexture; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_texture_downloader_set_color_state( + self_: *mut GdkTextureDownloader, + color_state: *mut GdkColorState, + ); #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] pub fn gdk_texture_downloader_set_format( @@ -4328,6 +4460,52 @@ extern "C" { pub fn gdk_cairo_context_get_type() -> GType; pub fn gdk_cairo_context_cairo_create(self_: *mut GdkCairoContext) -> *mut cairo::cairo_t; + //========================================================================= + // GdkCicpParams + //========================================================================= + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_get_type() -> GType; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_new() -> *mut GdkCicpParams; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_build_color_state( + self_: *mut GdkCicpParams, + error: *mut *mut glib::GError, + ) -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_get_color_primaries(self_: *mut GdkCicpParams) -> c_uint; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_get_matrix_coefficients(self_: *mut GdkCicpParams) -> c_uint; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_get_range(self_: *mut GdkCicpParams) -> GdkCicpRange; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_get_transfer_function(self_: *mut GdkCicpParams) -> c_uint; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_set_color_primaries(self_: *mut GdkCicpParams, color_primaries: c_uint); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_set_matrix_coefficients( + self_: *mut GdkCicpParams, + matrix_coefficients: c_uint, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_set_range(self_: *mut GdkCicpParams, range: GdkCicpRange); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_cicp_params_set_transfer_function( + self_: *mut GdkCicpParams, + transfer_function: c_uint, + ); + //========================================================================= // GdkClipboard //========================================================================= @@ -4724,6 +4902,11 @@ extern "C" { data: gpointer, error: *mut *mut glib::GError, ) -> *mut GdkTexture; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_dmabuf_texture_builder_get_color_state( + self_: *mut GdkDmabufTextureBuilder, + ) -> *mut GdkColorState; #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gdk_dmabuf_texture_builder_get_display( @@ -4777,6 +4960,12 @@ extern "C" { #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gdk_dmabuf_texture_builder_get_width(self_: *mut GdkDmabufTextureBuilder) -> c_uint; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_dmabuf_texture_builder_set_color_state( + self_: *mut GdkDmabufTextureBuilder, + color_state: *mut GdkColorState, + ); #[cfg(feature = "v4_14")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_14")))] pub fn gdk_dmabuf_texture_builder_set_display( @@ -5077,6 +5266,11 @@ extern "C" { destroy: glib::GDestroyNotify, data: gpointer, ) -> *mut GdkTexture; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_gl_texture_builder_get_color_state( + self_: *mut GdkGLTextureBuilder, + ) -> *mut GdkColorState; #[cfg(feature = "v4_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] pub fn gdk_gl_texture_builder_get_context(self_: *mut GdkGLTextureBuilder) @@ -5109,6 +5303,12 @@ extern "C" { #[cfg(feature = "v4_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] pub fn gdk_gl_texture_builder_get_width(self_: *mut GdkGLTextureBuilder) -> c_int; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_gl_texture_builder_set_color_state( + self_: *mut GdkGLTextureBuilder, + color_state: *mut GdkColorState, + ); #[cfg(feature = "v4_12")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] pub fn gdk_gl_texture_builder_set_context( @@ -5194,6 +5394,99 @@ extern "C" { stride: size_t, ) -> *mut GdkMemoryTexture; + //========================================================================= + // GdkMemoryTextureBuilder + //========================================================================= + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_type() -> GType; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_new() -> *mut GdkMemoryTextureBuilder; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_build(self_: *mut GdkMemoryTextureBuilder) + -> *mut GdkTexture; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_bytes( + self_: *mut GdkMemoryTextureBuilder, + ) -> *mut glib::GBytes; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_color_state( + self_: *mut GdkMemoryTextureBuilder, + ) -> *mut GdkColorState; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_format( + self_: *mut GdkMemoryTextureBuilder, + ) -> GdkMemoryFormat; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_height(self_: *mut GdkMemoryTextureBuilder) -> c_int; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_stride(self_: *mut GdkMemoryTextureBuilder) -> size_t; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_update_region( + self_: *mut GdkMemoryTextureBuilder, + ) -> *mut cairo::cairo_region_t; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_update_texture( + self_: *mut GdkMemoryTextureBuilder, + ) -> *mut GdkTexture; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_get_width(self_: *mut GdkMemoryTextureBuilder) -> c_int; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_bytes( + self_: *mut GdkMemoryTextureBuilder, + bytes: *mut glib::GBytes, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_color_state( + self_: *mut GdkMemoryTextureBuilder, + color_state: *mut GdkColorState, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_format( + self_: *mut GdkMemoryTextureBuilder, + format: GdkMemoryFormat, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_height( + self_: *mut GdkMemoryTextureBuilder, + height: c_int, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_stride( + self_: *mut GdkMemoryTextureBuilder, + stride: size_t, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_update_region( + self_: *mut GdkMemoryTextureBuilder, + region: *mut cairo::cairo_region_t, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_update_texture( + self_: *mut GdkMemoryTextureBuilder, + texture: *mut GdkTexture, + ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_memory_texture_builder_set_width(self_: *mut GdkMemoryTextureBuilder, width: c_int); + //========================================================================= // GdkMonitor //========================================================================= @@ -5368,6 +5661,9 @@ extern "C" { ) -> *mut GdkTexture; pub fn gdk_texture_new_from_resource(resource_path: *const c_char) -> *mut GdkTexture; pub fn gdk_texture_download(texture: *mut GdkTexture, data: *mut u8, stride: size_t); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gdk_texture_get_color_state(self_: *mut GdkTexture) -> *mut GdkColorState; #[cfg(feature = "v4_10")] #[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))] pub fn gdk_texture_get_format(self_: *mut GdkTexture) -> GdkMemoryFormat; diff --git a/gdk4/sys/tests/abi.rs b/gdk4/sys/tests/abi.rs index 8ff3871fad63..6d65d20097e5 100644 --- a/gdk4/sys/tests/abi.rs +++ b/gdk4/sys/tests/abi.rs @@ -222,6 +222,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GdkCicpRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GdkContentProvider", Layout { @@ -526,6 +533,8 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_BUTTON_PRIMARY", "1"), ("(gint) GDK_BUTTON_RELEASE", "3"), ("GDK_BUTTON_SECONDARY", "3"), + ("(gint) GDK_CICP_RANGE_FULL", "1"), + ("(gint) GDK_CICP_RANGE_NARROW", "0"), ("(guint) GDK_CONTROL_MASK", "4"), ("(gint) GDK_CROSSING_DEVICE_SWITCH", "8"), ("(gint) GDK_CROSSING_GRAB", "1"), @@ -2317,6 +2326,11 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_KEY_circle", "3023"), ("GDK_KEY_club", "2796"), ("GDK_KEY_colon", "58"), + ("GDK_KEY_combining_acute", "16777985"), + ("GDK_KEY_combining_belowdot", "16778019"), + ("GDK_KEY_combining_grave", "16777984"), + ("GDK_KEY_combining_hook", "16777993"), + ("GDK_KEY_combining_tilde", "16777987"), ("GDK_KEY_comma", "44"), ("GDK_KEY_containsas", "16785931"), ("GDK_KEY_copyright", "169"), @@ -2333,6 +2347,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_KEY_dead_E", "65155"), ("GDK_KEY_dead_I", "65157"), ("GDK_KEY_dead_O", "65159"), + ("GDK_KEY_dead_SCHWA", "65163"), ("GDK_KEY_dead_U", "65161"), ("GDK_KEY_dead_a", "65152"), ("GDK_KEY_dead_abovecomma", "65124"), @@ -2363,6 +2378,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_KEY_dead_e", "65154"), ("GDK_KEY_dead_grave", "65104"), ("GDK_KEY_dead_greek", "65164"), + ("GDK_KEY_dead_hamza", "65165"), ("GDK_KEY_dead_hook", "65121"), ("GDK_KEY_dead_horn", "65122"), ("GDK_KEY_dead_i", "65156"), @@ -2375,6 +2391,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_KEY_dead_ogonek", "65116"), ("GDK_KEY_dead_perispomeni", "65107"), ("GDK_KEY_dead_psili", "65124"), + ("GDK_KEY_dead_schwa", "65162"), ("GDK_KEY_dead_semivoiced_sound", "65119"), ("GDK_KEY_dead_small_schwa", "65162"), ("GDK_KEY_dead_stroke", "65123"), @@ -2469,6 +2486,8 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_KEY_grave", "96"), ("GDK_KEY_greater", "62"), ("GDK_KEY_greaterthanequal", "2238"), + ("GDK_KEY_guillemetleft", "171"), + ("GDK_KEY_guillemetright", "187"), ("GDK_KEY_guillemotleft", "171"), ("GDK_KEY_guillemotright", "187"), ("GDK_KEY_h", "104"), @@ -2712,6 +2731,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GDK_KEY_opentribulletdown", "2788"), ("GDK_KEY_opentribulletup", "2787"), ("GDK_KEY_ordfeminine", "170"), + ("GDK_KEY_ordmasculine", "186"), ("GDK_KEY_oslash", "248"), ("GDK_KEY_otilde", "245"), ("GDK_KEY_overbar", "3008"), diff --git a/gdk4/sys/tests/constant.c b/gdk4/sys/tests/constant.c index 300b36231e8a..61e1c9e32aa7 100644 --- a/gdk4/sys/tests/constant.c +++ b/gdk4/sys/tests/constant.c @@ -77,6 +77,8 @@ int main() { PRINT_CONSTANT(GDK_BUTTON_PRIMARY); PRINT_CONSTANT((gint) GDK_BUTTON_RELEASE); PRINT_CONSTANT(GDK_BUTTON_SECONDARY); + PRINT_CONSTANT((gint) GDK_CICP_RANGE_FULL); + PRINT_CONSTANT((gint) GDK_CICP_RANGE_NARROW); PRINT_CONSTANT((guint) GDK_CONTROL_MASK); PRINT_CONSTANT((gint) GDK_CROSSING_DEVICE_SWITCH); PRINT_CONSTANT((gint) GDK_CROSSING_GRAB); @@ -1868,6 +1870,11 @@ int main() { PRINT_CONSTANT(GDK_KEY_circle); PRINT_CONSTANT(GDK_KEY_club); PRINT_CONSTANT(GDK_KEY_colon); + PRINT_CONSTANT(GDK_KEY_combining_acute); + PRINT_CONSTANT(GDK_KEY_combining_belowdot); + PRINT_CONSTANT(GDK_KEY_combining_grave); + PRINT_CONSTANT(GDK_KEY_combining_hook); + PRINT_CONSTANT(GDK_KEY_combining_tilde); PRINT_CONSTANT(GDK_KEY_comma); PRINT_CONSTANT(GDK_KEY_containsas); PRINT_CONSTANT(GDK_KEY_copyright); @@ -1884,6 +1891,7 @@ int main() { PRINT_CONSTANT(GDK_KEY_dead_E); PRINT_CONSTANT(GDK_KEY_dead_I); PRINT_CONSTANT(GDK_KEY_dead_O); + PRINT_CONSTANT(GDK_KEY_dead_SCHWA); PRINT_CONSTANT(GDK_KEY_dead_U); PRINT_CONSTANT(GDK_KEY_dead_a); PRINT_CONSTANT(GDK_KEY_dead_abovecomma); @@ -1914,6 +1922,7 @@ int main() { PRINT_CONSTANT(GDK_KEY_dead_e); PRINT_CONSTANT(GDK_KEY_dead_grave); PRINT_CONSTANT(GDK_KEY_dead_greek); + PRINT_CONSTANT(GDK_KEY_dead_hamza); PRINT_CONSTANT(GDK_KEY_dead_hook); PRINT_CONSTANT(GDK_KEY_dead_horn); PRINT_CONSTANT(GDK_KEY_dead_i); @@ -1926,6 +1935,7 @@ int main() { PRINT_CONSTANT(GDK_KEY_dead_ogonek); PRINT_CONSTANT(GDK_KEY_dead_perispomeni); PRINT_CONSTANT(GDK_KEY_dead_psili); + PRINT_CONSTANT(GDK_KEY_dead_schwa); PRINT_CONSTANT(GDK_KEY_dead_semivoiced_sound); PRINT_CONSTANT(GDK_KEY_dead_small_schwa); PRINT_CONSTANT(GDK_KEY_dead_stroke); @@ -2020,6 +2030,8 @@ int main() { PRINT_CONSTANT(GDK_KEY_grave); PRINT_CONSTANT(GDK_KEY_greater); PRINT_CONSTANT(GDK_KEY_greaterthanequal); + PRINT_CONSTANT(GDK_KEY_guillemetleft); + PRINT_CONSTANT(GDK_KEY_guillemetright); PRINT_CONSTANT(GDK_KEY_guillemotleft); PRINT_CONSTANT(GDK_KEY_guillemotright); PRINT_CONSTANT(GDK_KEY_h); @@ -2263,6 +2275,7 @@ int main() { PRINT_CONSTANT(GDK_KEY_opentribulletdown); PRINT_CONSTANT(GDK_KEY_opentribulletup); PRINT_CONSTANT(GDK_KEY_ordfeminine); + PRINT_CONSTANT(GDK_KEY_ordmasculine); PRINT_CONSTANT(GDK_KEY_oslash); PRINT_CONSTANT(GDK_KEY_otilde); PRINT_CONSTANT(GDK_KEY_overbar); diff --git a/gdk4/sys/tests/layout.c b/gdk4/sys/tests/layout.c index 7fe8362b6666..e9ee3fb85549 100644 --- a/gdk4/sys/tests/layout.c +++ b/gdk4/sys/tests/layout.c @@ -10,6 +10,7 @@ int main() { printf("%s;%zu;%zu\n", "GdkAnchorHints", sizeof(GdkAnchorHints), alignof(GdkAnchorHints)); printf("%s;%zu;%zu\n", "GdkAxisFlags", sizeof(GdkAxisFlags), alignof(GdkAxisFlags)); printf("%s;%zu;%zu\n", "GdkAxisUse", sizeof(GdkAxisUse), alignof(GdkAxisUse)); + printf("%s;%zu;%zu\n", "GdkCicpRange", sizeof(GdkCicpRange), alignof(GdkCicpRange)); printf("%s;%zu;%zu\n", "GdkContentProvider", sizeof(GdkContentProvider), alignof(GdkContentProvider)); printf("%s;%zu;%zu\n", "GdkContentProviderClass", sizeof(GdkContentProviderClass), alignof(GdkContentProviderClass)); printf("%s;%zu;%zu\n", "GdkCrossingMode", sizeof(GdkCrossingMode), alignof(GdkCrossingMode)); diff --git a/gdk4/sys/versions.txt b/gdk4/sys/versions.txt index 0a416aa18620..60ae865ee3d0 100644 --- a/gdk4/sys/versions.txt +++ b/gdk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gir b/gir index eff839d4745d..af6703cf6545 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit eff839d4745d5eb210834507c2a9598741ad2e54 +Subproject commit af6703cf65453810c46003233c916896d36e8f24 diff --git a/gir-files b/gir-files index 62da9eb7c4bd..e45712216c81 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 62da9eb7c4bd5d6091a0eaab0d5e97a51f59fd6d +Subproject commit e45712216c81cc5e03ac1e5a6846ef9bcf0ef642 diff --git a/gsk4/src/auto/versions.txt b/gsk4/src/auto/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gsk4/sys/Cargo.toml b/gsk4/sys/Cargo.toml index d06121125006..bf064cb9ad5d 100644 --- a/gsk4/sys/Cargo.toml +++ b/gsk4/sys/Cargo.toml @@ -49,7 +49,7 @@ version = "4.10" version = "4.14" [package.metadata.system-deps.gtk4.v4_16] -version = "4.15" +version = "4.16" [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] diff --git a/gsk4/sys/versions.txt b/gsk4/sys/versions.txt index 0a416aa18620..60ae865ee3d0 100644 --- a/gsk4/sys/versions.txt +++ b/gsk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gtk4/Cargo.toml b/gtk4/Cargo.toml index a204a96b6239..f84d0048bda9 100644 --- a/gtk4/Cargo.toml +++ b/gtk4/Cargo.toml @@ -25,6 +25,7 @@ v4_10 = ["gtk4-sys/v4_10", "v4_8", "gdk/v4_10", "gsk/v4_10"] v4_12 = ["gtk4-sys/v4_12", "v4_10", "gdk/v4_12"] v4_14 = ["gtk4-sys/v4_14", "v4_12", "gdk/v4_14", "gsk/v4_14"] v4_16 = ["gtk4-sys/v4_16", "v4_14", "gdk/v4_16", "gsk/v4_16"] +v4_18 = ["gtk4-sys/v4_18", "v4_16"] gio_v2_80 = ["gio/v2_80"] xml_validation = ["gtk4-macros/xml_validation"] blueprint = ["gtk4-macros/blueprint"] diff --git a/gtk4/Gir.toml b/gtk4/Gir.toml index f759093d1c32..3b12c59666eb 100644 --- a/gtk4/Gir.toml +++ b/gtk4/Gir.toml @@ -255,6 +255,7 @@ generate = [ "Gtk.SymbolicColor", "Gtk.SymbolicPaintable", "Gtk.SystemSetting", + "Gtk.TextBufferNotifyFlags", "Gtk.TextChildAnchor", "Gtk.TextDirection", "Gtk.TextExtendSelection", @@ -2194,6 +2195,9 @@ manual_traits = ["TextBufferExtManual"] [[object.function]] name = "insert_with_tags_by_name" manual = true + [[object.function]] + name = "add_commit_notify" + manual = true # Ends up using from_glib_borrow for a TextBufferNotifyFlags [[object]] name = "Gtk.TextIter" diff --git a/gtk4/README.md b/gtk4/README.md index d87435ab8e09..9032dbbd8f0e 100644 --- a/gtk4/README.md +++ b/gtk4/README.md @@ -182,6 +182,7 @@ gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" } | Feature | Description | | --- | ----------- | +| `v4_18` | Enable the new APIs part of GTK 4.18 | | `v4_16` | Enable the new APIs part of GTK 4.16 | | `v4_14` | Enable the new APIs part of GTK 4.14 | | `v4_12` | Enable the new APIs part of GTK 4.12 | diff --git a/gtk4/src/auto/flags.rs b/gtk4/src/auto/flags.rs index a1fe4f538654..ccd452fb5e03 100644 --- a/gtk4/src/auto/flags.rs +++ b/gtk4/src/auto/flags.rs @@ -1555,6 +1555,114 @@ impl From for glib::Value { } } +#[cfg(feature = "v4_16")] +bitflags! { + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] + #[doc(alias = "GtkTextBufferNotifyFlags")] + pub struct TextBufferNotifyFlags: u32 { + #[doc(alias = "GTK_TEXT_BUFFER_NOTIFY_BEFORE_INSERT")] + const BEFORE_INSERT = ffi::GTK_TEXT_BUFFER_NOTIFY_BEFORE_INSERT as _; + #[doc(alias = "GTK_TEXT_BUFFER_NOTIFY_AFTER_INSERT")] + const AFTER_INSERT = ffi::GTK_TEXT_BUFFER_NOTIFY_AFTER_INSERT as _; + #[doc(alias = "GTK_TEXT_BUFFER_NOTIFY_BEFORE_DELETE")] + const BEFORE_DELETE = ffi::GTK_TEXT_BUFFER_NOTIFY_BEFORE_DELETE as _; + #[doc(alias = "GTK_TEXT_BUFFER_NOTIFY_AFTER_DELETE")] + const AFTER_DELETE = ffi::GTK_TEXT_BUFFER_NOTIFY_AFTER_DELETE as _; + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +#[doc(hidden)] +impl IntoGlib for TextBufferNotifyFlags { + type GlibType = ffi::GtkTextBufferNotifyFlags; + + #[inline] + fn into_glib(self) -> ffi::GtkTextBufferNotifyFlags { + self.bits() + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +#[doc(hidden)] +impl FromGlib for TextBufferNotifyFlags { + #[inline] + unsafe fn from_glib(value: ffi::GtkTextBufferNotifyFlags) -> Self { + skip_assert_initialized!(); + Self::from_bits_truncate(value) + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl StaticType for TextBufferNotifyFlags { + #[inline] + #[doc(alias = "gtk_text_buffer_notify_flags_get_type")] + fn static_type() -> glib::Type { + unsafe { from_glib(ffi::gtk_text_buffer_notify_flags_get_type()) } + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl glib::HasParamSpec for TextBufferNotifyFlags { + type ParamSpec = glib::ParamSpecFlags; + type SetValue = Self; + type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder; + + fn param_spec_builder() -> Self::BuilderFn { + Self::ParamSpec::builder + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl glib::value::ValueType for TextBufferNotifyFlags { + type Type = Self; +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +unsafe impl<'a> glib::value::FromValue<'a> for TextBufferNotifyFlags { + type Checker = glib::value::GenericValueTypeChecker; + + #[inline] + unsafe fn from_value(value: &'a glib::Value) -> Self { + skip_assert_initialized!(); + from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl ToValue for TextBufferNotifyFlags { + #[inline] + fn to_value(&self) -> glib::Value { + let mut value = glib::Value::for_value_type::(); + unsafe { + glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); + } + value + } + + #[inline] + fn value_type(&self) -> glib::Type { + Self::static_type() + } +} + +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +impl From for glib::Value { + #[inline] + fn from(v: TextBufferNotifyFlags) -> Self { + skip_assert_initialized!(); + ToValue::to_value(&v) + } +} + bitflags! { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[doc(alias = "GtkTextSearchFlags")] diff --git a/gtk4/src/auto/list_box.rs b/gtk4/src/auto/list_box.rs index a40e5f6e9163..f314fad99995 100644 --- a/gtk4/src/auto/list_box.rs +++ b/gtk4/src/auto/list_box.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(feature = "v4_18")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] +use crate::ListTabBehavior; use crate::{ ffi, Accessible, AccessibleRole, Adjustment, Align, Buildable, ConstraintTarget, LayoutManager, ListBoxRow, MovementStep, Overflow, SelectionMode, Widget, @@ -159,6 +162,15 @@ impl ListBox { unsafe { from_glib(ffi::gtk_list_box_get_show_separators(self.to_glib_none().0)) } } + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "gtk_list_box_get_tab_behavior")] + #[doc(alias = "get_tab_behavior")] + #[doc(alias = "tab-behavior")] + pub fn tab_behavior(&self) -> ListTabBehavior { + unsafe { from_glib(ffi::gtk_list_box_get_tab_behavior(self.to_glib_none().0)) } + } + #[doc(alias = "gtk_list_box_insert")] pub fn insert(&self, child: &impl IsA, position: i32) { unsafe { @@ -370,6 +382,16 @@ impl ListBox { } } + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "gtk_list_box_set_tab_behavior")] + #[doc(alias = "tab-behavior")] + pub fn set_tab_behavior(&self, behavior: ListTabBehavior) { + unsafe { + ffi::gtk_list_box_set_tab_behavior(self.to_glib_none().0, behavior.into_glib()); + } + } + #[doc(alias = "gtk_list_box_unselect_all")] pub fn unselect_all(&self) { unsafe { @@ -721,6 +743,31 @@ impl ListBox { ) } } + + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "tab-behavior")] + pub fn connect_tab_behavior_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_tab_behavior_trampoline( + this: *mut ffi::GtkListBox, + _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 _, + b"notify::tab-behavior\0".as_ptr() as *const _, + Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>( + notify_tab_behavior_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } } impl Default for ListBox { @@ -773,6 +820,14 @@ impl ListBoxBuilder { } } + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn tab_behavior(self, tab_behavior: ListTabBehavior) -> Self { + Self { + builder: self.builder.property("tab-behavior", tab_behavior), + } + } + pub fn can_focus(self, can_focus: bool) -> Self { Self { builder: self.builder.property("can-focus", can_focus), diff --git a/gtk4/src/auto/mod.rs b/gtk4/src/auto/mod.rs index 66bbaefc5268..3659e2117bd3 100644 --- a/gtk4/src/auto/mod.rs +++ b/gtk4/src/auto/mod.rs @@ -1276,6 +1276,9 @@ pub use self::flags::PrintCapabilities; pub use self::flags::ShortcutActionFlags; pub use self::flags::StateFlags; pub use self::flags::StyleContextPrintFlags; +#[cfg(feature = "v4_16")] +#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] +pub use self::flags::TextBufferNotifyFlags; pub use self::flags::TextSearchFlags; #[allow(deprecated)] pub use self::flags::TreeModelFlags; diff --git a/gtk4/src/auto/string_list.rs b/gtk4/src/auto/string_list.rs index d5fe0cd756b4..610aff404728 100644 --- a/gtk4/src/auto/string_list.rs +++ b/gtk4/src/auto/string_list.rs @@ -28,6 +28,13 @@ impl StringList { } } + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + #[doc(alias = "gtk_string_list_find")] + pub fn find(&self, string: &str) -> u32 { + unsafe { ffi::gtk_string_list_find(self.to_glib_none().0, string.to_glib_none().0) } + } + #[doc(alias = "gtk_string_list_get_string")] #[doc(alias = "get_string")] pub fn string(&self, position: u32) -> Option { diff --git a/gtk4/src/auto/text_buffer.rs b/gtk4/src/auto/text_buffer.rs index cbb52f9c79a7..5a5d4510a19b 100644 --- a/gtk4/src/auto/text_buffer.rs +++ b/gtk4/src/auto/text_buffer.rs @@ -770,6 +770,18 @@ pub trait TextBufferExt: IsA + 'static { } } + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gtk_text_buffer_remove_commit_notify")] + fn remove_commit_notify(&self, commit_notify_handler: u32) { + unsafe { + ffi::gtk_text_buffer_remove_commit_notify( + self.as_ref().to_glib_none().0, + commit_notify_handler, + ); + } + } + #[doc(alias = "gtk_text_buffer_remove_selection_clipboard")] fn remove_selection_clipboard(&self, clipboard: &gdk::Clipboard) { unsafe { diff --git a/gtk4/src/auto/versions.txt b/gtk4/src/auto/versions.txt index 0a416aa18620..60ae865ee3d0 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 @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81) diff --git a/gtk4/src/text_buffer.rs b/gtk4/src/text_buffer.rs index b1c7f23e50bd..b06390884e0e 100644 --- a/gtk4/src/text_buffer.rs +++ b/gtk4/src/text_buffer.rs @@ -10,6 +10,9 @@ use libc::{c_char, c_int}; use crate::{ffi, prelude::*, TextBuffer, TextIter, TextTag}; +#[cfg(feature = "v4_16")] +use crate::TextBufferNotifyFlags; + // rustdoc-stripper-ignore-next /// Trait containing manually implemented methods of /// [`TextBuffer`](crate::TextBuffer). @@ -100,6 +103,50 @@ pub trait TextBufferExtManual: IsA + 'static { ) } } + + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + #[doc(alias = "gtk_text_buffer_add_commit_notify")] + fn add_commit_notify( + &self, + flags: TextBufferNotifyFlags, + commit_notify: P, + ) -> u32 { + let commit_notify_data: Box_

= Box_::new(commit_notify); + unsafe extern "C" fn commit_notify_func< + P: Fn(&TextBuffer, TextBufferNotifyFlags, u32, u32) + 'static, + >( + buffer: *mut ffi::GtkTextBuffer, + flags: ffi::GtkTextBufferNotifyFlags, + position: std::ffi::c_uint, + length: std::ffi::c_uint, + user_data: glib::ffi::gpointer, + ) { + let buffer = from_glib_borrow(buffer); + let flags = from_glib(flags); + let callback = &*(user_data as *mut P); + (*callback)(&buffer, flags, position, length) + } + let commit_notify = Some(commit_notify_func::

as _); + unsafe extern "C" fn destroy_func< + P: Fn(&TextBuffer, TextBufferNotifyFlags, u32, u32) + 'static, + >( + data: glib::ffi::gpointer, + ) { + let _callback = Box_::from_raw(data as *mut P); + } + let destroy_call4 = Some(destroy_func::

as _); + let super_callback0: Box_

= commit_notify_data; + unsafe { + ffi::gtk_text_buffer_add_commit_notify( + self.as_ref().to_glib_none().0, + flags.into_glib(), + commit_notify, + Box_::into_raw(super_callback0) as *mut _, + destroy_call4, + ) + } + } } impl> TextBufferExtManual for O {} diff --git a/gtk4/sys/Cargo.toml b/gtk4/sys/Cargo.toml index e02f99849416..b45f4c8c3b25 100644 --- a/gtk4/sys/Cargo.toml +++ b/gtk4/sys/Cargo.toml @@ -56,7 +56,10 @@ version = "4.12" version = "4.14" [package.metadata.system-deps.gtk4.v4_16] -version = "4.15" +version = "4.16" + +[package.metadata.system-deps.gtk4.v4_18] +version = "4.17" [package.metadata.docs.rs] rustc-args = ["--cfg", "docsrs"] @@ -75,6 +78,7 @@ v4_10 = ["v4_8"] v4_12 = ["v4_10"] v4_14 = ["v4_12"] v4_16 = ["v4_14"] +v4_18 = ["v4_16"] [dependencies] libc = "0.2" diff --git a/gtk4/sys/src/lib.rs b/gtk4/sys/src/lib.rs index e69b897c5427..c190605b743c 100644 --- a/gtk4/sys/src/lib.rs +++ b/gtk4/sys/src/lib.rs @@ -1144,6 +1144,12 @@ pub const GTK_STYLE_CONTEXT_PRINT_RECURSE: GtkStyleContextPrintFlags = 1; pub const GTK_STYLE_CONTEXT_PRINT_SHOW_STYLE: GtkStyleContextPrintFlags = 2; pub const GTK_STYLE_CONTEXT_PRINT_SHOW_CHANGE: GtkStyleContextPrintFlags = 4; +pub type GtkTextBufferNotifyFlags = c_uint; +pub const GTK_TEXT_BUFFER_NOTIFY_BEFORE_INSERT: GtkTextBufferNotifyFlags = 1; +pub const GTK_TEXT_BUFFER_NOTIFY_AFTER_INSERT: GtkTextBufferNotifyFlags = 2; +pub const GTK_TEXT_BUFFER_NOTIFY_BEFORE_DELETE: GtkTextBufferNotifyFlags = 4; +pub const GTK_TEXT_BUFFER_NOTIFY_AFTER_DELETE: GtkTextBufferNotifyFlags = 8; + pub type GtkTextSearchFlags = c_uint; pub const GTK_TEXT_SEARCH_VISIBLE_ONLY: GtkTextSearchFlags = 1; pub const GTK_TEXT_SEARCH_TEXT_ONLY: GtkTextSearchFlags = 2; @@ -1240,6 +1246,9 @@ pub type GtkScaleFormatValueFunc = Option *mut c_char>; pub type GtkShortcutFunc = Option gboolean>; +pub type GtkTextBufferCommitNotify = Option< + unsafe extern "C" fn(*mut GtkTextBuffer, GtkTextBufferNotifyFlags, c_uint, c_uint, gpointer), +>; pub type GtkTextCharPredicate = Option gboolean>; pub type GtkTextTagTableForeach = Option; pub type GtkTickCallback = @@ -10478,6 +10487,13 @@ extern "C" { //========================================================================= pub fn gtk_style_context_print_flags_get_type() -> GType; + //========================================================================= + // GtkTextBufferNotifyFlags + //========================================================================= + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gtk_text_buffer_notify_flags_get_type() -> GType; + //========================================================================= // GtkTextSearchFlags //========================================================================= @@ -15596,6 +15612,9 @@ extern "C" { pub fn gtk_list_box_get_selected_rows(box_: *mut GtkListBox) -> *mut glib::GList; pub fn gtk_list_box_get_selection_mode(box_: *mut GtkListBox) -> GtkSelectionMode; pub fn gtk_list_box_get_show_separators(box_: *mut GtkListBox) -> gboolean; + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn gtk_list_box_get_tab_behavior(box_: *mut GtkListBox) -> GtkListTabBehavior; pub fn gtk_list_box_insert(box_: *mut GtkListBox, child: *mut GtkWidget, position: c_int); pub fn gtk_list_box_invalidate_filter(box_: *mut GtkListBox); pub fn gtk_list_box_invalidate_headers(box_: *mut GtkListBox); @@ -15635,6 +15654,9 @@ extern "C" { user_data: gpointer, destroy: glib::GDestroyNotify, ); + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn gtk_list_box_set_tab_behavior(box_: *mut GtkListBox, behavior: GtkListTabBehavior); pub fn gtk_list_box_unselect_all(box_: *mut GtkListBox); pub fn gtk_list_box_unselect_row(box_: *mut GtkListBox, row: *mut GtkListBoxRow); @@ -18389,6 +18411,9 @@ extern "C" { pub fn gtk_string_list_get_type() -> GType; pub fn gtk_string_list_new(strings: *const *const c_char) -> *mut GtkStringList; pub fn gtk_string_list_append(self_: *mut GtkStringList, string: *const c_char); + #[cfg(feature = "v4_18")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))] + pub fn gtk_string_list_find(self_: *mut GtkStringList, string: *const c_char) -> c_uint; pub fn gtk_string_list_get_string(self_: *mut GtkStringList, position: c_uint) -> *const c_char; pub fn gtk_string_list_remove(self_: *mut GtkStringList, position: c_uint); @@ -18545,6 +18570,15 @@ extern "C" { //========================================================================= pub fn gtk_text_buffer_get_type() -> GType; pub fn gtk_text_buffer_new(table: *mut GtkTextTagTable) -> *mut GtkTextBuffer; + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gtk_text_buffer_add_commit_notify( + buffer: *mut GtkTextBuffer, + flags: GtkTextBufferNotifyFlags, + commit_notify: GtkTextBufferCommitNotify, + user_data: gpointer, + destroy: glib::GDestroyNotify, + ) -> c_uint; pub fn gtk_text_buffer_add_mark( buffer: *mut GtkTextBuffer, mark: *mut GtkTextMark, @@ -18785,6 +18819,12 @@ extern "C" { start: *const GtkTextIter, end: *const GtkTextIter, ); + #[cfg(feature = "v4_16")] + #[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))] + pub fn gtk_text_buffer_remove_commit_notify( + buffer: *mut GtkTextBuffer, + commit_notify_handler: c_uint, + ); pub fn gtk_text_buffer_remove_selection_clipboard( buffer: *mut GtkTextBuffer, clipboard: *mut gdk::GdkClipboard, diff --git a/gtk4/sys/tests/abi.rs b/gtk4/sys/tests/abi.rs index b69a014cf484..3d114d6da0df 100644 --- a/gtk4/sys/tests/abi.rs +++ b/gtk4/sys/tests/abi.rs @@ -2196,6 +2196,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ alignment: align_of::(), }, ), + ( + "GtkTextBufferNotifyFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ( "GtkTextChildAnchor", Layout { @@ -3413,6 +3420,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GTK_SYSTEM_SETTING_FONT_CONFIG", "2"), ("(gint) GTK_SYSTEM_SETTING_FONT_NAME", "1"), ("(gint) GTK_SYSTEM_SETTING_ICON_THEME", "4"), + ("(guint) GTK_TEXT_BUFFER_NOTIFY_AFTER_DELETE", "8"), + ("(guint) GTK_TEXT_BUFFER_NOTIFY_AFTER_INSERT", "2"), + ("(guint) GTK_TEXT_BUFFER_NOTIFY_BEFORE_DELETE", "4"), + ("(guint) GTK_TEXT_BUFFER_NOTIFY_BEFORE_INSERT", "1"), ("(gint) GTK_TEXT_DIR_LTR", "1"), ("(gint) GTK_TEXT_DIR_NONE", "0"), ("(gint) GTK_TEXT_DIR_RTL", "2"), diff --git a/gtk4/sys/tests/constant.c b/gtk4/sys/tests/constant.c index c88d3c1cc0e1..2cd2bb0496c1 100644 --- a/gtk4/sys/tests/constant.c +++ b/gtk4/sys/tests/constant.c @@ -816,6 +816,10 @@ int main() { PRINT_CONSTANT((gint) GTK_SYSTEM_SETTING_FONT_CONFIG); PRINT_CONSTANT((gint) GTK_SYSTEM_SETTING_FONT_NAME); PRINT_CONSTANT((gint) GTK_SYSTEM_SETTING_ICON_THEME); + PRINT_CONSTANT((guint) GTK_TEXT_BUFFER_NOTIFY_AFTER_DELETE); + PRINT_CONSTANT((guint) GTK_TEXT_BUFFER_NOTIFY_AFTER_INSERT); + PRINT_CONSTANT((guint) GTK_TEXT_BUFFER_NOTIFY_BEFORE_DELETE); + PRINT_CONSTANT((guint) GTK_TEXT_BUFFER_NOTIFY_BEFORE_INSERT); PRINT_CONSTANT((gint) GTK_TEXT_DIR_LTR); PRINT_CONSTANT((gint) GTK_TEXT_DIR_NONE); PRINT_CONSTANT((gint) GTK_TEXT_DIR_RTL); diff --git a/gtk4/sys/tests/layout.c b/gtk4/sys/tests/layout.c index 0ee49f3d1d4c..d8e82c350206 100644 --- a/gtk4/sys/tests/layout.c +++ b/gtk4/sys/tests/layout.c @@ -292,6 +292,7 @@ int main() { printf("%s;%zu;%zu\n", "GtkText", sizeof(GtkText), alignof(GtkText)); printf("%s;%zu;%zu\n", "GtkTextBuffer", sizeof(GtkTextBuffer), alignof(GtkTextBuffer)); printf("%s;%zu;%zu\n", "GtkTextBufferClass", sizeof(GtkTextBufferClass), alignof(GtkTextBufferClass)); + printf("%s;%zu;%zu\n", "GtkTextBufferNotifyFlags", sizeof(GtkTextBufferNotifyFlags), alignof(GtkTextBufferNotifyFlags)); printf("%s;%zu;%zu\n", "GtkTextChildAnchor", sizeof(GtkTextChildAnchor), alignof(GtkTextChildAnchor)); printf("%s;%zu;%zu\n", "GtkTextChildAnchorClass", sizeof(GtkTextChildAnchorClass), alignof(GtkTextChildAnchorClass)); printf("%s;%zu;%zu\n", "GtkTextDirection", sizeof(GtkTextDirection), alignof(GtkTextDirection)); diff --git a/gtk4/sys/versions.txt b/gtk4/sys/versions.txt index 0a416aa18620..60ae865ee3d0 100644 --- a/gtk4/sys/versions.txt +++ b/gtk4/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ eff839d4745d) -from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd) +Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545) +from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)