From 068833d5ae7dfda37e51b2d461aa041593155515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 8 Nov 2024 15:56:02 +0200 Subject: [PATCH 01/11] Update gir --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index c954dbdc9ac0..e9ef1f366af2 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit c954dbdc9ac0b72081b63937431c646283cbcf33 +Subproject commit e9ef1f366af2a54be48d37cff1104a77cd975413 From 056106ec640a39213503ce1a8143f5407334b2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 8 Nov 2024 15:56:38 +0200 Subject: [PATCH 02/11] Regenerate with latest gir --- gdk-pixbuf/src/auto/versions.txt | 2 +- gdk-pixbuf/sys/versions.txt | 2 +- gio/src/auto/desktop_app_info.rs | 9 +++++---- gio/src/auto/file.rs | 12 ++++++------ gio/src/auto/versions.txt | 2 +- gio/sys/versions.txt | 2 +- glib/gobject-sys/versions.txt | 2 +- glib/src/auto/versions.txt | 2 +- glib/sys/versions.txt | 2 +- graphene/src/auto/versions.txt | 2 +- graphene/sys/versions.txt | 2 +- pango/src/auto/attr_list.rs | 6 +++--- pango/src/auto/fontset.rs | 6 +++--- pango/src/auto/versions.txt | 2 +- pango/sys/versions.txt | 2 +- pangocairo/src/auto/versions.txt | 2 +- pangocairo/sys/versions.txt | 2 +- 17 files changed, 30 insertions(+), 29 deletions(-) diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/gio/src/auto/desktop_app_info.rs b/gio/src/auto/desktop_app_info.rs index 76e69c0fcef9..bbb79e97c463 100644 --- a/gio/src/auto/desktop_app_info.rs +++ b/gio/src/auto/desktop_app_info.rs @@ -218,7 +218,8 @@ impl DesktopAppInfo { } else { None }; - let pid_callback_data: Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))> = pid_callback; + let mut pid_callback_data: Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))> = + pid_callback; unsafe extern "C" fn pid_callback_func( appinfo: *mut ffi::GDesktopAppInfo, pid: glib::ffi::GPid, @@ -239,8 +240,8 @@ impl DesktopAppInfo { None }; let super_callback0: Box_>> = user_setup_data; - let super_callback1: &Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))> = - &pid_callback_data; + let super_callback1: &mut Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))> = + &mut pid_callback_data; unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::g_desktop_app_info_launch_uris_as_manager( @@ -251,7 +252,7 @@ impl DesktopAppInfo { user_setup, Box_::into_raw(super_callback0) as *mut _, pid_callback, - super_callback1 as *const _ as *mut _, + super_callback1 as *mut _ as *mut _, &mut error, ); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); diff --git a/gio/src/auto/file.rs b/gio/src/auto/file.rs index d71a5c31b11c..b40ba4e85439 100644 --- a/gio/src/auto/file.rs +++ b/gio/src/auto/file.rs @@ -229,7 +229,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, progress_callback: Option<&mut dyn (FnMut(i64, i64))>, ) -> Result<(), glib::Error> { - let progress_callback_data: Option<&mut dyn (FnMut(i64, i64))> = progress_callback; + let mut progress_callback_data: Option<&mut dyn (FnMut(i64, i64))> = progress_callback; unsafe extern "C" fn progress_callback_func( current_num_bytes: i64, total_num_bytes: i64, @@ -247,7 +247,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { } else { None }; - let super_callback0: &Option<&mut dyn (FnMut(i64, i64))> = &progress_callback_data; + let super_callback0: &mut Option<&mut dyn (FnMut(i64, i64))> = &mut progress_callback_data; unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_copy( @@ -256,7 +256,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, progress_callback, - super_callback0 as *const _ as *mut _, + super_callback0 as *mut _ as *mut _, &mut error, ); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); @@ -1257,7 +1257,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { cancellable: Option<&impl IsA>, progress_callback: Option<&mut dyn (FnMut(i64, i64))>, ) -> Result<(), glib::Error> { - let progress_callback_data: Option<&mut dyn (FnMut(i64, i64))> = progress_callback; + let mut progress_callback_data: Option<&mut dyn (FnMut(i64, i64))> = progress_callback; unsafe extern "C" fn progress_callback_func( current_num_bytes: i64, total_num_bytes: i64, @@ -1275,7 +1275,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { } else { None }; - let super_callback0: &Option<&mut dyn (FnMut(i64, i64))> = &progress_callback_data; + let super_callback0: &mut Option<&mut dyn (FnMut(i64, i64))> = &mut progress_callback_data; unsafe { let mut error = std::ptr::null_mut(); let is_ok = ffi::g_file_move( @@ -1284,7 +1284,7 @@ pub trait FileExt: IsA + sealed::Sealed + 'static { flags.into_glib(), cancellable.map(|p| p.as_ref()).to_glib_none().0, progress_callback, - super_callback0 as *const _ as *mut _, + super_callback0 as *mut _ as *mut _, &mut error, ); debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/pango/src/auto/attr_list.rs b/pango/src/auto/attr_list.rs index 363189c50fbc..e366296904d8 100644 --- a/pango/src/auto/attr_list.rs +++ b/pango/src/auto/attr_list.rs @@ -31,7 +31,7 @@ impl AttrList { #[doc(alias = "pango_attr_list_filter")] #[must_use] pub fn filter bool>(&self, func: P) -> Option { - let func_data: P = func; + let mut func_data: P = func; unsafe extern "C" fn func_func bool>( attribute: *mut ffi::PangoAttribute, user_data: glib::ffi::gpointer, @@ -41,12 +41,12 @@ impl AttrList { (*callback)(&attribute).into_glib() } let func = Some(func_func::

as _); - let super_callback0: &P = &func_data; + let super_callback0: &mut P = &mut func_data; unsafe { from_glib_full(ffi::pango_attr_list_filter( self.to_glib_none().0, func, - super_callback0 as *const _ as *mut _, + super_callback0 as *mut _ as *mut _, )) } } diff --git a/pango/src/auto/fontset.rs b/pango/src/auto/fontset.rs index 1864fdd0bf67..2df3c1f9c44a 100644 --- a/pango/src/auto/fontset.rs +++ b/pango/src/auto/fontset.rs @@ -26,7 +26,7 @@ mod sealed { pub trait FontsetExt: IsA + sealed::Sealed + 'static { #[doc(alias = "pango_fontset_foreach")] fn foreach bool>(&self, func: P) { - let func_data: P = func; + let mut func_data: P = func; unsafe extern "C" fn func_func bool>( fontset: *mut ffi::PangoFontset, font: *mut ffi::PangoFont, @@ -38,12 +38,12 @@ pub trait FontsetExt: IsA + sealed::Sealed + 'static { (*callback)(&fontset, &font).into_glib() } let func = Some(func_func::

as _); - let super_callback0: &P = &func_data; + let super_callback0: &mut P = &mut func_data; unsafe { ffi::pango_fontset_foreach( self.as_ref().to_glib_none().0, func, - super_callback0 as *const _ as *mut _, + super_callback0 as *mut _ as *mut _, ); } } diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index a3aecadef692..57c48e8495b9 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c954dbdc9ac0) +Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) From 96aa7b0f9e03e3f8207bc0c6d2dcd0c376d2cc65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 5 Nov 2024 09:08:29 +0200 Subject: [PATCH 03/11] pango: Fix `LayoutLine::x_ranges()` bindings The returned array has 2*n_ranges elements, not just n_ranges. Fixes https://github.com/gtk-rs/gtk-rs-core/issues/1563 --- pango/Gir.toml | 3 +++ pango/src/auto/layout_line.rs | 17 ----------------- pango/src/layout.rs | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pango/Gir.toml b/pango/Gir.toml index 559179c13703..cf3136ac5a65 100644 --- a/pango/Gir.toml +++ b/pango/Gir.toml @@ -383,6 +383,9 @@ status = "generate" [[object.function]] name = "x_to_index" manual = true + [[object.function]] + name = "get_x_ranges" + manual = true [[object]] name = "Pango.Matrix" diff --git a/pango/src/auto/layout_line.rs b/pango/src/auto/layout_line.rs index c077e5b562da..4ed931430529 100644 --- a/pango/src/auto/layout_line.rs +++ b/pango/src/auto/layout_line.rs @@ -90,23 +90,6 @@ impl LayoutLine { unsafe { ffi::pango_layout_line_get_start_index(self.to_glib_none().0) } } - #[doc(alias = "pango_layout_line_get_x_ranges")] - #[doc(alias = "get_x_ranges")] - pub fn x_ranges(&self, start_index: i32, end_index: i32) -> Vec { - unsafe { - let mut ranges = std::ptr::null_mut(); - let mut n_ranges = std::mem::MaybeUninit::uninit(); - ffi::pango_layout_line_get_x_ranges( - self.to_glib_none().0, - start_index, - end_index, - &mut ranges, - n_ranges.as_mut_ptr(), - ); - FromGlibContainer::from_glib_full_num(ranges, n_ranges.assume_init() as _) - } - } - #[doc(alias = "pango_layout_line_index_to_x")] pub fn index_to_x(&self, index_: i32, trailing: bool) -> i32 { unsafe { diff --git a/pango/src/layout.rs b/pango/src/layout.rs index bfc16cbba8f1..dc56cc789ca8 100644 --- a/pango/src/layout.rs +++ b/pango/src/layout.rs @@ -90,4 +90,21 @@ impl LayoutLine { is_inside, } } + + #[doc(alias = "pango_layout_line_get_x_ranges")] + #[doc(alias = "get_x_ranges")] + pub fn x_ranges(&self, start_index: i32, end_index: i32) -> Vec { + unsafe { + let mut ranges = std::ptr::null_mut(); + let mut n_ranges = std::mem::MaybeUninit::uninit(); + ffi::pango_layout_line_get_x_ranges( + self.to_glib_none().0, + start_index, + end_index, + &mut ranges, + n_ranges.as_mut_ptr(), + ); + FromGlibContainer::from_glib_full_num(ranges, 2 * n_ranges.assume_init() as usize) + } + } } From fba4ade234f0eabd96b13c4784315ce70e9a49e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Thu, 7 Nov 2024 09:36:18 +0100 Subject: [PATCH 04/11] glib: fix userdata mutability for FnMut callbacks --- glib/src/source.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/src/source.rs b/glib/src/source.rs index ba0ba5f7e85d..d410d6993034 100644 --- a/glib/src/source.rs +++ b/glib/src/source.rs @@ -1092,9 +1092,9 @@ where ffi::g_source_set_callback( source, Some(transmute::< - *const (), + *mut (), unsafe extern "C" fn(ffi::gpointer) -> ffi::gboolean, - >(trampoline_child_watch:: as *const ())), + >(trampoline_child_watch:: as *mut ())), into_raw_child_watch(func), Some(destroy_closure_child_watch::), ); From f312b5af125b93a8c236dc022b393b3f2e8f2b35 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Fri, 1 Nov 2024 18:09:30 +0100 Subject: [PATCH 05/11] Fix typo to get Github actions to pass --- glib/src/source.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/src/source.rs b/glib/src/source.rs index d410d6993034..7b835827619d 100644 --- a/glib/src/source.rs +++ b/glib/src/source.rs @@ -53,7 +53,7 @@ impl FromGlib for SourceId { } // rustdoc-stripper-ignore-next -/// Process identificator +/// Process identifier #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[doc(alias = "GPid")] pub struct Pid(pub ffi::GPid); From e9ec2d1eda2b6e6e2c3220d750ebaa078f7479ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 8 Nov 2024 15:57:36 +0200 Subject: [PATCH 06/11] Update Cargo.lock --- Cargo.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d52cadce179..2c567a28d7c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "async-tls" @@ -102,9 +102,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.31" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "shlex", ] @@ -268,9 +268,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "float_eq" @@ -579,9 +579,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -642,9 +642,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "linux-raw-sys" @@ -929,9 +929,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.38" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags", "errno", @@ -1114,9 +1114,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "syn" -version = "2.0.85" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -1144,9 +1144,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", From 27e1641de780ee3ecc8f87b815b6816791abc2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 12 Nov 2024 12:26:44 +0200 Subject: [PATCH 07/11] Update gir-files --- gir-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir-files b/gir-files index 1dc2560a9ae8..d48ffb674809 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit 1dc2560a9ae89ae78ab63ef34b926a48e0fc3bb9 +Subproject commit d48ffb674809dba0989cdc3af9a149defe0d3c85 From 721538bcd68676337d4a6f46bbdf50f9e1d37b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 12 Nov 2024 12:27:16 +0200 Subject: [PATCH 08/11] Regenerate with latest gir / gir-files --- gdk-pixbuf/src/auto/versions.txt | 2 +- gdk-pixbuf/sys/versions.txt | 2 +- gio/src/auto/unix_mount_entry.rs | 214 ++++++++++++++++++++++++++++++- gio/src/auto/versions.txt | 2 +- gio/sys/src/lib.rs | 71 ++++++++++ gio/sys/versions.txt | 2 +- glib/gobject-sys/versions.txt | 2 +- glib/src/auto/enums.rs | 28 ++++ glib/src/auto/functions.rs | 2 +- glib/src/auto/versions.txt | 2 +- glib/sys/src/lib.rs | 11 +- glib/sys/tests/abi.rs | 9 ++ glib/sys/tests/constant.c | 9 ++ glib/sys/versions.txt | 2 +- graphene/src/auto/versions.txt | 2 +- graphene/sys/versions.txt | 2 +- pango/src/auto/versions.txt | 2 +- pango/sys/versions.txt | 2 +- pangocairo/src/auto/versions.txt | 2 +- pangocairo/sys/versions.txt | 2 +- 20 files changed, 353 insertions(+), 17 deletions(-) diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/gio/src/auto/unix_mount_entry.rs b/gio/src/auto/unix_mount_entry.rs index 0262bc3c552b..792f3292480f 100644 --- a/gio/src/auto/unix_mount_entry.rs +++ b/gio/src/auto/unix_mount_entry.rs @@ -3,17 +3,227 @@ // DO NOT EDIT use crate::ffi; +#[cfg(feature = "v2_84")] +#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] +use crate::Icon; +#[cfg(feature = "v2_84")] +#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] +use glib::translate::*; glib::wrapper! { #[derive(Debug)] pub struct UnixMountEntry(Boxed); match fn { - copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::g_unix_mount_entry_get_type(), ptr as *mut _) as *mut ffi::GUnixMountEntry, - free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::g_unix_mount_entry_get_type(), ptr as *mut _), + copy => |ptr| ffi::g_unix_mount_entry_copy(mut_override(ptr)), + free => |ptr| ffi::g_unix_mount_entry_free(ptr), type_ => || ffi::g_unix_mount_entry_get_type(), } } +impl UnixMountEntry { + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_compare")] + fn compare(&mut self, mount2: &mut UnixMountEntry) -> i32 { + unsafe { + ffi::g_unix_mount_entry_compare(self.to_glib_none_mut().0, mount2.to_glib_none_mut().0) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_get_device_path")] + #[doc(alias = "get_device_path")] + pub fn device_path(&mut self) -> std::path::PathBuf { + unsafe { + from_glib_none(ffi::g_unix_mount_entry_get_device_path( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_get_fs_type")] + #[doc(alias = "get_fs_type")] + pub fn fs_type(&mut self) -> glib::GString { + unsafe { + from_glib_none(ffi::g_unix_mount_entry_get_fs_type( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_get_mount_path")] + #[doc(alias = "get_mount_path")] + pub fn mount_path(&mut self) -> std::path::PathBuf { + unsafe { + from_glib_none(ffi::g_unix_mount_entry_get_mount_path( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_get_options")] + #[doc(alias = "get_options")] + pub fn options(&mut self) -> Option { + unsafe { + from_glib_none(ffi::g_unix_mount_entry_get_options( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_get_root_path")] + #[doc(alias = "get_root_path")] + pub fn root_path(&mut self) -> Option { + unsafe { + from_glib_none(ffi::g_unix_mount_entry_get_root_path( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_guess_can_eject")] + pub fn guess_can_eject(&mut self) -> bool { + unsafe { + from_glib(ffi::g_unix_mount_entry_guess_can_eject( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_guess_icon")] + pub fn guess_icon(&mut self) -> Icon { + unsafe { + from_glib_full(ffi::g_unix_mount_entry_guess_icon( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_guess_name")] + pub fn guess_name(&mut self) -> glib::GString { + unsafe { + from_glib_full(ffi::g_unix_mount_entry_guess_name( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_guess_should_display")] + pub fn guess_should_display(&mut self) -> bool { + unsafe { + from_glib(ffi::g_unix_mount_entry_guess_should_display( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_guess_symbolic_icon")] + pub fn guess_symbolic_icon(&mut self) -> Icon { + unsafe { + from_glib_full(ffi::g_unix_mount_entry_guess_symbolic_icon( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_is_readonly")] + pub fn is_readonly(&mut self) -> bool { + unsafe { + from_glib(ffi::g_unix_mount_entry_is_readonly( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_is_system_internal")] + pub fn is_system_internal(&mut self) -> bool { + unsafe { + from_glib(ffi::g_unix_mount_entry_is_system_internal( + self.to_glib_none_mut().0, + )) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_at")] + pub fn at(mount_path: impl AsRef) -> (Option, u64) { + unsafe { + let mut time_read = std::mem::MaybeUninit::uninit(); + let ret = from_glib_full(ffi::g_unix_mount_entry_at( + mount_path.as_ref().to_glib_none().0, + time_read.as_mut_ptr(), + )); + (ret, time_read.assume_init()) + } + } + + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[doc(alias = "g_unix_mount_entry_for")] + #[doc(alias = "for")] + pub fn for_(file_path: impl AsRef) -> (Option, u64) { + unsafe { + let mut time_read = std::mem::MaybeUninit::uninit(); + let ret = from_glib_full(ffi::g_unix_mount_entry_for( + file_path.as_ref().to_glib_none().0, + time_read.as_mut_ptr(), + )); + (ret, time_read.assume_init()) + } + } +} + +#[cfg(feature = "v2_84")] +#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] +impl PartialEq for UnixMountEntry { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.compare(other) == 0 + } +} + +impl Eq for UnixMountEntry {} + +#[cfg(feature = "v2_84")] +#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] +impl PartialOrd for UnixMountEntry { + #[inline] + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for UnixMountEntry { + #[inline] + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.compare(other).cmp(&0) + } +} + unsafe impl Send for UnixMountEntry {} unsafe impl Sync for UnixMountEntry {} diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/gio/sys/src/lib.rs b/gio/sys/src/lib.rs index eccdd13c934f..e1a0208598d0 100644 --- a/gio/sys/src/lib.rs +++ b/gio/sys/src/lib.rs @@ -10161,6 +10161,66 @@ extern "C" { // GUnixMountEntry //========================================================================= pub fn g_unix_mount_entry_get_type() -> GType; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_compare( + mount1: *mut GUnixMountEntry, + mount2: *mut GUnixMountEntry, + ) -> c_int; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_copy(mount_entry: *mut GUnixMountEntry) -> *mut GUnixMountEntry; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_free(mount_entry: *mut GUnixMountEntry); + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_get_fs_type(mount_entry: *mut GUnixMountEntry) -> *const c_char; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_get_mount_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_get_options(mount_entry: *mut GUnixMountEntry) -> *const c_char; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_get_root_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_guess_can_eject(mount_entry: *mut GUnixMountEntry) -> gboolean; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_guess_icon(mount_entry: *mut GUnixMountEntry) -> *mut GIcon; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_guess_name(mount_entry: *mut GUnixMountEntry) -> *mut c_char; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_guess_should_display(mount_entry: *mut GUnixMountEntry) -> gboolean; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_guess_symbolic_icon(mount_entry: *mut GUnixMountEntry) -> *mut GIcon; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_is_readonly(mount_entry: *mut GUnixMountEntry) -> gboolean; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_is_system_internal(mount_entry: *mut GUnixMountEntry) -> gboolean; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_at( + mount_path: *const c_char, + time_read: *mut u64, + ) -> *mut GUnixMountEntry; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entry_for( + file_path: *const c_char, + time_read: *mut u64, + ) -> *mut GUnixMountEntry; //========================================================================= // GUnixMountPoint @@ -17301,6 +17361,17 @@ extern "C" { mount2: *mut GUnixMountEntry, ) -> c_int; pub fn g_unix_mount_copy(mount_entry: *mut GUnixMountEntry) -> *mut GUnixMountEntry; + pub fn g_unix_mount_entries_changed_since(time: u64) -> gboolean; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entries_get(time_read: *mut u64) -> *mut glib::GList; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + pub fn g_unix_mount_entries_get_from_file( + table_path: *const c_char, + time_read_out: *mut u64, + n_entries_out: *mut size_t, + ) -> *mut *mut GUnixMountEntry; pub fn g_unix_mount_for(file_path: *const c_char, time_read: *mut u64) -> *mut GUnixMountEntry; pub fn g_unix_mount_free(mount_entry: *mut GUnixMountEntry); pub fn g_unix_mount_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/glib/src/auto/enums.rs b/glib/src/auto/enums.rs index 998d83b473df..f77a298a2e3a 100644 --- a/glib/src/auto/enums.rs +++ b/glib/src/auto/enums.rs @@ -1514,6 +1514,20 @@ pub enum UnicodeScript { #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_UNICODE_SCRIPT_NAG_MUNDARI")] NagMundari, + #[doc(alias = "G_UNICODE_SCRIPT_TODHRI")] + Todhri, + #[doc(alias = "G_UNICODE_SCRIPT_GARAY")] + Garay, + #[doc(alias = "G_UNICODE_SCRIPT_TULU_TIGALARI")] + TuluTigalari, + #[doc(alias = "G_UNICODE_SCRIPT_SUNUWAR")] + Sunuwar, + #[doc(alias = "G_UNICODE_SCRIPT_GURUNG_KHEMA")] + GurungKhema, + #[doc(alias = "G_UNICODE_SCRIPT_KIRAT_RAI")] + KiratRai, + #[doc(alias = "G_UNICODE_SCRIPT_OL_ONAL")] + OlOnal, #[doc(hidden)] __Unknown(i32), } @@ -1710,6 +1724,13 @@ impl IntoGlib for UnicodeScript { Self::Kawi => ffi::G_UNICODE_SCRIPT_KAWI, #[cfg(feature = "v2_74")] Self::NagMundari => ffi::G_UNICODE_SCRIPT_NAG_MUNDARI, + Self::Todhri => ffi::G_UNICODE_SCRIPT_TODHRI, + Self::Garay => ffi::G_UNICODE_SCRIPT_GARAY, + Self::TuluTigalari => ffi::G_UNICODE_SCRIPT_TULU_TIGALARI, + Self::Sunuwar => ffi::G_UNICODE_SCRIPT_SUNUWAR, + Self::GurungKhema => ffi::G_UNICODE_SCRIPT_GURUNG_KHEMA, + Self::KiratRai => ffi::G_UNICODE_SCRIPT_KIRAT_RAI, + Self::OlOnal => ffi::G_UNICODE_SCRIPT_OL_ONAL, Self::__Unknown(value) => value, } } @@ -1893,6 +1914,13 @@ impl FromGlib for UnicodeScript { ffi::G_UNICODE_SCRIPT_KAWI => Self::Kawi, #[cfg(feature = "v2_74")] ffi::G_UNICODE_SCRIPT_NAG_MUNDARI => Self::NagMundari, + ffi::G_UNICODE_SCRIPT_TODHRI => Self::Todhri, + ffi::G_UNICODE_SCRIPT_GARAY => Self::Garay, + ffi::G_UNICODE_SCRIPT_TULU_TIGALARI => Self::TuluTigalari, + ffi::G_UNICODE_SCRIPT_SUNUWAR => Self::Sunuwar, + ffi::G_UNICODE_SCRIPT_GURUNG_KHEMA => Self::GurungKhema, + ffi::G_UNICODE_SCRIPT_KIRAT_RAI => Self::KiratRai, + ffi::G_UNICODE_SCRIPT_OL_ONAL => Self::OlOnal, value => Self::__Unknown(value), } } diff --git a/glib/src/auto/functions.rs b/glib/src/auto/functions.rs index b517156b49ed..815147662c16 100644 --- a/glib/src/auto/functions.rs +++ b/glib/src/auto/functions.rs @@ -559,7 +559,7 @@ pub fn on_error_query(prg_name: &str) { } #[doc(alias = "g_on_error_stack_trace")] -pub fn on_error_stack_trace(prg_name: &str) { +pub fn on_error_stack_trace(prg_name: Option<&str>) { unsafe { ffi::g_on_error_stack_trace(prg_name.to_glib_none().0); } diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/glib/sys/src/lib.rs b/glib/sys/src/lib.rs index ad36c51382ff..b63e81b4c5e9 100644 --- a/glib/sys/src/lib.rs +++ b/glib/sys/src/lib.rs @@ -607,6 +607,13 @@ pub const G_UNICODE_SCRIPT_VITHKUQI: GUnicodeScript = 161; pub const G_UNICODE_SCRIPT_MATH: GUnicodeScript = 162; pub const G_UNICODE_SCRIPT_KAWI: GUnicodeScript = 163; pub const G_UNICODE_SCRIPT_NAG_MUNDARI: GUnicodeScript = 164; +pub const G_UNICODE_SCRIPT_TODHRI: GUnicodeScript = 165; +pub const G_UNICODE_SCRIPT_GARAY: GUnicodeScript = 166; +pub const G_UNICODE_SCRIPT_TULU_TIGALARI: GUnicodeScript = 167; +pub const G_UNICODE_SCRIPT_SUNUWAR: GUnicodeScript = 168; +pub const G_UNICODE_SCRIPT_GURUNG_KHEMA: GUnicodeScript = 169; +pub const G_UNICODE_SCRIPT_KIRAT_RAI: GUnicodeScript = 170; +pub const G_UNICODE_SCRIPT_OL_ONAL: GUnicodeScript = 171; pub type GUnicodeType = c_int; pub const G_UNICODE_CONTROL: GUnicodeType = 0; @@ -797,6 +804,8 @@ pub const G_URI_RESERVED_CHARS_GENERIC_DELIMITERS: &[u8] = b":/?#[]@\0"; pub const G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: &[u8] = b"!$&'()*+,;=\0"; pub const G_USEC_PER_SEC: c_int = 1000000; pub const G_WIN32_MSG_HANDLE: c_int = 19981206; +pub const g_macro__has_attribute_ifunc: c_int = 0; +pub const g_macro__has_attribute_no_sanitize_address: c_int = 0; // Flags pub type GAsciiType = c_uint; @@ -4585,7 +4594,7 @@ extern "C" { index_: *mut c_uint, ) -> gboolean; pub fn g_ptr_array_foreach(array: *mut GPtrArray, func: GFunc, user_data: gpointer); - pub fn g_ptr_array_free(array: *mut GPtrArray, free_seg: gboolean) -> *mut gpointer; + pub fn g_ptr_array_free(array: *mut GPtrArray, free_segment: gboolean) -> *mut gpointer; pub fn g_ptr_array_insert(array: *mut GPtrArray, index_: c_int, data: gpointer); #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] diff --git a/glib/sys/tests/abi.rs b/glib/sys/tests/abi.rs index 1965533d45c5..350bfd75d740 100644 --- a/glib/sys/tests/abi.rs +++ b/glib/sys/tests/abi.rs @@ -1655,6 +1655,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) G_UNICODE_SCRIPT_ELBASAN", "106"), ("(gint) G_UNICODE_SCRIPT_ELYMAIC", "149"), ("(gint) G_UNICODE_SCRIPT_ETHIOPIC", "11"), + ("(gint) G_UNICODE_SCRIPT_GARAY", "166"), ("(gint) G_UNICODE_SCRIPT_GEORGIAN", "12"), ("(gint) G_UNICODE_SCRIPT_GLAGOLITIC", "56"), ("(gint) G_UNICODE_SCRIPT_GOTHIC", "13"), @@ -1663,6 +1664,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) G_UNICODE_SCRIPT_GUJARATI", "15"), ("(gint) G_UNICODE_SCRIPT_GUNJALA_GONDI", "143"), ("(gint) G_UNICODE_SCRIPT_GURMUKHI", "16"), + ("(gint) G_UNICODE_SCRIPT_GURUNG_KHEMA", "169"), ("(gint) G_UNICODE_SCRIPT_HAN", "17"), ("(gint) G_UNICODE_SCRIPT_HANGUL", "18"), ("(gint) G_UNICODE_SCRIPT_HANIFI_ROHINGYA", "144"), @@ -1686,6 +1688,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) G_UNICODE_SCRIPT_KHMER", "23"), ("(gint) G_UNICODE_SCRIPT_KHOJKI", "108"), ("(gint) G_UNICODE_SCRIPT_KHUDAWADI", "109"), + ("(gint) G_UNICODE_SCRIPT_KIRAT_RAI", "170"), ("(gint) G_UNICODE_SCRIPT_LAO", "24"), ("(gint) G_UNICODE_SCRIPT_LATIN", "25"), ("(gint) G_UNICODE_SCRIPT_LEPCHA", "68"), @@ -1733,6 +1736,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) G_UNICODE_SCRIPT_OLD_TURKIC", "89"), ("(gint) G_UNICODE_SCRIPT_OLD_UYGHUR", "158"), ("(gint) G_UNICODE_SCRIPT_OL_CHIKI", "73"), + ("(gint) G_UNICODE_SCRIPT_OL_ONAL", "171"), ("(gint) G_UNICODE_SCRIPT_ORIYA", "31"), ("(gint) G_UNICODE_SCRIPT_OSAGE", "136"), ("(gint) G_UNICODE_SCRIPT_OSMANYA", "49"), @@ -1755,6 +1759,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) G_UNICODE_SCRIPT_SORA_SOMPENG", "101"), ("(gint) G_UNICODE_SCRIPT_SOYOMBO", "140"), ("(gint) G_UNICODE_SCRIPT_SUNDANESE", "70"), + ("(gint) G_UNICODE_SCRIPT_SUNUWAR", "168"), ("(gint) G_UNICODE_SCRIPT_SYLOTI_NAGRI", "58"), ("(gint) G_UNICODE_SCRIPT_SYRIAC", "34"), ("(gint) G_UNICODE_SCRIPT_TAGALOG", "42"), @@ -1772,7 +1777,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) G_UNICODE_SCRIPT_TIBETAN", "39"), ("(gint) G_UNICODE_SCRIPT_TIFINAGH", "57"), ("(gint) G_UNICODE_SCRIPT_TIRHUTA", "124"), + ("(gint) G_UNICODE_SCRIPT_TODHRI", "165"), ("(gint) G_UNICODE_SCRIPT_TOTO", "160"), + ("(gint) G_UNICODE_SCRIPT_TULU_TIGALARI", "167"), ("(gint) G_UNICODE_SCRIPT_UGARITIC", "53"), ("(gint) G_UNICODE_SCRIPT_UNKNOWN", "61"), ("(gint) G_UNICODE_SCRIPT_VAI", "74"), @@ -1876,4 +1883,6 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ), ("(gint) G_VARIANT_PARSE_ERROR_VALUE_EXPECTED", "17"), ("G_WIN32_MSG_HANDLE", "19981206"), + ("g_macro__has_attribute_ifunc", "0"), + ("g_macro__has_attribute_no_sanitize_address", "0"), ]; diff --git a/glib/sys/tests/constant.c b/glib/sys/tests/constant.c index d9412096f662..b5a17c8a4d04 100644 --- a/glib/sys/tests/constant.c +++ b/glib/sys/tests/constant.c @@ -636,6 +636,7 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_ELBASAN); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_ELYMAIC); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_ETHIOPIC); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GARAY); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GEORGIAN); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GLAGOLITIC); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GOTHIC); @@ -644,6 +645,7 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GUJARATI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GUNJALA_GONDI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GURMUKHI); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_GURUNG_KHEMA); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_HAN); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_HANGUL); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_HANIFI_ROHINGYA); @@ -667,6 +669,7 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_KHMER); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_KHOJKI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_KHUDAWADI); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_KIRAT_RAI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_LAO); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_LATIN); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_LEPCHA); @@ -714,6 +717,7 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_OLD_TURKIC); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_OLD_UYGHUR); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_OL_CHIKI); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_OL_ONAL); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_ORIYA); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_OSAGE); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_OSMANYA); @@ -736,6 +740,7 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_SORA_SOMPENG); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_SOYOMBO); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_SUNDANESE); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_SUNUWAR); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_SYLOTI_NAGRI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_SYRIAC); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TAGALOG); @@ -753,7 +758,9 @@ int main() { PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TIBETAN); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TIFINAGH); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TIRHUTA); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TODHRI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TOTO); + PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_TULU_TIGALARI); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_UGARITIC); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_UNKNOWN); PRINT_CONSTANT((gint) G_UNICODE_SCRIPT_VAI); @@ -851,5 +858,7 @@ int main() { PRINT_CONSTANT((gint) G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT); PRINT_CONSTANT((gint) G_VARIANT_PARSE_ERROR_VALUE_EXPECTED); PRINT_CONSTANT(G_WIN32_MSG_HANDLE); + PRINT_CONSTANT(g_macro__has_attribute_ifunc); + PRINT_CONSTANT(g_macro__has_attribute_no_sanitize_address); return 0; } diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index 57c48e8495b9..2bf5373b57cc 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ e9ef1f366af2) -from gir-files (https://github.com/gtk-rs/gir-files @ 1dc2560a9ae8) +from gir-files (https://github.com/gtk-rs/gir-files @ d48ffb674809) From 95d1f244b918ce6f6199ebf7d73bc5e55f0320bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Nov 2024 14:30:30 +0200 Subject: [PATCH 09/11] gio: Clean up and autogenerate `UnixMountEntry` bindings --- gio/Gir.toml | 26 ++++ gio/src/auto/unix_mount_entry.rs | 155 ++++++++++-------------- gio/src/unix_mount_entry.rs | 196 ++++--------------------------- gio/sys/Gir.toml | 7 ++ gio/sys/src/lib.rs | 2 + gio/sys/src/manual.rs | 113 ++++++++++++++++++ 6 files changed, 234 insertions(+), 265 deletions(-) diff --git a/gio/Gir.toml b/gio/Gir.toml index efee867ab2f2..68a361347600 100644 --- a/gio/Gir.toml +++ b/gio/Gir.toml @@ -1565,6 +1565,32 @@ concurrency = "send+sync" cfg_condition = "unix" [[object.derive]] name = "Debug" + [[object.function]] + pattern = "compare|get_device_path|get_fs_type|get_mount_path|guess_can_eject|guess_name|guess_icon|guess_should_display|guess_symbolic_icon|is_readonly|is_system_internal" + version = "2.0" + [[object.function.parameter]] + pattern = ".+" + const = true + [[object.function]] + name = "get_options" + version = "2.58" + [[object.function.parameter]] + pattern = ".+" + const = true + [[object.function]] + name = "get_root_path" + version = "2.60" + [[object.function.parameter]] + pattern = ".+" + const = true + [[object.function]] + name = "at" + version = "2.0" + rename = "for_mount_path" + [[object.function]] + name = "for" + version = "2.0" + rename = "for_file_path" [[object]] name = "Gio.UnixMountPoint" diff --git a/gio/src/auto/unix_mount_entry.rs b/gio/src/auto/unix_mount_entry.rs index 792f3292480f..641a32ea6428 100644 --- a/gio/src/auto/unix_mount_entry.rs +++ b/gio/src/auto/unix_mount_entry.rs @@ -2,12 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use crate::ffi; -#[cfg(feature = "v2_84")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] -use crate::Icon; -#[cfg(feature = "v2_84")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] +use crate::{ffi, Icon}; use glib::translate::*; glib::wrapper! { @@ -22,156 +17,138 @@ glib::wrapper! { } impl UnixMountEntry { - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_compare")] - fn compare(&mut self, mount2: &mut UnixMountEntry) -> i32 { + fn compare(&self, mount2: &UnixMountEntry) -> i32 { unsafe { - ffi::g_unix_mount_entry_compare(self.to_glib_none_mut().0, mount2.to_glib_none_mut().0) + ffi::g_unix_mount_entry_compare( + mut_override(self.to_glib_none().0), + mut_override(mount2.to_glib_none().0), + ) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_get_device_path")] #[doc(alias = "get_device_path")] - pub fn device_path(&mut self) -> std::path::PathBuf { + pub fn device_path(&self) -> std::path::PathBuf { unsafe { - from_glib_none(ffi::g_unix_mount_entry_get_device_path( - self.to_glib_none_mut().0, - )) + from_glib_none(ffi::g_unix_mount_entry_get_device_path(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_get_fs_type")] #[doc(alias = "get_fs_type")] - pub fn fs_type(&mut self) -> glib::GString { + pub fn fs_type(&self) -> glib::GString { unsafe { - from_glib_none(ffi::g_unix_mount_entry_get_fs_type( - self.to_glib_none_mut().0, - )) + from_glib_none(ffi::g_unix_mount_entry_get_fs_type(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_get_mount_path")] #[doc(alias = "get_mount_path")] - pub fn mount_path(&mut self) -> std::path::PathBuf { + pub fn mount_path(&self) -> std::path::PathBuf { unsafe { - from_glib_none(ffi::g_unix_mount_entry_get_mount_path( - self.to_glib_none_mut().0, - )) + from_glib_none(ffi::g_unix_mount_entry_get_mount_path(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[cfg(feature = "v2_58")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] #[doc(alias = "g_unix_mount_entry_get_options")] #[doc(alias = "get_options")] - pub fn options(&mut self) -> Option { + pub fn options(&self) -> Option { unsafe { - from_glib_none(ffi::g_unix_mount_entry_get_options( - self.to_glib_none_mut().0, - )) + from_glib_none(ffi::g_unix_mount_entry_get_options(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] + #[cfg(feature = "v2_60")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "g_unix_mount_entry_get_root_path")] #[doc(alias = "get_root_path")] - pub fn root_path(&mut self) -> Option { + pub fn root_path(&self) -> Option { unsafe { - from_glib_none(ffi::g_unix_mount_entry_get_root_path( - self.to_glib_none_mut().0, - )) + from_glib_none(ffi::g_unix_mount_entry_get_root_path(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_guess_can_eject")] - pub fn guess_can_eject(&mut self) -> bool { + pub fn guess_can_eject(&self) -> bool { unsafe { - from_glib(ffi::g_unix_mount_entry_guess_can_eject( - self.to_glib_none_mut().0, - )) + from_glib(ffi::g_unix_mount_entry_guess_can_eject(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_guess_icon")] - pub fn guess_icon(&mut self) -> Icon { + pub fn guess_icon(&self) -> Icon { unsafe { - from_glib_full(ffi::g_unix_mount_entry_guess_icon( - self.to_glib_none_mut().0, - )) + from_glib_full(ffi::g_unix_mount_entry_guess_icon(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_guess_name")] - pub fn guess_name(&mut self) -> glib::GString { + pub fn guess_name(&self) -> glib::GString { unsafe { - from_glib_full(ffi::g_unix_mount_entry_guess_name( - self.to_glib_none_mut().0, - )) + from_glib_full(ffi::g_unix_mount_entry_guess_name(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_guess_should_display")] - pub fn guess_should_display(&mut self) -> bool { + pub fn guess_should_display(&self) -> bool { unsafe { - from_glib(ffi::g_unix_mount_entry_guess_should_display( - self.to_glib_none_mut().0, - )) + from_glib(ffi::g_unix_mount_entry_guess_should_display(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_guess_symbolic_icon")] - pub fn guess_symbolic_icon(&mut self) -> Icon { + pub fn guess_symbolic_icon(&self) -> Icon { unsafe { - from_glib_full(ffi::g_unix_mount_entry_guess_symbolic_icon( - self.to_glib_none_mut().0, - )) + from_glib_full(ffi::g_unix_mount_entry_guess_symbolic_icon(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_is_readonly")] - pub fn is_readonly(&mut self) -> bool { + pub fn is_readonly(&self) -> bool { unsafe { - from_glib(ffi::g_unix_mount_entry_is_readonly( - self.to_glib_none_mut().0, - )) + from_glib(ffi::g_unix_mount_entry_is_readonly(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_is_system_internal")] - pub fn is_system_internal(&mut self) -> bool { + pub fn is_system_internal(&self) -> bool { unsafe { - from_glib(ffi::g_unix_mount_entry_is_system_internal( - self.to_glib_none_mut().0, - )) + from_glib(ffi::g_unix_mount_entry_is_system_internal(mut_override( + self.to_glib_none().0, + ))) } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_at")] - pub fn at(mount_path: impl AsRef) -> (Option, u64) { + #[doc(alias = "at")] + pub fn for_mount_path( + mount_path: impl AsRef, + ) -> (Option, u64) { unsafe { let mut time_read = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::g_unix_mount_entry_at( @@ -182,11 +159,9 @@ impl UnixMountEntry { } } - #[cfg(feature = "v2_84")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "g_unix_mount_entry_for")] #[doc(alias = "for")] - pub fn for_(file_path: impl AsRef) -> (Option, u64) { + pub fn for_file_path(file_path: impl AsRef) -> (Option, u64) { unsafe { let mut time_read = std::mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::g_unix_mount_entry_for( @@ -198,8 +173,6 @@ impl UnixMountEntry { } } -#[cfg(feature = "v2_84")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] impl PartialEq for UnixMountEntry { #[inline] fn eq(&self, other: &Self) -> bool { @@ -209,8 +182,6 @@ impl PartialEq for UnixMountEntry { impl Eq for UnixMountEntry {} -#[cfg(feature = "v2_84")] -#[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] impl PartialOrd for UnixMountEntry { #[inline] fn partial_cmp(&self, other: &Self) -> Option { diff --git a/gio/src/unix_mount_entry.rs b/gio/src/unix_mount_entry.rs index 2091bd574204..2b7a2f88b362 100644 --- a/gio/src/unix_mount_entry.rs +++ b/gio/src/unix_mount_entry.rs @@ -1,35 +1,19 @@ // Take a look at the license at the top of the repository in the LICENSE file. -use std::{cmp, mem}; +use std::mem; -use glib::{translate::*, GString}; +use glib::translate::*; -use crate::{ffi, Icon, UnixMountEntry}; +use crate::{ffi, UnixMountEntry}; impl UnixMountEntry { - #[doc(alias = "g_unix_mount_at")] - #[doc(alias = "new_at")] - pub fn for_mount_path>( - mount_path: P, - ) -> (Option, u64) { - unsafe { - let mut time_read = mem::MaybeUninit::uninit(); - let ret = from_glib_full(ffi::g_unix_mount_at( - mount_path.as_ref().to_glib_none().0, - time_read.as_mut_ptr(), - )); - let time_read = time_read.assume_init(); - (ret, time_read) - } - } - - #[doc(alias = "g_unix_mount_for")] - #[doc(alias = "new_for")] - pub fn for_file_path>(file_path: P) -> (Option, u64) { + #[doc(alias = "g_unix_mounts_get")] + #[doc(alias = "g_unix_mount_entries_get")] + #[doc(alias = "get_mounts")] + pub fn mounts() -> (Vec, u64) { unsafe { let mut time_read = mem::MaybeUninit::uninit(); - let ret = from_glib_full(ffi::g_unix_mount_for( - file_path.as_ref().to_glib_none().0, + let ret = FromGlibPtrContainer::from_glib_full(ffi::g_unix_mount_entries_get( time_read.as_mut_ptr(), )); let time_read = time_read.assume_init(); @@ -37,170 +21,36 @@ impl UnixMountEntry { } } + #[cfg(feature = "v2_82")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_82")))] #[doc(alias = "g_unix_mounts_get")] + #[doc(alias = "g_unix_mount_entries_get")] #[doc(alias = "get_mounts")] - pub fn mounts() -> (Vec, u64) { + pub fn mounts_from_file(table_path: impl AsRef) -> (Vec, u64) { unsafe { let mut time_read = mem::MaybeUninit::uninit(); - let ret = FromGlibPtrContainer::from_glib_full(ffi::g_unix_mounts_get( + let mut n_entries_out = mem::MaybeUninit::uninit(); + let ret = ffi::g_unix_mount_entries_get_from_file( + table_path.as_ref().to_glib_none().0, time_read.as_mut_ptr(), - )); + n_entries_out.as_mut_ptr(), + ); + let n_entries_out = n_entries_out.assume_init(); + let ret = FromGlibContainer::from_glib_full_num(ret, n_entries_out); let time_read = time_read.assume_init(); (ret, time_read) } } - #[doc(alias = "g_unix_mount_compare")] - pub fn compare(&self, mount2: &UnixMountEntry) -> i32 { - unsafe { - ffi::g_unix_mount_compare( - mut_override(self.to_glib_none().0), - mut_override(mount2.to_glib_none().0), - ) - } - } - - #[doc(alias = "g_unix_mount_get_device_path")] - #[doc(alias = "get_device_path")] - pub fn device_path(&self) -> std::path::PathBuf { - unsafe { - from_glib_none(ffi::g_unix_mount_get_device_path(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_get_fs_type")] - #[doc(alias = "get_fs_type")] - pub fn fs_type(&self) -> GString { - unsafe { - from_glib_none(ffi::g_unix_mount_get_fs_type(mut_override( - self.to_glib_none().0, - ))) - } - } - #[doc(alias = "g_unix_mount_get_mount_path")] + #[deprecated = "Use `mount_path()`"] pub fn unix_mount_get_mount_path(&self) -> std::path::PathBuf { - unsafe { - from_glib_none(ffi::g_unix_mount_get_mount_path(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[cfg(feature = "v2_58")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_unix_mount_get_options")] - #[doc(alias = "get_options")] - pub fn options(&self) -> Option { - unsafe { - from_glib_none(ffi::g_unix_mount_get_options(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[cfg(feature = "v2_60")] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "g_unix_mount_get_root_path")] - #[doc(alias = "get_root_path")] - pub fn root_path(&self) -> Option { - unsafe { - from_glib_none(ffi::g_unix_mount_get_root_path(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_guess_can_eject")] - pub fn guess_can_eject(&self) -> bool { - unsafe { - from_glib(ffi::g_unix_mount_guess_can_eject(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_guess_icon")] - pub fn guess_icon(&self) -> Icon { - unsafe { - from_glib_full(ffi::g_unix_mount_guess_icon(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_guess_name")] - pub fn guess_name(&self) -> GString { - unsafe { - from_glib_full(ffi::g_unix_mount_guess_name(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_guess_should_display")] - pub fn guess_should_display(&self) -> bool { - unsafe { - from_glib(ffi::g_unix_mount_guess_should_display(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_guess_symbolic_icon")] - pub fn guess_symbolic_icon(&self) -> Icon { - unsafe { - from_glib_full(ffi::g_unix_mount_guess_symbolic_icon(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_is_readonly")] - pub fn is_readonly(&self) -> bool { - unsafe { - from_glib(ffi::g_unix_mount_is_readonly(mut_override( - self.to_glib_none().0, - ))) - } - } - - #[doc(alias = "g_unix_mount_is_system_internal")] - pub fn is_system_internal(&self) -> bool { - unsafe { - from_glib(ffi::g_unix_mount_is_system_internal(mut_override( - self.to_glib_none().0, - ))) - } + self.mount_path() } #[doc(alias = "g_unix_mounts_changed_since")] + #[doc(alias = "g_unix_mount_entries_changed_since")] pub fn is_changed_since(time: u64) -> bool { - unsafe { from_glib(ffi::g_unix_mounts_changed_since(time)) } - } -} - -impl PartialEq for UnixMountEntry { - #[inline] - fn eq(&self, other: &Self) -> bool { - self.compare(other) == 0 - } -} - -impl Eq for UnixMountEntry {} - -impl PartialOrd for UnixMountEntry { - #[inline] - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for UnixMountEntry { - #[inline] - fn cmp(&self, other: &Self) -> cmp::Ordering { - self.compare(other).cmp(&0) + unsafe { from_glib(ffi::g_unix_mount_entries_changed_since(time)) } } } diff --git a/gio/sys/Gir.toml b/gio/sys/Gir.toml index 98de0131f416..480b357c1b9b 100644 --- a/gio/sys/Gir.toml +++ b/gio/sys/Gir.toml @@ -15,6 +15,13 @@ ignore = [ "Gio.ThreadedResolverClass" ] +[[object]] +name = "Gio.*" +status = "generate" + [[object.function]] + name = "unix_mount_entries_changed_since" + version = "2.84" + [[object]] name = "Gio.Credentials" status = "generate" diff --git a/gio/sys/src/lib.rs b/gio/sys/src/lib.rs index e1a0208598d0..de6edc66465f 100644 --- a/gio/sys/src/lib.rs +++ b/gio/sys/src/lib.rs @@ -17361,6 +17361,8 @@ extern "C" { mount2: *mut GUnixMountEntry, ) -> c_int; pub fn g_unix_mount_copy(mount_entry: *mut GUnixMountEntry) -> *mut GUnixMountEntry; + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] pub fn g_unix_mount_entries_changed_since(time: u64) -> gboolean; #[cfg(feature = "v2_84")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] diff --git a/gio/sys/src/manual.rs b/gio/sys/src/manual.rs index adf976e32cef..11d40a900fa5 100644 --- a/gio/sys/src/manual.rs +++ b/gio/sys/src/manual.rs @@ -172,3 +172,116 @@ mod windows_streams { } } } + +#[cfg(not(feature = "v2_84"))] +mod unix_mount_compat { + #![allow(clippy::missing_safety_doc)] + + use crate::*; + + pub unsafe fn g_unix_mount_entry_compare( + mount1: *mut GUnixMountEntry, + mount2: *mut GUnixMountEntry, + ) -> c_int { + g_unix_mount_compare(mount1, mount2) + } + pub unsafe fn g_unix_mount_entry_copy( + mount_entry: *mut GUnixMountEntry, + ) -> *mut GUnixMountEntry { + g_unix_mount_copy(mount_entry) + } + pub unsafe fn g_unix_mount_entry_free(mount_entry: *mut GUnixMountEntry) { + g_unix_mount_free(mount_entry); + } + pub unsafe fn g_unix_mount_entry_get_device_path( + mount_entry: *mut GUnixMountEntry, + ) -> *const c_char { + g_unix_mount_get_device_path(mount_entry) + } + pub unsafe fn g_unix_mount_entry_get_fs_type( + mount_entry: *mut GUnixMountEntry, + ) -> *const c_char { + g_unix_mount_get_fs_type(mount_entry) + } + pub unsafe fn g_unix_mount_entry_get_mount_path( + mount_entry: *mut GUnixMountEntry, + ) -> *const c_char { + g_unix_mount_get_mount_path(mount_entry) + } + #[cfg(feature = "v2_58")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + pub unsafe fn g_unix_mount_entry_get_options( + mount_entry: *mut GUnixMountEntry, + ) -> *const c_char { + g_unix_mount_get_options(mount_entry) + } + #[cfg(feature = "v2_60")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + pub unsafe fn g_unix_mount_entry_get_root_path( + mount_entry: *mut GUnixMountEntry, + ) -> *const c_char { + g_unix_mount_get_root_path(mount_entry) + } + pub unsafe fn g_unix_mount_entry_guess_can_eject( + mount_entry: *mut GUnixMountEntry, + ) -> gboolean { + g_unix_mount_guess_can_eject(mount_entry) + } + pub unsafe fn g_unix_mount_entry_guess_icon(mount_entry: *mut GUnixMountEntry) -> *mut GIcon { + g_unix_mount_guess_icon(mount_entry) + } + pub unsafe fn g_unix_mount_entry_guess_name(mount_entry: *mut GUnixMountEntry) -> *mut c_char { + g_unix_mount_guess_name(mount_entry) + } + pub unsafe fn g_unix_mount_entry_guess_should_display( + mount_entry: *mut GUnixMountEntry, + ) -> gboolean { + g_unix_mount_guess_should_display(mount_entry) + } + pub unsafe fn g_unix_mount_entry_guess_symbolic_icon( + mount_entry: *mut GUnixMountEntry, + ) -> *mut GIcon { + g_unix_mount_guess_symbolic_icon(mount_entry) + } + pub unsafe fn g_unix_mount_entry_is_readonly(mount_entry: *mut GUnixMountEntry) -> gboolean { + g_unix_mount_is_readonly(mount_entry) + } + pub unsafe fn g_unix_mount_entry_is_system_internal( + mount_entry: *mut GUnixMountEntry, + ) -> gboolean { + g_unix_mount_is_system_internal(mount_entry) + } + pub unsafe fn g_unix_mount_entry_at( + mount_path: *const c_char, + time_read: *mut u64, + ) -> *mut GUnixMountEntry { + g_unix_mount_at(mount_path, time_read) + } + pub unsafe fn g_unix_mount_entry_for( + file_path: *const c_char, + time_read: *mut u64, + ) -> *mut GUnixMountEntry { + g_unix_mount_for(file_path, time_read) + } + + #[cfg(feature = "v2_82")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_82")))] + pub unsafe fn g_unix_mount_entries_get_from_file( + table_path: *const c_char, + time_read_out: *mut u64, + n_entries_out: *mut size_t, + ) -> *mut *mut GUnixMountEntry { + g_unix_mounts_get_from_file(table_path, time_read_out, n_entries_out) + } + + pub unsafe fn g_unix_mount_entries_get(time_read: *mut u64) -> *mut glib::GList { + g_unix_mounts_get(time_read) + } + + pub unsafe fn g_unix_mount_entries_changed_since(time: u64) -> gboolean { + g_unix_mounts_changed_since(time) + } +} + +#[cfg(not(feature = "v2_84"))] +pub use unix_mount_compat::*; From 01698a95eda5b6df67b0099ed41b868dbefeec64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Nov 2024 14:30:51 +0200 Subject: [PATCH 10/11] glib: Ignore CPP feature constants --- glib/sys/Gir.toml | 2 ++ glib/sys/src/lib.rs | 2 -- glib/sys/tests/abi.rs | 2 -- glib/sys/tests/constant.c | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/glib/sys/Gir.toml b/glib/sys/Gir.toml index 8c72ba6c3bf9..7fd4b7be93ea 100644 --- a/glib/sys/Gir.toml +++ b/glib/sys/Gir.toml @@ -62,6 +62,8 @@ ignore = [ "GLib.SIZEOF_VOID_P", "GLib.VA_COPY_AS_ARRAY", "GLib.VERSION_MIN_REQUIRED", + "GLib.macro__has_attribute_ifunc", + "GLib.macro__has_attribute_no_sanitize_address", ] [[object]] diff --git a/glib/sys/src/lib.rs b/glib/sys/src/lib.rs index b63e81b4c5e9..e207581dbf10 100644 --- a/glib/sys/src/lib.rs +++ b/glib/sys/src/lib.rs @@ -804,8 +804,6 @@ pub const G_URI_RESERVED_CHARS_GENERIC_DELIMITERS: &[u8] = b":/?#[]@\0"; pub const G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: &[u8] = b"!$&'()*+,;=\0"; pub const G_USEC_PER_SEC: c_int = 1000000; pub const G_WIN32_MSG_HANDLE: c_int = 19981206; -pub const g_macro__has_attribute_ifunc: c_int = 0; -pub const g_macro__has_attribute_no_sanitize_address: c_int = 0; // Flags pub type GAsciiType = c_uint; diff --git a/glib/sys/tests/abi.rs b/glib/sys/tests/abi.rs index 350bfd75d740..b1937208bacb 100644 --- a/glib/sys/tests/abi.rs +++ b/glib/sys/tests/abi.rs @@ -1883,6 +1883,4 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ), ("(gint) G_VARIANT_PARSE_ERROR_VALUE_EXPECTED", "17"), ("G_WIN32_MSG_HANDLE", "19981206"), - ("g_macro__has_attribute_ifunc", "0"), - ("g_macro__has_attribute_no_sanitize_address", "0"), ]; diff --git a/glib/sys/tests/constant.c b/glib/sys/tests/constant.c index b5a17c8a4d04..bea4e15a5718 100644 --- a/glib/sys/tests/constant.c +++ b/glib/sys/tests/constant.c @@ -858,7 +858,5 @@ int main() { PRINT_CONSTANT((gint) G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT); PRINT_CONSTANT((gint) G_VARIANT_PARSE_ERROR_VALUE_EXPECTED); PRINT_CONSTANT(G_WIN32_MSG_HANDLE); - PRINT_CONSTANT(g_macro__has_attribute_ifunc); - PRINT_CONSTANT(g_macro__has_attribute_no_sanitize_address); return 0; } From a805246f8b9671349fa4128213145dace5a29cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Nov 2024 14:32:40 +0200 Subject: [PATCH 11/11] glib: Add correct versions to various new unicode scripts --- glib/Gir.toml | 23 ++++------------------- glib/src/auto/enums.rs | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/glib/Gir.toml b/glib/Gir.toml index e4c360cfcec5..2c32f533b932 100644 --- a/glib/Gir.toml +++ b/glib/Gir.toml @@ -888,29 +888,14 @@ status = "generate" name = "GLib.UnicodeScript" status = "generate" [[object.member]] - name = "cypro_minoan" + pattern = "cypro_minoan|old_uyghur|tangsa|toto|vithkuqi|math" version = "2.72" [[object.member]] - name = "old_uyghur" - version = "2.72" - [[object.member]] - name = "tangsa" - version = "2.72" - [[object.member]] - name = "toto" - version = "2.72" - [[object.member]] - name = "vithkuqi" - version = "2.72" - [[object.member]] - name = "math" - version = "2.72" - [[object.member]] - name = "kawi" + pattern = "kawi|nag_mundari" version = "2.74" [[object.member]] - name = "nag_mundari" - version = "2.74" + pattern = "todhri|garay|tulu_tigalari|sunuwar|gurung_khema|kirat_rai|ol_onal" + version = "2.84" [[object]] name = "GLib.Uri" diff --git a/glib/src/auto/enums.rs b/glib/src/auto/enums.rs index f77a298a2e3a..32d9d49a56d2 100644 --- a/glib/src/auto/enums.rs +++ b/glib/src/auto/enums.rs @@ -1514,18 +1514,32 @@ pub enum UnicodeScript { #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_UNICODE_SCRIPT_NAG_MUNDARI")] NagMundari, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_TODHRI")] Todhri, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_GARAY")] Garay, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_TULU_TIGALARI")] TuluTigalari, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_SUNUWAR")] Sunuwar, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_GURUNG_KHEMA")] GurungKhema, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_KIRAT_RAI")] KiratRai, + #[cfg(feature = "v2_84")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2_84")))] #[doc(alias = "G_UNICODE_SCRIPT_OL_ONAL")] OlOnal, #[doc(hidden)] @@ -1724,12 +1738,19 @@ impl IntoGlib for UnicodeScript { Self::Kawi => ffi::G_UNICODE_SCRIPT_KAWI, #[cfg(feature = "v2_74")] Self::NagMundari => ffi::G_UNICODE_SCRIPT_NAG_MUNDARI, + #[cfg(feature = "v2_84")] Self::Todhri => ffi::G_UNICODE_SCRIPT_TODHRI, + #[cfg(feature = "v2_84")] Self::Garay => ffi::G_UNICODE_SCRIPT_GARAY, + #[cfg(feature = "v2_84")] Self::TuluTigalari => ffi::G_UNICODE_SCRIPT_TULU_TIGALARI, + #[cfg(feature = "v2_84")] Self::Sunuwar => ffi::G_UNICODE_SCRIPT_SUNUWAR, + #[cfg(feature = "v2_84")] Self::GurungKhema => ffi::G_UNICODE_SCRIPT_GURUNG_KHEMA, + #[cfg(feature = "v2_84")] Self::KiratRai => ffi::G_UNICODE_SCRIPT_KIRAT_RAI, + #[cfg(feature = "v2_84")] Self::OlOnal => ffi::G_UNICODE_SCRIPT_OL_ONAL, Self::__Unknown(value) => value, } @@ -1914,12 +1935,19 @@ impl FromGlib for UnicodeScript { ffi::G_UNICODE_SCRIPT_KAWI => Self::Kawi, #[cfg(feature = "v2_74")] ffi::G_UNICODE_SCRIPT_NAG_MUNDARI => Self::NagMundari, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_TODHRI => Self::Todhri, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_GARAY => Self::Garay, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_TULU_TIGALARI => Self::TuluTigalari, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_SUNUWAR => Self::Sunuwar, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_GURUNG_KHEMA => Self::GurungKhema, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_KIRAT_RAI => Self::KiratRai, + #[cfg(feature = "v2_84")] ffi::G_UNICODE_SCRIPT_OL_ONAL => Self::OlOnal, value => Self::__Unknown(value), }