From 5955da949b2b91773318516f508227e3def80957 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 4 May 2023 10:10:17 +0200 Subject: [PATCH 1/5] Update gir --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index 6a0603f52c3c..bf8c5e344a73 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 6a0603f52c3cf379227779d6fca74290b71ae5a8 +Subproject commit bf8c5e344a73e59563bf1eac0f633119393e6ec8 From 1bd7eb3a132107ad2a0e3f252bc69cbd1de1453f Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 4 May 2023 10:10:29 +0200 Subject: [PATCH 2/5] Update gir-files --- gir-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir-files b/gir-files index b42700b30bb2..43cac7495ff5 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit b42700b30bb2ba066cd2ba2f74581ad82cbf8f7d +Subproject commit 43cac7495ff5daa303fcd5e360644a3b0a4cd4c3 From 3c0e25342e05e70c8001c88e5e4fe09b829762e4 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 4 May 2023 10:11:55 +0200 Subject: [PATCH 3/5] Regenerate with latest gir-files --- gdk-pixbuf/src/auto/pixbuf.rs | 2 +- gdk-pixbuf/src/auto/pixbuf_animation.rs | 24 +- gdk-pixbuf/src/auto/pixbuf_loader.rs | 57 +- gdk-pixbuf/src/auto/versions.txt | 4 +- gdk-pixbuf/sys/src/lib.rs | 2 +- gdk-pixbuf/sys/versions.txt | 4 +- gio/src/auto/action.rs | 68 +- gio/src/auto/action_group.rs | 98 +-- gio/src/auto/action_map.rs | 16 +- gio/src/auto/app_info.rs | 133 +--- gio/src/auto/app_launch_context.rs | 54 +- gio/src/auto/application.rs | 212 ++---- gio/src/auto/application_command_line.rs | 76 +- gio/src/auto/async_initable.rs | 18 +- gio/src/auto/async_result.rs | 22 +- gio/src/auto/buffered_input_stream.rs | 56 +- gio/src/auto/buffered_output_stream.rs | 30 +- gio/src/auto/cancellable.rs | 34 +- gio/src/auto/constants.rs | 44 +- gio/src/auto/converter.rs | 8 +- gio/src/auto/converter_input_stream.rs | 8 +- gio/src/auto/converter_output_stream.rs | 8 +- gio/src/auto/credentials.rs | 6 +- gio/src/auto/data_input_stream.rs | 58 +- gio/src/auto/data_output_stream.rs | 80 +-- gio/src/auto/datagram_based.rs | 8 +- gio/src/auto/dbus_connection.rs | 8 +- gio/src/auto/dbus_interface.rs | 18 +- gio/src/auto/dbus_interface_skeleton.rs | 89 +-- gio/src/auto/dbus_message.rs | 8 +- gio/src/auto/dbus_method_invocation.rs | 2 +- gio/src/auto/dbus_object.rs | 34 +- gio/src/auto/dbus_proxy.rs | 221 ++---- gio/src/auto/debug_controller.rs | 20 +- gio/src/auto/debug_controller_dbus.rs | 19 +- gio/src/auto/desktop_app_info.rs | 4 +- gio/src/auto/drive.rs | 166 +---- gio/src/auto/emblemed_icon.rs | 26 +- gio/src/auto/enums.rs | 132 ++-- gio/src/auto/file.rs | 828 +++------------------- gio/src/auto/file_enumerator.rs | 69 +- gio/src/auto/file_info.rs | 12 +- gio/src/auto/file_input_stream.rs | 28 +- gio/src/auto/file_io_stream.rs | 32 +- gio/src/auto/file_monitor.rs | 44 +- gio/src/auto/file_output_stream.rs | 32 +- gio/src/auto/filter_input_stream.rs | 22 +- gio/src/auto/filter_output_stream.rs | 22 +- gio/src/auto/flags.rs | 26 +- gio/src/auto/functions.rs | 16 +- gio/src/auto/icon.rs | 20 +- gio/src/auto/inet_address.rs | 155 +--- gio/src/auto/inet_address_mask.rs | 53 +- gio/src/auto/inet_socket_address.rs | 26 +- gio/src/auto/initable.rs | 8 +- gio/src/auto/input_stream.rs | 86 +-- gio/src/auto/io_stream.rs | 54 +- gio/src/auto/list_model.rs | 29 +- gio/src/auto/list_store.rs | 4 +- gio/src/auto/loadable_icon.rs | 31 +- gio/src/auto/memory_input_stream.rs | 8 +- gio/src/auto/memory_monitor.rs | 15 +- gio/src/auto/memory_output_stream.rs | 16 +- gio/src/auto/menu_attribute_iter.rs | 8 +- gio/src/auto/menu_link_iter.rs | 8 +- gio/src/auto/menu_model.rs | 54 +- gio/src/auto/mod.rs | 128 ++-- gio/src/auto/mount.rs | 162 +---- gio/src/auto/mount_operation.rs | 204 ++---- gio/src/auto/network_address.rs | 20 +- gio/src/auto/network_monitor.rs | 60 +- gio/src/auto/network_service.rs | 34 +- gio/src/auto/notification.rs | 2 +- gio/src/auto/output_stream.rs | 127 +--- gio/src/auto/permission.rs | 70 +- gio/src/auto/pollable_input_stream.rs | 12 +- gio/src/auto/pollable_output_stream.rs | 20 +- gio/src/auto/power_profile_monitor.rs | 16 +- gio/src/auto/proxy.rs | 33 +- gio/src/auto/proxy_address.rs | 44 +- gio/src/auto/proxy_resolver.rs | 32 +- gio/src/auto/remote_action_group.rs | 22 +- gio/src/auto/resolver.rs | 150 +--- gio/src/auto/seekable.rs | 33 +- gio/src/auto/settings.rs | 233 ++---- gio/src/auto/settings_backend.rs | 28 +- gio/src/auto/simple_proxy_resolver.rs | 28 +- gio/src/auto/socket.rs | 286 ++------ gio/src/auto/socket_address.rs | 22 +- gio/src/auto/socket_address_enumerator.rs | 27 +- gio/src/auto/socket_client.rs | 256 ++----- gio/src/auto/socket_connectable.rs | 16 +- gio/src/auto/socket_connection.rs | 48 +- gio/src/auto/socket_control_message.rs | 20 +- gio/src/auto/socket_listener.rs | 117 +-- gio/src/auto/socket_service.rs | 29 +- gio/src/auto/subprocess.rs | 2 +- gio/src/auto/subprocess_launcher.rs | 12 +- gio/src/auto/tcp_connection.rs | 16 +- gio/src/auto/threaded_socket_service.rs | 15 +- gio/src/auto/tls_backend.rs | 60 +- gio/src/auto/tls_certificate.rs | 172 ++--- gio/src/auto/tls_client_connection.rs | 54 +- gio/src/auto/tls_connection.rs | 216 ++---- gio/src/auto/tls_database.rs | 137 +--- gio/src/auto/tls_file_database.rs | 14 +- gio/src/auto/tls_interaction.rs | 72 +- gio/src/auto/tls_password.rs | 48 +- gio/src/auto/tls_server_connection.rs | 16 +- gio/src/auto/unix_credentials_message.rs | 8 +- gio/src/auto/unix_fd_list.rs | 8 +- gio/src/auto/unix_fd_message.rs | 8 +- gio/src/auto/unix_input_stream.rs | 8 +- gio/src/auto/unix_mount_point.rs | 4 +- gio/src/auto/unix_output_stream.rs | 8 +- gio/src/auto/unix_socket_address.rs | 24 +- gio/src/auto/versions.txt | 4 +- gio/src/auto/vfs.rs | 41 +- gio/src/auto/volume.rs | 112 +-- gio/src/auto/volume_monitor.rs | 80 +-- gio/sys/src/lib.rs | 220 +++--- gio/sys/versions.txt | 4 +- glib/gobject-sys/src/lib.rs | 56 +- glib/gobject-sys/versions.txt | 4 +- glib/src/auto/constants.rs | 2 +- glib/src/auto/date_time.rs | 4 +- glib/src/auto/enums.rs | 74 +- glib/src/auto/flags.rs | 50 +- glib/src/auto/functions.rs | 22 +- glib/src/auto/main_context.rs | 4 +- glib/src/auto/mod.rs | 18 +- glib/src/auto/time_zone.rs | 6 +- glib/src/auto/versions.txt | 4 +- glib/src/gobject/auto/binding_group.rs | 4 +- glib/src/gobject/auto/mod.rs | 8 +- glib/src/gobject/auto/signal_group.rs | 2 +- glib/sys/Cargo.toml | 4 + glib/sys/src/lib.rs | 408 +++++------ glib/sys/tests/abi.rs | 2 + glib/sys/tests/constant.c | 2 + glib/sys/versions.txt | 4 +- graphene/src/auto/versions.txt | 4 +- graphene/sys/versions.txt | 4 +- pango/src/auto/attr_list.rs | 12 +- pango/src/auto/attribute.rs | 2 +- pango/src/auto/context.rs | 4 +- pango/src/auto/enums.rs | 200 +++--- pango/src/auto/flags.rs | 80 +-- pango/src/auto/font.rs | 90 +-- pango/src/auto/font_description.rs | 6 +- pango/src/auto/font_face.rs | 34 +- pango/src/auto/font_family.rs | 34 +- pango/src/auto/font_map.rs | 45 +- pango/src/auto/font_metrics.rs | 2 +- pango/src/auto/fontset.rs | 20 +- pango/src/auto/functions.rs | 4 +- pango/src/auto/glyph_string.rs | 2 +- pango/src/auto/item.rs | 4 +- pango/src/auto/language.rs | 2 +- pango/src/auto/layout.rs | 22 +- pango/src/auto/layout_iter.rs | 2 +- pango/src/auto/layout_line.rs | 12 +- pango/src/auto/matrix.rs | 2 +- pango/src/auto/mod.rs | 16 +- pango/src/auto/renderer.rs | 99 +-- pango/src/auto/tab_array.rs | 16 +- pango/src/auto/versions.txt | 4 +- pango/sys/src/lib.rs | 174 ++--- pango/sys/versions.txt | 4 +- pangocairo/src/auto/font.rs | 8 +- pangocairo/src/auto/font_map.rs | 12 +- pangocairo/src/auto/versions.txt | 4 +- pangocairo/sys/versions.txt | 4 +- 173 files changed, 2543 insertions(+), 6288 deletions(-) diff --git a/gdk-pixbuf/src/auto/pixbuf.rs b/gdk-pixbuf/src/auto/pixbuf.rs index 061477d4d26a..2126f90098bf 100644 --- a/gdk-pixbuf/src/auto/pixbuf.rs +++ b/gdk-pixbuf/src/auto/pixbuf.rs @@ -660,7 +660,7 @@ impl Pixbuf { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_pixbuf_get_formats()) } } - #[cfg(any(feature = "v2_40"))] + #[cfg(feature = "v2_40")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_40")))] #[doc(alias = "gdk_pixbuf_init_modules")] pub fn init_modules(path: &str) -> Result<(), glib::Error> { diff --git a/gdk-pixbuf/src/auto/pixbuf_animation.rs b/gdk-pixbuf/src/auto/pixbuf_animation.rs index de5de7289cc0..29a52d161a33 100644 --- a/gdk-pixbuf/src/auto/pixbuf_animation.rs +++ b/gdk-pixbuf/src/auto/pixbuf_animation.rs @@ -137,28 +137,15 @@ impl PixbufAnimation { } } -pub trait PixbufAnimationExt: 'static { +pub trait PixbufAnimationExt: IsA + 'static { #[doc(alias = "gdk_pixbuf_animation_get_height")] #[doc(alias = "get_height")] - fn height(&self) -> i32; - - #[doc(alias = "gdk_pixbuf_animation_get_static_image")] - #[doc(alias = "get_static_image")] - fn static_image(&self) -> Option; - - #[doc(alias = "gdk_pixbuf_animation_get_width")] - #[doc(alias = "get_width")] - fn width(&self) -> i32; - - #[doc(alias = "gdk_pixbuf_animation_is_static_image")] - fn is_static_image(&self) -> bool; -} - -impl> PixbufAnimationExt for O { fn height(&self) -> i32 { unsafe { ffi::gdk_pixbuf_animation_get_height(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gdk_pixbuf_animation_get_static_image")] + #[doc(alias = "get_static_image")] fn static_image(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_animation_get_static_image( @@ -167,10 +154,13 @@ impl> PixbufAnimationExt for O { } } + #[doc(alias = "gdk_pixbuf_animation_get_width")] + #[doc(alias = "get_width")] fn width(&self) -> i32 { unsafe { ffi::gdk_pixbuf_animation_get_width(self.as_ref().to_glib_none().0) } } + #[doc(alias = "gdk_pixbuf_animation_is_static_image")] fn is_static_image(&self) -> bool { unsafe { from_glib(ffi::gdk_pixbuf_animation_is_static_image( @@ -180,6 +170,8 @@ impl> PixbufAnimationExt for O { } } +impl> PixbufAnimationExt for O {} + impl fmt::Display for PixbufAnimation { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("PixbufAnimation") diff --git a/gdk-pixbuf/src/auto/pixbuf_loader.rs b/gdk-pixbuf/src/auto/pixbuf_loader.rs index 2bcdde64a3ae..feef424febaf 100644 --- a/gdk-pixbuf/src/auto/pixbuf_loader.rs +++ b/gdk-pixbuf/src/auto/pixbuf_loader.rs @@ -63,48 +63,8 @@ impl Default for PixbufLoader { } } -pub trait PixbufLoaderExt: 'static { +pub trait PixbufLoaderExt: IsA + 'static { #[doc(alias = "gdk_pixbuf_loader_close")] - fn close(&self) -> Result<(), glib::Error>; - - #[doc(alias = "gdk_pixbuf_loader_get_animation")] - #[doc(alias = "get_animation")] - fn animation(&self) -> Option; - - #[doc(alias = "gdk_pixbuf_loader_get_format")] - #[doc(alias = "get_format")] - fn format(&self) -> Option; - - #[doc(alias = "gdk_pixbuf_loader_get_pixbuf")] - #[doc(alias = "get_pixbuf")] - fn pixbuf(&self) -> Option; - - #[doc(alias = "gdk_pixbuf_loader_set_size")] - fn set_size(&self, width: i32, height: i32); - - #[doc(alias = "gdk_pixbuf_loader_write")] - fn write(&self, buf: &[u8]) -> Result<(), glib::Error>; - - #[doc(alias = "gdk_pixbuf_loader_write_bytes")] - fn write_bytes(&self, buffer: &glib::Bytes) -> Result<(), glib::Error>; - - #[doc(alias = "area-prepared")] - fn connect_area_prepared(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "area-updated")] - fn connect_area_updated( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "closed")] - fn connect_closed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "size-prepared")] - fn connect_size_prepared(&self, f: F) -> SignalHandlerId; -} - -impl> PixbufLoaderExt for O { fn close(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -118,6 +78,8 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "gdk_pixbuf_loader_get_animation")] + #[doc(alias = "get_animation")] fn animation(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_loader_get_animation( @@ -126,6 +88,8 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "gdk_pixbuf_loader_get_format")] + #[doc(alias = "get_format")] fn format(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_loader_get_format( @@ -134,6 +98,8 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "gdk_pixbuf_loader_get_pixbuf")] + #[doc(alias = "get_pixbuf")] fn pixbuf(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_loader_get_pixbuf( @@ -142,12 +108,14 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "gdk_pixbuf_loader_set_size")] fn set_size(&self, width: i32, height: i32) { unsafe { ffi::gdk_pixbuf_loader_set_size(self.as_ref().to_glib_none().0, width, height); } } + #[doc(alias = "gdk_pixbuf_loader_write")] fn write(&self, buf: &[u8]) -> Result<(), glib::Error> { let count = buf.len() as _; unsafe { @@ -167,6 +135,7 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "gdk_pixbuf_loader_write_bytes")] fn write_bytes(&self, buffer: &glib::Bytes) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -184,6 +153,7 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "area-prepared")] fn connect_area_prepared(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn area_prepared_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GdkPixbufLoader, @@ -205,6 +175,7 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "area-updated")] fn connect_area_updated( &self, f: F, @@ -242,6 +213,7 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "closed")] fn connect_closed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn closed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GdkPixbufLoader, @@ -263,6 +235,7 @@ impl> PixbufLoaderExt for O { } } + #[doc(alias = "size-prepared")] fn connect_size_prepared(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn size_prepared_trampoline< P: IsA, @@ -294,6 +267,8 @@ impl> PixbufLoaderExt for O { } } +impl> PixbufLoaderExt for O {} + impl fmt::Display for PixbufLoader { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("PixbufLoader") diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index 572441614b53..5dae17f3be8a 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 @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/gdk-pixbuf/sys/src/lib.rs b/gdk-pixbuf/sys/src/lib.rs index feae67a64a2c..af95db31103f 100644 --- a/gdk-pixbuf/sys/src/lib.rs +++ b/gdk-pixbuf/sys/src/lib.rs @@ -541,7 +541,7 @@ extern "C" { error: *mut *mut glib::GError, ) -> *mut GdkPixbufFormat; pub fn gdk_pixbuf_get_formats() -> *mut glib::GSList; - #[cfg(any(feature = "v2_40"))] + #[cfg(feature = "v2_40")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_40")))] pub fn gdk_pixbuf_init_modules(path: *const c_char, error: *mut *mut glib::GError) -> gboolean; pub fn gdk_pixbuf_new_from_stream_async( diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index 572441614b53..5dae17f3be8a 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 @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/gio/src/auto/action.rs b/gio/src/auto/action.rs index 66e1ff70f556..d3f7e59633bd 100644 --- a/gio/src/auto/action.rs +++ b/gio/src/auto/action.rs @@ -63,74 +63,35 @@ impl Action { } } -pub trait ActionExt: 'static { +pub trait ActionExt: IsA + 'static { #[doc(alias = "g_action_activate")] - fn activate(&self, parameter: Option<&glib::Variant>); - - #[doc(alias = "g_action_change_state")] - fn change_state(&self, value: &glib::Variant); - - #[doc(alias = "g_action_get_enabled")] - #[doc(alias = "get_enabled")] - fn is_enabled(&self) -> bool; - - #[doc(alias = "g_action_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> glib::GString; - - #[doc(alias = "g_action_get_parameter_type")] - #[doc(alias = "get_parameter_type")] - fn parameter_type(&self) -> Option; - - #[doc(alias = "g_action_get_state")] - #[doc(alias = "get_state")] - fn state(&self) -> Option; - - #[doc(alias = "g_action_get_state_hint")] - #[doc(alias = "get_state_hint")] - fn state_hint(&self) -> Option; - - #[doc(alias = "g_action_get_state_type")] - #[doc(alias = "get_state_type")] - fn state_type(&self) -> Option; - - #[doc(alias = "enabled")] - fn connect_enabled_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "name")] - fn connect_name_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "parameter-type")] - fn connect_parameter_type_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "state")] - fn connect_state_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "state-type")] - fn connect_state_type_notify(&self, f: F) -> SignalHandlerId; -} - -impl> ActionExt for O { fn activate(&self, parameter: Option<&glib::Variant>) { unsafe { ffi::g_action_activate(self.as_ref().to_glib_none().0, parameter.to_glib_none().0); } } + #[doc(alias = "g_action_change_state")] fn change_state(&self, value: &glib::Variant) { unsafe { ffi::g_action_change_state(self.as_ref().to_glib_none().0, value.to_glib_none().0); } } + #[doc(alias = "g_action_get_enabled")] + #[doc(alias = "get_enabled")] fn is_enabled(&self) -> bool { unsafe { from_glib(ffi::g_action_get_enabled(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_action_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_action_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_action_get_parameter_type")] + #[doc(alias = "get_parameter_type")] fn parameter_type(&self) -> Option { unsafe { from_glib_none(ffi::g_action_get_parameter_type( @@ -139,18 +100,25 @@ impl> ActionExt for O { } } + #[doc(alias = "g_action_get_state")] + #[doc(alias = "get_state")] fn state(&self) -> Option { unsafe { from_glib_full(ffi::g_action_get_state(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_action_get_state_hint")] + #[doc(alias = "get_state_hint")] fn state_hint(&self) -> Option { unsafe { from_glib_full(ffi::g_action_get_state_hint(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_action_get_state_type")] + #[doc(alias = "get_state_type")] fn state_type(&self) -> Option { unsafe { from_glib_none(ffi::g_action_get_state_type(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "enabled")] fn connect_enabled_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_enabled_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GAction, @@ -173,6 +141,7 @@ impl> ActionExt for O { } } + #[doc(alias = "name")] fn connect_name_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_name_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GAction, @@ -195,6 +164,7 @@ impl> ActionExt for O { } } + #[doc(alias = "parameter-type")] fn connect_parameter_type_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_parameter_type_trampoline< P: IsA, @@ -220,6 +190,7 @@ impl> ActionExt for O { } } + #[doc(alias = "state")] fn connect_state_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_state_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GAction, @@ -242,6 +213,7 @@ impl> ActionExt for O { } } + #[doc(alias = "state-type")] fn connect_state_type_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_state_type_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GAction, @@ -265,6 +237,8 @@ impl> ActionExt for O { } } +impl> ActionExt for O {} + impl fmt::Display for Action { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Action") diff --git a/gio/src/auto/action_group.rs b/gio/src/auto/action_group.rs index d23d6e697d2d..7e29b014da44 100644 --- a/gio/src/auto/action_group.rs +++ b/gio/src/auto/action_group.rs @@ -22,81 +22,8 @@ impl ActionGroup { pub const NONE: Option<&'static ActionGroup> = None; } -pub trait ActionGroupExt: 'static { +pub trait ActionGroupExt: IsA + 'static { #[doc(alias = "g_action_group_action_added")] - fn action_added(&self, action_name: &str); - - #[doc(alias = "g_action_group_action_enabled_changed")] - fn action_enabled_changed(&self, action_name: &str, enabled: bool); - - #[doc(alias = "g_action_group_action_removed")] - fn action_removed(&self, action_name: &str); - - #[doc(alias = "g_action_group_action_state_changed")] - fn action_state_changed(&self, action_name: &str, state: &glib::Variant); - - #[doc(alias = "g_action_group_activate_action")] - fn activate_action(&self, action_name: &str, parameter: Option<&glib::Variant>); - - #[doc(alias = "g_action_group_change_action_state")] - fn change_action_state(&self, action_name: &str, value: &glib::Variant); - - #[doc(alias = "g_action_group_get_action_enabled")] - #[doc(alias = "get_action_enabled")] - fn is_action_enabled(&self, action_name: &str) -> bool; - - #[doc(alias = "g_action_group_get_action_parameter_type")] - #[doc(alias = "get_action_parameter_type")] - fn action_parameter_type(&self, action_name: &str) -> Option; - - #[doc(alias = "g_action_group_get_action_state")] - #[doc(alias = "get_action_state")] - fn action_state(&self, action_name: &str) -> Option; - - #[doc(alias = "g_action_group_get_action_state_hint")] - #[doc(alias = "get_action_state_hint")] - fn action_state_hint(&self, action_name: &str) -> Option; - - #[doc(alias = "g_action_group_get_action_state_type")] - #[doc(alias = "get_action_state_type")] - fn action_state_type(&self, action_name: &str) -> Option; - - #[doc(alias = "g_action_group_has_action")] - fn has_action(&self, action_name: &str) -> bool; - - #[doc(alias = "g_action_group_list_actions")] - fn list_actions(&self) -> Vec; - - #[doc(alias = "action-added")] - fn connect_action_added( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "action-enabled-changed")] - fn connect_action_enabled_changed( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "action-removed")] - fn connect_action_removed( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "action-state-changed")] - fn connect_action_state_changed( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; -} - -impl> ActionGroupExt for O { fn action_added(&self, action_name: &str) { unsafe { ffi::g_action_group_action_added( @@ -106,6 +33,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_action_enabled_changed")] fn action_enabled_changed(&self, action_name: &str, enabled: bool) { unsafe { ffi::g_action_group_action_enabled_changed( @@ -116,6 +44,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_action_removed")] fn action_removed(&self, action_name: &str) { unsafe { ffi::g_action_group_action_removed( @@ -125,6 +54,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_action_state_changed")] fn action_state_changed(&self, action_name: &str, state: &glib::Variant) { unsafe { ffi::g_action_group_action_state_changed( @@ -135,6 +65,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_activate_action")] fn activate_action(&self, action_name: &str, parameter: Option<&glib::Variant>) { unsafe { ffi::g_action_group_activate_action( @@ -145,6 +76,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_change_action_state")] fn change_action_state(&self, action_name: &str, value: &glib::Variant) { unsafe { ffi::g_action_group_change_action_state( @@ -155,6 +87,8 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_get_action_enabled")] + #[doc(alias = "get_action_enabled")] fn is_action_enabled(&self, action_name: &str) -> bool { unsafe { from_glib(ffi::g_action_group_get_action_enabled( @@ -164,6 +98,8 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_get_action_parameter_type")] + #[doc(alias = "get_action_parameter_type")] fn action_parameter_type(&self, action_name: &str) -> Option { unsafe { from_glib_none(ffi::g_action_group_get_action_parameter_type( @@ -173,6 +109,8 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_get_action_state")] + #[doc(alias = "get_action_state")] fn action_state(&self, action_name: &str) -> Option { unsafe { from_glib_full(ffi::g_action_group_get_action_state( @@ -182,6 +120,8 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_get_action_state_hint")] + #[doc(alias = "get_action_state_hint")] fn action_state_hint(&self, action_name: &str) -> Option { unsafe { from_glib_full(ffi::g_action_group_get_action_state_hint( @@ -191,6 +131,8 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_get_action_state_type")] + #[doc(alias = "get_action_state_type")] fn action_state_type(&self, action_name: &str) -> Option { unsafe { from_glib_none(ffi::g_action_group_get_action_state_type( @@ -200,6 +142,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_has_action")] fn has_action(&self, action_name: &str) -> bool { unsafe { from_glib(ffi::g_action_group_has_action( @@ -209,6 +152,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "g_action_group_list_actions")] fn list_actions(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_action_group_list_actions( @@ -217,6 +161,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "action-added")] fn connect_action_added( &self, detail: Option<&str>, @@ -253,6 +198,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "action-enabled-changed")] fn connect_action_enabled_changed( &self, detail: Option<&str>, @@ -292,6 +238,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "action-removed")] fn connect_action_removed( &self, detail: Option<&str>, @@ -328,6 +275,7 @@ impl> ActionGroupExt for O { } } + #[doc(alias = "action-state-changed")] fn connect_action_state_changed( &self, detail: Option<&str>, @@ -367,6 +315,8 @@ impl> ActionGroupExt for O { } } +impl> ActionGroupExt for O {} + impl fmt::Display for ActionGroup { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ActionGroup") diff --git a/gio/src/auto/action_map.rs b/gio/src/auto/action_map.rs index 02b97c03ae1a..393a8d8829d6 100644 --- a/gio/src/auto/action_map.rs +++ b/gio/src/auto/action_map.rs @@ -19,18 +19,8 @@ impl ActionMap { pub const NONE: Option<&'static ActionMap> = None; } -pub trait ActionMapExt: 'static { +pub trait ActionMapExt: IsA + 'static { #[doc(alias = "g_action_map_add_action")] - fn add_action(&self, action: &impl IsA); - - #[doc(alias = "g_action_map_lookup_action")] - fn lookup_action(&self, action_name: &str) -> Option; - - #[doc(alias = "g_action_map_remove_action")] - fn remove_action(&self, action_name: &str); -} - -impl> ActionMapExt for O { fn add_action(&self, action: &impl IsA) { unsafe { ffi::g_action_map_add_action( @@ -40,6 +30,7 @@ impl> ActionMapExt for O { } } + #[doc(alias = "g_action_map_lookup_action")] fn lookup_action(&self, action_name: &str) -> Option { unsafe { from_glib_none(ffi::g_action_map_lookup_action( @@ -49,6 +40,7 @@ impl> ActionMapExt for O { } } + #[doc(alias = "g_action_map_remove_action")] fn remove_action(&self, action_name: &str) { unsafe { ffi::g_action_map_remove_action( @@ -59,6 +51,8 @@ impl> ActionMapExt for O { } } +impl> ActionMapExt for O {} + impl fmt::Display for ActionMap { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ActionMap") diff --git a/gio/src/auto/app_info.rs b/gio/src/auto/app_info.rs index 021eaf40063b..88db98b8ab0e 100644 --- a/gio/src/auto/app_info.rs +++ b/gio/src/auto/app_info.rs @@ -67,7 +67,7 @@ impl AppInfo { } } - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "g_app_info_get_default_for_type_async")] #[doc(alias = "get_default_for_type_async")] @@ -120,7 +120,7 @@ impl AppInfo { } } - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn default_for_type_future( content_type: &str, @@ -152,7 +152,7 @@ impl AppInfo { } } - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "g_app_info_get_default_for_uri_scheme_async")] #[doc(alias = "get_default_for_uri_scheme_async")] @@ -203,7 +203,7 @@ impl AppInfo { } } - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn default_for_uri_scheme_future( uri_scheme: &str, @@ -339,98 +339,8 @@ impl AppInfo { } } -pub trait AppInfoExt: 'static { +pub trait AppInfoExt: IsA + 'static { #[doc(alias = "g_app_info_add_supports_type")] - fn add_supports_type(&self, content_type: &str) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_can_delete")] - fn can_delete(&self) -> bool; - - #[doc(alias = "g_app_info_can_remove_supports_type")] - fn can_remove_supports_type(&self) -> bool; - - #[doc(alias = "g_app_info_delete")] - fn delete(&self) -> bool; - - #[doc(alias = "g_app_info_dup")] - #[must_use] - fn dup(&self) -> AppInfo; - - #[doc(alias = "g_app_info_equal")] - fn equal(&self, appinfo2: &impl IsA) -> bool; - - #[doc(alias = "g_app_info_get_commandline")] - #[doc(alias = "get_commandline")] - fn commandline(&self) -> Option; - - #[doc(alias = "g_app_info_get_description")] - #[doc(alias = "get_description")] - fn description(&self) -> Option; - - #[doc(alias = "g_app_info_get_display_name")] - #[doc(alias = "get_display_name")] - fn display_name(&self) -> glib::GString; - - #[doc(alias = "g_app_info_get_executable")] - #[doc(alias = "get_executable")] - fn executable(&self) -> std::path::PathBuf; - - #[doc(alias = "g_app_info_get_icon")] - #[doc(alias = "get_icon")] - fn icon(&self) -> Option; - - #[doc(alias = "g_app_info_get_id")] - #[doc(alias = "get_id")] - fn id(&self) -> Option; - - #[doc(alias = "g_app_info_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> glib::GString; - - #[doc(alias = "g_app_info_get_supported_types")] - #[doc(alias = "get_supported_types")] - fn supported_types(&self) -> Vec; - - #[doc(alias = "g_app_info_launch")] - fn launch( - &self, - files: &[File], - context: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_launch_uris")] - fn launch_uris( - &self, - uris: &[&str], - context: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_remove_supports_type")] - fn remove_supports_type(&self, content_type: &str) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_set_as_default_for_extension")] - fn set_as_default_for_extension( - &self, - extension: impl AsRef, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_set_as_default_for_type")] - fn set_as_default_for_type(&self, content_type: &str) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_set_as_last_used_for_type")] - fn set_as_last_used_for_type(&self, content_type: &str) -> Result<(), glib::Error>; - - #[doc(alias = "g_app_info_should_show")] - fn should_show(&self) -> bool; - - #[doc(alias = "g_app_info_supports_files")] - fn supports_files(&self) -> bool; - - #[doc(alias = "g_app_info_supports_uris")] - fn supports_uris(&self) -> bool; -} - -impl> AppInfoExt for O { fn add_supports_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -448,10 +358,12 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_can_delete")] fn can_delete(&self) -> bool { unsafe { from_glib(ffi::g_app_info_can_delete(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_can_remove_supports_type")] fn can_remove_supports_type(&self) -> bool { unsafe { from_glib(ffi::g_app_info_can_remove_supports_type( @@ -460,14 +372,18 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_delete")] fn delete(&self) -> bool { unsafe { from_glib(ffi::g_app_info_delete(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_dup")] + #[must_use] fn dup(&self) -> AppInfo { unsafe { from_glib_full(ffi::g_app_info_dup(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_equal")] fn equal(&self, appinfo2: &impl IsA) -> bool { unsafe { from_glib(ffi::g_app_info_equal( @@ -477,6 +393,8 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_get_commandline")] + #[doc(alias = "get_commandline")] fn commandline(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_commandline( @@ -485,6 +403,8 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_get_description")] + #[doc(alias = "get_description")] fn description(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_description( @@ -493,6 +413,8 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_get_display_name")] + #[doc(alias = "get_display_name")] fn display_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_app_info_get_display_name( @@ -501,6 +423,8 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_get_executable")] + #[doc(alias = "get_executable")] fn executable(&self) -> std::path::PathBuf { unsafe { from_glib_none(ffi::g_app_info_get_executable( @@ -509,18 +433,26 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_get_icon")] + #[doc(alias = "get_icon")] fn icon(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_icon(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_get_id")] + #[doc(alias = "get_id")] fn id(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_id(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_app_info_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_get_supported_types")] + #[doc(alias = "get_supported_types")] fn supported_types(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_app_info_get_supported_types( @@ -529,6 +461,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_launch")] fn launch( &self, files: &[File], @@ -551,6 +484,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_launch_uris")] fn launch_uris( &self, uris: &[&str], @@ -573,6 +507,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_remove_supports_type")] fn remove_supports_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -590,6 +525,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_set_as_default_for_extension")] fn set_as_default_for_extension( &self, extension: impl AsRef, @@ -610,6 +546,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_set_as_default_for_type")] fn set_as_default_for_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -627,6 +564,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_set_as_last_used_for_type")] fn set_as_last_used_for_type(&self, content_type: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -644,10 +582,12 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_should_show")] fn should_show(&self) -> bool { unsafe { from_glib(ffi::g_app_info_should_show(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_app_info_supports_files")] fn supports_files(&self) -> bool { unsafe { from_glib(ffi::g_app_info_supports_files( @@ -656,6 +596,7 @@ impl> AppInfoExt for O { } } + #[doc(alias = "g_app_info_supports_uris")] fn supports_uris(&self) -> bool { unsafe { from_glib(ffi::g_app_info_supports_uris( @@ -665,6 +606,8 @@ impl> AppInfoExt for O { } } +impl> AppInfoExt for O {} + impl fmt::Display for AppInfo { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("AppInfo") diff --git a/gio/src/auto/app_launch_context.rs b/gio/src/auto/app_launch_context.rs index 01fd02566cc8..e629ed086fc0 100644 --- a/gio/src/auto/app_launch_context.rs +++ b/gio/src/auto/app_launch_context.rs @@ -34,47 +34,9 @@ impl Default for AppLaunchContext { } } -pub trait AppLaunchContextExt: 'static { +pub trait AppLaunchContextExt: IsA + 'static { #[doc(alias = "g_app_launch_context_get_display")] #[doc(alias = "get_display")] - fn display(&self, info: &impl IsA, files: &[File]) -> Option; - - #[doc(alias = "g_app_launch_context_get_environment")] - #[doc(alias = "get_environment")] - fn environment(&self) -> Vec; - - #[doc(alias = "g_app_launch_context_get_startup_notify_id")] - #[doc(alias = "get_startup_notify_id")] - fn startup_notify_id(&self, info: &impl IsA, files: &[File]) -> Option; - - #[doc(alias = "g_app_launch_context_launch_failed")] - fn launch_failed(&self, startup_notify_id: &str); - - #[doc(alias = "g_app_launch_context_setenv")] - fn setenv(&self, variable: impl AsRef, value: impl AsRef); - - #[doc(alias = "g_app_launch_context_unsetenv")] - fn unsetenv(&self, variable: impl AsRef); - - #[doc(alias = "launch-failed")] - fn connect_launch_failed(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_72"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] - #[doc(alias = "launch-started")] - fn connect_launch_started) + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "launched")] - fn connect_launched( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> AppLaunchContextExt for O { fn display(&self, info: &impl IsA, files: &[File]) -> Option { unsafe { from_glib_full(ffi::g_app_launch_context_get_display( @@ -85,6 +47,8 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "g_app_launch_context_get_environment")] + #[doc(alias = "get_environment")] fn environment(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_app_launch_context_get_environment( @@ -93,6 +57,8 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "g_app_launch_context_get_startup_notify_id")] + #[doc(alias = "get_startup_notify_id")] fn startup_notify_id(&self, info: &impl IsA, files: &[File]) -> Option { unsafe { from_glib_full(ffi::g_app_launch_context_get_startup_notify_id( @@ -103,6 +69,7 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "g_app_launch_context_launch_failed")] fn launch_failed(&self, startup_notify_id: &str) { unsafe { ffi::g_app_launch_context_launch_failed( @@ -112,6 +79,7 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "g_app_launch_context_setenv")] fn setenv(&self, variable: impl AsRef, value: impl AsRef) { unsafe { ffi::g_app_launch_context_setenv( @@ -122,6 +90,7 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "g_app_launch_context_unsetenv")] fn unsetenv(&self, variable: impl AsRef) { unsafe { ffi::g_app_launch_context_unsetenv( @@ -131,6 +100,7 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "launch-failed")] fn connect_launch_failed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn launch_failed_trampoline< P: IsA, @@ -159,8 +129,9 @@ impl> AppLaunchContextExt for O { } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] + #[doc(alias = "launch-started")] fn connect_launch_started) + 'static>( &self, f: F, @@ -196,6 +167,7 @@ impl> AppLaunchContextExt for O { } } + #[doc(alias = "launched")] fn connect_launched( &self, f: F, @@ -230,6 +202,8 @@ impl> AppLaunchContextExt for O { } } +impl> AppLaunchContextExt for O {} + impl fmt::Display for AppLaunchContext { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("AppLaunchContext") diff --git a/gio/src/auto/application.rs b/gio/src/auto/application.rs index 2464c3cf8e46..7f4be97722f0 100644 --- a/gio/src/auto/application.rs +++ b/gio/src/auto/application.rs @@ -128,169 +128,15 @@ impl ApplicationBuilder { } } -pub trait ApplicationExt: 'static { +pub trait ApplicationExt: IsA + 'static { #[doc(alias = "g_application_activate")] - fn activate(&self); - - #[doc(alias = "g_application_add_main_option")] - fn add_main_option( - &self, - long_name: &str, - short_name: glib::Char, - flags: glib::OptionFlags, - arg: glib::OptionArg, - description: &str, - arg_description: Option<&str>, - ); - - //#[doc(alias = "g_application_add_main_option_entries")] - //fn add_main_option_entries(&self, entries: /*Ignored*/&[glib::OptionEntry]); - - //#[doc(alias = "g_application_add_option_group")] - //fn add_option_group(&self, group: /*Ignored*/glib::OptionGroup); - - #[doc(alias = "g_application_bind_busy_property")] - fn bind_busy_property(&self, object: &impl IsA, property: &str); - - #[doc(alias = "g_application_get_application_id")] - #[doc(alias = "get_application_id")] - fn application_id(&self) -> Option; - - #[doc(alias = "g_application_get_dbus_connection")] - #[doc(alias = "get_dbus_connection")] - fn dbus_connection(&self) -> Option; - - #[doc(alias = "g_application_get_dbus_object_path")] - #[doc(alias = "get_dbus_object_path")] - fn dbus_object_path(&self) -> Option; - - #[doc(alias = "g_application_get_flags")] - #[doc(alias = "get_flags")] - fn flags(&self) -> ApplicationFlags; - - #[doc(alias = "g_application_get_inactivity_timeout")] - #[doc(alias = "get_inactivity_timeout")] - fn inactivity_timeout(&self) -> u32; - - #[doc(alias = "g_application_get_is_busy")] - #[doc(alias = "get_is_busy")] - fn is_busy(&self) -> bool; - - #[doc(alias = "g_application_get_is_registered")] - #[doc(alias = "get_is_registered")] - fn is_registered(&self) -> bool; - - #[doc(alias = "g_application_get_is_remote")] - #[doc(alias = "get_is_remote")] - fn is_remote(&self) -> bool; - - #[doc(alias = "g_application_get_resource_base_path")] - #[doc(alias = "get_resource_base_path")] - fn resource_base_path(&self) -> Option; - - #[doc(alias = "g_application_open")] - fn open(&self, files: &[File], hint: &str); - - #[doc(alias = "g_application_quit")] - fn quit(&self); - - #[doc(alias = "g_application_register")] - fn register(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_application_send_notification")] - fn send_notification(&self, id: Option<&str>, notification: &Notification); - - #[doc(alias = "g_application_set_application_id")] - fn set_application_id(&self, application_id: Option<&str>); - - #[doc(alias = "g_application_set_default")] - fn set_default(&self); - - #[doc(alias = "g_application_set_flags")] - fn set_flags(&self, flags: ApplicationFlags); - - #[doc(alias = "g_application_set_inactivity_timeout")] - fn set_inactivity_timeout(&self, inactivity_timeout: u32); - - #[doc(alias = "g_application_set_option_context_description")] - fn set_option_context_description(&self, description: Option<&str>); - - #[doc(alias = "g_application_set_option_context_parameter_string")] - fn set_option_context_parameter_string(&self, parameter_string: Option<&str>); - - #[doc(alias = "g_application_set_option_context_summary")] - fn set_option_context_summary(&self, summary: Option<&str>); - - #[doc(alias = "g_application_set_resource_base_path")] - fn set_resource_base_path(&self, resource_path: Option<&str>); - - #[doc(alias = "g_application_unbind_busy_property")] - fn unbind_busy_property(&self, object: &impl IsA, property: &str); - - #[doc(alias = "g_application_withdraw_notification")] - fn withdraw_notification(&self, id: &str); - - #[doc(alias = "action-group")] - fn set_action_group>(&self, action_group: Option<&P>); - - #[doc(alias = "activate")] - fn connect_activate(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "command-line")] - fn connect_command_line i32 + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "handle-local-options")] - fn connect_handle_local_options i32 + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "name-lost")] - fn connect_name_lost bool + 'static>(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "shutdown")] - fn connect_shutdown(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "startup")] - fn connect_startup(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "action-group")] - fn connect_action_group_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "application-id")] - fn connect_application_id_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "flags")] - fn connect_flags_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "inactivity-timeout")] - fn connect_inactivity_timeout_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "is-busy")] - fn connect_is_busy_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "is-registered")] - fn connect_is_registered_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "is-remote")] - fn connect_is_remote_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "resource-base-path")] - fn connect_resource_base_path_notify(&self, f: F) -> SignalHandlerId; -} - -impl> ApplicationExt for O { fn activate(&self) { unsafe { ffi::g_application_activate(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_application_add_main_option")] fn add_main_option( &self, long_name: &str, @@ -313,14 +159,17 @@ impl> ApplicationExt for O { } } + //#[doc(alias = "g_application_add_main_option_entries")] //fn add_main_option_entries(&self, entries: /*Ignored*/&[glib::OptionEntry]) { // unsafe { TODO: call ffi:g_application_add_main_option_entries() } //} + //#[doc(alias = "g_application_add_option_group")] //fn add_option_group(&self, group: /*Ignored*/glib::OptionGroup) { // unsafe { TODO: call ffi:g_application_add_option_group() } //} + #[doc(alias = "g_application_bind_busy_property")] fn bind_busy_property(&self, object: &impl IsA, property: &str) { unsafe { ffi::g_application_bind_busy_property( @@ -331,6 +180,8 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_application_id")] + #[doc(alias = "get_application_id")] fn application_id(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_application_id( @@ -339,6 +190,8 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_dbus_connection")] + #[doc(alias = "get_dbus_connection")] fn dbus_connection(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_dbus_connection( @@ -347,6 +200,8 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_dbus_object_path")] + #[doc(alias = "get_dbus_object_path")] fn dbus_object_path(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_dbus_object_path( @@ -355,14 +210,20 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_flags")] + #[doc(alias = "get_flags")] fn flags(&self) -> ApplicationFlags { unsafe { from_glib(ffi::g_application_get_flags(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_application_get_inactivity_timeout")] + #[doc(alias = "get_inactivity_timeout")] fn inactivity_timeout(&self) -> u32 { unsafe { ffi::g_application_get_inactivity_timeout(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_application_get_is_busy")] + #[doc(alias = "get_is_busy")] fn is_busy(&self) -> bool { unsafe { from_glib(ffi::g_application_get_is_busy( @@ -371,6 +232,8 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_is_registered")] + #[doc(alias = "get_is_registered")] fn is_registered(&self) -> bool { unsafe { from_glib(ffi::g_application_get_is_registered( @@ -379,6 +242,8 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_is_remote")] + #[doc(alias = "get_is_remote")] fn is_remote(&self) -> bool { unsafe { from_glib(ffi::g_application_get_is_remote( @@ -387,6 +252,8 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_get_resource_base_path")] + #[doc(alias = "get_resource_base_path")] fn resource_base_path(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_resource_base_path( @@ -395,6 +262,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_open")] fn open(&self, files: &[File], hint: &str) { let n_files = files.len() as _; unsafe { @@ -407,12 +275,14 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_quit")] fn quit(&self) { unsafe { ffi::g_application_quit(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_application_register")] fn register(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -430,6 +300,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_send_notification")] fn send_notification(&self, id: Option<&str>, notification: &Notification) { unsafe { ffi::g_application_send_notification( @@ -440,6 +311,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_set_application_id")] fn set_application_id(&self, application_id: Option<&str>) { unsafe { ffi::g_application_set_application_id( @@ -449,18 +321,21 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_set_default")] fn set_default(&self) { unsafe { ffi::g_application_set_default(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_application_set_flags")] fn set_flags(&self, flags: ApplicationFlags) { unsafe { ffi::g_application_set_flags(self.as_ref().to_glib_none().0, flags.into_glib()); } } + #[doc(alias = "g_application_set_inactivity_timeout")] fn set_inactivity_timeout(&self, inactivity_timeout: u32) { unsafe { ffi::g_application_set_inactivity_timeout( @@ -470,6 +345,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_set_option_context_description")] fn set_option_context_description(&self, description: Option<&str>) { unsafe { ffi::g_application_set_option_context_description( @@ -479,6 +355,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_set_option_context_parameter_string")] fn set_option_context_parameter_string(&self, parameter_string: Option<&str>) { unsafe { ffi::g_application_set_option_context_parameter_string( @@ -488,6 +365,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_set_option_context_summary")] fn set_option_context_summary(&self, summary: Option<&str>) { unsafe { ffi::g_application_set_option_context_summary( @@ -497,6 +375,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_set_resource_base_path")] fn set_resource_base_path(&self, resource_path: Option<&str>) { unsafe { ffi::g_application_set_resource_base_path( @@ -506,6 +385,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_unbind_busy_property")] fn unbind_busy_property(&self, object: &impl IsA, property: &str) { unsafe { ffi::g_application_unbind_busy_property( @@ -516,6 +396,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "g_application_withdraw_notification")] fn withdraw_notification(&self, id: &str) { unsafe { ffi::g_application_withdraw_notification( @@ -525,10 +406,12 @@ impl> ApplicationExt for O { } } + #[doc(alias = "action-group")] fn set_action_group>(&self, action_group: Option<&P>) { glib::ObjectExt::set_property(self.as_ref(), "action-group", action_group) } + #[doc(alias = "activate")] fn connect_activate(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn activate_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GApplication, @@ -550,6 +433,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "command-line")] fn connect_command_line i32 + 'static>( &self, f: F, @@ -581,6 +465,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "handle-local-options")] fn connect_handle_local_options i32 + 'static>( &self, f: F, @@ -612,8 +497,9 @@ impl> ApplicationExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "name-lost")] fn connect_name_lost bool + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn name_lost_trampoline< P: IsA, @@ -638,6 +524,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "shutdown")] fn connect_shutdown(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn shutdown_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GApplication, @@ -659,6 +546,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "startup")] fn connect_startup(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn startup_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GApplication, @@ -680,6 +568,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "action-group")] fn connect_action_group_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_action_group_trampoline< P: IsA, @@ -705,6 +594,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "application-id")] fn connect_application_id_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_application_id_trampoline< P: IsA, @@ -730,6 +620,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "flags")] fn connect_flags_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_flags_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GApplication, @@ -752,6 +643,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "inactivity-timeout")] fn connect_inactivity_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_inactivity_timeout_trampoline< P: IsA, @@ -777,6 +669,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "is-busy")] fn connect_is_busy_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_busy_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GApplication, @@ -799,6 +692,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "is-registered")] fn connect_is_registered_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_registered_trampoline< P: IsA, @@ -824,6 +718,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "is-remote")] fn connect_is_remote_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_remote_trampoline< P: IsA, @@ -849,6 +744,7 @@ impl> ApplicationExt for O { } } + #[doc(alias = "resource-base-path")] fn connect_resource_base_path_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_resource_base_path_trampoline< P: IsA, @@ -875,6 +771,8 @@ impl> ApplicationExt for O { } } +impl> ApplicationExt for O {} + impl fmt::Display for Application { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Application") diff --git a/gio/src/auto/application_command_line.rs b/gio/src/auto/application_command_line.rs index f24989c4880a..11427cd07459 100644 --- a/gio/src/auto/application_command_line.rs +++ b/gio/src/auto/application_command_line.rs @@ -23,59 +23,8 @@ impl ApplicationCommandLine { pub const NONE: Option<&'static ApplicationCommandLine> = None; } -pub trait ApplicationCommandLineExt: 'static { +pub trait ApplicationCommandLineExt: IsA + 'static { #[doc(alias = "g_application_command_line_create_file_for_arg")] - fn create_file_for_arg(&self, arg: impl AsRef) -> File; - - #[doc(alias = "g_application_command_line_get_arguments")] - #[doc(alias = "get_arguments")] - fn arguments(&self) -> Vec; - - #[doc(alias = "g_application_command_line_get_cwd")] - #[doc(alias = "get_cwd")] - fn cwd(&self) -> Option; - - #[doc(alias = "g_application_command_line_get_environ")] - #[doc(alias = "get_environ")] - fn environ(&self) -> Vec; - - #[doc(alias = "g_application_command_line_get_exit_status")] - #[doc(alias = "get_exit_status")] - fn exit_status(&self) -> i32; - - #[doc(alias = "g_application_command_line_get_is_remote")] - #[doc(alias = "get_is_remote")] - fn is_remote(&self) -> bool; - - #[doc(alias = "g_application_command_line_get_options_dict")] - #[doc(alias = "get_options_dict")] - fn options_dict(&self) -> glib::VariantDict; - - #[doc(alias = "g_application_command_line_get_platform_data")] - #[doc(alias = "get_platform_data")] - fn platform_data(&self) -> Option; - - #[doc(alias = "g_application_command_line_get_stdin")] - #[doc(alias = "get_stdin")] - fn stdin(&self) -> Option; - - #[doc(alias = "g_application_command_line_getenv")] - fn getenv(&self, name: impl AsRef) -> Option; - - //#[doc(alias = "g_application_command_line_print")] - //fn print(&self, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - //#[doc(alias = "g_application_command_line_printerr")] - //fn printerr(&self, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "g_application_command_line_set_exit_status")] - fn set_exit_status(&self, exit_status: i32); - - #[doc(alias = "is-remote")] - fn connect_is_remote_notify(&self, f: F) -> SignalHandlerId; -} - -impl> ApplicationCommandLineExt for O { fn create_file_for_arg(&self, arg: impl AsRef) -> File { unsafe { from_glib_full(ffi::g_application_command_line_create_file_for_arg( @@ -85,6 +34,8 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_arguments")] + #[doc(alias = "get_arguments")] fn arguments(&self) -> Vec { unsafe { let mut argc = mem::MaybeUninit::uninit(); @@ -99,6 +50,8 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_cwd")] + #[doc(alias = "get_cwd")] fn cwd(&self) -> Option { unsafe { from_glib_none(ffi::g_application_command_line_get_cwd( @@ -107,6 +60,8 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_environ")] + #[doc(alias = "get_environ")] fn environ(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_application_command_line_get_environ( @@ -115,10 +70,14 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_exit_status")] + #[doc(alias = "get_exit_status")] fn exit_status(&self) -> i32 { unsafe { ffi::g_application_command_line_get_exit_status(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_application_command_line_get_is_remote")] + #[doc(alias = "get_is_remote")] fn is_remote(&self) -> bool { unsafe { from_glib(ffi::g_application_command_line_get_is_remote( @@ -127,6 +86,8 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_options_dict")] + #[doc(alias = "get_options_dict")] fn options_dict(&self) -> glib::VariantDict { unsafe { from_glib_none(ffi::g_application_command_line_get_options_dict( @@ -135,6 +96,8 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_platform_data")] + #[doc(alias = "get_platform_data")] fn platform_data(&self) -> Option { unsafe { from_glib_full(ffi::g_application_command_line_get_platform_data( @@ -143,6 +106,8 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_get_stdin")] + #[doc(alias = "get_stdin")] fn stdin(&self) -> Option { unsafe { from_glib_full(ffi::g_application_command_line_get_stdin( @@ -151,6 +116,7 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "g_application_command_line_getenv")] fn getenv(&self, name: impl AsRef) -> Option { unsafe { from_glib_none(ffi::g_application_command_line_getenv( @@ -160,14 +126,17 @@ impl> ApplicationCommandLineExt for O { } } + //#[doc(alias = "g_application_command_line_print")] //fn print(&self, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:g_application_command_line_print() } //} + //#[doc(alias = "g_application_command_line_printerr")] //fn printerr(&self, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:g_application_command_line_printerr() } //} + #[doc(alias = "g_application_command_line_set_exit_status")] fn set_exit_status(&self, exit_status: i32) { unsafe { ffi::g_application_command_line_set_exit_status( @@ -177,6 +146,7 @@ impl> ApplicationCommandLineExt for O { } } + #[doc(alias = "is-remote")] fn connect_is_remote_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_remote_trampoline< P: IsA, @@ -203,6 +173,8 @@ impl> ApplicationCommandLineExt for O { } } +impl> ApplicationCommandLineExt for O {} + impl fmt::Display for ApplicationCommandLine { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ApplicationCommandLine") diff --git a/gio/src/auto/async_initable.rs b/gio/src/auto/async_initable.rs index 95ac377e430d..959a54894f13 100644 --- a/gio/src/auto/async_initable.rs +++ b/gio/src/auto/async_initable.rs @@ -19,22 +19,8 @@ impl AsyncInitable { pub const NONE: Option<&'static AsyncInitable> = None; } -pub trait AsyncInitableExt: 'static { +pub trait AsyncInitableExt: IsA + 'static { #[doc(alias = "g_async_initable_init_async")] - unsafe fn init_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - unsafe fn init_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; -} - -impl> AsyncInitableExt for O { unsafe fn init_async) + 'static>( &self, io_priority: glib::Priority, @@ -95,6 +81,8 @@ impl> AsyncInitableExt for O { } } +impl> AsyncInitableExt for O {} + impl fmt::Display for AsyncInitable { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("AsyncInitable") diff --git a/gio/src/auto/async_result.rs b/gio/src/auto/async_result.rs index 631950557110..26f5d0918ea5 100644 --- a/gio/src/auto/async_result.rs +++ b/gio/src/auto/async_result.rs @@ -18,23 +18,9 @@ impl AsyncResult { pub const NONE: Option<&'static AsyncResult> = None; } -pub trait AsyncResultExt: 'static { +pub trait AsyncResultExt: IsA + 'static { #[doc(alias = "g_async_result_get_source_object")] #[doc(alias = "get_source_object")] - fn source_object(&self) -> Option; - - //#[doc(alias = "g_async_result_get_user_data")] - //#[doc(alias = "get_user_data")] - //fn user_data(&self) -> /*Unimplemented*/Option; - - //#[doc(alias = "g_async_result_is_tagged")] - //fn is_tagged(&self, source_tag: /*Unimplemented*/Option) -> bool; - - #[doc(alias = "g_async_result_legacy_propagate_error")] - fn legacy_propagate_error(&self) -> Result<(), glib::Error>; -} - -impl> AsyncResultExt for O { fn source_object(&self) -> Option { unsafe { from_glib_full(ffi::g_async_result_get_source_object( @@ -43,14 +29,18 @@ impl> AsyncResultExt for O { } } + //#[doc(alias = "g_async_result_get_user_data")] + //#[doc(alias = "get_user_data")] //fn user_data(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:g_async_result_get_user_data() } //} + //#[doc(alias = "g_async_result_is_tagged")] //fn is_tagged(&self, source_tag: /*Unimplemented*/Option) -> bool { // unsafe { TODO: call ffi:g_async_result_is_tagged() } //} + #[doc(alias = "g_async_result_legacy_propagate_error")] fn legacy_propagate_error(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -68,6 +58,8 @@ impl> AsyncResultExt for O { } } +impl> AsyncResultExt for O {} + impl fmt::Display for AsyncResult { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("AsyncResult") diff --git a/gio/src/auto/buffered_input_stream.rs b/gio/src/auto/buffered_input_stream.rs index b16e56c2c011..5facadb18e4c 100644 --- a/gio/src/auto/buffered_input_stream.rs +++ b/gio/src/auto/buffered_input_stream.rs @@ -104,51 +104,8 @@ impl BufferedInputStreamBuilder { } } -pub trait BufferedInputStreamExt: 'static { +pub trait BufferedInputStreamExt: IsA + 'static { #[doc(alias = "g_buffered_input_stream_fill")] - fn fill( - &self, - count: isize, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_buffered_input_stream_fill_async")] - fn fill_async) + 'static>( - &self, - count: isize, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn fill_future( - &self, - count: isize, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_buffered_input_stream_get_available")] - #[doc(alias = "get_available")] - fn available(&self) -> usize; - - #[doc(alias = "g_buffered_input_stream_get_buffer_size")] - #[doc(alias = "get_buffer_size")] - fn buffer_size(&self) -> usize; - - #[doc(alias = "g_buffered_input_stream_peek_buffer")] - fn peek_buffer(&self) -> Vec; - - #[doc(alias = "g_buffered_input_stream_read_byte")] - fn read_byte(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_buffered_input_stream_set_buffer_size")] - fn set_buffer_size(&self, size: usize); - - #[doc(alias = "buffer-size")] - fn connect_buffer_size_notify(&self, f: F) -> SignalHandlerId; -} - -impl> BufferedInputStreamExt for O { fn fill( &self, count: isize, @@ -170,6 +127,7 @@ impl> BufferedInputStreamExt for O { } } + #[doc(alias = "g_buffered_input_stream_fill_async")] fn fill_async) + 'static>( &self, count: isize, @@ -237,14 +195,19 @@ impl> BufferedInputStreamExt for O { )) } + #[doc(alias = "g_buffered_input_stream_get_available")] + #[doc(alias = "get_available")] fn available(&self) -> usize { unsafe { ffi::g_buffered_input_stream_get_available(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_buffered_input_stream_get_buffer_size")] + #[doc(alias = "get_buffer_size")] fn buffer_size(&self) -> usize { unsafe { ffi::g_buffered_input_stream_get_buffer_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_buffered_input_stream_peek_buffer")] fn peek_buffer(&self) -> Vec { unsafe { let mut count = mem::MaybeUninit::uninit(); @@ -259,6 +222,7 @@ impl> BufferedInputStreamExt for O { } } + #[doc(alias = "g_buffered_input_stream_read_byte")] fn read_byte(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -275,12 +239,14 @@ impl> BufferedInputStreamExt for O { } } + #[doc(alias = "g_buffered_input_stream_set_buffer_size")] fn set_buffer_size(&self, size: usize) { unsafe { ffi::g_buffered_input_stream_set_buffer_size(self.as_ref().to_glib_none().0, size); } } + #[doc(alias = "buffer-size")] fn connect_buffer_size_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_buffer_size_trampoline< P: IsA, @@ -307,6 +273,8 @@ impl> BufferedInputStreamExt for O { } } +impl> BufferedInputStreamExt for O {} + impl fmt::Display for BufferedInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("BufferedInputStream") diff --git a/gio/src/auto/buffered_output_stream.rs b/gio/src/auto/buffered_output_stream.rs index 358b81fd1780..665282354ddf 100644 --- a/gio/src/auto/buffered_output_stream.rs +++ b/gio/src/auto/buffered_output_stream.rs @@ -110,29 +110,9 @@ impl BufferedOutputStreamBuilder { } } -pub trait BufferedOutputStreamExt: 'static { +pub trait BufferedOutputStreamExt: IsA + 'static { #[doc(alias = "g_buffered_output_stream_get_auto_grow")] #[doc(alias = "get_auto_grow")] - fn auto_grows(&self) -> bool; - - #[doc(alias = "g_buffered_output_stream_get_buffer_size")] - #[doc(alias = "get_buffer_size")] - fn buffer_size(&self) -> usize; - - #[doc(alias = "g_buffered_output_stream_set_auto_grow")] - fn set_auto_grow(&self, auto_grow: bool); - - #[doc(alias = "g_buffered_output_stream_set_buffer_size")] - fn set_buffer_size(&self, size: usize); - - #[doc(alias = "auto-grow")] - fn connect_auto_grow_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "buffer-size")] - fn connect_buffer_size_notify(&self, f: F) -> SignalHandlerId; -} - -impl> BufferedOutputStreamExt for O { fn auto_grows(&self) -> bool { unsafe { from_glib(ffi::g_buffered_output_stream_get_auto_grow( @@ -141,10 +121,13 @@ impl> BufferedOutputStreamExt for O { } } + #[doc(alias = "g_buffered_output_stream_get_buffer_size")] + #[doc(alias = "get_buffer_size")] fn buffer_size(&self) -> usize { unsafe { ffi::g_buffered_output_stream_get_buffer_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_buffered_output_stream_set_auto_grow")] fn set_auto_grow(&self, auto_grow: bool) { unsafe { ffi::g_buffered_output_stream_set_auto_grow( @@ -154,12 +137,14 @@ impl> BufferedOutputStreamExt for O { } } + #[doc(alias = "g_buffered_output_stream_set_buffer_size")] fn set_buffer_size(&self, size: usize) { unsafe { ffi::g_buffered_output_stream_set_buffer_size(self.as_ref().to_glib_none().0, size); } } + #[doc(alias = "auto-grow")] fn connect_auto_grow_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_auto_grow_trampoline< P: IsA, @@ -185,6 +170,7 @@ impl> BufferedOutputStreamExt for O { } } + #[doc(alias = "buffer-size")] fn connect_buffer_size_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_buffer_size_trampoline< P: IsA, @@ -211,6 +197,8 @@ impl> BufferedOutputStreamExt for O { } } +impl> BufferedOutputStreamExt for O {} + impl fmt::Display for BufferedOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("BufferedOutputStream") diff --git a/gio/src/auto/cancellable.rs b/gio/src/auto/cancellable.rs index 182be43b91f9..e982309181b8 100644 --- a/gio/src/auto/cancellable.rs +++ b/gio/src/auto/cancellable.rs @@ -38,41 +38,21 @@ impl Default for Cancellable { unsafe impl Send for Cancellable {} unsafe impl Sync for Cancellable {} -pub trait CancellableExt: 'static { +pub trait CancellableExt: IsA + 'static { #[doc(alias = "g_cancellable_cancel")] - fn cancel(&self); - - #[doc(alias = "g_cancellable_get_fd")] - #[doc(alias = "get_fd")] - fn fd(&self) -> i32; - - #[doc(alias = "g_cancellable_is_cancelled")] - fn is_cancelled(&self) -> bool; - - //#[doc(alias = "g_cancellable_make_pollfd")] - //fn make_pollfd(&self, pollfd: /*Ignored*/&mut glib::PollFD) -> bool; - - #[doc(alias = "g_cancellable_pop_current")] - fn pop_current(&self); - - #[doc(alias = "g_cancellable_push_current")] - fn push_current(&self); - - #[doc(alias = "g_cancellable_release_fd")] - fn release_fd(&self); -} - -impl> CancellableExt for O { fn cancel(&self) { unsafe { ffi::g_cancellable_cancel(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_cancellable_get_fd")] + #[doc(alias = "get_fd")] fn fd(&self) -> i32 { unsafe { ffi::g_cancellable_get_fd(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_cancellable_is_cancelled")] fn is_cancelled(&self) -> bool { unsafe { from_glib(ffi::g_cancellable_is_cancelled( @@ -81,22 +61,26 @@ impl> CancellableExt for O { } } + //#[doc(alias = "g_cancellable_make_pollfd")] //fn make_pollfd(&self, pollfd: /*Ignored*/&mut glib::PollFD) -> bool { // unsafe { TODO: call ffi:g_cancellable_make_pollfd() } //} + #[doc(alias = "g_cancellable_pop_current")] fn pop_current(&self) { unsafe { ffi::g_cancellable_pop_current(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_cancellable_push_current")] fn push_current(&self) { unsafe { ffi::g_cancellable_push_current(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_cancellable_release_fd")] fn release_fd(&self) { unsafe { ffi::g_cancellable_release_fd(self.as_ref().to_glib_none().0); @@ -104,6 +88,8 @@ impl> CancellableExt for O { } } +impl> CancellableExt for O {} + impl fmt::Display for Cancellable { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Cancellable") diff --git a/gio/src/auto/constants.rs b/gio/src/auto/constants.rs index 65750ebfc5c3..fd959c645bdf 100644 --- a/gio/src/auto/constants.rs +++ b/gio/src/auto/constants.rs @@ -4,12 +4,12 @@ use glib::GStr; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME")] pub static DEBUG_CONTROLLER_EXTENSION_POINT_NAME: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_DEBUG_CONTROLLER_EXTENSION_POINT_NAME) }; -#[cfg(any(feature = "v2_58"))] +#[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] #[doc(alias = "G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE")] pub static DRIVE_IDENTIFIER_KIND_UNIX_DEVICE: &GStr = @@ -35,7 +35,7 @@ pub static FILE_ATTRIBUTE_ACCESS_CAN_WRITE: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE")] pub static FILE_ATTRIBUTE_DOS_IS_ARCHIVE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE) }; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT")] pub static FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT: &GStr = @@ -43,7 +43,7 @@ pub static FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_DOS_IS_SYSTEM")] pub static FILE_ATTRIBUTE_DOS_IS_SYSTEM: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_DOS_IS_SYSTEM) }; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG")] pub static FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG: &GStr = @@ -200,22 +200,22 @@ pub static FILE_ATTRIBUTE_STANDARD_TYPE: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAILING_FAILED")] pub static FILE_ATTRIBUTE_THUMBNAILING_FAILED: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAILING_FAILED) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE")] pub static FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL")] pub static FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE")] pub static FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE")] pub static FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE: &GStr = unsafe { @@ -224,22 +224,22 @@ pub static FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE: &GStr = unsafe { #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID")] pub static FILE_ATTRIBUTE_THUMBNAIL_IS_VALID: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE")] pub static FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL")] pub static FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE")] pub static FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE")] pub static FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE: &GStr = @@ -247,22 +247,22 @@ pub static FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_PATH")] pub static FILE_ATTRIBUTE_THUMBNAIL_PATH: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_PATH) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE")] pub static FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL")] pub static FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE")] pub static FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE) }; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] #[doc(alias = "G_FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE")] pub static FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE: &GStr = @@ -270,7 +270,7 @@ pub static FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_TIME_ACCESS")] pub static FILE_ATTRIBUTE_TIME_ACCESS: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_TIME_ACCESS) }; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC")] pub static FILE_ATTRIBUTE_TIME_ACCESS_NSEC: &GStr = @@ -281,7 +281,7 @@ pub static FILE_ATTRIBUTE_TIME_ACCESS_USEC: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_TIME_CHANGED")] pub static FILE_ATTRIBUTE_TIME_CHANGED: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_TIME_CHANGED) }; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_FILE_ATTRIBUTE_TIME_CHANGED_NSEC")] pub static FILE_ATTRIBUTE_TIME_CHANGED_NSEC: &GStr = @@ -292,7 +292,7 @@ pub static FILE_ATTRIBUTE_TIME_CHANGED_USEC: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_TIME_CREATED")] pub static FILE_ATTRIBUTE_TIME_CREATED: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_TIME_CREATED) }; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_FILE_ATTRIBUTE_TIME_CREATED_NSEC")] pub static FILE_ATTRIBUTE_TIME_CREATED_NSEC: &GStr = @@ -303,7 +303,7 @@ pub static FILE_ATTRIBUTE_TIME_CREATED_USEC: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_TIME_MODIFIED")] pub static FILE_ATTRIBUTE_TIME_MODIFIED: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_TIME_MODIFIED) }; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC")] pub static FILE_ATTRIBUTE_TIME_MODIFIED_NSEC: &GStr = @@ -350,7 +350,7 @@ pub static FILE_ATTRIBUTE_UNIX_RDEV: &GStr = #[doc(alias = "G_FILE_ATTRIBUTE_UNIX_UID")] pub static FILE_ATTRIBUTE_UNIX_UID: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_FILE_ATTRIBUTE_UNIX_UID) }; -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(alias = "G_MEMORY_MONITOR_EXTENSION_POINT_NAME")] pub static MEMORY_MONITOR_EXTENSION_POINT_NAME: &GStr = @@ -383,7 +383,7 @@ pub static NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME: &GStr = unsafe { #[doc(alias = "G_NETWORK_MONITOR_EXTENSION_POINT_NAME")] pub static NETWORK_MONITOR_EXTENSION_POINT_NAME: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_NETWORK_MONITOR_EXTENSION_POINT_NAME) }; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME")] pub static POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME: &GStr = unsafe { diff --git a/gio/src/auto/converter.rs b/gio/src/auto/converter.rs index 7ae612a5d665..b8bab2d92a2e 100644 --- a/gio/src/auto/converter.rs +++ b/gio/src/auto/converter.rs @@ -18,12 +18,8 @@ impl Converter { pub const NONE: Option<&'static Converter> = None; } -pub trait ConverterExt: 'static { +pub trait ConverterExt: IsA + 'static { #[doc(alias = "g_converter_reset")] - fn reset(&self); -} - -impl> ConverterExt for O { fn reset(&self) { unsafe { ffi::g_converter_reset(self.as_ref().to_glib_none().0); @@ -31,6 +27,8 @@ impl> ConverterExt for O { } } +impl> ConverterExt for O {} + impl fmt::Display for Converter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Converter") diff --git a/gio/src/auto/converter_input_stream.rs b/gio/src/auto/converter_input_stream.rs index 88e03fed1109..e73859f7d7ee 100644 --- a/gio/src/auto/converter_input_stream.rs +++ b/gio/src/auto/converter_input_stream.rs @@ -95,13 +95,9 @@ impl ConverterInputStreamBuilder { } } -pub trait ConverterInputStreamExt: 'static { +pub trait ConverterInputStreamExt: IsA + 'static { #[doc(alias = "g_converter_input_stream_get_converter")] #[doc(alias = "get_converter")] - fn converter(&self) -> Converter; -} - -impl> ConverterInputStreamExt for O { fn converter(&self) -> Converter { unsafe { from_glib_none(ffi::g_converter_input_stream_get_converter( @@ -111,6 +107,8 @@ impl> ConverterInputStreamExt for O { } } +impl> ConverterInputStreamExt for O {} + impl fmt::Display for ConverterInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ConverterInputStream") diff --git a/gio/src/auto/converter_output_stream.rs b/gio/src/auto/converter_output_stream.rs index 9bd25e335c87..cea9f6deffbe 100644 --- a/gio/src/auto/converter_output_stream.rs +++ b/gio/src/auto/converter_output_stream.rs @@ -95,13 +95,9 @@ impl ConverterOutputStreamBuilder { } } -pub trait ConverterOutputStreamExt: 'static { +pub trait ConverterOutputStreamExt: IsA + 'static { #[doc(alias = "g_converter_output_stream_get_converter")] #[doc(alias = "get_converter")] - fn converter(&self) -> Converter; -} - -impl> ConverterOutputStreamExt for O { fn converter(&self) -> Converter { unsafe { from_glib_none(ffi::g_converter_output_stream_get_converter( @@ -111,6 +107,8 @@ impl> ConverterOutputStreamExt for O { } } +impl> ConverterOutputStreamExt for O {} + impl fmt::Display for ConverterOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ConverterOutputStream") diff --git a/gio/src/auto/credentials.rs b/gio/src/auto/credentials.rs index a1eb405ab685..fcc32a671205 100644 --- a/gio/src/auto/credentials.rs +++ b/gio/src/auto/credentials.rs @@ -26,7 +26,7 @@ impl Credentials { // unsafe { TODO: call ffi:g_credentials_get_native() } //} - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_credentials_get_unix_pid")] #[doc(alias = "get_unix_pid")] @@ -42,7 +42,7 @@ impl Credentials { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_credentials_get_unix_user")] #[doc(alias = "get_unix_user")] @@ -81,7 +81,7 @@ impl Credentials { // unsafe { TODO: call ffi:g_credentials_set_native() } //} - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_credentials_set_unix_user")] pub fn set_unix_user(&self, uid: u32) -> Result<(), glib::Error> { diff --git a/gio/src/auto/data_input_stream.rs b/gio/src/auto/data_input_stream.rs index 197515367101..bd760d491d22 100644 --- a/gio/src/auto/data_input_stream.rs +++ b/gio/src/auto/data_input_stream.rs @@ -107,50 +107,9 @@ impl DataInputStreamBuilder { } } -pub trait DataInputStreamExt: 'static { +pub trait DataInputStreamExt: IsA + 'static { #[doc(alias = "g_data_input_stream_get_byte_order")] #[doc(alias = "get_byte_order")] - fn byte_order(&self) -> DataStreamByteOrder; - - #[doc(alias = "g_data_input_stream_get_newline_type")] - #[doc(alias = "get_newline_type")] - fn newline_type(&self) -> DataStreamNewlineType; - - #[doc(alias = "g_data_input_stream_read_byte")] - fn read_byte(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_read_int16")] - fn read_int16(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_read_int32")] - fn read_int32(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_read_int64")] - fn read_int64(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_read_uint16")] - fn read_uint16(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_read_uint32")] - fn read_uint32(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_read_uint64")] - fn read_uint64(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_data_input_stream_set_byte_order")] - fn set_byte_order(&self, order: DataStreamByteOrder); - - #[doc(alias = "g_data_input_stream_set_newline_type")] - fn set_newline_type(&self, type_: DataStreamNewlineType); - - #[doc(alias = "byte-order")] - fn connect_byte_order_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "newline-type")] - fn connect_newline_type_notify(&self, f: F) -> SignalHandlerId; -} - -impl> DataInputStreamExt for O { fn byte_order(&self) -> DataStreamByteOrder { unsafe { from_glib(ffi::g_data_input_stream_get_byte_order( @@ -159,6 +118,8 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_get_newline_type")] + #[doc(alias = "get_newline_type")] fn newline_type(&self) -> DataStreamNewlineType { unsafe { from_glib(ffi::g_data_input_stream_get_newline_type( @@ -167,6 +128,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_byte")] fn read_byte(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -183,6 +145,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_int16")] fn read_int16(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -199,6 +162,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_int32")] fn read_int32(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -215,6 +179,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_int64")] fn read_int64(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -231,6 +196,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_uint16")] fn read_uint16(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -247,6 +213,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_uint32")] fn read_uint32(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -263,6 +230,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_read_uint64")] fn read_uint64(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -279,6 +247,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_set_byte_order")] fn set_byte_order(&self, order: DataStreamByteOrder) { unsafe { ffi::g_data_input_stream_set_byte_order( @@ -288,6 +257,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "g_data_input_stream_set_newline_type")] fn set_newline_type(&self, type_: DataStreamNewlineType) { unsafe { ffi::g_data_input_stream_set_newline_type( @@ -297,6 +267,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "byte-order")] fn connect_byte_order_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_byte_order_trampoline< P: IsA, @@ -322,6 +293,7 @@ impl> DataInputStreamExt for O { } } + #[doc(alias = "newline-type")] fn connect_newline_type_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_newline_type_trampoline< P: IsA, @@ -348,6 +320,8 @@ impl> DataInputStreamExt for O { } } +impl> DataInputStreamExt for O {} + impl fmt::Display for DataInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DataInputStream") diff --git a/gio/src/auto/data_output_stream.rs b/gio/src/auto/data_output_stream.rs index 02f0471b7c92..211091ad3a13 100644 --- a/gio/src/auto/data_output_stream.rs +++ b/gio/src/auto/data_output_stream.rs @@ -92,75 +92,9 @@ impl DataOutputStreamBuilder { } } -pub trait DataOutputStreamExt: 'static { +pub trait DataOutputStreamExt: IsA + 'static { #[doc(alias = "g_data_output_stream_get_byte_order")] #[doc(alias = "get_byte_order")] - fn byte_order(&self) -> DataStreamByteOrder; - - #[doc(alias = "g_data_output_stream_put_byte")] - fn put_byte( - &self, - data: u8, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_int16")] - fn put_int16( - &self, - data: i16, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_int32")] - fn put_int32( - &self, - data: i32, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_int64")] - fn put_int64( - &self, - data: i64, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_string")] - fn put_string( - &self, - str: &str, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_uint16")] - fn put_uint16( - &self, - data: u16, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_uint32")] - fn put_uint32( - &self, - data: u32, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_put_uint64")] - fn put_uint64( - &self, - data: u64, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_data_output_stream_set_byte_order")] - fn set_byte_order(&self, order: DataStreamByteOrder); - - #[doc(alias = "byte-order")] - fn connect_byte_order_notify(&self, f: F) -> SignalHandlerId; -} - -impl> DataOutputStreamExt for O { fn byte_order(&self) -> DataStreamByteOrder { unsafe { from_glib(ffi::g_data_output_stream_get_byte_order( @@ -169,6 +103,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_byte")] fn put_byte( &self, data: u8, @@ -191,6 +126,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_int16")] fn put_int16( &self, data: i16, @@ -213,6 +149,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_int32")] fn put_int32( &self, data: i32, @@ -235,6 +172,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_int64")] fn put_int64( &self, data: i64, @@ -257,6 +195,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_string")] fn put_string( &self, str: &str, @@ -279,6 +218,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_uint16")] fn put_uint16( &self, data: u16, @@ -301,6 +241,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_uint32")] fn put_uint32( &self, data: u32, @@ -323,6 +264,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_put_uint64")] fn put_uint64( &self, data: u64, @@ -345,6 +287,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "g_data_output_stream_set_byte_order")] fn set_byte_order(&self, order: DataStreamByteOrder) { unsafe { ffi::g_data_output_stream_set_byte_order( @@ -354,6 +297,7 @@ impl> DataOutputStreamExt for O { } } + #[doc(alias = "byte-order")] fn connect_byte_order_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_byte_order_trampoline< P: IsA, @@ -380,6 +324,8 @@ impl> DataOutputStreamExt for O { } } +impl> DataOutputStreamExt for O {} + impl fmt::Display for DataOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DataOutputStream") diff --git a/gio/src/auto/datagram_based.rs b/gio/src/auto/datagram_based.rs index 69df70034fad..b881d4a752d1 100644 --- a/gio/src/auto/datagram_based.rs +++ b/gio/src/auto/datagram_based.rs @@ -18,12 +18,8 @@ impl DatagramBased { pub const NONE: Option<&'static DatagramBased> = None; } -pub trait DatagramBasedExt: 'static { +pub trait DatagramBasedExt: IsA + 'static { #[doc(alias = "g_datagram_based_condition_check")] - fn condition_check(&self, condition: glib::IOCondition) -> glib::IOCondition; -} - -impl> DatagramBasedExt for O { fn condition_check(&self, condition: glib::IOCondition) -> glib::IOCondition { unsafe { from_glib(ffi::g_datagram_based_condition_check( @@ -34,6 +30,8 @@ impl> DatagramBasedExt for O { } } +impl> DatagramBasedExt for O {} + impl fmt::Display for DatagramBased { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DatagramBased") diff --git a/gio/src/auto/dbus_connection.rs b/gio/src/auto/dbus_connection.rs index 592d68a171a3..78951abded9c 100644 --- a/gio/src/auto/dbus_connection.rs +++ b/gio/src/auto/dbus_connection.rs @@ -217,7 +217,7 @@ impl DBusConnection { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_connection_call_with_unix_fd_list")] pub fn call_with_unix_fd_list< @@ -293,7 +293,7 @@ impl DBusConnection { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn call_with_unix_fd_list_future( &self, @@ -341,7 +341,7 @@ impl DBusConnection { )) } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_connection_call_with_unix_fd_list_sync")] pub fn call_with_unix_fd_list_sync( @@ -592,7 +592,7 @@ impl DBusConnection { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "g_dbus_connection_get_flags")] #[doc(alias = "get_flags")] diff --git a/gio/src/auto/dbus_interface.rs b/gio/src/auto/dbus_interface.rs index ea12c5247a45..13fbe8cadeba 100644 --- a/gio/src/auto/dbus_interface.rs +++ b/gio/src/auto/dbus_interface.rs @@ -19,20 +19,9 @@ impl DBusInterface { pub const NONE: Option<&'static DBusInterface> = None; } -pub trait DBusInterfaceExt: 'static { +pub trait DBusInterfaceExt: IsA + 'static { #[doc(alias = "g_dbus_interface_dup_object")] #[doc(alias = "dup_object")] - fn get(&self) -> Option; - - #[doc(alias = "g_dbus_interface_get_info")] - #[doc(alias = "get_info")] - fn info(&self) -> DBusInterfaceInfo; - - #[doc(alias = "g_dbus_interface_set_object")] - fn set_object(&self, object: Option<&impl IsA>); -} - -impl> DBusInterfaceExt for O { fn get(&self) -> Option { unsafe { from_glib_full(ffi::g_dbus_interface_dup_object( @@ -41,6 +30,8 @@ impl> DBusInterfaceExt for O { } } + #[doc(alias = "g_dbus_interface_get_info")] + #[doc(alias = "get_info")] fn info(&self) -> DBusInterfaceInfo { unsafe { from_glib_none(ffi::g_dbus_interface_get_info( @@ -49,6 +40,7 @@ impl> DBusInterfaceExt for O { } } + #[doc(alias = "g_dbus_interface_set_object")] fn set_object(&self, object: Option<&impl IsA>) { unsafe { ffi::g_dbus_interface_set_object( @@ -59,6 +51,8 @@ impl> DBusInterfaceExt for O { } } +impl> DBusInterfaceExt for O {} + impl fmt::Display for DBusInterface { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DBusInterface") diff --git a/gio/src/auto/dbus_interface_skeleton.rs b/gio/src/auto/dbus_interface_skeleton.rs index 17806af8ff6b..0fa9c782a8eb 100644 --- a/gio/src/auto/dbus_interface_skeleton.rs +++ b/gio/src/auto/dbus_interface_skeleton.rs @@ -26,70 +26,8 @@ impl DBusInterfaceSkeleton { pub const NONE: Option<&'static DBusInterfaceSkeleton> = None; } -pub trait DBusInterfaceSkeletonExt: 'static { +pub trait DBusInterfaceSkeletonExt: IsA + 'static { #[doc(alias = "g_dbus_interface_skeleton_export")] - fn export(&self, connection: &DBusConnection, object_path: &str) -> Result<(), glib::Error>; - - #[doc(alias = "g_dbus_interface_skeleton_flush")] - fn flush(&self); - - #[doc(alias = "g_dbus_interface_skeleton_get_connection")] - #[doc(alias = "get_connection")] - fn connection(&self) -> Option; - - #[doc(alias = "g_dbus_interface_skeleton_get_connections")] - #[doc(alias = "get_connections")] - fn connections(&self) -> Vec; - - #[doc(alias = "g_dbus_interface_skeleton_get_flags")] - #[doc(alias = "get_flags")] - fn flags(&self) -> DBusInterfaceSkeletonFlags; - - #[doc(alias = "g_dbus_interface_skeleton_get_info")] - #[doc(alias = "get_info")] - fn info(&self) -> DBusInterfaceInfo; - - #[doc(alias = "g_dbus_interface_skeleton_get_object_path")] - #[doc(alias = "get_object_path")] - fn object_path(&self) -> Option; - - #[doc(alias = "g_dbus_interface_skeleton_get_properties")] - #[doc(alias = "get_properties")] - fn properties(&self) -> glib::Variant; - - //#[doc(alias = "g_dbus_interface_skeleton_get_vtable")] - //#[doc(alias = "get_vtable")] - //fn vtable(&self) -> /*Ignored*/DBusInterfaceVTable; - - #[doc(alias = "g_dbus_interface_skeleton_has_connection")] - fn has_connection(&self, connection: &DBusConnection) -> bool; - - #[doc(alias = "g_dbus_interface_skeleton_set_flags")] - fn set_flags(&self, flags: DBusInterfaceSkeletonFlags); - - #[doc(alias = "g_dbus_interface_skeleton_unexport")] - fn unexport(&self); - - #[doc(alias = "g_dbus_interface_skeleton_unexport_from_connection")] - fn unexport_from_connection(&self, connection: &DBusConnection); - - #[doc(alias = "g-flags")] - fn g_flags(&self) -> DBusInterfaceSkeletonFlags; - - #[doc(alias = "g-flags")] - fn set_g_flags(&self, g_flags: DBusInterfaceSkeletonFlags); - - #[doc(alias = "g-authorize-method")] - fn connect_g_authorize_method bool + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "g-flags")] - fn connect_g_flags_notify(&self, f: F) -> SignalHandlerId; -} - -impl> DBusInterfaceSkeletonExt for O { fn export(&self, connection: &DBusConnection, object_path: &str) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -108,12 +46,15 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_flush")] fn flush(&self) { unsafe { ffi::g_dbus_interface_skeleton_flush(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_dbus_interface_skeleton_get_connection")] + #[doc(alias = "get_connection")] fn connection(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_interface_skeleton_get_connection( @@ -122,6 +63,8 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_get_connections")] + #[doc(alias = "get_connections")] fn connections(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_dbus_interface_skeleton_get_connections( @@ -130,6 +73,8 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_get_flags")] + #[doc(alias = "get_flags")] fn flags(&self) -> DBusInterfaceSkeletonFlags { unsafe { from_glib(ffi::g_dbus_interface_skeleton_get_flags( @@ -138,6 +83,8 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_get_info")] + #[doc(alias = "get_info")] fn info(&self) -> DBusInterfaceInfo { unsafe { from_glib_none(ffi::g_dbus_interface_skeleton_get_info( @@ -146,6 +93,8 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_get_object_path")] + #[doc(alias = "get_object_path")] fn object_path(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_interface_skeleton_get_object_path( @@ -154,6 +103,8 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_get_properties")] + #[doc(alias = "get_properties")] fn properties(&self) -> glib::Variant { unsafe { from_glib_full(ffi::g_dbus_interface_skeleton_get_properties( @@ -162,10 +113,13 @@ impl> DBusInterfaceSkeletonExt for O { } } + //#[doc(alias = "g_dbus_interface_skeleton_get_vtable")] + //#[doc(alias = "get_vtable")] //fn vtable(&self) -> /*Ignored*/DBusInterfaceVTable { // unsafe { TODO: call ffi:g_dbus_interface_skeleton_get_vtable() } //} + #[doc(alias = "g_dbus_interface_skeleton_has_connection")] fn has_connection(&self, connection: &DBusConnection) -> bool { unsafe { from_glib(ffi::g_dbus_interface_skeleton_has_connection( @@ -175,6 +129,7 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_set_flags")] fn set_flags(&self, flags: DBusInterfaceSkeletonFlags) { unsafe { ffi::g_dbus_interface_skeleton_set_flags( @@ -184,12 +139,14 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g_dbus_interface_skeleton_unexport")] fn unexport(&self) { unsafe { ffi::g_dbus_interface_skeleton_unexport(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_dbus_interface_skeleton_unexport_from_connection")] fn unexport_from_connection(&self, connection: &DBusConnection) { unsafe { ffi::g_dbus_interface_skeleton_unexport_from_connection( @@ -199,14 +156,17 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g-flags")] fn g_flags(&self) -> DBusInterfaceSkeletonFlags { glib::ObjectExt::property(self.as_ref(), "g-flags") } + #[doc(alias = "g-flags")] fn set_g_flags(&self, g_flags: DBusInterfaceSkeletonFlags) { glib::ObjectExt::set_property(self.as_ref(), "g-flags", g_flags) } + #[doc(alias = "g-authorize-method")] fn connect_g_authorize_method bool + 'static>( &self, f: F, @@ -239,6 +199,7 @@ impl> DBusInterfaceSkeletonExt for O { } } + #[doc(alias = "g-flags")] fn connect_g_flags_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_g_flags_trampoline< P: IsA, @@ -265,6 +226,8 @@ impl> DBusInterfaceSkeletonExt for O { } } +impl> DBusInterfaceSkeletonExt for O {} + impl fmt::Display for DBusInterfaceSkeleton { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DBusInterfaceSkeleton") diff --git a/gio/src/auto/dbus_message.rs b/gio/src/auto/dbus_message.rs index 2424e222e3ef..fed6b6a444fc 100644 --- a/gio/src/auto/dbus_message.rs +++ b/gio/src/auto/dbus_message.rs @@ -166,7 +166,7 @@ impl DBusMessage { unsafe { from_glib(ffi::g_dbus_message_get_message_type(self.to_glib_none().0)) } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_message_get_num_unix_fds")] #[doc(alias = "get_num_unix_fds")] @@ -204,7 +204,7 @@ impl DBusMessage { unsafe { from_glib_none(ffi::g_dbus_message_get_signature(self.to_glib_none().0)) } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_message_get_unix_fd_list")] #[doc(alias = "get_unix_fd_list")] @@ -321,7 +321,7 @@ impl DBusMessage { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_message_set_num_unix_fds")] pub fn set_num_unix_fds(&self, value: u32) { @@ -365,7 +365,7 @@ impl DBusMessage { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_message_set_unix_fd_list")] pub fn set_unix_fd_list(&self, fd_list: Option<&impl IsA>) { diff --git a/gio/src/auto/dbus_method_invocation.rs b/gio/src/auto/dbus_method_invocation.rs index 1216203d9c2f..bed7c20b5d65 100644 --- a/gio/src/auto/dbus_method_invocation.rs +++ b/gio/src/auto/dbus_method_invocation.rs @@ -149,7 +149,7 @@ impl DBusMethodInvocation { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_dbus_method_invocation_return_value_with_unix_fd_list")] pub fn return_value_with_unix_fd_list( diff --git a/gio/src/auto/dbus_object.rs b/gio/src/auto/dbus_object.rs index a5e2bdd44329..1700dd7789ea 100644 --- a/gio/src/auto/dbus_object.rs +++ b/gio/src/auto/dbus_object.rs @@ -23,33 +23,9 @@ impl DBusObject { pub const NONE: Option<&'static DBusObject> = None; } -pub trait DBusObjectExt: 'static { +pub trait DBusObjectExt: IsA + 'static { #[doc(alias = "g_dbus_object_get_interface")] #[doc(alias = "get_interface")] - fn interface(&self, interface_name: &str) -> Option; - - #[doc(alias = "g_dbus_object_get_interfaces")] - #[doc(alias = "get_interfaces")] - fn interfaces(&self) -> Vec; - - #[doc(alias = "g_dbus_object_get_object_path")] - #[doc(alias = "get_object_path")] - fn object_path(&self) -> glib::GString; - - #[doc(alias = "interface-added")] - fn connect_interface_added( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "interface-removed")] - fn connect_interface_removed( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> DBusObjectExt for O { fn interface(&self, interface_name: &str) -> Option { unsafe { from_glib_full(ffi::g_dbus_object_get_interface( @@ -59,6 +35,8 @@ impl> DBusObjectExt for O { } } + #[doc(alias = "g_dbus_object_get_interfaces")] + #[doc(alias = "get_interfaces")] fn interfaces(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_dbus_object_get_interfaces( @@ -67,6 +45,8 @@ impl> DBusObjectExt for O { } } + #[doc(alias = "g_dbus_object_get_object_path")] + #[doc(alias = "get_object_path")] fn object_path(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_object_get_object_path( @@ -75,6 +55,7 @@ impl> DBusObjectExt for O { } } + #[doc(alias = "interface-added")] fn connect_interface_added( &self, f: F, @@ -106,6 +87,7 @@ impl> DBusObjectExt for O { } } + #[doc(alias = "interface-removed")] fn connect_interface_removed( &self, f: F, @@ -138,6 +120,8 @@ impl> DBusObjectExt for O { } } +impl> DBusObjectExt for O {} + impl fmt::Display for DBusObject { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DBusObject") diff --git a/gio/src/auto/dbus_proxy.rs b/gio/src/auto/dbus_proxy.rs index b82a16c4d5b3..57654100f599 100644 --- a/gio/src/auto/dbus_proxy.rs +++ b/gio/src/auto/dbus_proxy.rs @@ -271,180 +271,8 @@ impl DBusProxy { unsafe impl Send for DBusProxy {} unsafe impl Sync for DBusProxy {} -pub trait DBusProxyExt: 'static { +pub trait DBusProxyExt: IsA + 'static { #[doc(alias = "g_dbus_proxy_call")] - fn call) + 'static>( - &self, - method_name: &str, - parameters: Option<&glib::Variant>, - flags: DBusCallFlags, - timeout_msec: i32, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn call_future( - &self, - method_name: &str, - parameters: Option<&glib::Variant>, - flags: DBusCallFlags, - timeout_msec: i32, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_dbus_proxy_call_sync")] - fn call_sync( - &self, - method_name: &str, - parameters: Option<&glib::Variant>, - flags: DBusCallFlags, - timeout_msec: i32, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[cfg(any(unix))] - #[cfg_attr(docsrs, doc(cfg(unix)))] - #[doc(alias = "g_dbus_proxy_call_with_unix_fd_list")] - fn call_with_unix_fd_list< - P: FnOnce(Result<(glib::Variant, UnixFDList), glib::Error>) + 'static, - >( - &self, - method_name: &str, - parameters: Option<&glib::Variant>, - flags: DBusCallFlags, - timeout_msec: i32, - fd_list: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - #[cfg(any(unix))] - #[cfg_attr(docsrs, doc(cfg(unix)))] - fn call_with_unix_fd_list_future( - &self, - method_name: &str, - parameters: Option<&glib::Variant>, - flags: DBusCallFlags, - timeout_msec: i32, - fd_list: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin< - Box_< - dyn std::future::Future> - + 'static, - >, - >; - - #[cfg(any(unix))] - #[cfg_attr(docsrs, doc(cfg(unix)))] - #[doc(alias = "g_dbus_proxy_call_with_unix_fd_list_sync")] - fn call_with_unix_fd_list_sync( - &self, - method_name: &str, - parameters: Option<&glib::Variant>, - flags: DBusCallFlags, - timeout_msec: i32, - fd_list: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - ) -> Result<(glib::Variant, UnixFDList), glib::Error>; - - #[doc(alias = "g_dbus_proxy_get_cached_property")] - #[doc(alias = "get_cached_property")] - fn cached_property(&self, property_name: &str) -> Option; - - #[doc(alias = "g_dbus_proxy_get_cached_property_names")] - #[doc(alias = "get_cached_property_names")] - fn cached_property_names(&self) -> Vec; - - #[doc(alias = "g_dbus_proxy_get_connection")] - #[doc(alias = "get_connection")] - fn connection(&self) -> DBusConnection; - - #[doc(alias = "g_dbus_proxy_get_default_timeout")] - #[doc(alias = "get_default_timeout")] - fn default_timeout(&self) -> i32; - - #[doc(alias = "g_dbus_proxy_get_flags")] - #[doc(alias = "get_flags")] - fn flags(&self) -> DBusProxyFlags; - - #[doc(alias = "g_dbus_proxy_get_interface_info")] - #[doc(alias = "get_interface_info")] - fn interface_info(&self) -> Option; - - #[doc(alias = "g_dbus_proxy_get_interface_name")] - #[doc(alias = "get_interface_name")] - fn interface_name(&self) -> glib::GString; - - #[doc(alias = "g_dbus_proxy_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> Option; - - #[doc(alias = "g_dbus_proxy_get_name_owner")] - #[doc(alias = "get_name_owner")] - fn name_owner(&self) -> Option; - - #[doc(alias = "g_dbus_proxy_get_object_path")] - #[doc(alias = "get_object_path")] - fn object_path(&self) -> glib::GString; - - #[doc(alias = "g_dbus_proxy_set_cached_property")] - fn set_cached_property(&self, property_name: &str, value: Option<&glib::Variant>); - - #[doc(alias = "g_dbus_proxy_set_default_timeout")] - fn set_default_timeout(&self, timeout_msec: i32); - - #[doc(alias = "g_dbus_proxy_set_interface_info")] - fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>); - - #[doc(alias = "g-connection")] - fn g_connection(&self) -> Option; - - #[doc(alias = "g-default-timeout")] - fn g_default_timeout(&self) -> i32; - - #[doc(alias = "g-default-timeout")] - fn set_g_default_timeout(&self, g_default_timeout: i32); - - #[doc(alias = "g-flags")] - fn g_flags(&self) -> DBusProxyFlags; - - #[doc(alias = "g-interface-info")] - fn g_interface_info(&self) -> Option; - - #[doc(alias = "g-interface-info")] - fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>); - - #[doc(alias = "g-interface-name")] - fn g_interface_name(&self) -> Option; - - #[doc(alias = "g-name")] - fn g_name(&self) -> Option; - - #[doc(alias = "g-name-owner")] - fn g_name_owner(&self) -> Option; - - #[doc(alias = "g-object-path")] - fn g_object_path(&self) -> Option; - - #[doc(alias = "g-default-timeout")] - fn connect_g_default_timeout_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "g-interface-info")] - fn connect_g_interface_info_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "g-name-owner")] - fn connect_g_name_owner_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> DBusProxyExt for O { fn call) + 'static>( &self, method_name: &str, @@ -527,6 +355,7 @@ impl> DBusProxyExt for O { )) } + #[doc(alias = "g_dbus_proxy_call_sync")] fn call_sync( &self, method_name: &str, @@ -554,8 +383,9 @@ impl> DBusProxyExt for O { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] + #[doc(alias = "g_dbus_proxy_call_with_unix_fd_list")] fn call_with_unix_fd_list< P: FnOnce(Result<(glib::Variant, UnixFDList), glib::Error>) + 'static, >( @@ -621,7 +451,7 @@ impl> DBusProxyExt for O { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] fn call_with_unix_fd_list_future( &self, @@ -657,8 +487,9 @@ impl> DBusProxyExt for O { )) } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] + #[doc(alias = "g_dbus_proxy_call_with_unix_fd_list_sync")] fn call_with_unix_fd_list_sync( &self, method_name: &str, @@ -690,6 +521,8 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_cached_property")] + #[doc(alias = "get_cached_property")] fn cached_property(&self, property_name: &str) -> Option { unsafe { from_glib_full(ffi::g_dbus_proxy_get_cached_property( @@ -699,6 +532,8 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_cached_property_names")] + #[doc(alias = "get_cached_property_names")] fn cached_property_names(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_dbus_proxy_get_cached_property_names( @@ -707,6 +542,8 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_connection")] + #[doc(alias = "get_connection")] fn connection(&self) -> DBusConnection { unsafe { from_glib_none(ffi::g_dbus_proxy_get_connection( @@ -715,14 +552,20 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_default_timeout")] + #[doc(alias = "get_default_timeout")] fn default_timeout(&self) -> i32 { unsafe { ffi::g_dbus_proxy_get_default_timeout(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_dbus_proxy_get_flags")] + #[doc(alias = "get_flags")] fn flags(&self) -> DBusProxyFlags { unsafe { from_glib(ffi::g_dbus_proxy_get_flags(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_dbus_proxy_get_interface_info")] + #[doc(alias = "get_interface_info")] fn interface_info(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_proxy_get_interface_info( @@ -731,6 +574,8 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_interface_name")] + #[doc(alias = "get_interface_name")] fn interface_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_proxy_get_interface_name( @@ -739,10 +584,14 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_proxy_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_dbus_proxy_get_name_owner")] + #[doc(alias = "get_name_owner")] fn name_owner(&self) -> Option { unsafe { from_glib_full(ffi::g_dbus_proxy_get_name_owner( @@ -751,6 +600,8 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_get_object_path")] + #[doc(alias = "get_object_path")] fn object_path(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_proxy_get_object_path( @@ -759,6 +610,7 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_set_cached_property")] fn set_cached_property(&self, property_name: &str, value: Option<&glib::Variant>) { unsafe { ffi::g_dbus_proxy_set_cached_property( @@ -769,12 +621,14 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g_dbus_proxy_set_default_timeout")] fn set_default_timeout(&self, timeout_msec: i32) { unsafe { ffi::g_dbus_proxy_set_default_timeout(self.as_ref().to_glib_none().0, timeout_msec); } } + #[doc(alias = "g_dbus_proxy_set_interface_info")] fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>) { unsafe { ffi::g_dbus_proxy_set_interface_info( @@ -784,46 +638,57 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g-connection")] fn g_connection(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "g-connection") } + #[doc(alias = "g-default-timeout")] fn g_default_timeout(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "g-default-timeout") } + #[doc(alias = "g-default-timeout")] fn set_g_default_timeout(&self, g_default_timeout: i32) { glib::ObjectExt::set_property(self.as_ref(), "g-default-timeout", g_default_timeout) } + #[doc(alias = "g-flags")] fn g_flags(&self) -> DBusProxyFlags { glib::ObjectExt::property(self.as_ref(), "g-flags") } + #[doc(alias = "g-interface-info")] fn g_interface_info(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "g-interface-info") } + #[doc(alias = "g-interface-info")] fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>) { glib::ObjectExt::set_property(self.as_ref(), "g-interface-info", g_interface_info) } + #[doc(alias = "g-interface-name")] fn g_interface_name(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "g-interface-name") } + #[doc(alias = "g-name")] fn g_name(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "g-name") } + #[doc(alias = "g-name-owner")] fn g_name_owner(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "g-name-owner") } + #[doc(alias = "g-object-path")] fn g_object_path(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "g-object-path") } + #[doc(alias = "g-default-timeout")] fn connect_g_default_timeout_notify( &self, f: F, @@ -852,6 +717,7 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g-interface-info")] fn connect_g_interface_info_notify( &self, f: F, @@ -880,6 +746,7 @@ impl> DBusProxyExt for O { } } + #[doc(alias = "g-name-owner")] fn connect_g_name_owner_notify( &self, f: F, @@ -909,6 +776,8 @@ impl> DBusProxyExt for O { } } +impl> DBusProxyExt for O {} + impl fmt::Display for DBusProxy { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DBusProxy") diff --git a/gio/src/auto/debug_controller.rs b/gio/src/auto/debug_controller.rs index aae90e8c0773..f9c684d51875 100644 --- a/gio/src/auto/debug_controller.rs +++ b/gio/src/auto/debug_controller.rs @@ -23,21 +23,9 @@ impl DebugController { pub const NONE: Option<&'static DebugController> = None; } -pub trait DebugControllerExt: 'static { +pub trait DebugControllerExt: IsA + 'static { #[doc(alias = "g_debug_controller_get_debug_enabled")] #[doc(alias = "get_debug_enabled")] - fn is_debug_enabled(&self) -> bool; - - #[doc(alias = "g_debug_controller_set_debug_enabled")] - fn set_debug_enabled(&self, debug_enabled: bool); - - #[cfg(any(feature = "v2_72"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] - #[doc(alias = "debug-enabled")] - fn connect_debug_enabled_notify(&self, f: F) -> SignalHandlerId; -} - -impl> DebugControllerExt for O { fn is_debug_enabled(&self) -> bool { unsafe { from_glib(ffi::g_debug_controller_get_debug_enabled( @@ -46,6 +34,7 @@ impl> DebugControllerExt for O { } } + #[doc(alias = "g_debug_controller_set_debug_enabled")] fn set_debug_enabled(&self, debug_enabled: bool) { unsafe { ffi::g_debug_controller_set_debug_enabled( @@ -55,8 +44,9 @@ impl> DebugControllerExt for O { } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] + #[doc(alias = "debug-enabled")] fn connect_debug_enabled_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_debug_enabled_trampoline< P: IsA, @@ -83,6 +73,8 @@ impl> DebugControllerExt for O { } } +impl> DebugControllerExt for O {} + impl fmt::Display for DebugController { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DebugController") diff --git a/gio/src/auto/debug_controller_dbus.rs b/gio/src/auto/debug_controller_dbus.rs index 7d1a8b875dac..36a59ce885cc 100644 --- a/gio/src/auto/debug_controller_dbus.rs +++ b/gio/src/auto/debug_controller_dbus.rs @@ -43,28 +43,17 @@ impl DebugControllerDBus { } } -pub trait DebugControllerDBusExt: 'static { +pub trait DebugControllerDBusExt: IsA + 'static { #[doc(alias = "g_debug_controller_dbus_stop")] - fn stop(&self); - - #[cfg(any(feature = "v2_72"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] - #[doc(alias = "authorize")] - fn connect_authorize bool + 'static>( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> DebugControllerDBusExt for O { fn stop(&self) { unsafe { ffi::g_debug_controller_dbus_stop(self.as_ref().to_glib_none().0); } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] + #[doc(alias = "authorize")] fn connect_authorize bool + 'static>( &self, f: F, @@ -98,6 +87,8 @@ impl> DebugControllerDBusExt for O { } } +impl> DebugControllerDBusExt for O {} + impl fmt::Display for DebugControllerDBus { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DebugControllerDBus") diff --git a/gio/src/auto/desktop_app_info.rs b/gio/src/auto/desktop_app_info.rs index 519ba5921893..1d3419ffc45a 100644 --- a/gio/src/auto/desktop_app_info.rs +++ b/gio/src/auto/desktop_app_info.rs @@ -4,7 +4,7 @@ use crate::{AppInfo, AppLaunchContext}; use glib::{prelude::*, translate::*}; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] use std::mem; use std::{boxed::Box as Box_, fmt, ptr}; @@ -157,7 +157,7 @@ impl DesktopAppInfo { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "g_desktop_app_info_get_string_list")] #[doc(alias = "get_string_list")] diff --git a/gio/src/auto/drive.rs b/gio/src/auto/drive.rs index fbe3e7e61914..338981a19317 100644 --- a/gio/src/auto/drive.rs +++ b/gio/src/auto/drive.rs @@ -26,142 +26,13 @@ impl Drive { pub const NONE: Option<&'static Drive> = None; } -pub trait DriveExt: 'static { +pub trait DriveExt: IsA + 'static { #[doc(alias = "g_drive_can_eject")] - fn can_eject(&self) -> bool; - - #[doc(alias = "g_drive_can_poll_for_media")] - fn can_poll_for_media(&self) -> bool; - - #[doc(alias = "g_drive_can_start")] - fn can_start(&self) -> bool; - - #[doc(alias = "g_drive_can_start_degraded")] - fn can_start_degraded(&self) -> bool; - - #[doc(alias = "g_drive_can_stop")] - fn can_stop(&self) -> bool; - - #[doc(alias = "g_drive_eject_with_operation")] - fn eject_with_operation) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn eject_with_operation_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_drive_enumerate_identifiers")] - fn enumerate_identifiers(&self) -> Vec; - - #[doc(alias = "g_drive_get_icon")] - #[doc(alias = "get_icon")] - fn icon(&self) -> Icon; - - #[doc(alias = "g_drive_get_identifier")] - #[doc(alias = "get_identifier")] - fn identifier(&self, kind: &str) -> Option; - - #[doc(alias = "g_drive_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> glib::GString; - - #[doc(alias = "g_drive_get_sort_key")] - #[doc(alias = "get_sort_key")] - fn sort_key(&self) -> Option; - - #[doc(alias = "g_drive_get_start_stop_type")] - #[doc(alias = "get_start_stop_type")] - fn start_stop_type(&self) -> DriveStartStopType; - - #[doc(alias = "g_drive_get_symbolic_icon")] - #[doc(alias = "get_symbolic_icon")] - fn symbolic_icon(&self) -> Icon; - - #[doc(alias = "g_drive_get_volumes")] - #[doc(alias = "get_volumes")] - fn volumes(&self) -> Vec; - - #[doc(alias = "g_drive_has_media")] - fn has_media(&self) -> bool; - - #[doc(alias = "g_drive_has_volumes")] - fn has_volumes(&self) -> bool; - - #[doc(alias = "g_drive_is_media_check_automatic")] - fn is_media_check_automatic(&self) -> bool; - - #[doc(alias = "g_drive_is_media_removable")] - fn is_media_removable(&self) -> bool; - - #[doc(alias = "g_drive_is_removable")] - fn is_removable(&self) -> bool; - - #[doc(alias = "g_drive_poll_for_media")] - fn poll_for_media) + 'static>( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn poll_for_media_future( - &self, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_drive_start")] - fn start) + 'static>( - &self, - flags: DriveStartFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn start_future( - &self, - flags: DriveStartFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_drive_stop")] - fn stop) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn stop_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "changed")] - fn connect_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "disconnected")] - fn connect_disconnected(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "eject-button")] - fn connect_eject_button(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "stop-button")] - fn connect_stop_button(&self, f: F) -> SignalHandlerId; -} - -impl> DriveExt for O { fn can_eject(&self) -> bool { unsafe { from_glib(ffi::g_drive_can_eject(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_can_poll_for_media")] fn can_poll_for_media(&self) -> bool { unsafe { from_glib(ffi::g_drive_can_poll_for_media( @@ -170,10 +41,12 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_can_start")] fn can_start(&self) -> bool { unsafe { from_glib(ffi::g_drive_can_start(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_can_start_degraded")] fn can_start_degraded(&self) -> bool { unsafe { from_glib(ffi::g_drive_can_start_degraded( @@ -182,10 +55,12 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_can_stop")] fn can_stop(&self) -> bool { unsafe { from_glib(ffi::g_drive_can_stop(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_eject_with_operation")] fn eject_with_operation) + 'static>( &self, flags: MountUnmountFlags, @@ -259,6 +134,7 @@ impl> DriveExt for O { )) } + #[doc(alias = "g_drive_enumerate_identifiers")] fn enumerate_identifiers(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_drive_enumerate_identifiers( @@ -267,10 +143,14 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_get_icon")] + #[doc(alias = "get_icon")] fn icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_drive_get_icon(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_get_identifier")] + #[doc(alias = "get_identifier")] fn identifier(&self, kind: &str) -> Option { unsafe { from_glib_full(ffi::g_drive_get_identifier( @@ -280,14 +160,20 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_drive_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_get_sort_key")] + #[doc(alias = "get_sort_key")] fn sort_key(&self) -> Option { unsafe { from_glib_none(ffi::g_drive_get_sort_key(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_get_start_stop_type")] + #[doc(alias = "get_start_stop_type")] fn start_stop_type(&self) -> DriveStartStopType { unsafe { from_glib(ffi::g_drive_get_start_stop_type( @@ -296,6 +182,8 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_get_symbolic_icon")] + #[doc(alias = "get_symbolic_icon")] fn symbolic_icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_drive_get_symbolic_icon( @@ -304,6 +192,8 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_get_volumes")] + #[doc(alias = "get_volumes")] fn volumes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_drive_get_volumes( @@ -312,14 +202,17 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_has_media")] fn has_media(&self) -> bool { unsafe { from_glib(ffi::g_drive_has_media(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_has_volumes")] fn has_volumes(&self) -> bool { unsafe { from_glib(ffi::g_drive_has_volumes(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_is_media_check_automatic")] fn is_media_check_automatic(&self) -> bool { unsafe { from_glib(ffi::g_drive_is_media_check_automatic( @@ -328,6 +221,7 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_is_media_removable")] fn is_media_removable(&self) -> bool { unsafe { from_glib(ffi::g_drive_is_media_removable( @@ -336,10 +230,12 @@ impl> DriveExt for O { } } + #[doc(alias = "g_drive_is_removable")] fn is_removable(&self) -> bool { unsafe { from_glib(ffi::g_drive_is_removable(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_drive_poll_for_media")] fn poll_for_media) + 'static>( &self, cancellable: Option<&impl IsA>, @@ -400,6 +296,7 @@ impl> DriveExt for O { )) } + #[doc(alias = "g_drive_start")] fn start) + 'static>( &self, flags: DriveStartFlags, @@ -470,6 +367,7 @@ impl> DriveExt for O { )) } + #[doc(alias = "g_drive_stop")] fn stop) + 'static>( &self, flags: MountUnmountFlags, @@ -540,6 +438,7 @@ impl> DriveExt for O { )) } + #[doc(alias = "changed")] fn connect_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn changed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GDrive, @@ -561,6 +460,7 @@ impl> DriveExt for O { } } + #[doc(alias = "disconnected")] fn connect_disconnected(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn disconnected_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GDrive, @@ -582,6 +482,7 @@ impl> DriveExt for O { } } + #[doc(alias = "eject-button")] fn connect_eject_button(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn eject_button_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GDrive, @@ -603,6 +504,7 @@ impl> DriveExt for O { } } + #[doc(alias = "stop-button")] fn connect_stop_button(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn stop_button_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GDrive, @@ -625,6 +527,8 @@ impl> DriveExt for O { } } +impl> DriveExt for O {} + impl fmt::Display for Drive { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Drive") diff --git a/gio/src/auto/emblemed_icon.rs b/gio/src/auto/emblemed_icon.rs index afc8fea7821d..bdbfa6fbb266 100644 --- a/gio/src/auto/emblemed_icon.rs +++ b/gio/src/auto/emblemed_icon.rs @@ -29,25 +29,8 @@ impl EmblemedIcon { } } -pub trait EmblemedIconExt: 'static { +pub trait EmblemedIconExt: IsA + 'static { #[doc(alias = "g_emblemed_icon_add_emblem")] - fn add_emblem(&self, emblem: &Emblem); - - #[doc(alias = "g_emblemed_icon_clear_emblems")] - fn clear_emblems(&self); - - #[doc(alias = "g_emblemed_icon_get_emblems")] - #[doc(alias = "get_emblems")] - fn emblems(&self) -> Vec; - - #[doc(alias = "g_emblemed_icon_get_icon")] - #[doc(alias = "get_icon")] - fn icon(&self) -> Icon; - - fn gicon(&self) -> Option; -} - -impl> EmblemedIconExt for O { fn add_emblem(&self, emblem: &Emblem) { unsafe { ffi::g_emblemed_icon_add_emblem( @@ -57,12 +40,15 @@ impl> EmblemedIconExt for O { } } + #[doc(alias = "g_emblemed_icon_clear_emblems")] fn clear_emblems(&self) { unsafe { ffi::g_emblemed_icon_clear_emblems(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_emblemed_icon_get_emblems")] + #[doc(alias = "get_emblems")] fn emblems(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_emblemed_icon_get_emblems( @@ -71,6 +57,8 @@ impl> EmblemedIconExt for O { } } + #[doc(alias = "g_emblemed_icon_get_icon")] + #[doc(alias = "get_icon")] fn icon(&self) -> Icon { unsafe { from_glib_none(ffi::g_emblemed_icon_get_icon( @@ -84,6 +72,8 @@ impl> EmblemedIconExt for O { } } +impl> EmblemedIconExt for O {} + impl fmt::Display for EmblemedIcon { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("EmblemedIcon") diff --git a/gio/src/auto/enums.rs b/gio/src/auto/enums.rs index fe5b05c47b25..70e597fe3da2 100644 --- a/gio/src/auto/enums.rs +++ b/gio/src/auto/enums.rs @@ -255,7 +255,7 @@ pub enum CredentialsType { NetbsdUnpcbid, #[doc(alias = "G_CREDENTIALS_TYPE_APPLE_XUCRED")] AppleXucred, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_CREDENTIALS_TYPE_WIN32_PID")] Win32Pid, @@ -276,7 +276,7 @@ impl fmt::Display for CredentialsType { Self::SolarisUcred => "SolarisUcred", Self::NetbsdUnpcbid => "NetbsdUnpcbid", Self::AppleXucred => "AppleXucred", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Win32Pid => "Win32Pid", _ => "Unknown", } @@ -298,7 +298,7 @@ impl IntoGlib for CredentialsType { Self::SolarisUcred => ffi::G_CREDENTIALS_TYPE_SOLARIS_UCRED, Self::NetbsdUnpcbid => ffi::G_CREDENTIALS_TYPE_NETBSD_UNPCBID, Self::AppleXucred => ffi::G_CREDENTIALS_TYPE_APPLE_XUCRED, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Win32Pid => ffi::G_CREDENTIALS_TYPE_WIN32_PID, Self::__Unknown(value) => value, } @@ -317,7 +317,7 @@ impl FromGlib for CredentialsType { ffi::G_CREDENTIALS_TYPE_SOLARIS_UCRED => Self::SolarisUcred, ffi::G_CREDENTIALS_TYPE_NETBSD_UNPCBID => Self::NetbsdUnpcbid, ffi::G_CREDENTIALS_TYPE_APPLE_XUCRED => Self::AppleXucred, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_CREDENTIALS_TYPE_WIN32_PID => Self::Win32Pid, value => Self::__Unknown(value), } @@ -1840,7 +1840,7 @@ pub enum IOErrorEnum { NotConnected, #[doc(alias = "G_IO_ERROR_MESSAGE_TOO_LARGE")] MessageTooLarge, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_IO_ERROR_NO_SUCH_DEVICE")] NoSuchDevice, @@ -1901,7 +1901,7 @@ impl fmt::Display for IOErrorEnum { Self::BrokenPipe => "BrokenPipe", Self::NotConnected => "NotConnected", Self::MessageTooLarge => "MessageTooLarge", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::NoSuchDevice => "NoSuchDevice", _ => "Unknown", } @@ -1962,7 +1962,7 @@ impl IntoGlib for IOErrorEnum { Self::BrokenPipe => ffi::G_IO_ERROR_BROKEN_PIPE, Self::NotConnected => ffi::G_IO_ERROR_NOT_CONNECTED, Self::MessageTooLarge => ffi::G_IO_ERROR_MESSAGE_TOO_LARGE, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::NoSuchDevice => ffi::G_IO_ERROR_NO_SUCH_DEVICE, Self::__Unknown(value) => value, } @@ -2020,7 +2020,7 @@ impl FromGlib for IOErrorEnum { ffi::G_IO_ERROR_BROKEN_PIPE => Self::BrokenPipe, ffi::G_IO_ERROR_NOT_CONNECTED => Self::NotConnected, ffi::G_IO_ERROR_MESSAGE_TOO_LARGE => Self::MessageTooLarge, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_IO_ERROR_NO_SUCH_DEVICE => Self::NoSuchDevice, value => Self::__Unknown(value), } @@ -2101,7 +2101,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -2117,7 +2117,7 @@ pub enum MemoryMonitorWarningLevel { __Unknown(i32), } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl fmt::Display for MemoryMonitorWarningLevel { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2134,7 +2134,7 @@ impl fmt::Display for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(hidden)] impl IntoGlib for MemoryMonitorWarningLevel { @@ -2151,7 +2151,7 @@ impl IntoGlib for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(hidden)] impl FromGlib for MemoryMonitorWarningLevel { @@ -2166,7 +2166,7 @@ impl FromGlib for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl StaticType for MemoryMonitorWarningLevel { #[inline] @@ -2175,7 +2175,7 @@ impl StaticType for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl glib::HasParamSpec for MemoryMonitorWarningLevel { type ParamSpec = glib::ParamSpecEnum; @@ -2187,13 +2187,13 @@ impl glib::HasParamSpec for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl glib::value::ValueType for MemoryMonitorWarningLevel { type Type = Self; } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] unsafe impl<'a> FromValue<'a> for MemoryMonitorWarningLevel { type Checker = glib::value::GenericValueTypeChecker; @@ -2204,7 +2204,7 @@ unsafe impl<'a> FromValue<'a> for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl ToValue for MemoryMonitorWarningLevel { #[inline] @@ -2222,7 +2222,7 @@ impl ToValue for MemoryMonitorWarningLevel { } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] impl From for glib::Value { #[inline] @@ -2681,7 +2681,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -2697,7 +2697,7 @@ pub enum PollableReturn { __Unknown(i32), } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl fmt::Display for PollableReturn { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2714,7 +2714,7 @@ impl fmt::Display for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(hidden)] impl IntoGlib for PollableReturn { @@ -2731,7 +2731,7 @@ impl IntoGlib for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(hidden)] impl FromGlib for PollableReturn { @@ -2746,7 +2746,7 @@ impl FromGlib for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl StaticType for PollableReturn { #[inline] @@ -2755,7 +2755,7 @@ impl StaticType for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl glib::HasParamSpec for PollableReturn { type ParamSpec = glib::ParamSpecEnum; @@ -2767,13 +2767,13 @@ impl glib::HasParamSpec for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl glib::value::ValueType for PollableReturn { type Type = Self; } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] unsafe impl<'a> FromValue<'a> for PollableReturn { type Checker = glib::value::GenericValueTypeChecker; @@ -2784,7 +2784,7 @@ unsafe impl<'a> FromValue<'a> for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl ToValue for PollableReturn { #[inline] @@ -2802,7 +2802,7 @@ impl ToValue for PollableReturn { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl From for glib::Value { #[inline] @@ -4001,7 +4001,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -4011,7 +4011,7 @@ pub enum TlsChannelBindingType { Unique, #[doc(alias = "G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT")] ServerEndPoint, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_TLS_CHANNEL_BINDING_TLS_EXPORTER")] Exporter, @@ -4019,7 +4019,7 @@ pub enum TlsChannelBindingType { __Unknown(i32), } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl fmt::Display for TlsChannelBindingType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -4029,7 +4029,7 @@ impl fmt::Display for TlsChannelBindingType { match *self { Self::Unique => "Unique", Self::ServerEndPoint => "ServerEndPoint", - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] Self::Exporter => "Exporter", _ => "Unknown", } @@ -4037,7 +4037,7 @@ impl fmt::Display for TlsChannelBindingType { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl IntoGlib for TlsChannelBindingType { @@ -4048,14 +4048,14 @@ impl IntoGlib for TlsChannelBindingType { match self { Self::Unique => ffi::G_TLS_CHANNEL_BINDING_TLS_UNIQUE, Self::ServerEndPoint => ffi::G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] Self::Exporter => ffi::G_TLS_CHANNEL_BINDING_TLS_EXPORTER, Self::__Unknown(value) => value, } } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl FromGlib for TlsChannelBindingType { @@ -4064,14 +4064,14 @@ impl FromGlib for TlsChannelBindingType { match value { ffi::G_TLS_CHANNEL_BINDING_TLS_UNIQUE => Self::Unique, ffi::G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT => Self::ServerEndPoint, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] ffi::G_TLS_CHANNEL_BINDING_TLS_EXPORTER => Self::Exporter, value => Self::__Unknown(value), } } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl StaticType for TlsChannelBindingType { #[inline] @@ -4080,7 +4080,7 @@ impl StaticType for TlsChannelBindingType { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl glib::HasParamSpec for TlsChannelBindingType { type ParamSpec = glib::ParamSpecEnum; @@ -4092,13 +4092,13 @@ impl glib::HasParamSpec for TlsChannelBindingType { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl glib::value::ValueType for TlsChannelBindingType { type Type = Self; } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] unsafe impl<'a> FromValue<'a> for TlsChannelBindingType { type Checker = glib::value::GenericValueTypeChecker; @@ -4109,7 +4109,7 @@ unsafe impl<'a> FromValue<'a> for TlsChannelBindingType { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl ToValue for TlsChannelBindingType { #[inline] @@ -4127,7 +4127,7 @@ impl ToValue for TlsChannelBindingType { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl From for glib::Value { #[inline] @@ -4261,7 +4261,7 @@ pub enum TlsError { Eof, #[doc(alias = "G_TLS_ERROR_INAPPROPRIATE_FALLBACK")] InappropriateFallback, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD")] BadCertificatePassword, @@ -4283,7 +4283,7 @@ impl fmt::Display for TlsError { Self::CertificateRequired => "CertificateRequired", Self::Eof => "Eof", Self::InappropriateFallback => "InappropriateFallback", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::BadCertificatePassword => "BadCertificatePassword", _ => "Unknown", } @@ -4306,7 +4306,7 @@ impl IntoGlib for TlsError { Self::CertificateRequired => ffi::G_TLS_ERROR_CERTIFICATE_REQUIRED, Self::Eof => ffi::G_TLS_ERROR_EOF, Self::InappropriateFallback => ffi::G_TLS_ERROR_INAPPROPRIATE_FALLBACK, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::BadCertificatePassword => ffi::G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD, Self::__Unknown(value) => value, } @@ -4326,7 +4326,7 @@ impl FromGlib for TlsError { ffi::G_TLS_ERROR_CERTIFICATE_REQUIRED => Self::CertificateRequired, ffi::G_TLS_ERROR_EOF => Self::Eof, ffi::G_TLS_ERROR_INAPPROPRIATE_FALLBACK => Self::InappropriateFallback, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_TLS_ERROR_BAD_CERTIFICATE_PASSWORD => Self::BadCertificatePassword, value => Self::__Unknown(value), } @@ -4516,7 +4516,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -4542,7 +4542,7 @@ pub enum TlsProtocolVersion { __Unknown(i32), } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl fmt::Display for TlsProtocolVersion { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -4564,7 +4564,7 @@ impl fmt::Display for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(hidden)] impl IntoGlib for TlsProtocolVersion { @@ -4586,7 +4586,7 @@ impl IntoGlib for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(hidden)] impl FromGlib for TlsProtocolVersion { @@ -4606,7 +4606,7 @@ impl FromGlib for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl StaticType for TlsProtocolVersion { #[inline] @@ -4615,7 +4615,7 @@ impl StaticType for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl glib::HasParamSpec for TlsProtocolVersion { type ParamSpec = glib::ParamSpecEnum; @@ -4627,13 +4627,13 @@ impl glib::HasParamSpec for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl glib::value::ValueType for TlsProtocolVersion { type Type = Self; } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] unsafe impl<'a> FromValue<'a> for TlsProtocolVersion { type Checker = glib::value::GenericValueTypeChecker; @@ -4644,7 +4644,7 @@ unsafe impl<'a> FromValue<'a> for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl ToValue for TlsProtocolVersion { #[inline] @@ -4662,7 +4662,7 @@ impl ToValue for TlsProtocolVersion { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] impl From for glib::Value { #[inline] @@ -4791,7 +4791,7 @@ impl From for glib::Value { } } -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -4811,7 +4811,7 @@ pub enum UnixSocketAddressType { __Unknown(i32), } -#[cfg(any(unix))] +#[cfg(unix)] impl fmt::Display for UnixSocketAddressType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( @@ -4829,7 +4829,7 @@ impl fmt::Display for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] #[doc(hidden)] impl IntoGlib for UnixSocketAddressType { type GlibType = ffi::GUnixSocketAddressType; @@ -4847,7 +4847,7 @@ impl IntoGlib for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] #[doc(hidden)] impl FromGlib for UnixSocketAddressType { #[inline] @@ -4863,7 +4863,7 @@ impl FromGlib for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] impl StaticType for UnixSocketAddressType { #[inline] fn static_type() -> Type { @@ -4871,7 +4871,7 @@ impl StaticType for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] impl glib::HasParamSpec for UnixSocketAddressType { type ParamSpec = glib::ParamSpecEnum; type SetValue = Self; @@ -4882,12 +4882,12 @@ impl glib::HasParamSpec for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] impl glib::value::ValueType for UnixSocketAddressType { type Type = Self; } -#[cfg(any(unix))] +#[cfg(unix)] unsafe impl<'a> FromValue<'a> for UnixSocketAddressType { type Checker = glib::value::GenericValueTypeChecker; @@ -4897,7 +4897,7 @@ unsafe impl<'a> FromValue<'a> for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] impl ToValue for UnixSocketAddressType { #[inline] fn to_value(&self) -> glib::Value { @@ -4914,7 +4914,7 @@ impl ToValue for UnixSocketAddressType { } } -#[cfg(any(unix))] +#[cfg(unix)] impl From for glib::Value { #[inline] fn from(v: UnixSocketAddressType) -> Self { diff --git a/gio/src/auto/file.rs b/gio/src/auto/file.rs index 67687b8939c9..f370bbe543d4 100644 --- a/gio/src/auto/file.rs +++ b/gio/src/auto/file.rs @@ -94,730 +94,8 @@ impl File { unsafe impl Send for File {} unsafe impl Sync for File {} -pub trait FileExt: 'static { +pub trait FileExt: IsA + 'static { #[doc(alias = "g_file_append_to")] - fn append_to( - &self, - flags: FileCreateFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_append_to_async")] - fn append_to_async) + 'static>( - &self, - flags: FileCreateFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn append_to_future( - &self, - flags: FileCreateFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[cfg(any(feature = "v2_68"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] - #[doc(alias = "g_file_build_attribute_list_for_copy")] - fn build_attribute_list_for_copy( - &self, - flags: FileCopyFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_copy")] - fn copy( - &self, - destination: &impl IsA, - flags: FileCopyFlags, - cancellable: Option<&impl IsA>, - progress_callback: Option<&mut dyn (FnMut(i64, i64))>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_copy_attributes")] - fn copy_attributes( - &self, - destination: &impl IsA, - flags: FileCopyFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_create")] - fn create( - &self, - flags: FileCreateFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_create_async")] - fn create_async) + 'static>( - &self, - flags: FileCreateFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn create_future( - &self, - flags: FileCreateFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_create_readwrite")] - fn create_readwrite( - &self, - flags: FileCreateFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_create_readwrite_async")] - fn create_readwrite_async) + 'static>( - &self, - flags: FileCreateFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn create_readwrite_future( - &self, - flags: FileCreateFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_delete")] - fn delete(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_delete_async")] - fn delete_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn delete_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_dup")] - #[must_use] - fn dup(&self) -> File; - - #[doc(alias = "g_file_eject_mountable_with_operation")] - fn eject_mountable_with_operation) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn eject_mountable_with_operation_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_enumerate_children")] - fn enumerate_children( - &self, - attributes: &str, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_equal")] - fn equal(&self, file2: &impl IsA) -> bool; - - #[doc(alias = "g_file_find_enclosing_mount")] - fn find_enclosing_mount( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_get_basename")] - #[doc(alias = "get_basename")] - fn basename(&self) -> Option; - - #[doc(alias = "g_file_get_child")] - #[doc(alias = "get_child")] - #[must_use] - fn child(&self, name: impl AsRef) -> File; - - #[doc(alias = "g_file_get_child_for_display_name")] - #[doc(alias = "get_child_for_display_name")] - fn child_for_display_name(&self, display_name: &str) -> Result; - - #[doc(alias = "g_file_get_parent")] - #[doc(alias = "get_parent")] - #[must_use] - fn parent(&self) -> Option; - - #[doc(alias = "g_file_get_parse_name")] - #[doc(alias = "get_parse_name")] - fn parse_name(&self) -> glib::GString; - - #[doc(alias = "g_file_get_path")] - #[doc(alias = "get_path")] - fn path(&self) -> Option; - - #[doc(alias = "g_file_get_relative_path")] - #[doc(alias = "get_relative_path")] - fn relative_path(&self, descendant: &impl IsA) -> Option; - - #[doc(alias = "g_file_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> glib::GString; - - #[doc(alias = "g_file_get_uri_scheme")] - #[doc(alias = "get_uri_scheme")] - fn uri_scheme(&self) -> Option; - - #[doc(alias = "g_file_has_parent")] - fn has_parent(&self, parent: Option<&impl IsA>) -> bool; - - #[doc(alias = "g_file_has_prefix")] - fn has_prefix(&self, prefix: &impl IsA) -> bool; - - #[doc(alias = "g_file_has_uri_scheme")] - fn has_uri_scheme(&self, uri_scheme: &str) -> bool; - - #[doc(alias = "g_file_is_native")] - fn is_native(&self) -> bool; - - #[doc(alias = "g_file_load_bytes")] - fn load_bytes( - &self, - cancellable: Option<&impl IsA>, - ) -> Result<(glib::Bytes, Option), glib::Error>; - - #[doc(alias = "g_file_load_bytes_async")] - fn load_bytes_async< - P: FnOnce(Result<(glib::Bytes, Option), glib::Error>) + 'static, - >( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn load_bytes_future( - &self, - ) -> Pin< - Box_< - dyn std::future::Future< - Output = Result<(glib::Bytes, Option), glib::Error>, - > + 'static, - >, - >; - - #[doc(alias = "g_file_load_contents")] - fn load_contents( - &self, - cancellable: Option<&impl IsA>, - ) -> Result<(Vec, Option), glib::Error>; - - #[doc(alias = "g_file_load_contents_async")] - fn load_contents_async< - P: FnOnce(Result<(Vec, Option), glib::Error>) + 'static, - >( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn load_contents_future( - &self, - ) -> Pin< - Box_< - dyn std::future::Future, Option), glib::Error>> - + 'static, - >, - >; - - #[doc(alias = "g_file_make_directory")] - fn make_directory( - &self, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_make_directory_async")] - fn make_directory_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn make_directory_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_make_directory_with_parents")] - fn make_directory_with_parents( - &self, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_make_symbolic_link")] - fn make_symbolic_link( - &self, - symlink_value: impl AsRef, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_monitor")] - fn monitor( - &self, - flags: FileMonitorFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_monitor_directory")] - fn monitor_directory( - &self, - flags: FileMonitorFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_monitor_file")] - fn monitor_file( - &self, - flags: FileMonitorFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_mount_enclosing_volume")] - fn mount_enclosing_volume) + 'static>( - &self, - flags: MountMountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn mount_enclosing_volume_future( - &self, - flags: MountMountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_mount_mountable")] - fn mount_mountable) + 'static>( - &self, - flags: MountMountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn mount_mountable_future( - &self, - flags: MountMountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_move")] - #[doc(alias = "move")] - fn move_( - &self, - destination: &impl IsA, - flags: FileCopyFlags, - cancellable: Option<&impl IsA>, - progress_callback: Option<&mut dyn (FnMut(i64, i64))>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_open_readwrite")] - fn open_readwrite( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_open_readwrite_async")] - fn open_readwrite_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn open_readwrite_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_peek_path")] - fn peek_path(&self) -> Option; - - #[doc(alias = "g_file_poll_mountable")] - fn poll_mountable) + 'static>( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn poll_mountable_future( - &self, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_query_default_handler")] - fn query_default_handler( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "g_file_query_default_handler_async")] - fn query_default_handler_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - fn query_default_handler_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_query_exists")] - fn query_exists(&self, cancellable: Option<&impl IsA>) -> bool; - - #[doc(alias = "g_file_query_file_type")] - fn query_file_type( - &self, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> FileType; - - #[doc(alias = "g_file_query_filesystem_info")] - fn query_filesystem_info( - &self, - attributes: &str, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_query_filesystem_info_async")] - fn query_filesystem_info_async) + 'static>( - &self, - attributes: &str, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn query_filesystem_info_future( - &self, - attributes: &str, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_query_info")] - fn query_info( - &self, - attributes: &str, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_query_info_async")] - fn query_info_async) + 'static>( - &self, - attributes: &str, - flags: FileQueryInfoFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn query_info_future( - &self, - attributes: &str, - flags: FileQueryInfoFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_query_settable_attributes")] - fn query_settable_attributes( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_query_writable_namespaces")] - fn query_writable_namespaces( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_read")] - fn read( - &self, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_read_async")] - fn read_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn read_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_replace")] - fn replace( - &self, - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_replace_async")] - fn replace_async) + 'static>( - &self, - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn replace_future( - &self, - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_replace_contents")] - fn replace_contents( - &self, - contents: &[u8], - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - //#[doc(alias = "g_file_replace_contents_bytes_async")] - //fn replace_contents_bytes_async) + 'static>(&self, contents: &glib::Bytes, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&impl IsA>, callback: P); - - #[doc(alias = "g_file_replace_readwrite")] - fn replace_readwrite( - &self, - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_replace_readwrite_async")] - fn replace_readwrite_async) + 'static>( - &self, - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn replace_readwrite_future( - &self, - etag: Option<&str>, - make_backup: bool, - flags: FileCreateFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_resolve_relative_path")] - #[must_use] - fn resolve_relative_path(&self, relative_path: impl AsRef) -> File; - - //#[doc(alias = "g_file_set_attribute")] - //fn set_attribute(&self, attribute: &str, type_: FileAttributeType, value_p: /*Unimplemented*/Option, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attribute_byte_string")] - fn set_attribute_byte_string( - &self, - attribute: &str, - value: &str, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attribute_int32")] - fn set_attribute_int32( - &self, - attribute: &str, - value: i32, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attribute_int64")] - fn set_attribute_int64( - &self, - attribute: &str, - value: i64, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attribute_string")] - fn set_attribute_string( - &self, - attribute: &str, - value: &str, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attribute_uint32")] - fn set_attribute_uint32( - &self, - attribute: &str, - value: u32, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attribute_uint64")] - fn set_attribute_uint64( - &self, - attribute: &str, - value: u64, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_attributes_async")] - fn set_attributes_async) + 'static>( - &self, - info: &FileInfo, - flags: FileQueryInfoFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn set_attributes_future( - &self, - info: &FileInfo, - flags: FileQueryInfoFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_set_attributes_from_info")] - fn set_attributes_from_info( - &self, - info: &FileInfo, - flags: FileQueryInfoFlags, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_set_display_name")] - fn set_display_name( - &self, - display_name: &str, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_set_display_name_async")] - fn set_display_name_async) + 'static>( - &self, - display_name: &str, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn set_display_name_future( - &self, - display_name: &str, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_start_mountable")] - fn start_mountable) + 'static>( - &self, - flags: DriveStartFlags, - start_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn start_mountable_future( - &self, - flags: DriveStartFlags, - start_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_stop_mountable")] - fn stop_mountable) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn stop_mountable_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_supports_thread_contexts")] - fn supports_thread_contexts(&self) -> bool; - - #[doc(alias = "g_file_trash")] - fn trash(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_trash_async")] - fn trash_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn trash_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_unmount_mountable_with_operation")] - fn unmount_mountable_with_operation) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn unmount_mountable_with_operation_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; -} - -impl> FileExt for O { fn append_to( &self, flags: FileCreateFlags, @@ -839,6 +117,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_append_to_async")] fn append_to_async) + 'static>( &self, flags: FileCreateFlags, @@ -906,8 +185,9 @@ impl> FileExt for O { )) } - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] + #[doc(alias = "g_file_build_attribute_list_for_copy")] fn build_attribute_list_for_copy( &self, flags: FileCopyFlags, @@ -929,6 +209,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_copy")] fn copy( &self, destination: &impl IsA, @@ -976,6 +257,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_copy_attributes")] fn copy_attributes( &self, destination: &impl IsA, @@ -1000,6 +282,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_create")] fn create( &self, flags: FileCreateFlags, @@ -1021,6 +304,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_create_async")] fn create_async) + 'static>( &self, flags: FileCreateFlags, @@ -1088,6 +372,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_create_readwrite")] fn create_readwrite( &self, flags: FileCreateFlags, @@ -1109,6 +394,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_create_readwrite_async")] fn create_readwrite_async) + 'static>( &self, flags: FileCreateFlags, @@ -1177,6 +463,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_delete")] fn delete(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -1194,6 +481,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_delete_async")] fn delete_async) + 'static>( &self, io_priority: glib::Priority, @@ -1257,10 +545,13 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_dup")] + #[must_use] fn dup(&self) -> File { unsafe { from_glib_full(ffi::g_file_dup(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_eject_mountable_with_operation")] fn eject_mountable_with_operation) + 'static>( &self, flags: MountUnmountFlags, @@ -1337,6 +628,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_enumerate_children")] fn enumerate_children( &self, attributes: &str, @@ -1360,6 +652,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_equal")] fn equal(&self, file2: &impl IsA) -> bool { unsafe { from_glib(ffi::g_file_equal( @@ -1369,6 +662,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_find_enclosing_mount")] fn find_enclosing_mount( &self, cancellable: Option<&impl IsA>, @@ -1388,10 +682,15 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_get_basename")] + #[doc(alias = "get_basename")] fn basename(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_basename(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_get_child")] + #[doc(alias = "get_child")] + #[must_use] fn child(&self, name: impl AsRef) -> File { unsafe { from_glib_full(ffi::g_file_get_child( @@ -1401,6 +700,8 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_get_child_for_display_name")] + #[doc(alias = "get_child_for_display_name")] fn child_for_display_name(&self, display_name: &str) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -1417,18 +718,27 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_get_parent")] + #[doc(alias = "get_parent")] + #[must_use] fn parent(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_parent(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_get_parse_name")] + #[doc(alias = "get_parse_name")] fn parse_name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_file_get_parse_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_get_path")] + #[doc(alias = "get_path")] fn path(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_path(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_get_relative_path")] + #[doc(alias = "get_relative_path")] fn relative_path(&self, descendant: &impl IsA) -> Option { unsafe { from_glib_full(ffi::g_file_get_relative_path( @@ -1438,14 +748,19 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_file_get_uri(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_get_uri_scheme")] + #[doc(alias = "get_uri_scheme")] fn uri_scheme(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_uri_scheme(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_has_parent")] fn has_parent(&self, parent: Option<&impl IsA>) -> bool { unsafe { from_glib(ffi::g_file_has_parent( @@ -1455,6 +770,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_has_prefix")] fn has_prefix(&self, prefix: &impl IsA) -> bool { unsafe { from_glib(ffi::g_file_has_prefix( @@ -1464,6 +780,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_has_uri_scheme")] fn has_uri_scheme(&self, uri_scheme: &str) -> bool { unsafe { from_glib(ffi::g_file_has_uri_scheme( @@ -1473,10 +790,12 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_is_native")] fn is_native(&self) -> bool { unsafe { from_glib(ffi::g_file_is_native(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_load_bytes")] fn load_bytes( &self, cancellable: Option<&impl IsA>, @@ -1498,6 +817,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_load_bytes_async")] fn load_bytes_async< P: FnOnce(Result<(glib::Bytes, Option), glib::Error>) + 'static, >( @@ -1572,6 +892,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_load_contents")] fn load_contents( &self, cancellable: Option<&impl IsA>, @@ -1601,6 +922,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_load_contents_async")] fn load_contents_async< P: FnOnce(Result<(Vec, Option), glib::Error>) + 'static, >( @@ -1681,6 +1003,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_make_directory")] fn make_directory( &self, cancellable: Option<&impl IsA>, @@ -1701,6 +1024,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_make_directory_async")] fn make_directory_async) + 'static>( &self, io_priority: glib::Priority, @@ -1764,6 +1088,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_make_directory_with_parents")] fn make_directory_with_parents( &self, cancellable: Option<&impl IsA>, @@ -1784,6 +1109,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_make_symbolic_link")] fn make_symbolic_link( &self, symlink_value: impl AsRef, @@ -1806,6 +1132,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_monitor")] fn monitor( &self, flags: FileMonitorFlags, @@ -1827,6 +1154,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_monitor_directory")] fn monitor_directory( &self, flags: FileMonitorFlags, @@ -1848,6 +1176,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_monitor_file")] fn monitor_file( &self, flags: FileMonitorFlags, @@ -1869,6 +1198,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_mount_enclosing_volume")] fn mount_enclosing_volume) + 'static>( &self, flags: MountMountFlags, @@ -1945,6 +1275,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_mount_mountable")] fn mount_mountable) + 'static>( &self, flags: MountMountFlags, @@ -2017,6 +1348,8 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_move")] + #[doc(alias = "move")] fn move_( &self, destination: &impl IsA, @@ -2064,6 +1397,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_open_readwrite")] fn open_readwrite( &self, cancellable: Option<&impl IsA>, @@ -2083,6 +1417,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_open_readwrite_async")] fn open_readwrite_async) + 'static>( &self, io_priority: glib::Priority, @@ -2147,10 +1482,12 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_peek_path")] fn peek_path(&self) -> Option { unsafe { from_glib_none(ffi::g_file_peek_path(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_poll_mountable")] fn poll_mountable) + 'static>( &self, cancellable: Option<&impl IsA>, @@ -2211,6 +1548,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_query_default_handler")] fn query_default_handler( &self, cancellable: Option<&impl IsA>, @@ -2230,8 +1568,9 @@ impl> FileExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "g_file_query_default_handler_async")] fn query_default_handler_async) + 'static>( &self, io_priority: glib::Priority, @@ -2282,7 +1621,7 @@ impl> FileExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] fn query_default_handler_future( &self, @@ -2298,6 +1637,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_query_exists")] fn query_exists(&self, cancellable: Option<&impl IsA>) -> bool { unsafe { from_glib(ffi::g_file_query_exists( @@ -2307,6 +1647,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_query_file_type")] fn query_file_type( &self, flags: FileQueryInfoFlags, @@ -2321,6 +1662,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_query_filesystem_info")] fn query_filesystem_info( &self, attributes: &str, @@ -2342,6 +1684,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_query_filesystem_info_async")] fn query_filesystem_info_async) + 'static>( &self, attributes: &str, @@ -2415,6 +1758,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_query_info")] fn query_info( &self, attributes: &str, @@ -2438,6 +1782,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_query_info_async")] fn query_info_async) + 'static>( &self, attributes: &str, @@ -2514,6 +1859,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_query_settable_attributes")] fn query_settable_attributes( &self, cancellable: Option<&impl IsA>, @@ -2533,6 +1879,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_query_writable_namespaces")] fn query_writable_namespaces( &self, cancellable: Option<&impl IsA>, @@ -2552,6 +1899,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_read")] fn read( &self, cancellable: Option<&impl IsA>, @@ -2571,6 +1919,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_read_async")] fn read_async) + 'static>( &self, io_priority: glib::Priority, @@ -2635,6 +1984,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_replace")] fn replace( &self, etag: Option<&str>, @@ -2660,6 +2010,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_replace_async")] fn replace_async) + 'static>( &self, etag: Option<&str>, @@ -2741,6 +2092,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_replace_contents")] fn replace_contents( &self, contents: &[u8], @@ -2773,10 +2125,12 @@ impl> FileExt for O { } } + //#[doc(alias = "g_file_replace_contents_bytes_async")] //fn replace_contents_bytes_async) + 'static>(&self, contents: &glib::Bytes, etag: Option<&str>, make_backup: bool, flags: FileCreateFlags, cancellable: Option<&impl IsA>, callback: P) { // unsafe { TODO: call ffi:g_file_replace_contents_bytes_async() } //} + #[doc(alias = "g_file_replace_readwrite")] fn replace_readwrite( &self, etag: Option<&str>, @@ -2802,6 +2156,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_replace_readwrite_async")] fn replace_readwrite_async) + 'static>( &self, etag: Option<&str>, @@ -2884,6 +2239,8 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_resolve_relative_path")] + #[must_use] fn resolve_relative_path(&self, relative_path: impl AsRef) -> File { unsafe { from_glib_full(ffi::g_file_resolve_relative_path( @@ -2893,10 +2250,12 @@ impl> FileExt for O { } } + //#[doc(alias = "g_file_set_attribute")] //fn set_attribute(&self, attribute: &str, type_: FileAttributeType, value_p: /*Unimplemented*/Option, flags: FileQueryInfoFlags, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { // unsafe { TODO: call ffi:g_file_set_attribute() } //} + #[doc(alias = "g_file_set_attribute_byte_string")] fn set_attribute_byte_string( &self, attribute: &str, @@ -2923,6 +2282,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_attribute_int32")] fn set_attribute_int32( &self, attribute: &str, @@ -2949,6 +2309,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_attribute_int64")] fn set_attribute_int64( &self, attribute: &str, @@ -2975,6 +2336,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_attribute_string")] fn set_attribute_string( &self, attribute: &str, @@ -3001,6 +2363,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_attribute_uint32")] fn set_attribute_uint32( &self, attribute: &str, @@ -3027,6 +2390,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_attribute_uint64")] fn set_attribute_uint64( &self, attribute: &str, @@ -3053,6 +2417,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_attributes_async")] fn set_attributes_async) + 'static>( &self, info: &FileInfo, @@ -3135,6 +2500,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_set_attributes_from_info")] fn set_attributes_from_info( &self, info: &FileInfo, @@ -3159,6 +2525,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_display_name")] fn set_display_name( &self, display_name: &str, @@ -3180,6 +2547,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_set_display_name_async")] fn set_display_name_async) + 'static>( &self, display_name: &str, @@ -3253,6 +2621,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_start_mountable")] fn start_mountable) + 'static>( &self, flags: DriveStartFlags, @@ -3325,6 +2694,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_stop_mountable")] fn stop_mountable) + 'static>( &self, flags: MountUnmountFlags, @@ -3397,6 +2767,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_supports_thread_contexts")] fn supports_thread_contexts(&self) -> bool { unsafe { from_glib(ffi::g_file_supports_thread_contexts( @@ -3405,6 +2776,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_trash")] fn trash(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -3422,6 +2794,7 @@ impl> FileExt for O { } } + #[doc(alias = "g_file_trash_async")] fn trash_async) + 'static>( &self, io_priority: glib::Priority, @@ -3485,6 +2858,7 @@ impl> FileExt for O { )) } + #[doc(alias = "g_file_unmount_mountable_with_operation")] fn unmount_mountable_with_operation) + 'static>( &self, flags: MountUnmountFlags, @@ -3562,6 +2936,8 @@ impl> FileExt for O { } } +impl> FileExt for O {} + impl fmt::Display for File { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("File") diff --git a/gio/src/auto/file_enumerator.rs b/gio/src/auto/file_enumerator.rs index 8b1a6f4c54e5..d9007bae0e59 100644 --- a/gio/src/auto/file_enumerator.rs +++ b/gio/src/auto/file_enumerator.rs @@ -19,63 +19,8 @@ impl FileEnumerator { pub const NONE: Option<&'static FileEnumerator> = None; } -pub trait FileEnumeratorExt: 'static { +pub trait FileEnumeratorExt: IsA + 'static { #[doc(alias = "g_file_enumerator_close")] - fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_file_enumerator_close_async")] - fn close_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn close_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_file_enumerator_get_child")] - #[doc(alias = "get_child")] - fn child(&self, info: &FileInfo) -> File; - - #[doc(alias = "g_file_enumerator_get_container")] - #[doc(alias = "get_container")] - fn container(&self) -> File; - - #[doc(alias = "g_file_enumerator_has_pending")] - fn has_pending(&self) -> bool; - - #[doc(alias = "g_file_enumerator_is_closed")] - fn is_closed(&self) -> bool; - - #[doc(alias = "g_file_enumerator_next_file")] - fn next_file( - &self, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_file_enumerator_next_files_async")] - fn next_files_async, glib::Error>) + 'static>( - &self, - num_files: i32, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn next_files_future( - &self, - num_files: i32, - io_priority: glib::Priority, - ) -> Pin, glib::Error>> + 'static>>; - - #[doc(alias = "g_file_enumerator_set_pending")] - fn set_pending(&self, pending: bool); -} - -impl> FileEnumeratorExt for O { fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -93,6 +38,7 @@ impl> FileEnumeratorExt for O { } } + #[doc(alias = "g_file_enumerator_close_async")] fn close_async) + 'static>( &self, io_priority: glib::Priority, @@ -156,6 +102,8 @@ impl> FileEnumeratorExt for O { )) } + #[doc(alias = "g_file_enumerator_get_child")] + #[doc(alias = "get_child")] fn child(&self, info: &FileInfo) -> File { unsafe { from_glib_full(ffi::g_file_enumerator_get_child( @@ -165,6 +113,8 @@ impl> FileEnumeratorExt for O { } } + #[doc(alias = "g_file_enumerator_get_container")] + #[doc(alias = "get_container")] fn container(&self) -> File { unsafe { from_glib_none(ffi::g_file_enumerator_get_container( @@ -173,6 +123,7 @@ impl> FileEnumeratorExt for O { } } + #[doc(alias = "g_file_enumerator_has_pending")] fn has_pending(&self) -> bool { unsafe { from_glib(ffi::g_file_enumerator_has_pending( @@ -181,6 +132,7 @@ impl> FileEnumeratorExt for O { } } + #[doc(alias = "g_file_enumerator_is_closed")] fn is_closed(&self) -> bool { unsafe { from_glib(ffi::g_file_enumerator_is_closed( @@ -189,6 +141,7 @@ impl> FileEnumeratorExt for O { } } + #[doc(alias = "g_file_enumerator_next_file")] fn next_file( &self, cancellable: Option<&impl IsA>, @@ -208,6 +161,7 @@ impl> FileEnumeratorExt for O { } } + #[doc(alias = "g_file_enumerator_next_files_async")] fn next_files_async, glib::Error>) + 'static>( &self, num_files: i32, @@ -276,6 +230,7 @@ impl> FileEnumeratorExt for O { )) } + #[doc(alias = "g_file_enumerator_set_pending")] fn set_pending(&self, pending: bool) { unsafe { ffi::g_file_enumerator_set_pending(self.as_ref().to_glib_none().0, pending.into_glib()); @@ -283,6 +238,8 @@ impl> FileEnumeratorExt for O { } } +impl> FileEnumeratorExt for O {} + impl fmt::Display for FileEnumerator { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FileEnumerator") diff --git a/gio/src/auto/file_info.rs b/gio/src/auto/file_info.rs index f48f5748a588..33a49e00b4cd 100644 --- a/gio/src/auto/file_info.rs +++ b/gio/src/auto/file_info.rs @@ -42,7 +42,7 @@ impl FileInfo { unsafe { from_glib_full(ffi::g_file_info_dup(self.to_glib_none().0)) } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_file_info_get_access_date_time")] #[doc(alias = "get_access_date_time")] @@ -171,7 +171,7 @@ impl FileInfo { unsafe { from_glib_none(ffi::g_file_info_get_content_type(self.to_glib_none().0)) } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_file_info_get_creation_date_time")] #[doc(alias = "get_creation_date_time")] @@ -237,7 +237,7 @@ impl FileInfo { unsafe { from_glib(ffi::g_file_info_get_is_symlink(self.to_glib_none().0)) } } - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] #[doc(alias = "g_file_info_get_modification_date_time")] #[doc(alias = "get_modification_date_time")] @@ -316,7 +316,7 @@ impl FileInfo { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_file_info_set_access_date_time")] pub fn set_access_date_time(&self, atime: &glib::DateTime) { @@ -443,7 +443,7 @@ impl FileInfo { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_file_info_set_creation_date_time")] pub fn set_creation_date_time(&self, creation_time: &glib::DateTime) { @@ -497,7 +497,7 @@ impl FileInfo { } } - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] #[doc(alias = "g_file_info_set_modification_date_time")] pub fn set_modification_date_time(&self, mtime: &glib::DateTime) { diff --git a/gio/src/auto/file_input_stream.rs b/gio/src/auto/file_input_stream.rs index fcc5b40f7545..fc4f29e3216c 100644 --- a/gio/src/auto/file_input_stream.rs +++ b/gio/src/auto/file_input_stream.rs @@ -19,31 +19,8 @@ impl FileInputStream { pub const NONE: Option<&'static FileInputStream> = None; } -pub trait FileInputStreamExt: 'static { +pub trait FileInputStreamExt: IsA + 'static { #[doc(alias = "g_file_input_stream_query_info")] - fn query_info( - &self, - attributes: &str, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_input_stream_query_info_async")] - fn query_info_async) + 'static>( - &self, - attributes: &str, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn query_info_future( - &self, - attributes: &str, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; -} - -impl> FileInputStreamExt for O { fn query_info( &self, attributes: &str, @@ -65,6 +42,7 @@ impl> FileInputStreamExt for O { } } + #[doc(alias = "g_file_input_stream_query_info_async")] fn query_info_async) + 'static>( &self, attributes: &str, @@ -137,6 +115,8 @@ impl> FileInputStreamExt for O { } } +impl> FileInputStreamExt for O {} + impl fmt::Display for FileInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FileInputStream") diff --git a/gio/src/auto/file_io_stream.rs b/gio/src/auto/file_io_stream.rs index b8d813a2c6dd..1d315c69cda2 100644 --- a/gio/src/auto/file_io_stream.rs +++ b/gio/src/auto/file_io_stream.rs @@ -19,35 +19,9 @@ impl FileIOStream { pub const NONE: Option<&'static FileIOStream> = None; } -pub trait FileIOStreamExt: 'static { +pub trait FileIOStreamExt: IsA + 'static { #[doc(alias = "g_file_io_stream_get_etag")] #[doc(alias = "get_etag")] - fn etag(&self) -> Option; - - #[doc(alias = "g_file_io_stream_query_info")] - fn query_info( - &self, - attributes: &str, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_io_stream_query_info_async")] - fn query_info_async) + 'static>( - &self, - attributes: &str, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn query_info_future( - &self, - attributes: &str, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; -} - -impl> FileIOStreamExt for O { fn etag(&self) -> Option { unsafe { from_glib_full(ffi::g_file_io_stream_get_etag( @@ -56,6 +30,7 @@ impl> FileIOStreamExt for O { } } + #[doc(alias = "g_file_io_stream_query_info")] fn query_info( &self, attributes: &str, @@ -77,6 +52,7 @@ impl> FileIOStreamExt for O { } } + #[doc(alias = "g_file_io_stream_query_info_async")] fn query_info_async) + 'static>( &self, attributes: &str, @@ -146,6 +122,8 @@ impl> FileIOStreamExt for O { } } +impl> FileIOStreamExt for O {} + impl fmt::Display for FileIOStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FileIOStream") diff --git a/gio/src/auto/file_monitor.rs b/gio/src/auto/file_monitor.rs index c85435a122ae..e2e1da53d697 100644 --- a/gio/src/auto/file_monitor.rs +++ b/gio/src/auto/file_monitor.rs @@ -23,45 +23,13 @@ impl FileMonitor { pub const NONE: Option<&'static FileMonitor> = None; } -pub trait FileMonitorExt: 'static { +pub trait FileMonitorExt: IsA + 'static { #[doc(alias = "g_file_monitor_cancel")] - fn cancel(&self) -> bool; - - #[doc(alias = "g_file_monitor_emit_event")] - fn emit_event( - &self, - child: &impl IsA, - other_file: &impl IsA, - event_type: FileMonitorEvent, - ); - - #[doc(alias = "g_file_monitor_is_cancelled")] - fn is_cancelled(&self) -> bool; - - #[doc(alias = "g_file_monitor_set_rate_limit")] - fn set_rate_limit(&self, limit_msecs: i32); - - #[doc(alias = "rate-limit")] - fn rate_limit(&self) -> i32; - - #[doc(alias = "changed")] - fn connect_changed, FileMonitorEvent) + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "cancelled")] - fn connect_cancelled_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "rate-limit")] - fn connect_rate_limit_notify(&self, f: F) -> SignalHandlerId; -} - -impl> FileMonitorExt for O { fn cancel(&self) -> bool { unsafe { from_glib(ffi::g_file_monitor_cancel(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_file_monitor_emit_event")] fn emit_event( &self, child: &impl IsA, @@ -78,6 +46,7 @@ impl> FileMonitorExt for O { } } + #[doc(alias = "g_file_monitor_is_cancelled")] fn is_cancelled(&self) -> bool { unsafe { from_glib(ffi::g_file_monitor_is_cancelled( @@ -86,16 +55,19 @@ impl> FileMonitorExt for O { } } + #[doc(alias = "g_file_monitor_set_rate_limit")] fn set_rate_limit(&self, limit_msecs: i32) { unsafe { ffi::g_file_monitor_set_rate_limit(self.as_ref().to_glib_none().0, limit_msecs); } } + #[doc(alias = "rate-limit")] fn rate_limit(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "rate-limit") } + #[doc(alias = "changed")] fn connect_changed, FileMonitorEvent) + 'static>( &self, f: F, @@ -133,6 +105,7 @@ impl> FileMonitorExt for O { } } + #[doc(alias = "cancelled")] fn connect_cancelled_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_cancelled_trampoline< P: IsA, @@ -158,6 +131,7 @@ impl> FileMonitorExt for O { } } + #[doc(alias = "rate-limit")] fn connect_rate_limit_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_rate_limit_trampoline< P: IsA, @@ -184,6 +158,8 @@ impl> FileMonitorExt for O { } } +impl> FileMonitorExt for O {} + impl fmt::Display for FileMonitor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FileMonitor") diff --git a/gio/src/auto/file_output_stream.rs b/gio/src/auto/file_output_stream.rs index 5ecd17ddc8c0..a1edf2a5a564 100644 --- a/gio/src/auto/file_output_stream.rs +++ b/gio/src/auto/file_output_stream.rs @@ -19,35 +19,9 @@ impl FileOutputStream { pub const NONE: Option<&'static FileOutputStream> = None; } -pub trait FileOutputStreamExt: 'static { +pub trait FileOutputStreamExt: IsA + 'static { #[doc(alias = "g_file_output_stream_get_etag")] #[doc(alias = "get_etag")] - fn etag(&self) -> Option; - - #[doc(alias = "g_file_output_stream_query_info")] - fn query_info( - &self, - attributes: &str, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_file_output_stream_query_info_async")] - fn query_info_async) + 'static>( - &self, - attributes: &str, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn query_info_future( - &self, - attributes: &str, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; -} - -impl> FileOutputStreamExt for O { fn etag(&self) -> Option { unsafe { from_glib_full(ffi::g_file_output_stream_get_etag( @@ -56,6 +30,7 @@ impl> FileOutputStreamExt for O { } } + #[doc(alias = "g_file_output_stream_query_info")] fn query_info( &self, attributes: &str, @@ -77,6 +52,7 @@ impl> FileOutputStreamExt for O { } } + #[doc(alias = "g_file_output_stream_query_info_async")] fn query_info_async) + 'static>( &self, attributes: &str, @@ -149,6 +125,8 @@ impl> FileOutputStreamExt for O { } } +impl> FileOutputStreamExt for O {} + impl fmt::Display for FileOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FileOutputStream") diff --git a/gio/src/auto/filter_input_stream.rs b/gio/src/auto/filter_input_stream.rs index 0858e8541710..d97e785e691a 100644 --- a/gio/src/auto/filter_input_stream.rs +++ b/gio/src/auto/filter_input_stream.rs @@ -23,23 +23,9 @@ impl FilterInputStream { pub const NONE: Option<&'static FilterInputStream> = None; } -pub trait FilterInputStreamExt: 'static { +pub trait FilterInputStreamExt: IsA + 'static { #[doc(alias = "g_filter_input_stream_get_base_stream")] #[doc(alias = "get_base_stream")] - fn base_stream(&self) -> InputStream; - - #[doc(alias = "g_filter_input_stream_get_close_base_stream")] - #[doc(alias = "get_close_base_stream")] - fn closes_base_stream(&self) -> bool; - - #[doc(alias = "g_filter_input_stream_set_close_base_stream")] - fn set_close_base_stream(&self, close_base: bool); - - #[doc(alias = "close-base-stream")] - fn connect_close_base_stream_notify(&self, f: F) -> SignalHandlerId; -} - -impl> FilterInputStreamExt for O { fn base_stream(&self) -> InputStream { unsafe { from_glib_none(ffi::g_filter_input_stream_get_base_stream( @@ -48,6 +34,8 @@ impl> FilterInputStreamExt for O { } } + #[doc(alias = "g_filter_input_stream_get_close_base_stream")] + #[doc(alias = "get_close_base_stream")] fn closes_base_stream(&self) -> bool { unsafe { from_glib(ffi::g_filter_input_stream_get_close_base_stream( @@ -56,6 +44,7 @@ impl> FilterInputStreamExt for O { } } + #[doc(alias = "g_filter_input_stream_set_close_base_stream")] fn set_close_base_stream(&self, close_base: bool) { unsafe { ffi::g_filter_input_stream_set_close_base_stream( @@ -65,6 +54,7 @@ impl> FilterInputStreamExt for O { } } + #[doc(alias = "close-base-stream")] fn connect_close_base_stream_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_close_base_stream_trampoline< P: IsA, @@ -91,6 +81,8 @@ impl> FilterInputStreamExt for O { } } +impl> FilterInputStreamExt for O {} + impl fmt::Display for FilterInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FilterInputStream") diff --git a/gio/src/auto/filter_output_stream.rs b/gio/src/auto/filter_output_stream.rs index 07aebc113f68..4593918d38ff 100644 --- a/gio/src/auto/filter_output_stream.rs +++ b/gio/src/auto/filter_output_stream.rs @@ -23,23 +23,9 @@ impl FilterOutputStream { pub const NONE: Option<&'static FilterOutputStream> = None; } -pub trait FilterOutputStreamExt: 'static { +pub trait FilterOutputStreamExt: IsA + 'static { #[doc(alias = "g_filter_output_stream_get_base_stream")] #[doc(alias = "get_base_stream")] - fn base_stream(&self) -> OutputStream; - - #[doc(alias = "g_filter_output_stream_get_close_base_stream")] - #[doc(alias = "get_close_base_stream")] - fn closes_base_stream(&self) -> bool; - - #[doc(alias = "g_filter_output_stream_set_close_base_stream")] - fn set_close_base_stream(&self, close_base: bool); - - #[doc(alias = "close-base-stream")] - fn connect_close_base_stream_notify(&self, f: F) -> SignalHandlerId; -} - -impl> FilterOutputStreamExt for O { fn base_stream(&self) -> OutputStream { unsafe { from_glib_none(ffi::g_filter_output_stream_get_base_stream( @@ -48,6 +34,8 @@ impl> FilterOutputStreamExt for O { } } + #[doc(alias = "g_filter_output_stream_get_close_base_stream")] + #[doc(alias = "get_close_base_stream")] fn closes_base_stream(&self) -> bool { unsafe { from_glib(ffi::g_filter_output_stream_get_close_base_stream( @@ -56,6 +44,7 @@ impl> FilterOutputStreamExt for O { } } + #[doc(alias = "g_filter_output_stream_set_close_base_stream")] fn set_close_base_stream(&self, close_base: bool) { unsafe { ffi::g_filter_output_stream_set_close_base_stream( @@ -65,6 +54,7 @@ impl> FilterOutputStreamExt for O { } } + #[doc(alias = "close-base-stream")] fn connect_close_base_stream_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_close_base_stream_trampoline< P: IsA, @@ -91,6 +81,8 @@ impl> FilterOutputStreamExt for O { } } +impl> FilterOutputStreamExt for O {} + impl fmt::Display for FilterOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FilterOutputStream") diff --git a/gio/src/auto/flags.rs b/gio/src/auto/flags.rs index 21c331568b50..c697ac1ed32a 100644 --- a/gio/src/auto/flags.rs +++ b/gio/src/auto/flags.rs @@ -755,7 +755,7 @@ bitflags! { const DELAY_MESSAGE_PROCESSING = ffi::G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING as _; #[doc(alias = "G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER")] const AUTHENTICATION_REQUIRE_SAME_USER = ffi::G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER as _; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_DBUS_CONNECTION_FLAGS_CROSS_NAMESPACE")] const CROSS_NAMESPACE = ffi::G_DBUS_CONNECTION_FLAGS_CROSS_NAMESPACE as _; @@ -1032,7 +1032,7 @@ bitflags! { const GET_INVALIDATED_PROPERTIES = ffi::G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES as _; #[doc(alias = "G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION")] const DO_NOT_AUTO_START_AT_CONSTRUCTION = ffi::G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION as _; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "G_DBUS_PROXY_FLAGS_NO_MATCH_RULE")] const NO_MATCH_RULE = ffi::G_DBUS_PROXY_FLAGS_NO_MATCH_RULE as _; @@ -2368,7 +2368,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "GResolverNameLookupFlags")] @@ -2382,7 +2382,7 @@ bitflags! { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl fmt::Display for ResolverNameLookupFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2390,7 +2390,7 @@ impl fmt::Display for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(hidden)] impl IntoGlib for ResolverNameLookupFlags { @@ -2402,7 +2402,7 @@ impl IntoGlib for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(hidden)] impl FromGlib for ResolverNameLookupFlags { @@ -2412,7 +2412,7 @@ impl FromGlib for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl StaticType for ResolverNameLookupFlags { #[inline] @@ -2421,7 +2421,7 @@ impl StaticType for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl glib::HasParamSpec for ResolverNameLookupFlags { type ParamSpec = glib::ParamSpecFlags; @@ -2433,13 +2433,13 @@ impl glib::HasParamSpec for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl glib::value::ValueType for ResolverNameLookupFlags { type Type = Self; } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] unsafe impl<'a> FromValue<'a> for ResolverNameLookupFlags { type Checker = glib::value::GenericValueTypeChecker; @@ -2450,7 +2450,7 @@ unsafe impl<'a> FromValue<'a> for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl ToValue for ResolverNameLookupFlags { #[inline] @@ -2468,7 +2468,7 @@ impl ToValue for ResolverNameLookupFlags { } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] impl From for glib::Value { #[inline] @@ -2678,7 +2678,7 @@ bitflags! { const STDERR_MERGE = ffi::G_SUBPROCESS_FLAGS_STDERR_MERGE as _; #[doc(alias = "G_SUBPROCESS_FLAGS_INHERIT_FDS")] const INHERIT_FDS = ffi::G_SUBPROCESS_FLAGS_INHERIT_FDS as _; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP")] const SEARCH_PATH_FROM_ENVP = ffi::G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP as _; diff --git a/gio/src/auto/functions.rs b/gio/src/auto/functions.rs index 2e6d472bdba3..c5d5266d481d 100644 --- a/gio/src/auto/functions.rs +++ b/gio/src/auto/functions.rs @@ -157,7 +157,7 @@ pub fn content_type_get_icon(type_: &str) -> Icon { unsafe { from_glib_full(ffi::g_content_type_get_icon(type_.to_glib_none().0)) } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "g_content_type_get_mime_dirs")] pub fn content_type_get_mime_dirs() -> Vec { @@ -230,7 +230,7 @@ pub fn content_type_is_unknown(type_: &str) -> bool { unsafe { from_glib(ffi::g_content_type_is_unknown(type_.to_glib_none().0)) } } -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "g_content_type_set_mime_dirs")] pub fn content_type_set_mime_dirs(dirs: &[&str]) { @@ -361,14 +361,14 @@ pub fn dbus_address_get_stream_sync( } } -#[cfg(any(feature = "v2_68"))] +#[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] #[doc(alias = "g_dbus_escape_object_path")] pub fn dbus_escape_object_path(s: &str) -> glib::GString { unsafe { from_glib_full(ffi::g_dbus_escape_object_path(s.to_glib_none().0)) } } -//#[cfg(any(feature = "v2_68"))] +//#[cfg(feature = "v2_68")] //#[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] //#[doc(alias = "g_dbus_escape_object_path_bytestring")] //pub fn dbus_escape_object_path_bytestring(bytes: &[u8]) -> glib::GString { @@ -404,7 +404,7 @@ pub fn dbus_is_address(string: &str) -> bool { unsafe { from_glib(ffi::g_dbus_is_address(string.to_glib_none().0)) } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_dbus_is_error_name")] pub fn dbus_is_error_name(string: &str) -> bool { @@ -601,7 +601,7 @@ pub fn resources_unregister(resource: &Resource) { } } -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_unix_is_mount_path_system_internal")] pub fn unix_is_mount_path_system_internal(mount_path: impl AsRef) -> bool { @@ -612,7 +612,7 @@ pub fn unix_is_mount_path_system_internal(mount_path: impl AsRef) -> bool { @@ -623,7 +623,7 @@ pub fn unix_is_system_device_path(device_path: impl AsRef) -> b } } -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_unix_is_system_fs_type")] pub fn unix_is_system_fs_type(fs_type: &str) -> bool { diff --git a/gio/src/auto/icon.rs b/gio/src/auto/icon.rs index 56a94544e15a..21fd28f373d7 100644 --- a/gio/src/auto/icon.rs +++ b/gio/src/auto/icon.rs @@ -37,21 +37,8 @@ impl Icon { } } -pub trait IconExt: 'static { +pub trait IconExt: IsA + 'static { #[doc(alias = "g_icon_equal")] - fn equal(&self, icon2: Option<&impl IsA>) -> bool; - - #[doc(alias = "g_icon_hash")] - fn hash(&self) -> u32; - - #[doc(alias = "g_icon_serialize")] - fn serialize(&self) -> Option; - - #[doc(alias = "g_icon_to_string")] - fn to_string(&self) -> Option; -} - -impl> IconExt for O { fn equal(&self, icon2: Option<&impl IsA>) -> bool { unsafe { from_glib(ffi::g_icon_equal( @@ -61,6 +48,7 @@ impl> IconExt for O { } } + #[doc(alias = "g_icon_hash")] fn hash(&self) -> u32 { unsafe { ffi::g_icon_hash( @@ -70,15 +58,19 @@ impl> IconExt for O { } } + #[doc(alias = "g_icon_serialize")] fn serialize(&self) -> Option { unsafe { from_glib_full(ffi::g_icon_serialize(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_icon_to_string")] fn to_string(&self) -> Option { unsafe { from_glib_full(ffi::g_icon_to_string(self.as_ref().to_glib_none().0)) } } } +impl> IconExt for O {} + impl fmt::Display for Icon { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Icon") diff --git a/gio/src/auto/inet_address.rs b/gio/src/auto/inet_address.rs index 56ab8f77fae8..8e7ef83f63d1 100644 --- a/gio/src/auto/inet_address.rs +++ b/gio/src/auto/inet_address.rs @@ -49,123 +49,8 @@ impl fmt::Display for InetAddress { unsafe impl Send for InetAddress {} unsafe impl Sync for InetAddress {} -pub trait InetAddressExt: 'static { +pub trait InetAddressExt: IsA + 'static { #[doc(alias = "g_inet_address_equal")] - fn equal(&self, other_address: &impl IsA) -> bool; - - #[doc(alias = "g_inet_address_get_family")] - #[doc(alias = "get_family")] - fn family(&self) -> SocketFamily; - - #[doc(alias = "g_inet_address_get_is_any")] - #[doc(alias = "get_is_any")] - fn is_any(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_link_local")] - #[doc(alias = "get_is_link_local")] - fn is_link_local(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_loopback")] - #[doc(alias = "get_is_loopback")] - fn is_loopback(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_mc_global")] - #[doc(alias = "get_is_mc_global")] - fn is_mc_global(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_mc_link_local")] - #[doc(alias = "get_is_mc_link_local")] - fn is_mc_link_local(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_mc_node_local")] - #[doc(alias = "get_is_mc_node_local")] - fn is_mc_node_local(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_mc_org_local")] - #[doc(alias = "get_is_mc_org_local")] - fn is_mc_org_local(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_mc_site_local")] - #[doc(alias = "get_is_mc_site_local")] - fn is_mc_site_local(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_multicast")] - #[doc(alias = "get_is_multicast")] - fn is_multicast(&self) -> bool; - - #[doc(alias = "g_inet_address_get_is_site_local")] - #[doc(alias = "get_is_site_local")] - fn is_site_local(&self) -> bool; - - #[doc(alias = "g_inet_address_get_native_size")] - #[doc(alias = "get_native_size")] - fn native_size(&self) -> usize; - - #[doc(alias = "g_inet_address_to_string")] - #[doc(alias = "to_string")] - fn to_str(&self) -> glib::GString; - - //fn bytes(&self) -> /*Unimplemented*/Basic: Pointer; - - #[doc(alias = "is-any")] - fn connect_is_any_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "is-link-local")] - fn connect_is_link_local_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-loopback")] - fn connect_is_loopback_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-mc-global")] - fn connect_is_mc_global_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-mc-link-local")] - fn connect_is_mc_link_local_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-mc-node-local")] - fn connect_is_mc_node_local_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-mc-org-local")] - fn connect_is_mc_org_local_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-mc-site-local")] - fn connect_is_mc_site_local_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-multicast")] - fn connect_is_multicast_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "is-site-local")] - fn connect_is_site_local_notify( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> InetAddressExt for O { fn equal(&self, other_address: &impl IsA) -> bool { unsafe { from_glib(ffi::g_inet_address_equal( @@ -175,6 +60,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_family")] + #[doc(alias = "get_family")] fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_inet_address_get_family( @@ -183,6 +70,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_any")] + #[doc(alias = "get_is_any")] fn is_any(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_any( @@ -191,6 +80,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_link_local")] + #[doc(alias = "get_is_link_local")] fn is_link_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_link_local( @@ -199,6 +90,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_loopback")] + #[doc(alias = "get_is_loopback")] fn is_loopback(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_loopback( @@ -207,6 +100,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_mc_global")] + #[doc(alias = "get_is_mc_global")] fn is_mc_global(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_global( @@ -215,6 +110,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_mc_link_local")] + #[doc(alias = "get_is_mc_link_local")] fn is_mc_link_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_link_local( @@ -223,6 +120,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_mc_node_local")] + #[doc(alias = "get_is_mc_node_local")] fn is_mc_node_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_node_local( @@ -231,6 +130,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_mc_org_local")] + #[doc(alias = "get_is_mc_org_local")] fn is_mc_org_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_org_local( @@ -239,6 +140,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_mc_site_local")] + #[doc(alias = "get_is_mc_site_local")] fn is_mc_site_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_site_local( @@ -247,6 +150,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_multicast")] + #[doc(alias = "get_is_multicast")] fn is_multicast(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_multicast( @@ -255,6 +160,8 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_is_site_local")] + #[doc(alias = "get_is_site_local")] fn is_site_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_site_local( @@ -263,10 +170,14 @@ impl> InetAddressExt for O { } } + #[doc(alias = "g_inet_address_get_native_size")] + #[doc(alias = "get_native_size")] fn native_size(&self) -> usize { unsafe { ffi::g_inet_address_get_native_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_inet_address_to_string")] + #[doc(alias = "to_string")] fn to_str(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_inet_address_to_string( @@ -279,6 +190,7 @@ impl> InetAddressExt for O { // glib::ObjectExt::property(self.as_ref(), "bytes") //} + #[doc(alias = "is-any")] fn connect_is_any_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_any_trampoline< P: IsA, @@ -304,6 +216,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-link-local")] fn connect_is_link_local_notify( &self, f: F, @@ -332,6 +245,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-loopback")] fn connect_is_loopback_notify( &self, f: F, @@ -360,6 +274,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-mc-global")] fn connect_is_mc_global_notify( &self, f: F, @@ -388,6 +303,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-mc-link-local")] fn connect_is_mc_link_local_notify( &self, f: F, @@ -416,6 +332,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-mc-node-local")] fn connect_is_mc_node_local_notify( &self, f: F, @@ -444,6 +361,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-mc-org-local")] fn connect_is_mc_org_local_notify( &self, f: F, @@ -472,6 +390,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-mc-site-local")] fn connect_is_mc_site_local_notify( &self, f: F, @@ -500,6 +419,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-multicast")] fn connect_is_multicast_notify( &self, f: F, @@ -528,6 +448,7 @@ impl> InetAddressExt for O { } } + #[doc(alias = "is-site-local")] fn connect_is_site_local_notify( &self, f: F, @@ -556,3 +477,5 @@ impl> InetAddressExt for O { } } } + +impl> InetAddressExt for O {} diff --git a/gio/src/auto/inet_address_mask.rs b/gio/src/auto/inet_address_mask.rs index b41733678840..a1725ebbf533 100644 --- a/gio/src/auto/inet_address_mask.rs +++ b/gio/src/auto/inet_address_mask.rs @@ -62,45 +62,8 @@ impl fmt::Display for InetAddressMask { unsafe impl Send for InetAddressMask {} unsafe impl Sync for InetAddressMask {} -pub trait InetAddressMaskExt: 'static { +pub trait InetAddressMaskExt: IsA + 'static { #[doc(alias = "g_inet_address_mask_equal")] - fn equal(&self, mask2: &impl IsA) -> bool; - - #[doc(alias = "g_inet_address_mask_get_address")] - #[doc(alias = "get_address")] - fn address(&self) -> InetAddress; - - #[doc(alias = "g_inet_address_mask_get_family")] - #[doc(alias = "get_family")] - fn family(&self) -> SocketFamily; - - #[doc(alias = "g_inet_address_mask_get_length")] - #[doc(alias = "get_length")] - fn length(&self) -> u32; - - #[doc(alias = "g_inet_address_mask_matches")] - fn matches(&self, address: &impl IsA) -> bool; - - #[doc(alias = "g_inet_address_mask_to_string")] - #[doc(alias = "to_string")] - fn to_str(&self) -> glib::GString; - - fn set_address>(&self, address: Option<&P>); - - fn set_length(&self, length: u32); - - #[doc(alias = "address")] - fn connect_address_notify(&self, f: F) - -> SignalHandlerId; - - #[doc(alias = "family")] - fn connect_family_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "length")] - fn connect_length_notify(&self, f: F) -> SignalHandlerId; -} - -impl> InetAddressMaskExt for O { fn equal(&self, mask2: &impl IsA) -> bool { unsafe { from_glib(ffi::g_inet_address_mask_equal( @@ -110,6 +73,8 @@ impl> InetAddressMaskExt for O { } } + #[doc(alias = "g_inet_address_mask_get_address")] + #[doc(alias = "get_address")] fn address(&self) -> InetAddress { unsafe { from_glib_none(ffi::g_inet_address_mask_get_address( @@ -118,6 +83,8 @@ impl> InetAddressMaskExt for O { } } + #[doc(alias = "g_inet_address_mask_get_family")] + #[doc(alias = "get_family")] fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_inet_address_mask_get_family( @@ -126,10 +93,13 @@ impl> InetAddressMaskExt for O { } } + #[doc(alias = "g_inet_address_mask_get_length")] + #[doc(alias = "get_length")] fn length(&self) -> u32 { unsafe { ffi::g_inet_address_mask_get_length(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_inet_address_mask_matches")] fn matches(&self, address: &impl IsA) -> bool { unsafe { from_glib(ffi::g_inet_address_mask_matches( @@ -139,6 +109,8 @@ impl> InetAddressMaskExt for O { } } + #[doc(alias = "g_inet_address_mask_to_string")] + #[doc(alias = "to_string")] fn to_str(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_inet_address_mask_to_string( @@ -155,6 +127,7 @@ impl> InetAddressMaskExt for O { glib::ObjectExt::set_property(self.as_ref(), "length", length) } + #[doc(alias = "address")] fn connect_address_notify( &self, f: F, @@ -183,6 +156,7 @@ impl> InetAddressMaskExt for O { } } + #[doc(alias = "family")] fn connect_family_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_family_trampoline< P: IsA, @@ -208,6 +182,7 @@ impl> InetAddressMaskExt for O { } } + #[doc(alias = "length")] fn connect_length_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_length_trampoline< P: IsA, @@ -233,3 +208,5 @@ impl> InetAddressMaskExt for O { } } } + +impl> InetAddressMaskExt for O {} diff --git a/gio/src/auto/inet_socket_address.rs b/gio/src/auto/inet_socket_address.rs index 9efca6ac27ca..1e695e93c531 100644 --- a/gio/src/auto/inet_socket_address.rs +++ b/gio/src/auto/inet_socket_address.rs @@ -45,25 +45,9 @@ impl InetSocketAddress { unsafe impl Send for InetSocketAddress {} unsafe impl Sync for InetSocketAddress {} -pub trait InetSocketAddressExt: 'static { +pub trait InetSocketAddressExt: IsA + 'static { #[doc(alias = "g_inet_socket_address_get_address")] #[doc(alias = "get_address")] - fn address(&self) -> InetAddress; - - #[doc(alias = "g_inet_socket_address_get_flowinfo")] - #[doc(alias = "get_flowinfo")] - fn flowinfo(&self) -> u32; - - #[doc(alias = "g_inet_socket_address_get_port")] - #[doc(alias = "get_port")] - fn port(&self) -> u16; - - #[doc(alias = "g_inet_socket_address_get_scope_id")] - #[doc(alias = "get_scope_id")] - fn scope_id(&self) -> u32; -} - -impl> InetSocketAddressExt for O { fn address(&self) -> InetAddress { unsafe { from_glib_none(ffi::g_inet_socket_address_get_address( @@ -72,19 +56,27 @@ impl> InetSocketAddressExt for O { } } + #[doc(alias = "g_inet_socket_address_get_flowinfo")] + #[doc(alias = "get_flowinfo")] fn flowinfo(&self) -> u32 { unsafe { ffi::g_inet_socket_address_get_flowinfo(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_inet_socket_address_get_port")] + #[doc(alias = "get_port")] fn port(&self) -> u16 { unsafe { ffi::g_inet_socket_address_get_port(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_inet_socket_address_get_scope_id")] + #[doc(alias = "get_scope_id")] fn scope_id(&self) -> u32 { unsafe { ffi::g_inet_socket_address_get_scope_id(self.as_ref().to_glib_none().0) } } } +impl> InetSocketAddressExt for O {} + impl fmt::Display for InetSocketAddress { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("InetSocketAddress") diff --git a/gio/src/auto/initable.rs b/gio/src/auto/initable.rs index f10cda55b3e2..90c030744e00 100644 --- a/gio/src/auto/initable.rs +++ b/gio/src/auto/initable.rs @@ -19,12 +19,8 @@ impl Initable { pub const NONE: Option<&'static Initable> = None; } -pub trait InitableExt: 'static { +pub trait InitableExt: IsA + 'static { #[doc(alias = "g_initable_init")] - unsafe fn init(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; -} - -impl> InitableExt for O { unsafe fn init(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { let mut error = ptr::null_mut(); let is_ok = ffi::g_initable_init( @@ -41,6 +37,8 @@ impl> InitableExt for O { } } +impl> InitableExt for O {} + impl fmt::Display for Initable { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Initable") diff --git a/gio/src/auto/input_stream.rs b/gio/src/auto/input_stream.rs index 7c0e821a381d..a1f2d8245fe1 100644 --- a/gio/src/auto/input_stream.rs +++ b/gio/src/auto/input_stream.rs @@ -19,87 +19,15 @@ impl InputStream { pub const NONE: Option<&'static InputStream> = None; } -pub trait InputStreamExt: 'static { +pub trait InputStreamExt: IsA + 'static { #[doc(alias = "g_input_stream_clear_pending")] - fn clear_pending(&self); - - #[doc(alias = "g_input_stream_close")] - fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_input_stream_close_async")] - fn close_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn close_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_input_stream_has_pending")] - fn has_pending(&self) -> bool; - - #[doc(alias = "g_input_stream_is_closed")] - fn is_closed(&self) -> bool; - - #[doc(alias = "g_input_stream_read_bytes")] - fn read_bytes( - &self, - count: usize, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_input_stream_read_bytes_async")] - fn read_bytes_async) + 'static>( - &self, - count: usize, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn read_bytes_future( - &self, - count: usize, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_input_stream_set_pending")] - fn set_pending(&self) -> Result<(), glib::Error>; - - #[doc(alias = "g_input_stream_skip")] - fn skip( - &self, - count: usize, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_input_stream_skip_async")] - fn skip_async) + 'static>( - &self, - count: usize, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn skip_future( - &self, - count: usize, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; -} - -impl> InputStreamExt for O { fn clear_pending(&self) { unsafe { ffi::g_input_stream_clear_pending(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_input_stream_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -117,6 +45,7 @@ impl> InputStreamExt for O { } } + #[doc(alias = "g_input_stream_close_async")] fn close_async) + 'static>( &self, io_priority: glib::Priority, @@ -180,6 +109,7 @@ impl> InputStreamExt for O { )) } + #[doc(alias = "g_input_stream_has_pending")] fn has_pending(&self) -> bool { unsafe { from_glib(ffi::g_input_stream_has_pending( @@ -188,6 +118,7 @@ impl> InputStreamExt for O { } } + #[doc(alias = "g_input_stream_is_closed")] fn is_closed(&self) -> bool { unsafe { from_glib(ffi::g_input_stream_is_closed( @@ -196,6 +127,7 @@ impl> InputStreamExt for O { } } + #[doc(alias = "g_input_stream_read_bytes")] fn read_bytes( &self, count: usize, @@ -217,6 +149,7 @@ impl> InputStreamExt for O { } } + #[doc(alias = "g_input_stream_read_bytes_async")] fn read_bytes_async) + 'static>( &self, count: usize, @@ -285,6 +218,7 @@ impl> InputStreamExt for O { )) } + #[doc(alias = "g_input_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -298,6 +232,7 @@ impl> InputStreamExt for O { } } + #[doc(alias = "g_input_stream_skip")] fn skip( &self, count: usize, @@ -319,6 +254,7 @@ impl> InputStreamExt for O { } } + #[doc(alias = "g_input_stream_skip_async")] fn skip_async) + 'static>( &self, count: usize, @@ -386,6 +322,8 @@ impl> InputStreamExt for O { } } +impl> InputStreamExt for O {} + impl fmt::Display for InputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("InputStream") diff --git a/gio/src/auto/io_stream.rs b/gio/src/auto/io_stream.rs index dfea8560c80b..57f8d131f92b 100644 --- a/gio/src/auto/io_stream.rs +++ b/gio/src/auto/io_stream.rs @@ -23,54 +23,15 @@ impl IOStream { pub const NONE: Option<&'static IOStream> = None; } -pub trait IOStreamExt: 'static { +pub trait IOStreamExt: IsA + 'static { #[doc(alias = "g_io_stream_clear_pending")] - fn clear_pending(&self); - - #[doc(alias = "g_io_stream_close")] - fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_io_stream_close_async")] - fn close_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn close_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_io_stream_get_input_stream")] - #[doc(alias = "get_input_stream")] - fn input_stream(&self) -> InputStream; - - #[doc(alias = "g_io_stream_get_output_stream")] - #[doc(alias = "get_output_stream")] - fn output_stream(&self) -> OutputStream; - - #[doc(alias = "g_io_stream_has_pending")] - fn has_pending(&self) -> bool; - - #[doc(alias = "g_io_stream_is_closed")] - fn is_closed(&self) -> bool; - - #[doc(alias = "g_io_stream_set_pending")] - fn set_pending(&self) -> Result<(), glib::Error>; - - #[doc(alias = "closed")] - fn connect_closed_notify(&self, f: F) -> SignalHandlerId; -} - -impl> IOStreamExt for O { fn clear_pending(&self) { unsafe { ffi::g_io_stream_clear_pending(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_io_stream_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -88,6 +49,7 @@ impl> IOStreamExt for O { } } + #[doc(alias = "g_io_stream_close_async")] fn close_async) + 'static>( &self, io_priority: glib::Priority, @@ -151,6 +113,8 @@ impl> IOStreamExt for O { )) } + #[doc(alias = "g_io_stream_get_input_stream")] + #[doc(alias = "get_input_stream")] fn input_stream(&self) -> InputStream { unsafe { from_glib_none(ffi::g_io_stream_get_input_stream( @@ -159,6 +123,8 @@ impl> IOStreamExt for O { } } + #[doc(alias = "g_io_stream_get_output_stream")] + #[doc(alias = "get_output_stream")] fn output_stream(&self) -> OutputStream { unsafe { from_glib_none(ffi::g_io_stream_get_output_stream( @@ -167,14 +133,17 @@ impl> IOStreamExt for O { } } + #[doc(alias = "g_io_stream_has_pending")] fn has_pending(&self) -> bool { unsafe { from_glib(ffi::g_io_stream_has_pending(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_io_stream_is_closed")] fn is_closed(&self) -> bool { unsafe { from_glib(ffi::g_io_stream_is_closed(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_io_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -188,6 +157,7 @@ impl> IOStreamExt for O { } } + #[doc(alias = "closed")] fn connect_closed_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_closed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GIOStream, @@ -211,6 +181,8 @@ impl> IOStreamExt for O { } } +impl> IOStreamExt for O {} + impl fmt::Display for IOStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("IOStream") diff --git a/gio/src/auto/list_model.rs b/gio/src/auto/list_model.rs index ce79ca0e48c9..b19fb7c58c56 100644 --- a/gio/src/auto/list_model.rs +++ b/gio/src/auto/list_model.rs @@ -22,28 +22,9 @@ impl ListModel { pub const NONE: Option<&'static ListModel> = None; } -pub trait ListModelExt: 'static { +pub trait ListModelExt: IsA + 'static { #[doc(alias = "g_list_model_get_item_type")] #[doc(alias = "get_item_type")] - fn item_type(&self) -> glib::types::Type; - - #[doc(alias = "g_list_model_get_n_items")] - #[doc(alias = "get_n_items")] - fn n_items(&self) -> u32; - - #[doc(alias = "g_list_model_get_object")] - #[doc(alias = "get_object")] - fn item(&self, position: u32) -> Option; - - #[doc(alias = "g_list_model_items_changed")] - fn items_changed(&self, position: u32, removed: u32, added: u32); - - #[doc(alias = "items-changed")] - fn connect_items_changed(&self, f: F) - -> SignalHandlerId; -} - -impl> ListModelExt for O { fn item_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_list_model_get_item_type( @@ -52,10 +33,14 @@ impl> ListModelExt for O { } } + #[doc(alias = "g_list_model_get_n_items")] + #[doc(alias = "get_n_items")] fn n_items(&self) -> u32 { unsafe { ffi::g_list_model_get_n_items(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_list_model_get_object")] + #[doc(alias = "get_object")] fn item(&self, position: u32) -> Option { unsafe { from_glib_full(ffi::g_list_model_get_object( @@ -65,6 +50,7 @@ impl> ListModelExt for O { } } + #[doc(alias = "g_list_model_items_changed")] fn items_changed(&self, position: u32, removed: u32, added: u32) { unsafe { ffi::g_list_model_items_changed( @@ -76,6 +62,7 @@ impl> ListModelExt for O { } } + #[doc(alias = "items-changed")] fn connect_items_changed( &self, f: F, @@ -112,6 +99,8 @@ impl> ListModelExt for O { } } +impl> ListModelExt for O {} + impl fmt::Display for ListModel { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ListModel") diff --git a/gio/src/auto/list_store.rs b/gio/src/auto/list_store.rs index b762f9e2b104..446767512e76 100644 --- a/gio/src/auto/list_store.rs +++ b/gio/src/auto/list_store.rs @@ -5,7 +5,7 @@ use crate::ListModel; use glib::{prelude::*, translate::*}; use std::fmt; -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] use std::mem; @@ -34,7 +34,7 @@ impl ListStore { } } - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(alias = "g_list_store_find")] pub fn find(&self, item: &impl IsA) -> Option { diff --git a/gio/src/auto/loadable_icon.rs b/gio/src/auto/loadable_icon.rs index 00adcf85c6ab..e011ca150a6c 100644 --- a/gio/src/auto/loadable_icon.rs +++ b/gio/src/auto/loadable_icon.rs @@ -19,34 +19,8 @@ impl LoadableIcon { pub const NONE: Option<&'static LoadableIcon> = None; } -pub trait LoadableIconExt: 'static { +pub trait LoadableIconExt: IsA + 'static { #[doc(alias = "g_loadable_icon_load")] - fn load( - &self, - size: i32, - cancellable: Option<&impl IsA>, - ) -> Result<(InputStream, glib::GString), glib::Error>; - - #[doc(alias = "g_loadable_icon_load_async")] - fn load_async) + 'static>( - &self, - size: i32, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn load_future( - &self, - size: i32, - ) -> Pin< - Box_< - dyn std::future::Future> - + 'static, - >, - >; -} - -impl> LoadableIconExt for O { fn load( &self, size: i32, @@ -70,6 +44,7 @@ impl> LoadableIconExt for O { } } + #[doc(alias = "g_loadable_icon_load_async")] fn load_async) + 'static>( &self, size: i32, @@ -145,6 +120,8 @@ impl> LoadableIconExt for O { } } +impl> LoadableIconExt for O {} + impl fmt::Display for LoadableIcon { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("LoadableIcon") diff --git a/gio/src/auto/memory_input_stream.rs b/gio/src/auto/memory_input_stream.rs index 570b8592fd94..49573036f8b5 100644 --- a/gio/src/auto/memory_input_stream.rs +++ b/gio/src/auto/memory_input_stream.rs @@ -41,12 +41,8 @@ impl Default for MemoryInputStream { } } -pub trait MemoryInputStreamExt: 'static { +pub trait MemoryInputStreamExt: IsA + 'static { #[doc(alias = "g_memory_input_stream_add_bytes")] - fn add_bytes(&self, bytes: &glib::Bytes); -} - -impl> MemoryInputStreamExt for O { fn add_bytes(&self, bytes: &glib::Bytes) { unsafe { ffi::g_memory_input_stream_add_bytes( @@ -57,6 +53,8 @@ impl> MemoryInputStreamExt for O { } } +impl> MemoryInputStreamExt for O {} + impl fmt::Display for MemoryInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MemoryInputStream") diff --git a/gio/src/auto/memory_monitor.rs b/gio/src/auto/memory_monitor.rs index 0a92fbc08051..6b0cabb71a9a 100644 --- a/gio/src/auto/memory_monitor.rs +++ b/gio/src/auto/memory_monitor.rs @@ -28,19 +28,10 @@ impl MemoryMonitor { } } -pub trait MemoryMonitorExt: 'static { - #[cfg(any(feature = "v2_64"))] +pub trait MemoryMonitorExt: IsA + 'static { + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(alias = "low-memory-warning")] - fn connect_low_memory_warning( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> MemoryMonitorExt for O { - #[cfg(any(feature = "v2_64"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] fn connect_low_memory_warning( &self, f: F, @@ -73,6 +64,8 @@ impl> MemoryMonitorExt for O { } } +impl> MemoryMonitorExt for O {} + impl fmt::Display for MemoryMonitor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MemoryMonitor") diff --git a/gio/src/auto/memory_output_stream.rs b/gio/src/auto/memory_output_stream.rs index 3366c9d0c8d6..2be9a747dc5d 100644 --- a/gio/src/auto/memory_output_stream.rs +++ b/gio/src/auto/memory_output_stream.rs @@ -30,23 +30,14 @@ impl MemoryOutputStream { } } -pub trait MemoryOutputStreamExt: 'static { +pub trait MemoryOutputStreamExt: IsA + 'static { #[doc(alias = "g_memory_output_stream_get_data_size")] #[doc(alias = "get_data_size")] - fn data_size(&self) -> usize; - - #[doc(alias = "g_memory_output_stream_steal_as_bytes")] - fn steal_as_bytes(&self) -> glib::Bytes; - - #[doc(alias = "data-size")] - fn connect_data_size_notify(&self, f: F) -> SignalHandlerId; -} - -impl> MemoryOutputStreamExt for O { fn data_size(&self) -> usize { unsafe { ffi::g_memory_output_stream_get_data_size(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_memory_output_stream_steal_as_bytes")] fn steal_as_bytes(&self) -> glib::Bytes { unsafe { from_glib_full(ffi::g_memory_output_stream_steal_as_bytes( @@ -55,6 +46,7 @@ impl> MemoryOutputStreamExt for O { } } + #[doc(alias = "data-size")] fn connect_data_size_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_data_size_trampoline< P: IsA, @@ -81,6 +73,8 @@ impl> MemoryOutputStreamExt for O { } } +impl> MemoryOutputStreamExt for O {} + impl fmt::Display for MemoryOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MemoryOutputStream") diff --git a/gio/src/auto/menu_attribute_iter.rs b/gio/src/auto/menu_attribute_iter.rs index 53d68df97e6c..6cd148d537cd 100644 --- a/gio/src/auto/menu_attribute_iter.rs +++ b/gio/src/auto/menu_attribute_iter.rs @@ -18,13 +18,9 @@ impl MenuAttributeIter { pub const NONE: Option<&'static MenuAttributeIter> = None; } -pub trait MenuAttributeIterExt: 'static { +pub trait MenuAttributeIterExt: IsA + 'static { #[doc(alias = "g_menu_attribute_iter_get_next")] #[doc(alias = "get_next")] - fn next(&self) -> Option<(glib::GString, glib::Variant)>; -} - -impl> MenuAttributeIterExt for O { fn next(&self) -> Option<(glib::GString, glib::Variant)> { unsafe { let mut out_name = ptr::null(); @@ -43,6 +39,8 @@ impl> MenuAttributeIterExt for O { } } +impl> MenuAttributeIterExt for O {} + impl fmt::Display for MenuAttributeIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MenuAttributeIter") diff --git a/gio/src/auto/menu_link_iter.rs b/gio/src/auto/menu_link_iter.rs index 96383430e97f..2b720dc46a18 100644 --- a/gio/src/auto/menu_link_iter.rs +++ b/gio/src/auto/menu_link_iter.rs @@ -19,13 +19,9 @@ impl MenuLinkIter { pub const NONE: Option<&'static MenuLinkIter> = None; } -pub trait MenuLinkIterExt: 'static { +pub trait MenuLinkIterExt: IsA + 'static { #[doc(alias = "g_menu_link_iter_get_next")] #[doc(alias = "get_next")] - fn next(&self) -> Option<(glib::GString, MenuModel)>; -} - -impl> MenuLinkIterExt for O { fn next(&self) -> Option<(glib::GString, MenuModel)> { unsafe { let mut out_link = ptr::null(); @@ -44,6 +40,8 @@ impl> MenuLinkIterExt for O { } } +impl> MenuLinkIterExt for O {} + impl fmt::Display for MenuLinkIter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MenuLinkIter") diff --git a/gio/src/auto/menu_model.rs b/gio/src/auto/menu_model.rs index 34967a83d3ca..b839481ccfb5 100644 --- a/gio/src/auto/menu_model.rs +++ b/gio/src/auto/menu_model.rs @@ -23,51 +23,15 @@ impl MenuModel { pub const NONE: Option<&'static MenuModel> = None; } -pub trait MenuModelExt: 'static { +pub trait MenuModelExt: IsA + 'static { //#[doc(alias = "g_menu_model_get_item_attribute")] //#[doc(alias = "get_item_attribute")] - //fn is_item_attribute(&self, item_index: i32, attribute: &str, format_string: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> bool; - - #[doc(alias = "g_menu_model_get_item_attribute_value")] - #[doc(alias = "get_item_attribute_value")] - fn item_attribute_value( - &self, - item_index: i32, - attribute: &str, - expected_type: Option<&glib::VariantTy>, - ) -> Option; - - #[doc(alias = "g_menu_model_get_item_link")] - #[doc(alias = "get_item_link")] - #[must_use] - fn item_link(&self, item_index: i32, link: &str) -> Option; - - #[doc(alias = "g_menu_model_get_n_items")] - #[doc(alias = "get_n_items")] - fn n_items(&self) -> i32; - - #[doc(alias = "g_menu_model_is_mutable")] - fn is_mutable(&self) -> bool; - - #[doc(alias = "g_menu_model_items_changed")] - fn items_changed(&self, position: i32, removed: i32, added: i32); - - #[doc(alias = "g_menu_model_iterate_item_attributes")] - fn iterate_item_attributes(&self, item_index: i32) -> MenuAttributeIter; - - #[doc(alias = "g_menu_model_iterate_item_links")] - fn iterate_item_links(&self, item_index: i32) -> MenuLinkIter; - - #[doc(alias = "items-changed")] - fn connect_items_changed(&self, f: F) - -> SignalHandlerId; -} - -impl> MenuModelExt for O { //fn is_item_attribute(&self, item_index: i32, attribute: &str, format_string: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> bool { // unsafe { TODO: call ffi:g_menu_model_get_item_attribute() } //} + #[doc(alias = "g_menu_model_get_item_attribute_value")] + #[doc(alias = "get_item_attribute_value")] fn item_attribute_value( &self, item_index: i32, @@ -84,6 +48,9 @@ impl> MenuModelExt for O { } } + #[doc(alias = "g_menu_model_get_item_link")] + #[doc(alias = "get_item_link")] + #[must_use] fn item_link(&self, item_index: i32, link: &str) -> Option { unsafe { from_glib_full(ffi::g_menu_model_get_item_link( @@ -94,14 +61,18 @@ impl> MenuModelExt for O { } } + #[doc(alias = "g_menu_model_get_n_items")] + #[doc(alias = "get_n_items")] fn n_items(&self) -> i32 { unsafe { ffi::g_menu_model_get_n_items(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_menu_model_is_mutable")] fn is_mutable(&self) -> bool { unsafe { from_glib(ffi::g_menu_model_is_mutable(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_menu_model_items_changed")] fn items_changed(&self, position: i32, removed: i32, added: i32) { unsafe { ffi::g_menu_model_items_changed( @@ -113,6 +84,7 @@ impl> MenuModelExt for O { } } + #[doc(alias = "g_menu_model_iterate_item_attributes")] fn iterate_item_attributes(&self, item_index: i32) -> MenuAttributeIter { unsafe { from_glib_full(ffi::g_menu_model_iterate_item_attributes( @@ -122,6 +94,7 @@ impl> MenuModelExt for O { } } + #[doc(alias = "g_menu_model_iterate_item_links")] fn iterate_item_links(&self, item_index: i32) -> MenuLinkIter { unsafe { from_glib_full(ffi::g_menu_model_iterate_item_links( @@ -131,6 +104,7 @@ impl> MenuModelExt for O { } } + #[doc(alias = "items-changed")] fn connect_items_changed( &self, f: F, @@ -167,6 +141,8 @@ impl> MenuModelExt for O { } } +impl> MenuModelExt for O {} + impl fmt::Display for MenuModel { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MenuModel") diff --git a/gio/src/auto/mod.rs b/gio/src/auto/mod.rs index 418fb112a196..e0212dba5135 100644 --- a/gio/src/auto/mod.rs +++ b/gio/src/auto/mod.rs @@ -101,24 +101,24 @@ pub use self::data_output_stream::DataOutputStream; mod datagram_based; pub use self::datagram_based::DatagramBased; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] mod debug_controller; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use self::debug_controller::DebugController; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] mod debug_controller_dbus; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use self::debug_controller_dbus::DebugControllerDBus; -#[cfg(any(all(not(windows), not(target_os = "macos"))))] +#[cfg(all(not(windows), not(target_os = "macos")))] #[cfg_attr(docsrs, doc(cfg(all(not(windows), not(target_os = "macos")))))] mod desktop_app_info; -#[cfg(any(all(not(windows), not(target_os = "macos"))))] +#[cfg(all(not(windows), not(target_os = "macos")))] #[cfg_attr(docsrs, doc(cfg(all(not(windows), not(target_os = "macos")))))] pub use self::desktop_app_info::DesktopAppInfo; @@ -197,10 +197,10 @@ pub use self::loadable_icon::LoadableIcon; mod memory_input_stream; pub use self::memory_input_stream::MemoryInputStream; -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] mod memory_monitor; -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub use self::memory_monitor::MemoryMonitor; @@ -252,10 +252,10 @@ pub use self::pollable_input_stream::PollableInputStream; mod pollable_output_stream; pub use self::pollable_output_stream::PollableOutputStream; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] mod power_profile_monitor; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub use self::power_profile_monitor::PowerProfileMonitor; @@ -370,45 +370,45 @@ pub use self::tls_password::TlsPassword; mod tls_server_connection; pub use self::tls_server_connection::TlsServerConnection; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_credentials_message; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_credentials_message::UnixCredentialsMessage; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_fd_list; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_fd_list::UnixFDList; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_fd_message; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_fd_message::UnixFDMessage; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_input_stream; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_input_stream::UnixInputStream; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_output_stream; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_output_stream::UnixOutputStream; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_socket_address; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_socket_address::UnixSocketAddress; @@ -466,17 +466,17 @@ pub use self::settings_schema_source::SettingsSchemaSource; mod srv_target; pub use self::srv_target::SrvTarget; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_mount_entry; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_mount_entry::UnixMountEntry; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] mod unix_mount_point; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::unix_mount_point::UnixMountPoint; @@ -496,14 +496,14 @@ pub use self::enums::FileAttributeType; pub use self::enums::FileMonitorEvent; pub use self::enums::FileType; pub use self::enums::IOErrorEnum; -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub use self::enums::MemoryMonitorWarningLevel; pub use self::enums::MountOperationResult; pub use self::enums::NetworkConnectivity; pub use self::enums::NotificationPriority; pub use self::enums::PasswordSave; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub use self::enums::PollableReturn; pub use self::enums::ResolverError; @@ -516,18 +516,18 @@ pub use self::enums::SocketProtocol; pub use self::enums::SocketType; pub use self::enums::TlsAuthenticationMode; pub use self::enums::TlsCertificateRequestFlags; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::enums::TlsChannelBindingType; pub use self::enums::TlsDatabaseLookupFlags; pub use self::enums::TlsError; pub use self::enums::TlsInteractionResult; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub use self::enums::TlsProtocolVersion; #[allow(deprecated)] pub use self::enums::TlsRehandshakeMode; -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use self::enums::UnixSocketAddressType; pub use self::enums::ZlibCompressorFormat; @@ -559,7 +559,7 @@ pub use self::flags::IOStreamSpliceFlags; pub use self::flags::MountMountFlags; pub use self::flags::MountUnmountFlags; pub use self::flags::OutputStreamSpliceFlags; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub use self::flags::ResolverNameLookupFlags; pub use self::flags::ResourceLookupFlags; @@ -572,10 +572,10 @@ pub use self::flags::TlsPasswordFlags; pub mod functions; mod constants; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use self::constants::DEBUG_CONTROLLER_EXTENSION_POINT_NAME; -#[cfg(any(feature = "v2_58"))] +#[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub use self::constants::DRIVE_IDENTIFIER_KIND_UNIX_DEVICE; pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_DELETE; @@ -585,11 +585,11 @@ pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_RENAME; pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_TRASH; pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_WRITE; pub use self::constants::FILE_ATTRIBUTE_DOS_IS_ARCHIVE; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub use self::constants::FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT; pub use self::constants::FILE_ATTRIBUTE_DOS_IS_SYSTEM; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub use self::constants::FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG; pub use self::constants::FILE_ATTRIBUTE_ETAG_VALUE; @@ -642,61 +642,61 @@ pub use self::constants::FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET; pub use self::constants::FILE_ATTRIBUTE_STANDARD_TARGET_URI; pub use self::constants::FILE_ATTRIBUTE_STANDARD_TYPE; pub use self::constants::FILE_ATTRIBUTE_THUMBNAILING_FAILED; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE; pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_IS_VALID; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE; pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_PATH; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE; -#[cfg(any(feature = "v2_76"))] +#[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE; pub use self::constants::FILE_ATTRIBUTE_TIME_ACCESS; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub use self::constants::FILE_ATTRIBUTE_TIME_ACCESS_NSEC; pub use self::constants::FILE_ATTRIBUTE_TIME_ACCESS_USEC; pub use self::constants::FILE_ATTRIBUTE_TIME_CHANGED; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub use self::constants::FILE_ATTRIBUTE_TIME_CHANGED_NSEC; pub use self::constants::FILE_ATTRIBUTE_TIME_CHANGED_USEC; pub use self::constants::FILE_ATTRIBUTE_TIME_CREATED; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub use self::constants::FILE_ATTRIBUTE_TIME_CREATED_NSEC; pub use self::constants::FILE_ATTRIBUTE_TIME_CREATED_USEC; pub use self::constants::FILE_ATTRIBUTE_TIME_MODIFIED; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub use self::constants::FILE_ATTRIBUTE_TIME_MODIFIED_NSEC; pub use self::constants::FILE_ATTRIBUTE_TIME_MODIFIED_USEC; @@ -713,7 +713,7 @@ pub use self::constants::FILE_ATTRIBUTE_UNIX_MODE; pub use self::constants::FILE_ATTRIBUTE_UNIX_NLINK; pub use self::constants::FILE_ATTRIBUTE_UNIX_RDEV; pub use self::constants::FILE_ATTRIBUTE_UNIX_UID; -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub use self::constants::MEMORY_MONITOR_EXTENSION_POINT_NAME; pub use self::constants::MENU_ATTRIBUTE_ACTION; @@ -725,7 +725,7 @@ pub use self::constants::MENU_LINK_SECTION; pub use self::constants::MENU_LINK_SUBMENU; pub use self::constants::NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME; pub use self::constants::NETWORK_MONITOR_EXTENSION_POINT_NAME; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub use self::constants::POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME; pub use self::constants::PROXY_EXTENSION_POINT_NAME; @@ -768,10 +768,10 @@ pub mod traits { pub use super::dbus_interface_skeleton::DBusInterfaceSkeletonExt; pub use super::dbus_object::DBusObjectExt; pub use super::dbus_proxy::DBusProxyExt; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use super::debug_controller::DebugControllerExt; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use super::debug_controller_dbus::DebugControllerDBusExt; pub use super::drive::DriveExt; @@ -794,7 +794,7 @@ pub mod traits { pub use super::list_model::ListModelExt; pub use super::loadable_icon::LoadableIconExt; pub use super::memory_input_stream::MemoryInputStreamExt; - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub use super::memory_monitor::MemoryMonitorExt; pub use super::memory_output_stream::MemoryOutputStreamExt; @@ -810,7 +810,7 @@ pub mod traits { pub use super::permission::PermissionExt; pub use super::pollable_input_stream::PollableInputStreamExt; pub use super::pollable_output_stream::PollableOutputStreamExt; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub use super::power_profile_monitor::PowerProfileMonitorExt; pub use super::proxy::ProxyExt; @@ -842,22 +842,22 @@ pub mod traits { pub use super::tls_interaction::TlsInteractionExt; pub use super::tls_password::TlsPasswordExt; pub use super::tls_server_connection::TlsServerConnectionExt; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use super::unix_credentials_message::UnixCredentialsMessageExt; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use super::unix_fd_list::UnixFDListExt; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use super::unix_fd_message::UnixFDMessageExt; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use super::unix_input_stream::UnixInputStreamExt; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use super::unix_output_stream::UnixOutputStreamExt; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub use super::unix_socket_address::UnixSocketAddressExt; pub use super::vfs::VfsExt; diff --git a/gio/src/auto/mount.rs b/gio/src/auto/mount.rs index e2e367aba8c9..a948feab9293 100644 --- a/gio/src/auto/mount.rs +++ b/gio/src/auto/mount.rs @@ -26,144 +26,18 @@ impl Mount { pub const NONE: Option<&'static Mount> = None; } -pub trait MountExt: 'static { +pub trait MountExt: IsA + 'static { #[doc(alias = "g_mount_can_eject")] - fn can_eject(&self) -> bool; - - #[doc(alias = "g_mount_can_unmount")] - fn can_unmount(&self) -> bool; - - #[doc(alias = "g_mount_eject_with_operation")] - fn eject_with_operation) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn eject_with_operation_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_mount_get_default_location")] - #[doc(alias = "get_default_location")] - fn default_location(&self) -> File; - - #[doc(alias = "g_mount_get_drive")] - #[doc(alias = "get_drive")] - fn drive(&self) -> Option; - - #[doc(alias = "g_mount_get_icon")] - #[doc(alias = "get_icon")] - fn icon(&self) -> Icon; - - #[doc(alias = "g_mount_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> glib::GString; - - #[doc(alias = "g_mount_get_root")] - #[doc(alias = "get_root")] - fn root(&self) -> File; - - #[doc(alias = "g_mount_get_sort_key")] - #[doc(alias = "get_sort_key")] - fn sort_key(&self) -> Option; - - #[doc(alias = "g_mount_get_symbolic_icon")] - #[doc(alias = "get_symbolic_icon")] - fn symbolic_icon(&self) -> Icon; - - #[doc(alias = "g_mount_get_uuid")] - #[doc(alias = "get_uuid")] - fn uuid(&self) -> Option; - - #[doc(alias = "g_mount_get_volume")] - #[doc(alias = "get_volume")] - fn volume(&self) -> Option; - - #[doc(alias = "g_mount_guess_content_type")] - fn guess_content_type, glib::Error>) + 'static>( - &self, - force_rescan: bool, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn guess_content_type_future( - &self, - force_rescan: bool, - ) -> Pin< - Box_, glib::Error>> + 'static>, - >; - - #[doc(alias = "g_mount_guess_content_type_sync")] - fn guess_content_type_sync( - &self, - force_rescan: bool, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_mount_is_shadowed")] - fn is_shadowed(&self) -> bool; - - #[doc(alias = "g_mount_remount")] - fn remount) + 'static>( - &self, - flags: MountMountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn remount_future( - &self, - flags: MountMountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_mount_shadow")] - fn shadow(&self); - - #[doc(alias = "g_mount_unmount_with_operation")] - fn unmount_with_operation) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn unmount_with_operation_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_mount_unshadow")] - fn unshadow(&self); - - #[doc(alias = "changed")] - fn connect_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "pre-unmount")] - fn connect_pre_unmount(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "unmounted")] - fn connect_unmounted(&self, f: F) -> SignalHandlerId; -} - -impl> MountExt for O { fn can_eject(&self) -> bool { unsafe { from_glib(ffi::g_mount_can_eject(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_can_unmount")] fn can_unmount(&self) -> bool { unsafe { from_glib(ffi::g_mount_can_unmount(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_eject_with_operation")] fn eject_with_operation) + 'static>( &self, flags: MountUnmountFlags, @@ -237,6 +111,8 @@ impl> MountExt for O { )) } + #[doc(alias = "g_mount_get_default_location")] + #[doc(alias = "get_default_location")] fn default_location(&self) -> File { unsafe { from_glib_full(ffi::g_mount_get_default_location( @@ -245,26 +121,38 @@ impl> MountExt for O { } } + #[doc(alias = "g_mount_get_drive")] + #[doc(alias = "get_drive")] fn drive(&self) -> Option { unsafe { from_glib_full(ffi::g_mount_get_drive(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_get_icon")] + #[doc(alias = "get_icon")] fn icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_mount_get_icon(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_mount_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_get_root")] + #[doc(alias = "get_root")] fn root(&self) -> File { unsafe { from_glib_full(ffi::g_mount_get_root(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_get_sort_key")] + #[doc(alias = "get_sort_key")] fn sort_key(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_get_sort_key(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_get_symbolic_icon")] + #[doc(alias = "get_symbolic_icon")] fn symbolic_icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_mount_get_symbolic_icon( @@ -273,14 +161,19 @@ impl> MountExt for O { } } + #[doc(alias = "g_mount_get_uuid")] + #[doc(alias = "get_uuid")] fn uuid(&self) -> Option { unsafe { from_glib_full(ffi::g_mount_get_uuid(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_get_volume")] + #[doc(alias = "get_volume")] fn volume(&self) -> Option { unsafe { from_glib_full(ffi::g_mount_get_volume(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_guess_content_type")] fn guess_content_type, glib::Error>) + 'static>( &self, force_rescan: bool, @@ -347,6 +240,7 @@ impl> MountExt for O { )) } + #[doc(alias = "g_mount_guess_content_type_sync")] fn guess_content_type_sync( &self, force_rescan: bool, @@ -368,10 +262,12 @@ impl> MountExt for O { } } + #[doc(alias = "g_mount_is_shadowed")] fn is_shadowed(&self) -> bool { unsafe { from_glib(ffi::g_mount_is_shadowed(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_mount_remount")] fn remount) + 'static>( &self, flags: MountMountFlags, @@ -442,12 +338,14 @@ impl> MountExt for O { )) } + #[doc(alias = "g_mount_shadow")] fn shadow(&self) { unsafe { ffi::g_mount_shadow(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_mount_unmount_with_operation")] fn unmount_with_operation) + 'static>( &self, flags: MountUnmountFlags, @@ -524,12 +422,14 @@ impl> MountExt for O { )) } + #[doc(alias = "g_mount_unshadow")] fn unshadow(&self) { unsafe { ffi::g_mount_unshadow(self.as_ref().to_glib_none().0); } } + #[doc(alias = "changed")] fn connect_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn changed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GMount, @@ -551,6 +451,7 @@ impl> MountExt for O { } } + #[doc(alias = "pre-unmount")] fn connect_pre_unmount(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn pre_unmount_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GMount, @@ -572,6 +473,7 @@ impl> MountExt for O { } } + #[doc(alias = "unmounted")] fn connect_unmounted(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn unmounted_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GMount, @@ -594,6 +496,8 @@ impl> MountExt for O { } } +impl> MountExt for O {} + impl fmt::Display for Mount { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Mount") diff --git a/gio/src/auto/mount_operation.rs b/gio/src/auto/mount_operation.rs index c5a6709b58bc..f8549e884b34 100644 --- a/gio/src/auto/mount_operation.rs +++ b/gio/src/auto/mount_operation.rs @@ -34,150 +34,9 @@ impl Default for MountOperation { } } -pub trait MountOperationExt: 'static { +pub trait MountOperationExt: IsA + 'static { #[doc(alias = "g_mount_operation_get_anonymous")] #[doc(alias = "get_anonymous")] - fn is_anonymous(&self) -> bool; - - #[doc(alias = "g_mount_operation_get_choice")] - #[doc(alias = "get_choice")] - fn choice(&self) -> i32; - - #[doc(alias = "g_mount_operation_get_domain")] - #[doc(alias = "get_domain")] - fn domain(&self) -> Option; - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_mount_operation_get_is_tcrypt_hidden_volume")] - #[doc(alias = "get_is_tcrypt_hidden_volume")] - fn is_tcrypt_hidden_volume(&self) -> bool; - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_mount_operation_get_is_tcrypt_system_volume")] - #[doc(alias = "get_is_tcrypt_system_volume")] - fn is_tcrypt_system_volume(&self) -> bool; - - #[doc(alias = "g_mount_operation_get_password")] - #[doc(alias = "get_password")] - fn password(&self) -> Option; - - #[doc(alias = "g_mount_operation_get_password_save")] - #[doc(alias = "get_password_save")] - fn password_save(&self) -> PasswordSave; - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_mount_operation_get_pim")] - #[doc(alias = "get_pim")] - fn pim(&self) -> u32; - - #[doc(alias = "g_mount_operation_get_username")] - #[doc(alias = "get_username")] - fn username(&self) -> Option; - - #[doc(alias = "g_mount_operation_reply")] - fn reply(&self, result: MountOperationResult); - - #[doc(alias = "g_mount_operation_set_anonymous")] - fn set_anonymous(&self, anonymous: bool); - - #[doc(alias = "g_mount_operation_set_choice")] - fn set_choice(&self, choice: i32); - - #[doc(alias = "g_mount_operation_set_domain")] - fn set_domain(&self, domain: Option<&str>); - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_mount_operation_set_is_tcrypt_hidden_volume")] - fn set_is_tcrypt_hidden_volume(&self, hidden_volume: bool); - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_mount_operation_set_is_tcrypt_system_volume")] - fn set_is_tcrypt_system_volume(&self, system_volume: bool); - - #[doc(alias = "g_mount_operation_set_password")] - fn set_password(&self, password: Option<&str>); - - #[doc(alias = "g_mount_operation_set_password_save")] - fn set_password_save(&self, save: PasswordSave); - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "g_mount_operation_set_pim")] - fn set_pim(&self, pim: u32); - - #[doc(alias = "g_mount_operation_set_username")] - fn set_username(&self, username: Option<&str>); - - #[doc(alias = "aborted")] - fn connect_aborted(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "ask-password")] - fn connect_ask_password( - &self, - f: F, - ) -> SignalHandlerId; - - //#[doc(alias = "ask-question")] - //fn connect_ask_question(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "reply")] - fn connect_reply(&self, f: F) -> SignalHandlerId; - - //#[doc(alias = "show-processes")] - //fn connect_show_processes(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "show-unmount-progress")] - fn connect_show_unmount_progress( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "anonymous")] - fn connect_anonymous_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "choice")] - fn connect_choice_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "domain")] - fn connect_domain_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "is-tcrypt-hidden-volume")] - fn connect_is_tcrypt_hidden_volume_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "is-tcrypt-system-volume")] - fn connect_is_tcrypt_system_volume_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "password")] - fn connect_password_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "password-save")] - fn connect_password_save_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_58"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] - #[doc(alias = "pim")] - fn connect_pim_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "username")] - fn connect_username_notify(&self, f: F) -> SignalHandlerId; -} - -impl> MountOperationExt for O { fn is_anonymous(&self) -> bool { unsafe { from_glib(ffi::g_mount_operation_get_anonymous( @@ -186,10 +45,14 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_get_choice")] + #[doc(alias = "get_choice")] fn choice(&self) -> i32 { unsafe { ffi::g_mount_operation_get_choice(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_mount_operation_get_domain")] + #[doc(alias = "get_domain")] fn domain(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_operation_get_domain( @@ -198,8 +61,10 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "g_mount_operation_get_is_tcrypt_hidden_volume")] + #[doc(alias = "get_is_tcrypt_hidden_volume")] fn is_tcrypt_hidden_volume(&self) -> bool { unsafe { from_glib(ffi::g_mount_operation_get_is_tcrypt_hidden_volume( @@ -208,8 +73,10 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "g_mount_operation_get_is_tcrypt_system_volume")] + #[doc(alias = "get_is_tcrypt_system_volume")] fn is_tcrypt_system_volume(&self) -> bool { unsafe { from_glib(ffi::g_mount_operation_get_is_tcrypt_system_volume( @@ -218,6 +85,8 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_get_password")] + #[doc(alias = "get_password")] fn password(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_operation_get_password( @@ -226,6 +95,8 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_get_password_save")] + #[doc(alias = "get_password_save")] fn password_save(&self) -> PasswordSave { unsafe { from_glib(ffi::g_mount_operation_get_password_save( @@ -234,12 +105,16 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "g_mount_operation_get_pim")] + #[doc(alias = "get_pim")] fn pim(&self) -> u32 { unsafe { ffi::g_mount_operation_get_pim(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_mount_operation_get_username")] + #[doc(alias = "get_username")] fn username(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_operation_get_username( @@ -248,12 +123,14 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_reply")] fn reply(&self, result: MountOperationResult) { unsafe { ffi::g_mount_operation_reply(self.as_ref().to_glib_none().0, result.into_glib()); } } + #[doc(alias = "g_mount_operation_set_anonymous")] fn set_anonymous(&self, anonymous: bool) { unsafe { ffi::g_mount_operation_set_anonymous( @@ -263,12 +140,14 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_set_choice")] fn set_choice(&self, choice: i32) { unsafe { ffi::g_mount_operation_set_choice(self.as_ref().to_glib_none().0, choice); } } + #[doc(alias = "g_mount_operation_set_domain")] fn set_domain(&self, domain: Option<&str>) { unsafe { ffi::g_mount_operation_set_domain( @@ -278,8 +157,9 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "g_mount_operation_set_is_tcrypt_hidden_volume")] fn set_is_tcrypt_hidden_volume(&self, hidden_volume: bool) { unsafe { ffi::g_mount_operation_set_is_tcrypt_hidden_volume( @@ -289,8 +169,9 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "g_mount_operation_set_is_tcrypt_system_volume")] fn set_is_tcrypt_system_volume(&self, system_volume: bool) { unsafe { ffi::g_mount_operation_set_is_tcrypt_system_volume( @@ -300,6 +181,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_set_password")] fn set_password(&self, password: Option<&str>) { unsafe { ffi::g_mount_operation_set_password( @@ -309,6 +191,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "g_mount_operation_set_password_save")] fn set_password_save(&self, save: PasswordSave) { unsafe { ffi::g_mount_operation_set_password_save( @@ -318,14 +201,16 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "g_mount_operation_set_pim")] fn set_pim(&self, pim: u32) { unsafe { ffi::g_mount_operation_set_pim(self.as_ref().to_glib_none().0, pim); } } + #[doc(alias = "g_mount_operation_set_username")] fn set_username(&self, username: Option<&str>) { unsafe { ffi::g_mount_operation_set_username( @@ -335,6 +220,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "aborted")] fn connect_aborted(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn aborted_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GMountOperation, @@ -356,6 +242,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "ask-password")] fn connect_ask_password( &self, f: F, @@ -393,10 +280,12 @@ impl> MountOperationExt for O { } } + //#[doc(alias = "ask-question")] //fn connect_ask_question(&self, f: F) -> SignalHandlerId { // Empty ctype choices: *.CArray TypeId { ns_id: 0, id: 28 } //} + #[doc(alias = "reply")] fn connect_reply(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn reply_trampoline< P: IsA, @@ -425,11 +314,13 @@ impl> MountOperationExt for O { } } + //#[doc(alias = "show-processes")] //fn connect_show_processes(&self, f: F) -> SignalHandlerId { // Empty ctype processes: *.Array TypeId { ns_id: 2, id: 4 } // Empty ctype choices: *.CArray TypeId { ns_id: 0, id: 28 } //} + #[doc(alias = "show-unmount-progress")] fn connect_show_unmount_progress( &self, f: F, @@ -465,6 +356,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "anonymous")] fn connect_anonymous_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_anonymous_trampoline< P: IsA, @@ -490,6 +382,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "choice")] fn connect_choice_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_choice_trampoline< P: IsA, @@ -515,6 +408,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "domain")] fn connect_domain_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_domain_trampoline< P: IsA, @@ -540,8 +434,9 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "is-tcrypt-hidden-volume")] fn connect_is_tcrypt_hidden_volume_notify( &self, f: F, @@ -570,8 +465,9 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "is-tcrypt-system-volume")] fn connect_is_tcrypt_system_volume_notify( &self, f: F, @@ -600,6 +496,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "password")] fn connect_password_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_password_trampoline< P: IsA, @@ -625,6 +522,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "password-save")] fn connect_password_save_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_password_save_trampoline< P: IsA, @@ -650,8 +548,9 @@ impl> MountOperationExt for O { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] + #[doc(alias = "pim")] fn connect_pim_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_pim_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GMountOperation, @@ -674,6 +573,7 @@ impl> MountOperationExt for O { } } + #[doc(alias = "username")] fn connect_username_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_username_trampoline< P: IsA, @@ -700,6 +600,8 @@ impl> MountOperationExt for O { } } +impl> MountOperationExt for O {} + impl fmt::Display for MountOperation { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("MountOperation") diff --git a/gio/src/auto/network_address.rs b/gio/src/auto/network_address.rs index b105c5b5dfea..b2ac9baaba12 100644 --- a/gio/src/auto/network_address.rs +++ b/gio/src/auto/network_address.rs @@ -63,21 +63,9 @@ impl NetworkAddress { unsafe impl Send for NetworkAddress {} unsafe impl Sync for NetworkAddress {} -pub trait NetworkAddressExt: 'static { +pub trait NetworkAddressExt: IsA + 'static { #[doc(alias = "g_network_address_get_hostname")] #[doc(alias = "get_hostname")] - fn hostname(&self) -> glib::GString; - - #[doc(alias = "g_network_address_get_port")] - #[doc(alias = "get_port")] - fn port(&self) -> u16; - - #[doc(alias = "g_network_address_get_scheme")] - #[doc(alias = "get_scheme")] - fn scheme(&self) -> Option; -} - -impl> NetworkAddressExt for O { fn hostname(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_address_get_hostname( @@ -86,10 +74,14 @@ impl> NetworkAddressExt for O { } } + #[doc(alias = "g_network_address_get_port")] + #[doc(alias = "get_port")] fn port(&self) -> u16 { unsafe { ffi::g_network_address_get_port(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_network_address_get_scheme")] + #[doc(alias = "get_scheme")] fn scheme(&self) -> Option { unsafe { from_glib_none(ffi::g_network_address_get_scheme( @@ -99,6 +91,8 @@ impl> NetworkAddressExt for O { } } +impl> NetworkAddressExt for O {} + impl fmt::Display for NetworkAddress { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("NetworkAddress") diff --git a/gio/src/auto/network_monitor.rs b/gio/src/auto/network_monitor.rs index c827c0f9ab9a..44e18c09b55f 100644 --- a/gio/src/auto/network_monitor.rs +++ b/gio/src/auto/network_monitor.rs @@ -30,53 +30,8 @@ impl NetworkMonitor { } } -pub trait NetworkMonitorExt: 'static { +pub trait NetworkMonitorExt: IsA + 'static { #[doc(alias = "g_network_monitor_can_reach")] - fn can_reach( - &self, - connectable: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_network_monitor_can_reach_async")] - fn can_reach_async) + 'static>( - &self, - connectable: &impl IsA, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn can_reach_future( - &self, - connectable: &(impl IsA + Clone + 'static), - ) -> Pin> + 'static>>; - - #[doc(alias = "g_network_monitor_get_connectivity")] - #[doc(alias = "get_connectivity")] - fn connectivity(&self) -> NetworkConnectivity; - - #[doc(alias = "g_network_monitor_get_network_available")] - #[doc(alias = "get_network_available")] - fn is_network_available(&self) -> bool; - - #[doc(alias = "g_network_monitor_get_network_metered")] - #[doc(alias = "get_network_metered")] - fn is_network_metered(&self) -> bool; - - #[doc(alias = "network-changed")] - fn connect_network_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "connectivity")] - fn connect_connectivity_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "network-available")] - fn connect_network_available_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "network-metered")] - fn connect_network_metered_notify(&self, f: F) -> SignalHandlerId; -} - -impl> NetworkMonitorExt for O { fn can_reach( &self, connectable: &impl IsA, @@ -99,6 +54,7 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "g_network_monitor_can_reach_async")] fn can_reach_async) + 'static>( &self, connectable: &impl IsA, @@ -164,6 +120,8 @@ impl> NetworkMonitorExt for O { )) } + #[doc(alias = "g_network_monitor_get_connectivity")] + #[doc(alias = "get_connectivity")] fn connectivity(&self) -> NetworkConnectivity { unsafe { from_glib(ffi::g_network_monitor_get_connectivity( @@ -172,6 +130,8 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "g_network_monitor_get_network_available")] + #[doc(alias = "get_network_available")] fn is_network_available(&self) -> bool { unsafe { from_glib(ffi::g_network_monitor_get_network_available( @@ -180,6 +140,8 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "g_network_monitor_get_network_metered")] + #[doc(alias = "get_network_metered")] fn is_network_metered(&self) -> bool { unsafe { from_glib(ffi::g_network_monitor_get_network_metered( @@ -188,6 +150,7 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "network-changed")] fn connect_network_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn network_changed_trampoline< P: IsA, @@ -216,6 +179,7 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "connectivity")] fn connect_connectivity_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_connectivity_trampoline< P: IsA, @@ -241,6 +205,7 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "network-available")] fn connect_network_available_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_network_available_trampoline< P: IsA, @@ -266,6 +231,7 @@ impl> NetworkMonitorExt for O { } } + #[doc(alias = "network-metered")] fn connect_network_metered_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_network_metered_trampoline< P: IsA, @@ -292,6 +258,8 @@ impl> NetworkMonitorExt for O { } } +impl> NetworkMonitorExt for O {} + impl fmt::Display for NetworkMonitor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("NetworkMonitor") diff --git a/gio/src/auto/network_service.rs b/gio/src/auto/network_service.rs index 7c865b74c0a1..8e450a794f37 100644 --- a/gio/src/auto/network_service.rs +++ b/gio/src/auto/network_service.rs @@ -34,31 +34,9 @@ impl NetworkService { } } -pub trait NetworkServiceExt: 'static { +pub trait NetworkServiceExt: IsA + 'static { #[doc(alias = "g_network_service_get_domain")] #[doc(alias = "get_domain")] - fn domain(&self) -> glib::GString; - - #[doc(alias = "g_network_service_get_protocol")] - #[doc(alias = "get_protocol")] - fn protocol(&self) -> glib::GString; - - #[doc(alias = "g_network_service_get_scheme")] - #[doc(alias = "get_scheme")] - fn scheme(&self) -> glib::GString; - - #[doc(alias = "g_network_service_get_service")] - #[doc(alias = "get_service")] - fn service(&self) -> glib::GString; - - #[doc(alias = "g_network_service_set_scheme")] - fn set_scheme(&self, scheme: &str); - - #[doc(alias = "scheme")] - fn connect_scheme_notify(&self, f: F) -> SignalHandlerId; -} - -impl> NetworkServiceExt for O { fn domain(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_domain( @@ -67,6 +45,8 @@ impl> NetworkServiceExt for O { } } + #[doc(alias = "g_network_service_get_protocol")] + #[doc(alias = "get_protocol")] fn protocol(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_protocol( @@ -75,6 +55,8 @@ impl> NetworkServiceExt for O { } } + #[doc(alias = "g_network_service_get_scheme")] + #[doc(alias = "get_scheme")] fn scheme(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_scheme( @@ -83,6 +65,8 @@ impl> NetworkServiceExt for O { } } + #[doc(alias = "g_network_service_get_service")] + #[doc(alias = "get_service")] fn service(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_service( @@ -91,6 +75,7 @@ impl> NetworkServiceExt for O { } } + #[doc(alias = "g_network_service_set_scheme")] fn set_scheme(&self, scheme: &str) { unsafe { ffi::g_network_service_set_scheme( @@ -100,6 +85,7 @@ impl> NetworkServiceExt for O { } } + #[doc(alias = "scheme")] fn connect_scheme_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_scheme_trampoline< P: IsA, @@ -126,6 +112,8 @@ impl> NetworkServiceExt for O { } } +impl> NetworkServiceExt for O {} + impl fmt::Display for NetworkService { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("NetworkService") diff --git a/gio/src/auto/notification.rs b/gio/src/auto/notification.rs index 3681d88eac8b..de26b3274b27 100644 --- a/gio/src/auto/notification.rs +++ b/gio/src/auto/notification.rs @@ -61,7 +61,7 @@ impl Notification { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_notification_set_category")] pub fn set_category(&self, category: Option<&str>) { diff --git a/gio/src/auto/output_stream.rs b/gio/src/auto/output_stream.rs index 34a6a7672802..26653ca5f967 100644 --- a/gio/src/auto/output_stream.rs +++ b/gio/src/auto/output_stream.rs @@ -19,122 +19,15 @@ impl OutputStream { pub const NONE: Option<&'static OutputStream> = None; } -pub trait OutputStreamExt: 'static { +pub trait OutputStreamExt: IsA + 'static { #[doc(alias = "g_output_stream_clear_pending")] - fn clear_pending(&self); - - #[doc(alias = "g_output_stream_close")] - fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_output_stream_close_async")] - fn close_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn close_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_output_stream_flush")] - fn flush(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_output_stream_flush_async")] - fn flush_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn flush_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_output_stream_has_pending")] - fn has_pending(&self) -> bool; - - #[doc(alias = "g_output_stream_is_closed")] - fn is_closed(&self) -> bool; - - #[doc(alias = "g_output_stream_is_closing")] - fn is_closing(&self) -> bool; - - //#[doc(alias = "g_output_stream_printf")] - //fn printf(&self, cancellable: Option<&impl IsA>, error: &mut glib::Error, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Option; - - #[doc(alias = "g_output_stream_set_pending")] - fn set_pending(&self) -> Result<(), glib::Error>; - - #[doc(alias = "g_output_stream_splice")] - fn splice( - &self, - source: &impl IsA, - flags: OutputStreamSpliceFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_output_stream_splice_async")] - fn splice_async) + 'static>( - &self, - source: &impl IsA, - flags: OutputStreamSpliceFlags, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn splice_future( - &self, - source: &(impl IsA + Clone + 'static), - flags: OutputStreamSpliceFlags, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - //#[doc(alias = "g_output_stream_vprintf")] - //fn vprintf(&self, cancellable: Option<&impl IsA>, error: &mut glib::Error, format: &str, args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option; - - #[doc(alias = "g_output_stream_write")] - fn write( - &self, - buffer: &[u8], - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_output_stream_write_bytes")] - fn write_bytes( - &self, - bytes: &glib::Bytes, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_output_stream_write_bytes_async")] - fn write_bytes_async) + 'static>( - &self, - bytes: &glib::Bytes, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn write_bytes_future( - &self, - bytes: &glib::Bytes, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; -} - -impl> OutputStreamExt for O { fn clear_pending(&self) { unsafe { ffi::g_output_stream_clear_pending(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_output_stream_close")] fn close(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -152,6 +45,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_close_async")] fn close_async) + 'static>( &self, io_priority: glib::Priority, @@ -215,6 +109,7 @@ impl> OutputStreamExt for O { )) } + #[doc(alias = "g_output_stream_flush")] fn flush(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -232,6 +127,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_flush_async")] fn flush_async) + 'static>( &self, io_priority: glib::Priority, @@ -295,6 +191,7 @@ impl> OutputStreamExt for O { )) } + #[doc(alias = "g_output_stream_has_pending")] fn has_pending(&self) -> bool { unsafe { from_glib(ffi::g_output_stream_has_pending( @@ -303,6 +200,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_is_closed")] fn is_closed(&self) -> bool { unsafe { from_glib(ffi::g_output_stream_is_closed( @@ -311,6 +209,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_is_closing")] fn is_closing(&self) -> bool { unsafe { from_glib(ffi::g_output_stream_is_closing( @@ -319,10 +218,12 @@ impl> OutputStreamExt for O { } } + //#[doc(alias = "g_output_stream_printf")] //fn printf(&self, cancellable: Option<&impl IsA>, error: &mut glib::Error, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Option { // unsafe { TODO: call ffi:g_output_stream_printf() } //} + #[doc(alias = "g_output_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -337,6 +238,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_splice")] fn splice( &self, source: &impl IsA, @@ -360,6 +262,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_splice_async")] fn splice_async) + 'static>( &self, source: &impl IsA, @@ -430,10 +333,12 @@ impl> OutputStreamExt for O { )) } + //#[doc(alias = "g_output_stream_vprintf")] //fn vprintf(&self, cancellable: Option<&impl IsA>, error: &mut glib::Error, format: &str, args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option { // unsafe { TODO: call ffi:g_output_stream_vprintf() } //} + #[doc(alias = "g_output_stream_write")] fn write( &self, buffer: &[u8], @@ -457,6 +362,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_write_bytes")] fn write_bytes( &self, bytes: &glib::Bytes, @@ -478,6 +384,7 @@ impl> OutputStreamExt for O { } } + #[doc(alias = "g_output_stream_write_bytes_async")] fn write_bytes_async) + 'static>( &self, bytes: &glib::Bytes, @@ -547,6 +454,8 @@ impl> OutputStreamExt for O { } } +impl> OutputStreamExt for O {} + impl fmt::Display for OutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("OutputStream") diff --git a/gio/src/auto/permission.rs b/gio/src/auto/permission.rs index 444faccadaa1..1b9ec58c07fa 100644 --- a/gio/src/auto/permission.rs +++ b/gio/src/auto/permission.rs @@ -23,61 +23,8 @@ impl Permission { pub const NONE: Option<&'static Permission> = None; } -pub trait PermissionExt: 'static { +pub trait PermissionExt: IsA + 'static { #[doc(alias = "g_permission_acquire")] - fn acquire(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_permission_acquire_async")] - fn acquire_async) + 'static>( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn acquire_future( - &self, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_permission_get_allowed")] - #[doc(alias = "get_allowed")] - fn is_allowed(&self) -> bool; - - #[doc(alias = "g_permission_get_can_acquire")] - #[doc(alias = "get_can_acquire")] - fn can_acquire(&self) -> bool; - - #[doc(alias = "g_permission_get_can_release")] - #[doc(alias = "get_can_release")] - fn can_release(&self) -> bool; - - #[doc(alias = "g_permission_impl_update")] - fn impl_update(&self, allowed: bool, can_acquire: bool, can_release: bool); - - #[doc(alias = "g_permission_release")] - fn release(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_permission_release_async")] - fn release_async) + 'static>( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn release_future( - &self, - ) -> Pin> + 'static>>; - - #[doc(alias = "allowed")] - fn connect_allowed_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "can-acquire")] - fn connect_can_acquire_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "can-release")] - fn connect_can_release_notify(&self, f: F) -> SignalHandlerId; -} - -impl> PermissionExt for O { fn acquire(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -95,6 +42,7 @@ impl> PermissionExt for O { } } + #[doc(alias = "g_permission_acquire_async")] fn acquire_async) + 'static>( &self, cancellable: Option<&impl IsA>, @@ -155,6 +103,8 @@ impl> PermissionExt for O { )) } + #[doc(alias = "g_permission_get_allowed")] + #[doc(alias = "get_allowed")] fn is_allowed(&self) -> bool { unsafe { from_glib(ffi::g_permission_get_allowed( @@ -163,6 +113,8 @@ impl> PermissionExt for O { } } + #[doc(alias = "g_permission_get_can_acquire")] + #[doc(alias = "get_can_acquire")] fn can_acquire(&self) -> bool { unsafe { from_glib(ffi::g_permission_get_can_acquire( @@ -171,6 +123,8 @@ impl> PermissionExt for O { } } + #[doc(alias = "g_permission_get_can_release")] + #[doc(alias = "get_can_release")] fn can_release(&self) -> bool { unsafe { from_glib(ffi::g_permission_get_can_release( @@ -179,6 +133,7 @@ impl> PermissionExt for O { } } + #[doc(alias = "g_permission_impl_update")] fn impl_update(&self, allowed: bool, can_acquire: bool, can_release: bool) { unsafe { ffi::g_permission_impl_update( @@ -190,6 +145,7 @@ impl> PermissionExt for O { } } + #[doc(alias = "g_permission_release")] fn release(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -207,6 +163,7 @@ impl> PermissionExt for O { } } + #[doc(alias = "g_permission_release_async")] fn release_async) + 'static>( &self, cancellable: Option<&impl IsA>, @@ -267,6 +224,7 @@ impl> PermissionExt for O { )) } + #[doc(alias = "allowed")] fn connect_allowed_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_allowed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GPermission, @@ -289,6 +247,7 @@ impl> PermissionExt for O { } } + #[doc(alias = "can-acquire")] fn connect_can_acquire_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_can_acquire_trampoline< P: IsA, @@ -314,6 +273,7 @@ impl> PermissionExt for O { } } + #[doc(alias = "can-release")] fn connect_can_release_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_can_release_trampoline< P: IsA, @@ -340,6 +300,8 @@ impl> PermissionExt for O { } } +impl> PermissionExt for O {} + impl fmt::Display for Permission { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Permission") diff --git a/gio/src/auto/pollable_input_stream.rs b/gio/src/auto/pollable_input_stream.rs index c831856c0d30..09d6dfebf1ee 100644 --- a/gio/src/auto/pollable_input_stream.rs +++ b/gio/src/auto/pollable_input_stream.rs @@ -19,15 +19,8 @@ impl PollableInputStream { pub const NONE: Option<&'static PollableInputStream> = None; } -pub trait PollableInputStreamExt: 'static { +pub trait PollableInputStreamExt: IsA + 'static { #[doc(alias = "g_pollable_input_stream_can_poll")] - fn can_poll(&self) -> bool; - - #[doc(alias = "g_pollable_input_stream_is_readable")] - fn is_readable(&self) -> bool; -} - -impl> PollableInputStreamExt for O { fn can_poll(&self) -> bool { unsafe { from_glib(ffi::g_pollable_input_stream_can_poll( @@ -36,6 +29,7 @@ impl> PollableInputStreamExt for O { } } + #[doc(alias = "g_pollable_input_stream_is_readable")] fn is_readable(&self) -> bool { unsafe { from_glib(ffi::g_pollable_input_stream_is_readable( @@ -45,6 +39,8 @@ impl> PollableInputStreamExt for O { } } +impl> PollableInputStreamExt for O {} + impl fmt::Display for PollableInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("PollableInputStream") diff --git a/gio/src/auto/pollable_output_stream.rs b/gio/src/auto/pollable_output_stream.rs index 0ea16d91df00..339d511b31ca 100644 --- a/gio/src/auto/pollable_output_stream.rs +++ b/gio/src/auto/pollable_output_stream.rs @@ -19,22 +19,8 @@ impl PollableOutputStream { pub const NONE: Option<&'static PollableOutputStream> = None; } -pub trait PollableOutputStreamExt: 'static { +pub trait PollableOutputStreamExt: IsA + 'static { #[doc(alias = "g_pollable_output_stream_can_poll")] - fn can_poll(&self) -> bool; - - #[doc(alias = "g_pollable_output_stream_is_writable")] - fn is_writable(&self) -> bool; - - #[doc(alias = "g_pollable_output_stream_write_nonblocking")] - fn write_nonblocking( - &self, - buffer: &[u8], - cancellable: Option<&impl IsA>, - ) -> Result; -} - -impl> PollableOutputStreamExt for O { fn can_poll(&self) -> bool { unsafe { from_glib(ffi::g_pollable_output_stream_can_poll( @@ -43,6 +29,7 @@ impl> PollableOutputStreamExt for O { } } + #[doc(alias = "g_pollable_output_stream_is_writable")] fn is_writable(&self) -> bool { unsafe { from_glib(ffi::g_pollable_output_stream_is_writable( @@ -51,6 +38,7 @@ impl> PollableOutputStreamExt for O { } } + #[doc(alias = "g_pollable_output_stream_write_nonblocking")] fn write_nonblocking( &self, buffer: &[u8], @@ -75,6 +63,8 @@ impl> PollableOutputStreamExt for O { } } +impl> PollableOutputStreamExt for O {} + impl fmt::Display for PollableOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("PollableOutputStream") diff --git a/gio/src/auto/power_profile_monitor.rs b/gio/src/auto/power_profile_monitor.rs index e3779745da89..1200466aebf7 100644 --- a/gio/src/auto/power_profile_monitor.rs +++ b/gio/src/auto/power_profile_monitor.rs @@ -29,18 +29,9 @@ impl PowerProfileMonitor { } } -pub trait PowerProfileMonitorExt: 'static { +pub trait PowerProfileMonitorExt: IsA + 'static { #[doc(alias = "g_power_profile_monitor_get_power_saver_enabled")] #[doc(alias = "get_power_saver_enabled")] - fn is_power_saver_enabled(&self) -> bool; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "power-saver-enabled")] - fn connect_power_saver_enabled_notify(&self, f: F) -> SignalHandlerId; -} - -impl> PowerProfileMonitorExt for O { fn is_power_saver_enabled(&self) -> bool { unsafe { from_glib(ffi::g_power_profile_monitor_get_power_saver_enabled( @@ -49,8 +40,9 @@ impl> PowerProfileMonitorExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "power-saver-enabled")] fn connect_power_saver_enabled_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_power_saver_enabled_trampoline< P: IsA, @@ -77,6 +69,8 @@ impl> PowerProfileMonitorExt for O { } } +impl> PowerProfileMonitorExt for O {} + impl fmt::Display for PowerProfileMonitor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("PowerProfileMonitor") diff --git a/gio/src/auto/proxy.rs b/gio/src/auto/proxy.rs index 81ef08f39590..4c690b772a48 100644 --- a/gio/src/auto/proxy.rs +++ b/gio/src/auto/proxy.rs @@ -29,35 +29,8 @@ impl Proxy { } } -pub trait ProxyExt: 'static { +pub trait ProxyExt: IsA + 'static { #[doc(alias = "g_proxy_connect")] - fn connect( - &self, - connection: &impl IsA, - proxy_address: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_proxy_connect_async")] - fn connect_async) + 'static>( - &self, - connection: &impl IsA, - proxy_address: &impl IsA, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn connect_future( - &self, - connection: &(impl IsA + Clone + 'static), - proxy_address: &(impl IsA + Clone + 'static), - ) -> Pin> + 'static>>; - - #[doc(alias = "g_proxy_supports_hostname")] - fn supports_hostname(&self) -> bool; -} - -impl> ProxyExt for O { fn connect( &self, connection: &impl IsA, @@ -81,6 +54,7 @@ impl> ProxyExt for O { } } + #[doc(alias = "g_proxy_connect_async")] fn connect_async) + 'static>( &self, connection: &impl IsA, @@ -149,6 +123,7 @@ impl> ProxyExt for O { )) } + #[doc(alias = "g_proxy_supports_hostname")] fn supports_hostname(&self) -> bool { unsafe { from_glib(ffi::g_proxy_supports_hostname( @@ -158,6 +133,8 @@ impl> ProxyExt for O { } } +impl> ProxyExt for O {} + impl fmt::Display for Proxy { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Proxy") diff --git a/gio/src/auto/proxy_address.rs b/gio/src/auto/proxy_address.rs index 7123fef65aab..f89e057e3cb5 100644 --- a/gio/src/auto/proxy_address.rs +++ b/gio/src/auto/proxy_address.rs @@ -46,37 +46,9 @@ impl ProxyAddress { unsafe impl Send for ProxyAddress {} unsafe impl Sync for ProxyAddress {} -pub trait ProxyAddressExt: 'static { +pub trait ProxyAddressExt: IsA + 'static { #[doc(alias = "g_proxy_address_get_destination_hostname")] #[doc(alias = "get_destination_hostname")] - fn destination_hostname(&self) -> glib::GString; - - #[doc(alias = "g_proxy_address_get_destination_port")] - #[doc(alias = "get_destination_port")] - fn destination_port(&self) -> u16; - - #[doc(alias = "g_proxy_address_get_destination_protocol")] - #[doc(alias = "get_destination_protocol")] - fn destination_protocol(&self) -> glib::GString; - - #[doc(alias = "g_proxy_address_get_password")] - #[doc(alias = "get_password")] - fn password(&self) -> Option; - - #[doc(alias = "g_proxy_address_get_protocol")] - #[doc(alias = "get_protocol")] - fn protocol(&self) -> glib::GString; - - #[doc(alias = "g_proxy_address_get_uri")] - #[doc(alias = "get_uri")] - fn uri(&self) -> Option; - - #[doc(alias = "g_proxy_address_get_username")] - #[doc(alias = "get_username")] - fn username(&self) -> Option; -} - -impl> ProxyAddressExt for O { fn destination_hostname(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_proxy_address_get_destination_hostname( @@ -85,10 +57,14 @@ impl> ProxyAddressExt for O { } } + #[doc(alias = "g_proxy_address_get_destination_port")] + #[doc(alias = "get_destination_port")] fn destination_port(&self) -> u16 { unsafe { ffi::g_proxy_address_get_destination_port(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_proxy_address_get_destination_protocol")] + #[doc(alias = "get_destination_protocol")] fn destination_protocol(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_proxy_address_get_destination_protocol( @@ -97,6 +73,8 @@ impl> ProxyAddressExt for O { } } + #[doc(alias = "g_proxy_address_get_password")] + #[doc(alias = "get_password")] fn password(&self) -> Option { unsafe { from_glib_none(ffi::g_proxy_address_get_password( @@ -105,6 +83,8 @@ impl> ProxyAddressExt for O { } } + #[doc(alias = "g_proxy_address_get_protocol")] + #[doc(alias = "get_protocol")] fn protocol(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_proxy_address_get_protocol( @@ -113,10 +93,14 @@ impl> ProxyAddressExt for O { } } + #[doc(alias = "g_proxy_address_get_uri")] + #[doc(alias = "get_uri")] fn uri(&self) -> Option { unsafe { from_glib_none(ffi::g_proxy_address_get_uri(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_proxy_address_get_username")] + #[doc(alias = "get_username")] fn username(&self) -> Option { unsafe { from_glib_none(ffi::g_proxy_address_get_username( @@ -126,6 +110,8 @@ impl> ProxyAddressExt for O { } } +impl> ProxyAddressExt for O {} + impl fmt::Display for ProxyAddress { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ProxyAddress") diff --git a/gio/src/auto/proxy_resolver.rs b/gio/src/auto/proxy_resolver.rs index 6dedbc5e7ff5..75cd1d84c301 100644 --- a/gio/src/auto/proxy_resolver.rs +++ b/gio/src/auto/proxy_resolver.rs @@ -26,34 +26,8 @@ impl ProxyResolver { } } -pub trait ProxyResolverExt: 'static { +pub trait ProxyResolverExt: IsA + 'static { #[doc(alias = "g_proxy_resolver_is_supported")] - fn is_supported(&self) -> bool; - - #[doc(alias = "g_proxy_resolver_lookup")] - fn lookup( - &self, - uri: &str, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_proxy_resolver_lookup_async")] - fn lookup_async, glib::Error>) + 'static>( - &self, - uri: &str, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_future( - &self, - uri: &str, - ) -> Pin< - Box_, glib::Error>> + 'static>, - >; -} - -impl> ProxyResolverExt for O { fn is_supported(&self) -> bool { unsafe { from_glib(ffi::g_proxy_resolver_is_supported( @@ -62,6 +36,7 @@ impl> ProxyResolverExt for O { } } + #[doc(alias = "g_proxy_resolver_lookup")] fn lookup( &self, uri: &str, @@ -83,6 +58,7 @@ impl> ProxyResolverExt for O { } } + #[doc(alias = "g_proxy_resolver_lookup_async")] fn lookup_async, glib::Error>) + 'static>( &self, uri: &str, @@ -151,6 +127,8 @@ impl> ProxyResolverExt for O { } } +impl> ProxyResolverExt for O {} + impl fmt::Display for ProxyResolver { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ProxyResolver") diff --git a/gio/src/auto/remote_action_group.rs b/gio/src/auto/remote_action_group.rs index b729c9ac5681..56119861c701 100644 --- a/gio/src/auto/remote_action_group.rs +++ b/gio/src/auto/remote_action_group.rs @@ -19,25 +19,8 @@ impl RemoteActionGroup { pub const NONE: Option<&'static RemoteActionGroup> = None; } -pub trait RemoteActionGroupExt: 'static { +pub trait RemoteActionGroupExt: IsA + 'static { #[doc(alias = "g_remote_action_group_activate_action_full")] - fn activate_action_full( - &self, - action_name: &str, - parameter: Option<&glib::Variant>, - platform_data: &glib::Variant, - ); - - #[doc(alias = "g_remote_action_group_change_action_state_full")] - fn change_action_state_full( - &self, - action_name: &str, - value: &glib::Variant, - platform_data: &glib::Variant, - ); -} - -impl> RemoteActionGroupExt for O { fn activate_action_full( &self, action_name: &str, @@ -54,6 +37,7 @@ impl> RemoteActionGroupExt for O { } } + #[doc(alias = "g_remote_action_group_change_action_state_full")] fn change_action_state_full( &self, action_name: &str, @@ -71,6 +55,8 @@ impl> RemoteActionGroupExt for O { } } +impl> RemoteActionGroupExt for O {} + impl fmt::Display for RemoteActionGroup { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("RemoteActionGroup") diff --git a/gio/src/auto/resolver.rs b/gio/src/auto/resolver.rs index 6f8afa5727d6..7cf6df3e62e2 100644 --- a/gio/src/auto/resolver.rs +++ b/gio/src/auto/resolver.rs @@ -2,7 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] use crate::ResolverNameLookupFlags; use crate::{AsyncResult, Cancellable, InetAddress, ResolverRecordType, SrvTarget}; @@ -43,135 +43,8 @@ impl Resolver { } } -pub trait ResolverExt: 'static { +pub trait ResolverExt: IsA + 'static { #[doc(alias = "g_resolver_lookup_by_address")] - fn lookup_by_address( - &self, - address: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_resolver_lookup_by_address_async")] - fn lookup_by_address_async) + 'static>( - &self, - address: &impl IsA, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_by_address_future( - &self, - address: &(impl IsA + Clone + 'static), - ) -> Pin> + 'static>>; - - #[doc(alias = "g_resolver_lookup_by_name")] - fn lookup_by_name( - &self, - hostname: &str, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_resolver_lookup_by_name_async")] - fn lookup_by_name_async, glib::Error>) + 'static>( - &self, - hostname: &str, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_by_name_future( - &self, - hostname: &str, - ) -> Pin, glib::Error>> + 'static>>; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "g_resolver_lookup_by_name_with_flags")] - fn lookup_by_name_with_flags( - &self, - hostname: &str, - flags: ResolverNameLookupFlags, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "g_resolver_lookup_by_name_with_flags_async")] - fn lookup_by_name_with_flags_async, glib::Error>) + 'static>( - &self, - hostname: &str, - flags: ResolverNameLookupFlags, - cancellable: Option<&impl IsA>, - callback: P, - ); - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - fn lookup_by_name_with_flags_future( - &self, - hostname: &str, - flags: ResolverNameLookupFlags, - ) -> Pin, glib::Error>> + 'static>>; - - #[doc(alias = "g_resolver_lookup_records")] - fn lookup_records( - &self, - rrname: &str, - record_type: ResolverRecordType, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_resolver_lookup_records_async")] - fn lookup_records_async, glib::Error>) + 'static>( - &self, - rrname: &str, - record_type: ResolverRecordType, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_records_future( - &self, - rrname: &str, - record_type: ResolverRecordType, - ) -> Pin< - Box_, glib::Error>> + 'static>, - >; - - #[doc(alias = "g_resolver_lookup_service")] - fn lookup_service( - &self, - service: &str, - protocol: &str, - domain: &str, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_resolver_lookup_service_async")] - fn lookup_service_async, glib::Error>) + 'static>( - &self, - service: &str, - protocol: &str, - domain: &str, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_service_future( - &self, - service: &str, - protocol: &str, - domain: &str, - ) -> Pin, glib::Error>> + 'static>>; - - #[doc(alias = "g_resolver_set_default")] - fn set_default(&self); - - #[doc(alias = "reload")] - fn connect_reload(&self, f: F) -> SignalHandlerId; -} - -impl> ResolverExt for O { fn lookup_by_address( &self, address: &impl IsA, @@ -193,6 +66,7 @@ impl> ResolverExt for O { } } + #[doc(alias = "g_resolver_lookup_by_address_async")] fn lookup_by_address_async) + 'static>( &self, address: &impl IsA, @@ -259,6 +133,7 @@ impl> ResolverExt for O { )) } + #[doc(alias = "g_resolver_lookup_by_name")] fn lookup_by_name( &self, hostname: &str, @@ -280,6 +155,7 @@ impl> ResolverExt for O { } } + #[doc(alias = "g_resolver_lookup_by_name_async")] fn lookup_by_name_async, glib::Error>) + 'static>( &self, hostname: &str, @@ -346,8 +222,9 @@ impl> ResolverExt for O { )) } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "g_resolver_lookup_by_name_with_flags")] fn lookup_by_name_with_flags( &self, hostname: &str, @@ -371,8 +248,9 @@ impl> ResolverExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "g_resolver_lookup_by_name_with_flags_async")] fn lookup_by_name_with_flags_async< P: FnOnce(Result, glib::Error>) + 'static, >( @@ -430,7 +308,7 @@ impl> ResolverExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] fn lookup_by_name_with_flags_future( &self, @@ -454,6 +332,7 @@ impl> ResolverExt for O { )) } + #[doc(alias = "g_resolver_lookup_records")] fn lookup_records( &self, rrname: &str, @@ -477,6 +356,7 @@ impl> ResolverExt for O { } } + #[doc(alias = "g_resolver_lookup_records_async")] fn lookup_records_async, glib::Error>) + 'static>( &self, rrname: &str, @@ -547,6 +427,7 @@ impl> ResolverExt for O { )) } + #[doc(alias = "g_resolver_lookup_service")] fn lookup_service( &self, service: &str, @@ -572,6 +453,7 @@ impl> ResolverExt for O { } } + #[doc(alias = "g_resolver_lookup_service_async")] fn lookup_service_async, glib::Error>) + 'static>( &self, service: &str, @@ -652,12 +534,14 @@ impl> ResolverExt for O { )) } + #[doc(alias = "g_resolver_set_default")] fn set_default(&self) { unsafe { ffi::g_resolver_set_default(self.as_ref().to_glib_none().0); } } + #[doc(alias = "reload")] fn connect_reload(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn reload_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GResolver, @@ -680,6 +564,8 @@ impl> ResolverExt for O { } } +impl> ResolverExt for O {} + impl fmt::Display for Resolver { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Resolver") diff --git a/gio/src/auto/seekable.rs b/gio/src/auto/seekable.rs index 692ab750d602..904cba8aee13 100644 --- a/gio/src/auto/seekable.rs +++ b/gio/src/auto/seekable.rs @@ -19,41 +19,18 @@ impl Seekable { pub const NONE: Option<&'static Seekable> = None; } -pub trait SeekableExt: 'static { +pub trait SeekableExt: IsA + 'static { #[doc(alias = "g_seekable_can_seek")] - fn can_seek(&self) -> bool; - - #[doc(alias = "g_seekable_can_truncate")] - fn can_truncate(&self) -> bool; - - #[doc(alias = "g_seekable_seek")] - fn seek( - &self, - offset: i64, - type_: glib::SeekType, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_seekable_tell")] - fn tell(&self) -> i64; - - #[doc(alias = "g_seekable_truncate")] - fn truncate( - &self, - offset: i64, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; -} - -impl> SeekableExt for O { fn can_seek(&self) -> bool { unsafe { from_glib(ffi::g_seekable_can_seek(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_seekable_can_truncate")] fn can_truncate(&self) -> bool { unsafe { from_glib(ffi::g_seekable_can_truncate(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_seekable_seek")] fn seek( &self, offset: i64, @@ -78,10 +55,12 @@ impl> SeekableExt for O { } } + #[doc(alias = "g_seekable_tell")] fn tell(&self) -> i64 { unsafe { ffi::g_seekable_tell(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_seekable_truncate")] fn truncate( &self, offset: i64, @@ -105,6 +84,8 @@ impl> SeekableExt for O { } } +impl> SeekableExt for O {} + impl fmt::Display for Seekable { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Seekable") diff --git a/gio/src/auto/settings.rs b/gio/src/auto/settings.rs index c93916736d08..5dbb47e5dcdc 100644 --- a/gio/src/auto/settings.rs +++ b/gio/src/auto/settings.rs @@ -95,184 +95,15 @@ impl Settings { } } -pub trait SettingsExt: 'static { +pub trait SettingsExt: IsA + 'static { #[doc(alias = "g_settings_apply")] - fn apply(&self); - - #[doc(alias = "g_settings_bind_writable")] - fn bind_writable( - &self, - key: &str, - object: &impl IsA, - property: &str, - inverted: bool, - ); - - #[doc(alias = "g_settings_create_action")] - fn create_action(&self, key: &str) -> Action; - - #[doc(alias = "g_settings_delay")] - fn delay(&self); - - //#[doc(alias = "g_settings_get")] - //fn get(&self, key: &str, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs); - - #[doc(alias = "g_settings_get_boolean")] - #[doc(alias = "get_boolean")] - fn boolean(&self, key: &str) -> bool; - - #[doc(alias = "g_settings_get_child")] - #[doc(alias = "get_child")] - #[must_use] - fn child(&self, name: &str) -> Settings; - - #[doc(alias = "g_settings_get_default_value")] - #[doc(alias = "get_default_value")] - fn default_value(&self, key: &str) -> Option; - - #[doc(alias = "g_settings_get_double")] - #[doc(alias = "get_double")] - fn double(&self, key: &str) -> f64; - - #[doc(alias = "g_settings_get_enum")] - #[doc(alias = "get_enum")] - fn enum_(&self, key: &str) -> i32; - - #[doc(alias = "g_settings_get_flags")] - #[doc(alias = "get_flags")] - fn flags(&self, key: &str) -> u32; - - #[doc(alias = "g_settings_get_has_unapplied")] - #[doc(alias = "get_has_unapplied")] - fn has_unapplied(&self) -> bool; - - #[doc(alias = "g_settings_get_int")] - #[doc(alias = "get_int")] - fn int(&self, key: &str) -> i32; - - #[doc(alias = "g_settings_get_int64")] - #[doc(alias = "get_int64")] - fn int64(&self, key: &str) -> i64; - - //#[doc(alias = "g_settings_get_mapped")] - //#[doc(alias = "get_mapped")] - //fn mapped(&self, key: &str, mapping: /*Unimplemented*/FnMut(&glib::Variant, /*Unimplemented*/Option) -> bool, user_data: /*Unimplemented*/Option) -> /*Unimplemented*/Option; - - #[doc(alias = "g_settings_get_string")] - #[doc(alias = "get_string")] - fn string(&self, key: &str) -> glib::GString; - - #[doc(alias = "g_settings_get_uint")] - #[doc(alias = "get_uint")] - fn uint(&self, key: &str) -> u32; - - #[doc(alias = "g_settings_get_uint64")] - #[doc(alias = "get_uint64")] - fn uint64(&self, key: &str) -> u64; - - #[doc(alias = "g_settings_get_user_value")] - #[doc(alias = "get_user_value")] - fn user_value(&self, key: &str) -> Option; - - #[doc(alias = "g_settings_get_value")] - #[doc(alias = "get_value")] - fn value(&self, key: &str) -> glib::Variant; - - #[doc(alias = "g_settings_is_writable")] - fn is_writable(&self, name: &str) -> bool; - - #[doc(alias = "g_settings_list_children")] - fn list_children(&self) -> Vec; - - #[doc(alias = "g_settings_reset")] - fn reset(&self, key: &str); - - #[doc(alias = "g_settings_revert")] - fn revert(&self); - - //#[doc(alias = "g_settings_set")] - //fn set(&self, key: &str, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> bool; - - #[doc(alias = "g_settings_set_boolean")] - fn set_boolean(&self, key: &str, value: bool) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_double")] - fn set_double(&self, key: &str, value: f64) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_enum")] - fn set_enum(&self, key: &str, value: i32) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_flags")] - fn set_flags(&self, key: &str, value: u32) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_int")] - fn set_int(&self, key: &str, value: i32) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_int64")] - fn set_int64(&self, key: &str, value: i64) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_string")] - fn set_string(&self, key: &str, value: &str) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_uint")] - fn set_uint(&self, key: &str, value: u32) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_uint64")] - fn set_uint64(&self, key: &str, value: u64) -> Result<(), glib::error::BoolError>; - - #[doc(alias = "g_settings_set_value")] - fn set_value(&self, key: &str, value: &glib::Variant) -> Result<(), glib::error::BoolError>; - - fn backend(&self) -> Option; - - #[doc(alias = "delay-apply")] - fn is_delay_apply(&self) -> bool; - - fn path(&self) -> Option; - - #[doc(alias = "schema-id")] - fn schema_id(&self) -> Option; - - #[doc(alias = "settings-schema")] - fn settings_schema(&self) -> Option; - - //#[doc(alias = "change-event")] - //fn connect_change_event(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "changed")] - fn connect_changed( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "writable-change-event")] - fn connect_writable_change_event glib::signal::Inhibit + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "writable-changed")] - fn connect_writable_changed( - &self, - detail: Option<&str>, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "delay-apply")] - fn connect_delay_apply_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "has-unapplied")] - fn connect_has_unapplied_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SettingsExt for O { fn apply(&self) { unsafe { ffi::g_settings_apply(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_settings_bind_writable")] fn bind_writable( &self, key: &str, @@ -291,6 +122,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_create_action")] fn create_action(&self, key: &str) -> Action { unsafe { from_glib_full(ffi::g_settings_create_action( @@ -300,16 +132,20 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_delay")] fn delay(&self) { unsafe { ffi::g_settings_delay(self.as_ref().to_glib_none().0); } } + //#[doc(alias = "g_settings_get")] //fn get(&self, key: &str, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) { // unsafe { TODO: call ffi:g_settings_get() } //} + #[doc(alias = "g_settings_get_boolean")] + #[doc(alias = "get_boolean")] fn boolean(&self, key: &str) -> bool { unsafe { from_glib(ffi::g_settings_get_boolean( @@ -319,6 +155,9 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_get_child")] + #[doc(alias = "get_child")] + #[must_use] fn child(&self, name: &str) -> Settings { unsafe { from_glib_full(ffi::g_settings_get_child( @@ -328,6 +167,8 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_get_default_value")] + #[doc(alias = "get_default_value")] fn default_value(&self, key: &str) -> Option { unsafe { from_glib_full(ffi::g_settings_get_default_value( @@ -337,18 +178,26 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_get_double")] + #[doc(alias = "get_double")] fn double(&self, key: &str) -> f64 { unsafe { ffi::g_settings_get_double(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + #[doc(alias = "g_settings_get_enum")] + #[doc(alias = "get_enum")] fn enum_(&self, key: &str) -> i32 { unsafe { ffi::g_settings_get_enum(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + #[doc(alias = "g_settings_get_flags")] + #[doc(alias = "get_flags")] fn flags(&self, key: &str) -> u32 { unsafe { ffi::g_settings_get_flags(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + #[doc(alias = "g_settings_get_has_unapplied")] + #[doc(alias = "get_has_unapplied")] fn has_unapplied(&self) -> bool { unsafe { from_glib(ffi::g_settings_get_has_unapplied( @@ -357,18 +206,26 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_get_int")] + #[doc(alias = "get_int")] fn int(&self, key: &str) -> i32 { unsafe { ffi::g_settings_get_int(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + #[doc(alias = "g_settings_get_int64")] + #[doc(alias = "get_int64")] fn int64(&self, key: &str) -> i64 { unsafe { ffi::g_settings_get_int64(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + //#[doc(alias = "g_settings_get_mapped")] + //#[doc(alias = "get_mapped")] //fn mapped(&self, key: &str, mapping: /*Unimplemented*/FnMut(&glib::Variant, /*Unimplemented*/Option) -> bool, user_data: /*Unimplemented*/Option) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:g_settings_get_mapped() } //} + #[doc(alias = "g_settings_get_string")] + #[doc(alias = "get_string")] fn string(&self, key: &str) -> glib::GString { unsafe { from_glib_full(ffi::g_settings_get_string( @@ -378,14 +235,20 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_get_uint")] + #[doc(alias = "get_uint")] fn uint(&self, key: &str) -> u32 { unsafe { ffi::g_settings_get_uint(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + #[doc(alias = "g_settings_get_uint64")] + #[doc(alias = "get_uint64")] fn uint64(&self, key: &str) -> u64 { unsafe { ffi::g_settings_get_uint64(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } + #[doc(alias = "g_settings_get_user_value")] + #[doc(alias = "get_user_value")] fn user_value(&self, key: &str) -> Option { unsafe { from_glib_full(ffi::g_settings_get_user_value( @@ -395,6 +258,8 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_get_value")] + #[doc(alias = "get_value")] fn value(&self, key: &str) -> glib::Variant { unsafe { from_glib_full(ffi::g_settings_get_value( @@ -404,6 +269,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_is_writable")] fn is_writable(&self, name: &str) -> bool { unsafe { from_glib(ffi::g_settings_is_writable( @@ -413,6 +279,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_list_children")] fn list_children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_settings_list_children( @@ -421,22 +288,26 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_reset")] fn reset(&self, key: &str) { unsafe { ffi::g_settings_reset(self.as_ref().to_glib_none().0, key.to_glib_none().0); } } + #[doc(alias = "g_settings_revert")] fn revert(&self) { unsafe { ffi::g_settings_revert(self.as_ref().to_glib_none().0); } } + //#[doc(alias = "g_settings_set")] //fn set(&self, key: &str, format: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> bool { // unsafe { TODO: call ffi:g_settings_set() } //} + #[doc(alias = "g_settings_set_boolean")] fn set_boolean(&self, key: &str, value: bool) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -450,6 +321,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_double")] fn set_double(&self, key: &str, value: f64) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -463,6 +335,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_enum")] fn set_enum(&self, key: &str, value: i32) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -476,6 +349,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_flags")] fn set_flags(&self, key: &str, value: u32) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -489,6 +363,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_int")] fn set_int(&self, key: &str, value: i32) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -502,6 +377,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_int64")] fn set_int64(&self, key: &str, value: i64) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -515,6 +391,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_string")] fn set_string(&self, key: &str, value: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -528,6 +405,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_uint")] fn set_uint(&self, key: &str, value: u32) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -541,6 +419,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_uint64")] fn set_uint64(&self, key: &str, value: u64) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -554,6 +433,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "g_settings_set_value")] fn set_value(&self, key: &str, value: &glib::Variant) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( @@ -571,6 +451,7 @@ impl> SettingsExt for O { glib::ObjectExt::property(self.as_ref(), "backend") } + #[doc(alias = "delay-apply")] fn is_delay_apply(&self) -> bool { glib::ObjectExt::property(self.as_ref(), "delay-apply") } @@ -579,18 +460,22 @@ impl> SettingsExt for O { glib::ObjectExt::property(self.as_ref(), "path") } + #[doc(alias = "schema-id")] fn schema_id(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "schema-id") } + #[doc(alias = "settings-schema")] fn settings_schema(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "settings-schema") } + //#[doc(alias = "change-event")] //fn connect_change_event(&self, f: F) -> SignalHandlerId { // Unimplemented keys: *.CArray TypeId { ns_id: 2, id: 5 } //} + #[doc(alias = "changed")] fn connect_changed( &self, detail: Option<&str>, @@ -624,6 +509,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "writable-change-event")] fn connect_writable_change_event glib::signal::Inhibit + 'static>( &self, f: F, @@ -652,6 +538,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "writable-changed")] fn connect_writable_changed( &self, detail: Option<&str>, @@ -688,6 +575,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "delay-apply")] fn connect_delay_apply_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_delay_apply_trampoline< P: IsA, @@ -713,6 +601,7 @@ impl> SettingsExt for O { } } + #[doc(alias = "has-unapplied")] fn connect_has_unapplied_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_has_unapplied_trampoline< P: IsA, @@ -739,6 +628,8 @@ impl> SettingsExt for O { } } +impl> SettingsExt for O {} + impl fmt::Display for Settings { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Settings") diff --git a/gio/src/auto/settings_backend.rs b/gio/src/auto/settings_backend.rs index 21b5a27ce69e..37a0eabda449 100644 --- a/gio/src/auto/settings_backend.rs +++ b/gio/src/auto/settings_backend.rs @@ -30,43 +30,28 @@ impl SettingsBackend { } } -pub trait SettingsBackendExt: 'static { +pub trait SettingsBackendExt: IsA + 'static { //#[doc(alias = "g_settings_backend_changed")] - //fn changed(&self, key: &str, origin_tag: /*Unimplemented*/Option); - - //#[doc(alias = "g_settings_backend_changed_tree")] - //fn changed_tree(&self, tree: /*Ignored*/&glib::Tree, origin_tag: /*Unimplemented*/Option); - - //#[doc(alias = "g_settings_backend_keys_changed")] - //fn keys_changed(&self, path: &str, items: &[&str], origin_tag: /*Unimplemented*/Option); - - //#[doc(alias = "g_settings_backend_path_changed")] - //fn path_changed(&self, path: &str, origin_tag: /*Unimplemented*/Option); - - #[doc(alias = "g_settings_backend_path_writable_changed")] - fn path_writable_changed(&self, path: &str); - - #[doc(alias = "g_settings_backend_writable_changed")] - fn writable_changed(&self, key: &str); -} - -impl> SettingsBackendExt for O { //fn changed(&self, key: &str, origin_tag: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:g_settings_backend_changed() } //} + //#[doc(alias = "g_settings_backend_changed_tree")] //fn changed_tree(&self, tree: /*Ignored*/&glib::Tree, origin_tag: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:g_settings_backend_changed_tree() } //} + //#[doc(alias = "g_settings_backend_keys_changed")] //fn keys_changed(&self, path: &str, items: &[&str], origin_tag: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:g_settings_backend_keys_changed() } //} + //#[doc(alias = "g_settings_backend_path_changed")] //fn path_changed(&self, path: &str, origin_tag: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:g_settings_backend_path_changed() } //} + #[doc(alias = "g_settings_backend_path_writable_changed")] fn path_writable_changed(&self, path: &str) { unsafe { ffi::g_settings_backend_path_writable_changed( @@ -76,6 +61,7 @@ impl> SettingsBackendExt for O { } } + #[doc(alias = "g_settings_backend_writable_changed")] fn writable_changed(&self, key: &str) { unsafe { ffi::g_settings_backend_writable_changed( @@ -86,6 +72,8 @@ impl> SettingsBackendExt for O { } } +impl> SettingsBackendExt for O {} + impl fmt::Display for SettingsBackend { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SettingsBackend") diff --git a/gio/src/auto/simple_proxy_resolver.rs b/gio/src/auto/simple_proxy_resolver.rs index 5d58f5633d1a..a102401c0373 100644 --- a/gio/src/auto/simple_proxy_resolver.rs +++ b/gio/src/auto/simple_proxy_resolver.rs @@ -23,27 +23,8 @@ impl SimpleProxyResolver { pub const NONE: Option<&'static SimpleProxyResolver> = None; } -pub trait SimpleProxyResolverExt: 'static { +pub trait SimpleProxyResolverExt: IsA + 'static { #[doc(alias = "g_simple_proxy_resolver_set_default_proxy")] - fn set_default_proxy(&self, default_proxy: Option<&str>); - - #[doc(alias = "g_simple_proxy_resolver_set_uri_proxy")] - fn set_uri_proxy(&self, uri_scheme: &str, proxy: &str); - - #[doc(alias = "default-proxy")] - fn default_proxy(&self) -> Option; - - #[doc(alias = "ignore-hosts")] - fn ignore_hosts(&self) -> Vec; - - #[doc(alias = "default-proxy")] - fn connect_default_proxy_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "ignore-hosts")] - fn connect_ignore_hosts_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SimpleProxyResolverExt for O { fn set_default_proxy(&self, default_proxy: Option<&str>) { unsafe { ffi::g_simple_proxy_resolver_set_default_proxy( @@ -53,6 +34,7 @@ impl> SimpleProxyResolverExt for O { } } + #[doc(alias = "g_simple_proxy_resolver_set_uri_proxy")] fn set_uri_proxy(&self, uri_scheme: &str, proxy: &str) { unsafe { ffi::g_simple_proxy_resolver_set_uri_proxy( @@ -63,14 +45,17 @@ impl> SimpleProxyResolverExt for O { } } + #[doc(alias = "default-proxy")] fn default_proxy(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "default-proxy") } + #[doc(alias = "ignore-hosts")] fn ignore_hosts(&self) -> Vec { glib::ObjectExt::property(self.as_ref(), "ignore-hosts") } + #[doc(alias = "default-proxy")] fn connect_default_proxy_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_default_proxy_trampoline< P: IsA, @@ -96,6 +81,7 @@ impl> SimpleProxyResolverExt for O { } } + #[doc(alias = "ignore-hosts")] fn connect_ignore_hosts_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ignore_hosts_trampoline< P: IsA, @@ -122,6 +108,8 @@ impl> SimpleProxyResolverExt for O { } } +impl> SimpleProxyResolverExt for O {} + impl fmt::Display for SimpleProxyResolver { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SimpleProxyResolver") diff --git a/gio/src/auto/socket.rs b/gio/src/auto/socket.rs index 150309618d96..5497bc09847a 100644 --- a/gio/src/auto/socket.rs +++ b/gio/src/auto/socket.rs @@ -48,221 +48,8 @@ impl Socket { } } -pub trait SocketExt: 'static { +pub trait SocketExt: IsA + 'static { #[doc(alias = "g_socket_accept")] - fn accept(&self, cancellable: Option<&impl IsA>) -> Result; - - #[doc(alias = "g_socket_bind")] - fn bind(&self, address: &impl IsA, allow_reuse: bool) - -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_check_connect_result")] - fn check_connect_result(&self) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_close")] - fn close(&self) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_condition_check")] - fn condition_check(&self, condition: glib::IOCondition) -> glib::IOCondition; - - #[doc(alias = "g_socket_condition_timed_wait")] - fn condition_timed_wait( - &self, - condition: glib::IOCondition, - timeout_us: i64, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_condition_wait")] - fn condition_wait( - &self, - condition: glib::IOCondition, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_connect")] - fn connect( - &self, - address: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_connection_factory_create_connection")] - fn connection_factory_create_connection(&self) -> SocketConnection; - - #[doc(alias = "g_socket_get_available_bytes")] - #[doc(alias = "get_available_bytes")] - fn available_bytes(&self) -> isize; - - #[doc(alias = "g_socket_get_blocking")] - #[doc(alias = "get_blocking")] - fn is_blocking(&self) -> bool; - - #[doc(alias = "g_socket_get_broadcast")] - #[doc(alias = "get_broadcast")] - fn is_broadcast(&self) -> bool; - - #[doc(alias = "g_socket_get_credentials")] - #[doc(alias = "get_credentials")] - fn credentials(&self) -> Result; - - #[doc(alias = "g_socket_get_family")] - #[doc(alias = "get_family")] - fn family(&self) -> SocketFamily; - - #[doc(alias = "g_socket_get_keepalive")] - #[doc(alias = "get_keepalive")] - fn is_keepalive(&self) -> bool; - - #[doc(alias = "g_socket_get_listen_backlog")] - #[doc(alias = "get_listen_backlog")] - fn listen_backlog(&self) -> i32; - - #[doc(alias = "g_socket_get_local_address")] - #[doc(alias = "get_local_address")] - fn local_address(&self) -> Result; - - #[doc(alias = "g_socket_get_multicast_loopback")] - #[doc(alias = "get_multicast_loopback")] - fn is_multicast_loopback(&self) -> bool; - - #[doc(alias = "g_socket_get_multicast_ttl")] - #[doc(alias = "get_multicast_ttl")] - fn multicast_ttl(&self) -> u32; - - #[doc(alias = "g_socket_get_option")] - #[doc(alias = "get_option")] - fn option(&self, level: i32, optname: i32) -> Result; - - #[doc(alias = "g_socket_get_protocol")] - #[doc(alias = "get_protocol")] - fn protocol(&self) -> SocketProtocol; - - #[doc(alias = "g_socket_get_remote_address")] - #[doc(alias = "get_remote_address")] - fn remote_address(&self) -> Result; - - #[doc(alias = "g_socket_get_socket_type")] - #[doc(alias = "get_socket_type")] - fn socket_type(&self) -> SocketType; - - #[doc(alias = "g_socket_get_timeout")] - #[doc(alias = "get_timeout")] - fn timeout(&self) -> u32; - - #[doc(alias = "g_socket_get_ttl")] - #[doc(alias = "get_ttl")] - fn ttl(&self) -> u32; - - #[doc(alias = "g_socket_is_closed")] - fn is_closed(&self) -> bool; - - #[doc(alias = "g_socket_is_connected")] - fn is_connected(&self) -> bool; - - #[doc(alias = "g_socket_join_multicast_group")] - fn join_multicast_group( - &self, - group: &impl IsA, - source_specific: bool, - iface: Option<&str>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_join_multicast_group_ssm")] - fn join_multicast_group_ssm( - &self, - group: &impl IsA, - source_specific: Option<&impl IsA>, - iface: Option<&str>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_leave_multicast_group")] - fn leave_multicast_group( - &self, - group: &impl IsA, - source_specific: bool, - iface: Option<&str>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_leave_multicast_group_ssm")] - fn leave_multicast_group_ssm( - &self, - group: &impl IsA, - source_specific: Option<&impl IsA>, - iface: Option<&str>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_listen")] - fn listen(&self) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_set_blocking")] - fn set_blocking(&self, blocking: bool); - - #[doc(alias = "g_socket_set_broadcast")] - fn set_broadcast(&self, broadcast: bool); - - #[doc(alias = "g_socket_set_keepalive")] - fn set_keepalive(&self, keepalive: bool); - - #[doc(alias = "g_socket_set_listen_backlog")] - fn set_listen_backlog(&self, backlog: i32); - - #[doc(alias = "g_socket_set_multicast_loopback")] - fn set_multicast_loopback(&self, loopback: bool); - - #[doc(alias = "g_socket_set_multicast_ttl")] - fn set_multicast_ttl(&self, ttl: u32); - - #[doc(alias = "g_socket_set_option")] - fn set_option(&self, level: i32, optname: i32, value: i32) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_set_timeout")] - fn set_timeout(&self, timeout: u32); - - #[doc(alias = "g_socket_set_ttl")] - fn set_ttl(&self, ttl: u32); - - #[doc(alias = "g_socket_shutdown")] - fn shutdown(&self, shutdown_read: bool, shutdown_write: bool) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_speaks_ipv4")] - fn speaks_ipv4(&self) -> bool; - - #[doc(alias = "type")] - fn type_(&self) -> SocketType; - - #[doc(alias = "blocking")] - fn connect_blocking_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "broadcast")] - fn connect_broadcast_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "keepalive")] - fn connect_keepalive_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "listen-backlog")] - fn connect_listen_backlog_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "local-address")] - fn connect_local_address_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "multicast-loopback")] - fn connect_multicast_loopback_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "multicast-ttl")] - fn connect_multicast_ttl_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "remote-address")] - fn connect_remote_address_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timeout")] - fn connect_timeout_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "ttl")] - fn connect_ttl_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SocketExt for O { fn accept(&self, cancellable: Option<&impl IsA>) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -279,6 +66,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_bind")] fn bind( &self, address: &impl IsA, @@ -301,6 +89,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_check_connect_result")] fn check_connect_result(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -315,6 +104,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_close")] fn close(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -328,6 +118,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_condition_check")] fn condition_check(&self, condition: glib::IOCondition) -> glib::IOCondition { unsafe { from_glib(ffi::g_socket_condition_check( @@ -337,6 +128,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_condition_timed_wait")] fn condition_timed_wait( &self, condition: glib::IOCondition, @@ -361,6 +153,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_condition_wait")] fn condition_wait( &self, condition: glib::IOCondition, @@ -383,6 +176,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_connect")] fn connect( &self, address: &impl IsA, @@ -405,6 +199,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_connection_factory_create_connection")] fn connection_factory_create_connection(&self) -> SocketConnection { unsafe { from_glib_full(ffi::g_socket_connection_factory_create_connection( @@ -413,18 +208,26 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_available_bytes")] + #[doc(alias = "get_available_bytes")] fn available_bytes(&self) -> isize { unsafe { ffi::g_socket_get_available_bytes(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_get_blocking")] + #[doc(alias = "get_blocking")] fn is_blocking(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_blocking(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_get_broadcast")] + #[doc(alias = "get_broadcast")] fn is_broadcast(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_broadcast(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_get_credentials")] + #[doc(alias = "get_credentials")] fn credentials(&self) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -437,18 +240,26 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_family")] + #[doc(alias = "get_family")] fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_socket_get_family(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_get_keepalive")] + #[doc(alias = "get_keepalive")] fn is_keepalive(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_keepalive(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_get_listen_backlog")] + #[doc(alias = "get_listen_backlog")] fn listen_backlog(&self) -> i32 { unsafe { ffi::g_socket_get_listen_backlog(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_get_local_address")] + #[doc(alias = "get_local_address")] fn local_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -461,6 +272,8 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_multicast_loopback")] + #[doc(alias = "get_multicast_loopback")] fn is_multicast_loopback(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_multicast_loopback( @@ -469,10 +282,14 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_multicast_ttl")] + #[doc(alias = "get_multicast_ttl")] fn multicast_ttl(&self) -> u32 { unsafe { ffi::g_socket_get_multicast_ttl(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_get_option")] + #[doc(alias = "get_option")] fn option(&self, level: i32, optname: i32) -> Result { unsafe { let mut value = mem::MaybeUninit::uninit(); @@ -493,10 +310,14 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_protocol")] + #[doc(alias = "get_protocol")] fn protocol(&self) -> SocketProtocol { unsafe { from_glib(ffi::g_socket_get_protocol(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_get_remote_address")] + #[doc(alias = "get_remote_address")] fn remote_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -509,6 +330,8 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_socket_type")] + #[doc(alias = "get_socket_type")] fn socket_type(&self) -> SocketType { unsafe { from_glib(ffi::g_socket_get_socket_type( @@ -517,22 +340,29 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_get_timeout")] + #[doc(alias = "get_timeout")] fn timeout(&self) -> u32 { unsafe { ffi::g_socket_get_timeout(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_get_ttl")] + #[doc(alias = "get_ttl")] fn ttl(&self) -> u32 { unsafe { ffi::g_socket_get_ttl(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_is_closed")] fn is_closed(&self) -> bool { unsafe { from_glib(ffi::g_socket_is_closed(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_is_connected")] fn is_connected(&self) -> bool { unsafe { from_glib(ffi::g_socket_is_connected(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_socket_join_multicast_group")] fn join_multicast_group( &self, group: &impl IsA, @@ -557,6 +387,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_join_multicast_group_ssm")] fn join_multicast_group_ssm( &self, group: &impl IsA, @@ -581,6 +412,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_leave_multicast_group")] fn leave_multicast_group( &self, group: &impl IsA, @@ -605,6 +437,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_leave_multicast_group_ssm")] fn leave_multicast_group_ssm( &self, group: &impl IsA, @@ -629,6 +462,7 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_listen")] fn listen(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -642,30 +476,35 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_set_blocking")] fn set_blocking(&self, blocking: bool) { unsafe { ffi::g_socket_set_blocking(self.as_ref().to_glib_none().0, blocking.into_glib()); } } + #[doc(alias = "g_socket_set_broadcast")] fn set_broadcast(&self, broadcast: bool) { unsafe { ffi::g_socket_set_broadcast(self.as_ref().to_glib_none().0, broadcast.into_glib()); } } + #[doc(alias = "g_socket_set_keepalive")] fn set_keepalive(&self, keepalive: bool) { unsafe { ffi::g_socket_set_keepalive(self.as_ref().to_glib_none().0, keepalive.into_glib()); } } + #[doc(alias = "g_socket_set_listen_backlog")] fn set_listen_backlog(&self, backlog: i32) { unsafe { ffi::g_socket_set_listen_backlog(self.as_ref().to_glib_none().0, backlog); } } + #[doc(alias = "g_socket_set_multicast_loopback")] fn set_multicast_loopback(&self, loopback: bool) { unsafe { ffi::g_socket_set_multicast_loopback( @@ -675,12 +514,14 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_set_multicast_ttl")] fn set_multicast_ttl(&self, ttl: u32) { unsafe { ffi::g_socket_set_multicast_ttl(self.as_ref().to_glib_none().0, ttl); } } + #[doc(alias = "g_socket_set_option")] fn set_option(&self, level: i32, optname: i32, value: i32) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -700,18 +541,21 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_set_timeout")] fn set_timeout(&self, timeout: u32) { unsafe { ffi::g_socket_set_timeout(self.as_ref().to_glib_none().0, timeout); } } + #[doc(alias = "g_socket_set_ttl")] fn set_ttl(&self, ttl: u32) { unsafe { ffi::g_socket_set_ttl(self.as_ref().to_glib_none().0, ttl); } } + #[doc(alias = "g_socket_shutdown")] fn shutdown(&self, shutdown_read: bool, shutdown_write: bool) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -730,14 +574,17 @@ impl> SocketExt for O { } } + #[doc(alias = "g_socket_speaks_ipv4")] fn speaks_ipv4(&self) -> bool { unsafe { from_glib(ffi::g_socket_speaks_ipv4(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "type")] fn type_(&self) -> SocketType { glib::ObjectExt::property(self.as_ref(), "type") } + #[doc(alias = "blocking")] fn connect_blocking_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_blocking_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocket, @@ -760,6 +607,7 @@ impl> SocketExt for O { } } + #[doc(alias = "broadcast")] fn connect_broadcast_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_broadcast_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocket, @@ -782,6 +630,7 @@ impl> SocketExt for O { } } + #[doc(alias = "keepalive")] fn connect_keepalive_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_keepalive_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocket, @@ -804,6 +653,7 @@ impl> SocketExt for O { } } + #[doc(alias = "listen-backlog")] fn connect_listen_backlog_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_listen_backlog_trampoline< P: IsA, @@ -829,6 +679,7 @@ impl> SocketExt for O { } } + #[doc(alias = "local-address")] fn connect_local_address_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_local_address_trampoline< P: IsA, @@ -854,6 +705,7 @@ impl> SocketExt for O { } } + #[doc(alias = "multicast-loopback")] fn connect_multicast_loopback_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_multicast_loopback_trampoline< P: IsA, @@ -879,6 +731,7 @@ impl> SocketExt for O { } } + #[doc(alias = "multicast-ttl")] fn connect_multicast_ttl_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_multicast_ttl_trampoline< P: IsA, @@ -904,6 +757,7 @@ impl> SocketExt for O { } } + #[doc(alias = "remote-address")] fn connect_remote_address_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_remote_address_trampoline< P: IsA, @@ -929,6 +783,7 @@ impl> SocketExt for O { } } + #[doc(alias = "timeout")] fn connect_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_timeout_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocket, @@ -951,6 +806,7 @@ impl> SocketExt for O { } } + #[doc(alias = "ttl")] fn connect_ttl_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ttl_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocket, @@ -974,6 +830,8 @@ impl> SocketExt for O { } } +impl> SocketExt for O {} + impl fmt::Display for Socket { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Socket") diff --git a/gio/src/auto/socket_address.rs b/gio/src/auto/socket_address.rs index 82124dce9b4d..9b1978c66f3a 100644 --- a/gio/src/auto/socket_address.rs +++ b/gio/src/auto/socket_address.rs @@ -32,23 +32,9 @@ impl SocketAddress { unsafe impl Send for SocketAddress {} unsafe impl Sync for SocketAddress {} -pub trait SocketAddressExt: 'static { +pub trait SocketAddressExt: IsA + 'static { #[doc(alias = "g_socket_address_get_family")] #[doc(alias = "get_family")] - fn family(&self) -> SocketFamily; - - #[doc(alias = "g_socket_address_get_native_size")] - #[doc(alias = "get_native_size")] - fn native_size(&self) -> isize; - - //#[doc(alias = "g_socket_address_to_native")] - //fn to_native(&self, dest: /*Unimplemented*/Option, destlen: usize) -> Result<(), glib::Error>; - - #[doc(alias = "family")] - fn connect_family_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SocketAddressExt for O { fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_socket_address_get_family( @@ -57,14 +43,18 @@ impl> SocketAddressExt for O { } } + #[doc(alias = "g_socket_address_get_native_size")] + #[doc(alias = "get_native_size")] fn native_size(&self) -> isize { unsafe { ffi::g_socket_address_get_native_size(self.as_ref().to_glib_none().0) } } + //#[doc(alias = "g_socket_address_to_native")] //fn to_native(&self, dest: /*Unimplemented*/Option, destlen: usize) -> Result<(), glib::Error> { // unsafe { TODO: call ffi:g_socket_address_to_native() } //} + #[doc(alias = "family")] fn connect_family_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_family_trampoline< P: IsA, @@ -91,6 +81,8 @@ impl> SocketAddressExt for O { } } +impl> SocketAddressExt for O {} + impl fmt::Display for SocketAddress { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketAddress") diff --git a/gio/src/auto/socket_address_enumerator.rs b/gio/src/auto/socket_address_enumerator.rs index 64e677dd492a..660cb5bc52b0 100644 --- a/gio/src/auto/socket_address_enumerator.rs +++ b/gio/src/auto/socket_address_enumerator.rs @@ -19,30 +19,8 @@ impl SocketAddressEnumerator { pub const NONE: Option<&'static SocketAddressEnumerator> = None; } -pub trait SocketAddressEnumeratorExt: 'static { +pub trait SocketAddressEnumeratorExt: IsA + 'static { #[doc(alias = "g_socket_address_enumerator_next")] - fn next( - &self, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_socket_address_enumerator_next_async")] - fn next_async, glib::Error>) + 'static>( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn next_future( - &self, - ) -> Pin< - Box_< - dyn std::future::Future, glib::Error>> + 'static, - >, - >; -} - -impl> SocketAddressEnumeratorExt for O { fn next( &self, cancellable: Option<&impl IsA>, @@ -62,6 +40,7 @@ impl> SocketAddressEnumeratorExt for O { } } + #[doc(alias = "g_socket_address_enumerator_next_async")] fn next_async, glib::Error>) + 'static>( &self, cancellable: Option<&impl IsA>, @@ -131,6 +110,8 @@ impl> SocketAddressEnumeratorExt for O { } } +impl> SocketAddressEnumeratorExt for O {} + impl fmt::Display for SocketAddressEnumerator { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketAddressEnumerator") diff --git a/gio/src/auto/socket_client.rs b/gio/src/auto/socket_client.rs index 4173e0577aa3..1300d18c22d7 100644 --- a/gio/src/auto/socket_client.rs +++ b/gio/src/auto/socket_client.rs @@ -39,210 +39,8 @@ impl Default for SocketClient { } } -pub trait SocketClientExt: 'static { +pub trait SocketClientExt: IsA + 'static { #[doc(alias = "g_socket_client_add_application_proxy")] - fn add_application_proxy(&self, protocol: &str); - - #[doc(alias = "g_socket_client_connect")] - fn connect( - &self, - connectable: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_socket_client_connect_async")] - fn connect_async) + 'static>( - &self, - connectable: &impl IsA, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn connect_future( - &self, - connectable: &(impl IsA + Clone + 'static), - ) -> Pin> + 'static>>; - - #[doc(alias = "g_socket_client_connect_to_host")] - fn connect_to_host( - &self, - host_and_port: &str, - default_port: u16, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_socket_client_connect_to_host_async")] - fn connect_to_host_async) + 'static>( - &self, - host_and_port: &str, - default_port: u16, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn connect_to_host_future( - &self, - host_and_port: &str, - default_port: u16, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_socket_client_connect_to_service")] - fn connect_to_service( - &self, - domain: &str, - service: &str, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_socket_client_connect_to_service_async")] - fn connect_to_service_async) + 'static>( - &self, - domain: &str, - service: &str, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn connect_to_service_future( - &self, - domain: &str, - service: &str, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_socket_client_connect_to_uri")] - fn connect_to_uri( - &self, - uri: &str, - default_port: u16, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_socket_client_connect_to_uri_async")] - fn connect_to_uri_async) + 'static>( - &self, - uri: &str, - default_port: u16, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn connect_to_uri_future( - &self, - uri: &str, - default_port: u16, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_socket_client_get_enable_proxy")] - #[doc(alias = "get_enable_proxy")] - fn enables_proxy(&self) -> bool; - - #[doc(alias = "g_socket_client_get_family")] - #[doc(alias = "get_family")] - fn family(&self) -> SocketFamily; - - #[doc(alias = "g_socket_client_get_local_address")] - #[doc(alias = "get_local_address")] - fn local_address(&self) -> Option; - - #[doc(alias = "g_socket_client_get_protocol")] - #[doc(alias = "get_protocol")] - fn protocol(&self) -> SocketProtocol; - - #[doc(alias = "g_socket_client_get_proxy_resolver")] - #[doc(alias = "get_proxy_resolver")] - fn proxy_resolver(&self) -> ProxyResolver; - - #[doc(alias = "g_socket_client_get_socket_type")] - #[doc(alias = "get_socket_type")] - fn socket_type(&self) -> SocketType; - - #[doc(alias = "g_socket_client_get_timeout")] - #[doc(alias = "get_timeout")] - fn timeout(&self) -> u32; - - #[doc(alias = "g_socket_client_get_tls")] - #[doc(alias = "get_tls")] - fn is_tls(&self) -> bool; - - #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] - #[allow(deprecated)] - #[doc(alias = "g_socket_client_get_tls_validation_flags")] - #[doc(alias = "get_tls_validation_flags")] - fn tls_validation_flags(&self) -> TlsCertificateFlags; - - #[doc(alias = "g_socket_client_set_enable_proxy")] - fn set_enable_proxy(&self, enable: bool); - - #[doc(alias = "g_socket_client_set_family")] - fn set_family(&self, family: SocketFamily); - - #[doc(alias = "g_socket_client_set_local_address")] - fn set_local_address(&self, address: Option<&impl IsA>); - - #[doc(alias = "g_socket_client_set_protocol")] - fn set_protocol(&self, protocol: SocketProtocol); - - #[doc(alias = "g_socket_client_set_proxy_resolver")] - fn set_proxy_resolver(&self, proxy_resolver: Option<&impl IsA>); - - #[doc(alias = "g_socket_client_set_socket_type")] - fn set_socket_type(&self, type_: SocketType); - - #[doc(alias = "g_socket_client_set_timeout")] - fn set_timeout(&self, timeout: u32); - - #[doc(alias = "g_socket_client_set_tls")] - fn set_tls(&self, tls: bool); - - #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] - #[allow(deprecated)] - #[doc(alias = "g_socket_client_set_tls_validation_flags")] - fn set_tls_validation_flags(&self, flags: TlsCertificateFlags); - - #[doc(alias = "type")] - fn type_(&self) -> SocketType; - - #[doc(alias = "type")] - fn set_type(&self, type_: SocketType); - - #[doc(alias = "event")] - fn connect_event< - F: Fn(&Self, SocketClientEvent, &SocketConnectable, Option<&IOStream>) + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "enable-proxy")] - fn connect_enable_proxy_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "family")] - fn connect_family_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "local-address")] - fn connect_local_address_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "protocol")] - fn connect_protocol_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "proxy-resolver")] - fn connect_proxy_resolver_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "timeout")] - fn connect_timeout_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "tls")] - fn connect_tls_notify(&self, f: F) -> SignalHandlerId; - - #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] - #[doc(alias = "tls-validation-flags")] - fn connect_tls_validation_flags_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "type")] - fn connect_type_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SocketClientExt for O { fn add_application_proxy(&self, protocol: &str) { unsafe { ffi::g_socket_client_add_application_proxy( @@ -252,6 +50,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_connect")] fn connect( &self, connectable: &impl IsA, @@ -273,6 +72,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_connect_async")] fn connect_async) + 'static>( &self, connectable: &impl IsA, @@ -339,6 +139,7 @@ impl> SocketClientExt for O { )) } + #[doc(alias = "g_socket_client_connect_to_host")] fn connect_to_host( &self, host_and_port: &str, @@ -362,6 +163,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_connect_to_host_async")] fn connect_to_host_async) + 'static>( &self, host_and_port: &str, @@ -439,6 +241,7 @@ impl> SocketClientExt for O { )) } + #[doc(alias = "g_socket_client_connect_to_service")] fn connect_to_service( &self, domain: &str, @@ -462,6 +265,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_connect_to_service_async")] fn connect_to_service_async) + 'static>( &self, domain: &str, @@ -535,6 +339,7 @@ impl> SocketClientExt for O { )) } + #[doc(alias = "g_socket_client_connect_to_uri")] fn connect_to_uri( &self, uri: &str, @@ -558,6 +363,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_connect_to_uri_async")] fn connect_to_uri_async) + 'static>( &self, uri: &str, @@ -630,6 +436,8 @@ impl> SocketClientExt for O { )) } + #[doc(alias = "g_socket_client_get_enable_proxy")] + #[doc(alias = "get_enable_proxy")] fn enables_proxy(&self) -> bool { unsafe { from_glib(ffi::g_socket_client_get_enable_proxy( @@ -638,6 +446,8 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_get_family")] + #[doc(alias = "get_family")] fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_socket_client_get_family( @@ -646,6 +456,8 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_get_local_address")] + #[doc(alias = "get_local_address")] fn local_address(&self) -> Option { unsafe { from_glib_none(ffi::g_socket_client_get_local_address( @@ -654,6 +466,8 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_get_protocol")] + #[doc(alias = "get_protocol")] fn protocol(&self) -> SocketProtocol { unsafe { from_glib(ffi::g_socket_client_get_protocol( @@ -662,6 +476,8 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_get_proxy_resolver")] + #[doc(alias = "get_proxy_resolver")] fn proxy_resolver(&self) -> ProxyResolver { unsafe { from_glib_none(ffi::g_socket_client_get_proxy_resolver( @@ -670,6 +486,8 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_get_socket_type")] + #[doc(alias = "get_socket_type")] fn socket_type(&self) -> SocketType { unsafe { from_glib(ffi::g_socket_client_get_socket_type( @@ -678,15 +496,22 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_get_timeout")] + #[doc(alias = "get_timeout")] fn timeout(&self) -> u32 { unsafe { ffi::g_socket_client_get_timeout(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_client_get_tls")] + #[doc(alias = "get_tls")] fn is_tls(&self) -> bool { unsafe { from_glib(ffi::g_socket_client_get_tls(self.as_ref().to_glib_none().0)) } } + #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] #[allow(deprecated)] + #[doc(alias = "g_socket_client_get_tls_validation_flags")] + #[doc(alias = "get_tls_validation_flags")] fn tls_validation_flags(&self) -> TlsCertificateFlags { unsafe { from_glib(ffi::g_socket_client_get_tls_validation_flags( @@ -695,6 +520,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_set_enable_proxy")] fn set_enable_proxy(&self, enable: bool) { unsafe { ffi::g_socket_client_set_enable_proxy( @@ -704,12 +530,14 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_set_family")] fn set_family(&self, family: SocketFamily) { unsafe { ffi::g_socket_client_set_family(self.as_ref().to_glib_none().0, family.into_glib()); } } + #[doc(alias = "g_socket_client_set_local_address")] fn set_local_address(&self, address: Option<&impl IsA>) { unsafe { ffi::g_socket_client_set_local_address( @@ -719,12 +547,14 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_set_protocol")] fn set_protocol(&self, protocol: SocketProtocol) { unsafe { ffi::g_socket_client_set_protocol(self.as_ref().to_glib_none().0, protocol.into_glib()); } } + #[doc(alias = "g_socket_client_set_proxy_resolver")] fn set_proxy_resolver(&self, proxy_resolver: Option<&impl IsA>) { unsafe { ffi::g_socket_client_set_proxy_resolver( @@ -734,25 +564,30 @@ impl> SocketClientExt for O { } } + #[doc(alias = "g_socket_client_set_socket_type")] fn set_socket_type(&self, type_: SocketType) { unsafe { ffi::g_socket_client_set_socket_type(self.as_ref().to_glib_none().0, type_.into_glib()); } } + #[doc(alias = "g_socket_client_set_timeout")] fn set_timeout(&self, timeout: u32) { unsafe { ffi::g_socket_client_set_timeout(self.as_ref().to_glib_none().0, timeout); } } + #[doc(alias = "g_socket_client_set_tls")] fn set_tls(&self, tls: bool) { unsafe { ffi::g_socket_client_set_tls(self.as_ref().to_glib_none().0, tls.into_glib()); } } + #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] #[allow(deprecated)] + #[doc(alias = "g_socket_client_set_tls_validation_flags")] fn set_tls_validation_flags(&self, flags: TlsCertificateFlags) { unsafe { ffi::g_socket_client_set_tls_validation_flags( @@ -762,14 +597,17 @@ impl> SocketClientExt for O { } } + #[doc(alias = "type")] fn type_(&self) -> SocketType { glib::ObjectExt::property(self.as_ref(), "type") } + #[doc(alias = "type")] fn set_type(&self, type_: SocketType) { glib::ObjectExt::set_property(self.as_ref(), "type", type_) } + #[doc(alias = "event")] fn connect_event< F: Fn(&Self, SocketClientEvent, &SocketConnectable, Option<&IOStream>) + 'static, >( @@ -809,6 +647,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "enable-proxy")] fn connect_enable_proxy_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_enable_proxy_trampoline< P: IsA, @@ -834,6 +673,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "family")] fn connect_family_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_family_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocketClient, @@ -856,6 +696,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "local-address")] fn connect_local_address_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_local_address_trampoline< P: IsA, @@ -881,6 +722,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "protocol")] fn connect_protocol_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_protocol_trampoline< P: IsA, @@ -906,6 +748,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "proxy-resolver")] fn connect_proxy_resolver_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_proxy_resolver_trampoline< P: IsA, @@ -931,6 +774,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "timeout")] fn connect_timeout_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_timeout_trampoline< P: IsA, @@ -956,6 +800,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "tls")] fn connect_tls_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_tls_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocketClient, @@ -978,6 +823,8 @@ impl> SocketClientExt for O { } } + #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] + #[doc(alias = "tls-validation-flags")] fn connect_tls_validation_flags_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_tls_validation_flags_trampoline< P: IsA, @@ -1003,6 +850,7 @@ impl> SocketClientExt for O { } } + #[doc(alias = "type")] fn connect_type_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_type_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GSocketClient, @@ -1026,6 +874,8 @@ impl> SocketClientExt for O { } } +impl> SocketClientExt for O {} + impl fmt::Display for SocketClient { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketClient") diff --git a/gio/src/auto/socket_connectable.rs b/gio/src/auto/socket_connectable.rs index 39be11fbbf99..bfc7c3eefbfd 100644 --- a/gio/src/auto/socket_connectable.rs +++ b/gio/src/auto/socket_connectable.rs @@ -19,18 +19,8 @@ impl SocketConnectable { pub const NONE: Option<&'static SocketConnectable> = None; } -pub trait SocketConnectableExt: 'static { +pub trait SocketConnectableExt: IsA + 'static { #[doc(alias = "g_socket_connectable_enumerate")] - fn enumerate(&self) -> SocketAddressEnumerator; - - #[doc(alias = "g_socket_connectable_proxy_enumerate")] - fn proxy_enumerate(&self) -> SocketAddressEnumerator; - - #[doc(alias = "g_socket_connectable_to_string")] - fn to_string(&self) -> glib::GString; -} - -impl> SocketConnectableExt for O { fn enumerate(&self) -> SocketAddressEnumerator { unsafe { from_glib_full(ffi::g_socket_connectable_enumerate( @@ -39,6 +29,7 @@ impl> SocketConnectableExt for O { } } + #[doc(alias = "g_socket_connectable_proxy_enumerate")] fn proxy_enumerate(&self) -> SocketAddressEnumerator { unsafe { from_glib_full(ffi::g_socket_connectable_proxy_enumerate( @@ -47,6 +38,7 @@ impl> SocketConnectableExt for O { } } + #[doc(alias = "g_socket_connectable_to_string")] fn to_string(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_socket_connectable_to_string( @@ -56,6 +48,8 @@ impl> SocketConnectableExt for O { } } +impl> SocketConnectableExt for O {} + impl fmt::Display for SocketConnectable { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketConnectable") diff --git a/gio/src/auto/socket_connection.rs b/gio/src/auto/socket_connection.rs index 9681cc2bc1c7..6460c77daafe 100644 --- a/gio/src/auto/socket_connection.rs +++ b/gio/src/auto/socket_connection.rs @@ -51,44 +51,8 @@ impl SocketConnection { } } -pub trait SocketConnectionExt: 'static { +pub trait SocketConnectionExt: IsA + 'static { #[doc(alias = "g_socket_connection_connect")] - fn connect( - &self, - address: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_connection_connect_async")] - fn connect_async) + 'static>( - &self, - address: &impl IsA, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn connect_future( - &self, - address: &(impl IsA + Clone + 'static), - ) -> Pin> + 'static>>; - - #[doc(alias = "g_socket_connection_get_local_address")] - #[doc(alias = "get_local_address")] - fn local_address(&self) -> Result; - - #[doc(alias = "g_socket_connection_get_remote_address")] - #[doc(alias = "get_remote_address")] - fn remote_address(&self) -> Result; - - #[doc(alias = "g_socket_connection_get_socket")] - #[doc(alias = "get_socket")] - fn socket(&self) -> Socket; - - #[doc(alias = "g_socket_connection_is_connected")] - fn is_connected(&self) -> bool; -} - -impl> SocketConnectionExt for O { fn connect( &self, address: &impl IsA, @@ -111,6 +75,7 @@ impl> SocketConnectionExt for O { } } + #[doc(alias = "g_socket_connection_connect_async")] fn connect_async) + 'static>( &self, address: &impl IsA, @@ -176,6 +141,8 @@ impl> SocketConnectionExt for O { )) } + #[doc(alias = "g_socket_connection_get_local_address")] + #[doc(alias = "get_local_address")] fn local_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -191,6 +158,8 @@ impl> SocketConnectionExt for O { } } + #[doc(alias = "g_socket_connection_get_remote_address")] + #[doc(alias = "get_remote_address")] fn remote_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); @@ -206,6 +175,8 @@ impl> SocketConnectionExt for O { } } + #[doc(alias = "g_socket_connection_get_socket")] + #[doc(alias = "get_socket")] fn socket(&self) -> Socket { unsafe { from_glib_none(ffi::g_socket_connection_get_socket( @@ -214,6 +185,7 @@ impl> SocketConnectionExt for O { } } + #[doc(alias = "g_socket_connection_is_connected")] fn is_connected(&self) -> bool { unsafe { from_glib(ffi::g_socket_connection_is_connected( @@ -223,6 +195,8 @@ impl> SocketConnectionExt for O { } } +impl> SocketConnectionExt for O {} + impl fmt::Display for SocketConnection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketConnection") diff --git a/gio/src/auto/socket_control_message.rs b/gio/src/auto/socket_control_message.rs index 8404dd30d5da..965198ee6938 100644 --- a/gio/src/auto/socket_control_message.rs +++ b/gio/src/auto/socket_control_message.rs @@ -31,34 +31,28 @@ impl SocketControlMessage { } } -pub trait SocketControlMessageExt: 'static { +pub trait SocketControlMessageExt: IsA + 'static { #[doc(alias = "g_socket_control_message_get_level")] #[doc(alias = "get_level")] - fn level(&self) -> i32; - - #[doc(alias = "g_socket_control_message_get_msg_type")] - #[doc(alias = "get_msg_type")] - fn msg_type(&self) -> i32; - - #[doc(alias = "g_socket_control_message_get_size")] - #[doc(alias = "get_size")] - fn size(&self) -> usize; -} - -impl> SocketControlMessageExt for O { fn level(&self) -> i32 { unsafe { ffi::g_socket_control_message_get_level(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_control_message_get_msg_type")] + #[doc(alias = "get_msg_type")] fn msg_type(&self) -> i32 { unsafe { ffi::g_socket_control_message_get_msg_type(self.as_ref().to_glib_none().0) } } + #[doc(alias = "g_socket_control_message_get_size")] + #[doc(alias = "get_size")] fn size(&self) -> usize { unsafe { ffi::g_socket_control_message_get_size(self.as_ref().to_glib_none().0) } } } +impl> SocketControlMessageExt for O {} + impl fmt::Display for SocketControlMessage { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketControlMessage") diff --git a/gio/src/auto/socket_listener.rs b/gio/src/auto/socket_listener.rs index b736355d2520..7185eafb0e75 100644 --- a/gio/src/auto/socket_listener.rs +++ b/gio/src/auto/socket_listener.rs @@ -37,108 +37,8 @@ impl Default for SocketListener { } } -pub trait SocketListenerExt: 'static { +pub trait SocketListenerExt: IsA + 'static { #[doc(alias = "g_socket_listener_accept")] - fn accept( - &self, - cancellable: Option<&impl IsA>, - ) -> Result<(SocketConnection, Option), glib::Error>; - - #[doc(alias = "g_socket_listener_accept_async")] - fn accept_async< - P: FnOnce(Result<(SocketConnection, Option), glib::Error>) + 'static, - >( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn accept_future( - &self, - ) -> Pin< - Box_< - dyn std::future::Future< - Output = Result<(SocketConnection, Option), glib::Error>, - > + 'static, - >, - >; - - #[doc(alias = "g_socket_listener_accept_socket")] - fn accept_socket( - &self, - cancellable: Option<&impl IsA>, - ) -> Result<(Socket, Option), glib::Error>; - - #[doc(alias = "g_socket_listener_accept_socket_async")] - fn accept_socket_async< - P: FnOnce(Result<(Socket, Option), glib::Error>) + 'static, - >( - &self, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn accept_socket_future( - &self, - ) -> Pin< - Box_< - dyn std::future::Future), glib::Error>> - + 'static, - >, - >; - - #[doc(alias = "g_socket_listener_add_address")] - fn add_address( - &self, - address: &impl IsA, - type_: SocketType, - protocol: SocketProtocol, - source_object: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_socket_listener_add_any_inet_port")] - fn add_any_inet_port( - &self, - source_object: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_socket_listener_add_inet_port")] - fn add_inet_port( - &self, - port: u16, - source_object: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_listener_add_socket")] - fn add_socket( - &self, - socket: &impl IsA, - source_object: Option<&impl IsA>, - ) -> Result<(), glib::Error>; - - #[doc(alias = "g_socket_listener_close")] - fn close(&self); - - #[doc(alias = "g_socket_listener_set_backlog")] - fn set_backlog(&self, listen_backlog: i32); - - #[doc(alias = "listen-backlog")] - fn listen_backlog(&self) -> i32; - - #[doc(alias = "listen-backlog")] - fn set_listen_backlog(&self, listen_backlog: i32); - - #[doc(alias = "event")] - fn connect_event( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "listen-backlog")] - fn connect_listen_backlog_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SocketListenerExt for O { fn accept( &self, cancellable: Option<&impl IsA>, @@ -160,6 +60,7 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "g_socket_listener_accept_async")] fn accept_async< P: FnOnce(Result<(SocketConnection, Option), glib::Error>) + 'static, >( @@ -234,6 +135,7 @@ impl> SocketListenerExt for O { )) } + #[doc(alias = "g_socket_listener_accept_socket")] fn accept_socket( &self, cancellable: Option<&impl IsA>, @@ -255,6 +157,7 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "g_socket_listener_accept_socket_async")] fn accept_socket_async< P: FnOnce(Result<(Socket, Option), glib::Error>) + 'static, >( @@ -328,6 +231,7 @@ impl> SocketListenerExt for O { )) } + #[doc(alias = "g_socket_listener_add_address")] fn add_address( &self, address: &impl IsA, @@ -356,6 +260,7 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "g_socket_listener_add_any_inet_port")] fn add_any_inet_port( &self, source_object: Option<&impl IsA>, @@ -375,6 +280,7 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "g_socket_listener_add_inet_port")] fn add_inet_port( &self, port: u16, @@ -397,6 +303,7 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "g_socket_listener_add_socket")] fn add_socket( &self, socket: &impl IsA, @@ -419,26 +326,31 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "g_socket_listener_close")] fn close(&self) { unsafe { ffi::g_socket_listener_close(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_socket_listener_set_backlog")] fn set_backlog(&self, listen_backlog: i32) { unsafe { ffi::g_socket_listener_set_backlog(self.as_ref().to_glib_none().0, listen_backlog); } } + #[doc(alias = "listen-backlog")] fn listen_backlog(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "listen-backlog") } + #[doc(alias = "listen-backlog")] fn set_listen_backlog(&self, listen_backlog: i32) { glib::ObjectExt::set_property(self.as_ref(), "listen-backlog", listen_backlog) } + #[doc(alias = "event")] fn connect_event( &self, f: F, @@ -472,6 +384,7 @@ impl> SocketListenerExt for O { } } + #[doc(alias = "listen-backlog")] fn connect_listen_backlog_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_listen_backlog_trampoline< P: IsA, @@ -498,6 +411,8 @@ impl> SocketListenerExt for O { } } +impl> SocketListenerExt for O {} + impl fmt::Display for SocketListener { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketListener") diff --git a/gio/src/auto/socket_service.rs b/gio/src/auto/socket_service.rs index 21c4c287d2c1..536677ec2d48 100644 --- a/gio/src/auto/socket_service.rs +++ b/gio/src/auto/socket_service.rs @@ -34,29 +34,8 @@ impl Default for SocketService { } } -pub trait SocketServiceExt: 'static { +pub trait SocketServiceExt: IsA + 'static { #[doc(alias = "g_socket_service_is_active")] - fn is_active(&self) -> bool; - - #[doc(alias = "g_socket_service_start")] - fn start(&self); - - #[doc(alias = "g_socket_service_stop")] - fn stop(&self); - - fn set_active(&self, active: bool); - - #[doc(alias = "incoming")] - fn connect_incoming) -> bool + 'static>( - &self, - f: F, - ) -> SignalHandlerId; - - #[doc(alias = "active")] - fn connect_active_notify(&self, f: F) -> SignalHandlerId; -} - -impl> SocketServiceExt for O { fn is_active(&self) -> bool { unsafe { from_glib(ffi::g_socket_service_is_active( @@ -65,12 +44,14 @@ impl> SocketServiceExt for O { } } + #[doc(alias = "g_socket_service_start")] fn start(&self) { unsafe { ffi::g_socket_service_start(self.as_ref().to_glib_none().0); } } + #[doc(alias = "g_socket_service_stop")] fn stop(&self) { unsafe { ffi::g_socket_service_stop(self.as_ref().to_glib_none().0); @@ -81,6 +62,7 @@ impl> SocketServiceExt for O { glib::ObjectExt::set_property(self.as_ref(), "active", active) } + #[doc(alias = "incoming")] fn connect_incoming< F: Fn(&Self, &SocketConnection, Option<&glib::Object>) -> bool + 'static, >( @@ -119,6 +101,7 @@ impl> SocketServiceExt for O { } } + #[doc(alias = "active")] fn connect_active_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_active_trampoline< P: IsA, @@ -145,6 +128,8 @@ impl> SocketServiceExt for O { } } +impl> SocketServiceExt for O {} + impl fmt::Display for SocketService { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("SocketService") diff --git a/gio/src/auto/subprocess.rs b/gio/src/auto/subprocess.rs index 6cd260374bfb..ed72b74c640e 100644 --- a/gio/src/auto/subprocess.rs +++ b/gio/src/auto/subprocess.rs @@ -243,7 +243,7 @@ impl Subprocess { unsafe { ffi::g_subprocess_get_term_sig(self.to_glib_none().0) } } - #[cfg(any(not(windows)))] + #[cfg(not(windows))] #[cfg_attr(docsrs, doc(cfg(not(windows))))] #[doc(alias = "g_subprocess_send_signal")] pub fn send_signal(&self, signal_num: i32) { diff --git a/gio/src/auto/subprocess_launcher.rs b/gio/src/auto/subprocess_launcher.rs index d9fc617401f1..47cbf32f84da 100644 --- a/gio/src/auto/subprocess_launcher.rs +++ b/gio/src/auto/subprocess_launcher.rs @@ -24,9 +24,9 @@ impl SubprocessLauncher { unsafe { from_glib_full(ffi::g_subprocess_launcher_new(flags.into_glib())) } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] #[doc(alias = "g_subprocess_launcher_close")] pub fn close(&self) { @@ -45,7 +45,7 @@ impl SubprocessLauncher { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_subprocess_launcher_set_child_setup")] pub fn set_child_setup(&self, child_setup: P) { @@ -94,7 +94,7 @@ impl SubprocessLauncher { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_subprocess_launcher_set_stderr_file_path")] pub fn set_stderr_file_path(&self, path: Option>) { @@ -106,7 +106,7 @@ impl SubprocessLauncher { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_subprocess_launcher_set_stdin_file_path")] pub fn set_stdin_file_path(&self, path: &str) { @@ -118,7 +118,7 @@ impl SubprocessLauncher { } } - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_subprocess_launcher_set_stdout_file_path")] pub fn set_stdout_file_path(&self, path: Option>) { diff --git a/gio/src/auto/tcp_connection.rs b/gio/src/auto/tcp_connection.rs index f997b3cbb414..48e3a2aff1fe 100644 --- a/gio/src/auto/tcp_connection.rs +++ b/gio/src/auto/tcp_connection.rs @@ -23,19 +23,9 @@ impl TcpConnection { pub const NONE: Option<&'static TcpConnection> = None; } -pub trait TcpConnectionExt: 'static { +pub trait TcpConnectionExt: IsA + 'static { #[doc(alias = "g_tcp_connection_get_graceful_disconnect")] #[doc(alias = "get_graceful_disconnect")] - fn is_graceful_disconnect(&self) -> bool; - - #[doc(alias = "g_tcp_connection_set_graceful_disconnect")] - fn set_graceful_disconnect(&self, graceful_disconnect: bool); - - #[doc(alias = "graceful-disconnect")] - fn connect_graceful_disconnect_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TcpConnectionExt for O { fn is_graceful_disconnect(&self) -> bool { unsafe { from_glib(ffi::g_tcp_connection_get_graceful_disconnect( @@ -44,6 +34,7 @@ impl> TcpConnectionExt for O { } } + #[doc(alias = "g_tcp_connection_set_graceful_disconnect")] fn set_graceful_disconnect(&self, graceful_disconnect: bool) { unsafe { ffi::g_tcp_connection_set_graceful_disconnect( @@ -53,6 +44,7 @@ impl> TcpConnectionExt for O { } } + #[doc(alias = "graceful-disconnect")] fn connect_graceful_disconnect_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_graceful_disconnect_trampoline< P: IsA, @@ -79,6 +71,8 @@ impl> TcpConnectionExt for O { } } +impl> TcpConnectionExt for O {} + impl fmt::Display for TcpConnection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TcpConnection") diff --git a/gio/src/auto/threaded_socket_service.rs b/gio/src/auto/threaded_socket_service.rs index 5b3bf17bd586..1a0a92556845 100644 --- a/gio/src/auto/threaded_socket_service.rs +++ b/gio/src/auto/threaded_socket_service.rs @@ -23,22 +23,13 @@ impl ThreadedSocketService { pub const NONE: Option<&'static ThreadedSocketService> = None; } -pub trait ThreadedSocketServiceExt: 'static { +pub trait ThreadedSocketServiceExt: IsA + 'static { #[doc(alias = "max-threads")] - fn max_threads(&self) -> i32; - - #[doc(alias = "run")] - fn connect_run) -> bool + 'static>( - &self, - f: F, - ) -> SignalHandlerId; -} - -impl> ThreadedSocketServiceExt for O { fn max_threads(&self) -> i32 { glib::ObjectExt::property(self.as_ref(), "max-threads") } + #[doc(alias = "run")] fn connect_run) -> bool + 'static>( &self, f: F, @@ -76,6 +67,8 @@ impl> ThreadedSocketServiceExt for O { } } +impl> ThreadedSocketServiceExt for O {} + impl fmt::Display for ThreadedSocketService { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("ThreadedSocketService") diff --git a/gio/src/auto/tls_backend.rs b/gio/src/auto/tls_backend.rs index 8fd9503500db..1708dfbbbed8 100644 --- a/gio/src/auto/tls_backend.rs +++ b/gio/src/auto/tls_backend.rs @@ -26,48 +26,9 @@ impl TlsBackend { } } -pub trait TlsBackendExt: 'static { +pub trait TlsBackendExt: IsA + 'static { #[doc(alias = "g_tls_backend_get_certificate_type")] #[doc(alias = "get_certificate_type")] - fn certificate_type(&self) -> glib::types::Type; - - #[doc(alias = "g_tls_backend_get_client_connection_type")] - #[doc(alias = "get_client_connection_type")] - fn client_connection_type(&self) -> glib::types::Type; - - #[doc(alias = "g_tls_backend_get_default_database")] - #[doc(alias = "get_default_database")] - fn default_database(&self) -> TlsDatabase; - - #[doc(alias = "g_tls_backend_get_dtls_client_connection_type")] - #[doc(alias = "get_dtls_client_connection_type")] - fn dtls_client_connection_type(&self) -> glib::types::Type; - - #[doc(alias = "g_tls_backend_get_dtls_server_connection_type")] - #[doc(alias = "get_dtls_server_connection_type")] - fn dtls_server_connection_type(&self) -> glib::types::Type; - - #[doc(alias = "g_tls_backend_get_file_database_type")] - #[doc(alias = "get_file_database_type")] - fn file_database_type(&self) -> glib::types::Type; - - #[doc(alias = "g_tls_backend_get_server_connection_type")] - #[doc(alias = "get_server_connection_type")] - fn server_connection_type(&self) -> glib::types::Type; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "g_tls_backend_set_default_database")] - fn set_default_database(&self, database: Option<&impl IsA>); - - #[doc(alias = "g_tls_backend_supports_dtls")] - fn supports_dtls(&self) -> bool; - - #[doc(alias = "g_tls_backend_supports_tls")] - fn supports_tls(&self) -> bool; -} - -impl> TlsBackendExt for O { fn certificate_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_certificate_type( @@ -76,6 +37,8 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_get_client_connection_type")] + #[doc(alias = "get_client_connection_type")] fn client_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_client_connection_type( @@ -84,6 +47,8 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_get_default_database")] + #[doc(alias = "get_default_database")] fn default_database(&self) -> TlsDatabase { unsafe { from_glib_full(ffi::g_tls_backend_get_default_database( @@ -92,6 +57,8 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_get_dtls_client_connection_type")] + #[doc(alias = "get_dtls_client_connection_type")] fn dtls_client_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_dtls_client_connection_type( @@ -100,6 +67,8 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_get_dtls_server_connection_type")] + #[doc(alias = "get_dtls_server_connection_type")] fn dtls_server_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_dtls_server_connection_type( @@ -108,6 +77,8 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_get_file_database_type")] + #[doc(alias = "get_file_database_type")] fn file_database_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_file_database_type( @@ -116,6 +87,8 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_get_server_connection_type")] + #[doc(alias = "get_server_connection_type")] fn server_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_server_connection_type( @@ -124,8 +97,9 @@ impl> TlsBackendExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "g_tls_backend_set_default_database")] fn set_default_database(&self, database: Option<&impl IsA>) { unsafe { ffi::g_tls_backend_set_default_database( @@ -135,6 +109,7 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_supports_dtls")] fn supports_dtls(&self) -> bool { unsafe { from_glib(ffi::g_tls_backend_supports_dtls( @@ -143,6 +118,7 @@ impl> TlsBackendExt for O { } } + #[doc(alias = "g_tls_backend_supports_tls")] fn supports_tls(&self) -> bool { unsafe { from_glib(ffi::g_tls_backend_supports_tls( @@ -152,6 +128,8 @@ impl> TlsBackendExt for O { } } +impl> TlsBackendExt for O {} + impl fmt::Display for TlsBackend { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsBackend") diff --git a/gio/src/auto/tls_certificate.rs b/gio/src/auto/tls_certificate.rs index 61fd6161f595..4b175d3f6621 100644 --- a/gio/src/auto/tls_certificate.rs +++ b/gio/src/auto/tls_certificate.rs @@ -2,15 +2,15 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] use crate::InetAddress; use crate::{SocketConnectable, TlsCertificateFlags}; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] use glib::signal::{connect_raw, SignalHandlerId}; use glib::{prelude::*, translate::*}; -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] use std::{boxed::Box as Box_, mem::transmute}; use std::{fmt, ptr}; @@ -42,7 +42,7 @@ impl TlsCertificate { } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "g_tls_certificate_new_from_file_with_password")] #[doc(alias = "new_from_file_with_password")] @@ -102,7 +102,7 @@ impl TlsCertificate { } } - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] #[doc(alias = "g_tls_certificate_new_from_pkcs11_uris")] #[doc(alias = "new_from_pkcs11_uris")] @@ -125,7 +125,7 @@ impl TlsCertificate { } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "g_tls_certificate_new_from_pkcs12")] #[doc(alias = "new_from_pkcs12")] @@ -166,113 +166,11 @@ impl TlsCertificate { } } -pub trait TlsCertificateExt: 'static { - #[cfg(any(feature = "v2_70"))] +pub trait TlsCertificateExt: IsA + 'static { + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_tls_certificate_get_dns_names")] #[doc(alias = "get_dns_names")] - fn dns_names(&self) -> Vec; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_certificate_get_ip_addresses")] - #[doc(alias = "get_ip_addresses")] - fn ip_addresses(&self) -> Vec; - - #[doc(alias = "g_tls_certificate_get_issuer")] - #[doc(alias = "get_issuer")] - #[must_use] - fn issuer(&self) -> Option; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_certificate_get_issuer_name")] - #[doc(alias = "get_issuer_name")] - fn issuer_name(&self) -> Option; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_certificate_get_not_valid_after")] - #[doc(alias = "get_not_valid_after")] - fn not_valid_after(&self) -> Option; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_certificate_get_not_valid_before")] - #[doc(alias = "get_not_valid_before")] - fn not_valid_before(&self) -> Option; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_certificate_get_subject_name")] - #[doc(alias = "get_subject_name")] - fn subject_name(&self) -> Option; - - #[doc(alias = "g_tls_certificate_is_same")] - fn is_same(&self, cert_two: &impl IsA) -> bool; - - #[doc(alias = "g_tls_certificate_verify")] - fn verify( - &self, - identity: Option<&impl IsA>, - trusted_ca: Option<&impl IsA>, - ) -> TlsCertificateFlags; - - fn certificate(&self) -> Option; - - #[doc(alias = "certificate-pem")] - fn certificate_pem(&self) -> Option; - - #[cfg(any(feature = "v2_68"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] - #[doc(alias = "pkcs11-uri")] - fn pkcs11_uri(&self) -> Option; - - #[doc(alias = "private-key")] - fn private_key(&self) -> Option; - - #[doc(alias = "private-key-pem")] - fn private_key_pem(&self) -> Option; - - #[cfg(any(feature = "v2_68"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] - #[doc(alias = "private-key-pkcs11-uri")] - fn private_key_pkcs11_uri(&self) -> Option; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "dns-names")] - fn connect_dns_names_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "ip-addresses")] - fn connect_ip_addresses_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "issuer-name")] - fn connect_issuer_name_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "not-valid-after")] - fn connect_not_valid_after_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "not-valid-before")] - fn connect_not_valid_before_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "subject-name")] - fn connect_subject_name_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TlsCertificateExt for O { - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] fn dns_names(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::g_tls_certificate_get_dns_names( @@ -281,8 +179,10 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_certificate_get_ip_addresses")] + #[doc(alias = "get_ip_addresses")] fn ip_addresses(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::g_tls_certificate_get_ip_addresses( @@ -291,6 +191,9 @@ impl> TlsCertificateExt for O { } } + #[doc(alias = "g_tls_certificate_get_issuer")] + #[doc(alias = "get_issuer")] + #[must_use] fn issuer(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_certificate_get_issuer( @@ -299,8 +202,10 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_certificate_get_issuer_name")] + #[doc(alias = "get_issuer_name")] fn issuer_name(&self) -> Option { unsafe { from_glib_full(ffi::g_tls_certificate_get_issuer_name( @@ -309,8 +214,10 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_certificate_get_not_valid_after")] + #[doc(alias = "get_not_valid_after")] fn not_valid_after(&self) -> Option { unsafe { from_glib_full(ffi::g_tls_certificate_get_not_valid_after( @@ -319,8 +226,10 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_certificate_get_not_valid_before")] + #[doc(alias = "get_not_valid_before")] fn not_valid_before(&self) -> Option { unsafe { from_glib_full(ffi::g_tls_certificate_get_not_valid_before( @@ -329,8 +238,10 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_certificate_get_subject_name")] + #[doc(alias = "get_subject_name")] fn subject_name(&self) -> Option { unsafe { from_glib_full(ffi::g_tls_certificate_get_subject_name( @@ -339,6 +250,7 @@ impl> TlsCertificateExt for O { } } + #[doc(alias = "g_tls_certificate_is_same")] fn is_same(&self, cert_two: &impl IsA) -> bool { unsafe { from_glib(ffi::g_tls_certificate_is_same( @@ -348,6 +260,7 @@ impl> TlsCertificateExt for O { } } + #[doc(alias = "g_tls_certificate_verify")] fn verify( &self, identity: Option<&impl IsA>, @@ -366,32 +279,38 @@ impl> TlsCertificateExt for O { glib::ObjectExt::property(self.as_ref(), "certificate") } + #[doc(alias = "certificate-pem")] fn certificate_pem(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "certificate-pem") } - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] + #[doc(alias = "pkcs11-uri")] fn pkcs11_uri(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "pkcs11-uri") } + #[doc(alias = "private-key")] fn private_key(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "private-key") } + #[doc(alias = "private-key-pem")] fn private_key_pem(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "private-key-pem") } - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] + #[doc(alias = "private-key-pkcs11-uri")] fn private_key_pkcs11_uri(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "private-key-pkcs11-uri") } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "dns-names")] fn connect_dns_names_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_dns_names_trampoline< P: IsA, @@ -417,8 +336,9 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "ip-addresses")] fn connect_ip_addresses_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ip_addresses_trampoline< P: IsA, @@ -444,8 +364,9 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "issuer-name")] fn connect_issuer_name_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_issuer_name_trampoline< P: IsA, @@ -471,8 +392,9 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "not-valid-after")] fn connect_not_valid_after_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_not_valid_after_trampoline< P: IsA, @@ -498,8 +420,9 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "not-valid-before")] fn connect_not_valid_before_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_not_valid_before_trampoline< P: IsA, @@ -525,8 +448,9 @@ impl> TlsCertificateExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "subject-name")] fn connect_subject_name_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_subject_name_trampoline< P: IsA, @@ -553,6 +477,8 @@ impl> TlsCertificateExt for O { } } +impl> TlsCertificateExt for O {} + impl fmt::Display for TlsCertificate { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsCertificate") diff --git a/gio/src/auto/tls_client_connection.rs b/gio/src/auto/tls_client_connection.rs index 431e1d3b161d..1fed65fa76dd 100644 --- a/gio/src/auto/tls_client_connection.rs +++ b/gio/src/auto/tls_client_connection.rs @@ -44,44 +44,8 @@ impl TlsClientConnection { } } -pub trait TlsClientConnectionExt: 'static { +pub trait TlsClientConnectionExt: IsA + 'static { #[doc(alias = "g_tls_client_connection_copy_session_state")] - fn copy_session_state(&self, source: &impl IsA); - - #[doc(alias = "g_tls_client_connection_get_accepted_cas")] - #[doc(alias = "get_accepted_cas")] - fn accepted_cas(&self) -> Vec; - - #[doc(alias = "g_tls_client_connection_get_server_identity")] - #[doc(alias = "get_server_identity")] - fn server_identity(&self) -> Option; - - #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] - #[allow(deprecated)] - #[doc(alias = "g_tls_client_connection_get_validation_flags")] - #[doc(alias = "get_validation_flags")] - fn validation_flags(&self) -> TlsCertificateFlags; - - #[doc(alias = "g_tls_client_connection_set_server_identity")] - fn set_server_identity(&self, identity: &impl IsA); - - #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] - #[allow(deprecated)] - #[doc(alias = "g_tls_client_connection_set_validation_flags")] - fn set_validation_flags(&self, flags: TlsCertificateFlags); - - #[doc(alias = "accepted-cas")] - fn connect_accepted_cas_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "server-identity")] - fn connect_server_identity_notify(&self, f: F) -> SignalHandlerId; - - #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] - #[doc(alias = "validation-flags")] - fn connect_validation_flags_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TlsClientConnectionExt for O { fn copy_session_state(&self, source: &impl IsA) { unsafe { ffi::g_tls_client_connection_copy_session_state( @@ -91,6 +55,8 @@ impl> TlsClientConnectionExt for O { } } + #[doc(alias = "g_tls_client_connection_get_accepted_cas")] + #[doc(alias = "get_accepted_cas")] fn accepted_cas(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_tls_client_connection_get_accepted_cas( @@ -99,6 +65,8 @@ impl> TlsClientConnectionExt for O { } } + #[doc(alias = "g_tls_client_connection_get_server_identity")] + #[doc(alias = "get_server_identity")] fn server_identity(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_client_connection_get_server_identity( @@ -107,7 +75,10 @@ impl> TlsClientConnectionExt for O { } } + #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] #[allow(deprecated)] + #[doc(alias = "g_tls_client_connection_get_validation_flags")] + #[doc(alias = "get_validation_flags")] fn validation_flags(&self) -> TlsCertificateFlags { unsafe { from_glib(ffi::g_tls_client_connection_get_validation_flags( @@ -116,6 +87,7 @@ impl> TlsClientConnectionExt for O { } } + #[doc(alias = "g_tls_client_connection_set_server_identity")] fn set_server_identity(&self, identity: &impl IsA) { unsafe { ffi::g_tls_client_connection_set_server_identity( @@ -125,7 +97,9 @@ impl> TlsClientConnectionExt for O { } } + #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] #[allow(deprecated)] + #[doc(alias = "g_tls_client_connection_set_validation_flags")] fn set_validation_flags(&self, flags: TlsCertificateFlags) { unsafe { ffi::g_tls_client_connection_set_validation_flags( @@ -135,6 +109,7 @@ impl> TlsClientConnectionExt for O { } } + #[doc(alias = "accepted-cas")] fn connect_accepted_cas_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_accepted_cas_trampoline< P: IsA, @@ -160,6 +135,7 @@ impl> TlsClientConnectionExt for O { } } + #[doc(alias = "server-identity")] fn connect_server_identity_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_server_identity_trampoline< P: IsA, @@ -185,6 +161,8 @@ impl> TlsClientConnectionExt for O { } } + #[cfg_attr(feature = "v2_72", deprecated = "Since 2.72")] + #[doc(alias = "validation-flags")] fn connect_validation_flags_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_validation_flags_trampoline< P: IsA, @@ -211,6 +189,8 @@ impl> TlsClientConnectionExt for O { } } +impl> TlsClientConnectionExt for O {} + impl fmt::Display for TlsClientConnection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsClientConnection") diff --git a/gio/src/auto/tls_connection.rs b/gio/src/auto/tls_connection.rs index 065094787c96..18f7e5920be9 100644 --- a/gio/src/auto/tls_connection.rs +++ b/gio/src/auto/tls_connection.rs @@ -3,7 +3,7 @@ // DO NOT EDIT #![allow(deprecated)] -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] use crate::TlsProtocolVersion; use crate::{ @@ -30,158 +30,8 @@ impl TlsConnection { pub const NONE: Option<&'static TlsConnection> = None; } -pub trait TlsConnectionExt: 'static { +pub trait TlsConnectionExt: IsA + 'static { #[doc(alias = "g_tls_connection_emit_accept_certificate")] - fn emit_accept_certificate( - &self, - peer_cert: &impl IsA, - errors: TlsCertificateFlags, - ) -> bool; - - #[doc(alias = "g_tls_connection_get_certificate")] - #[doc(alias = "get_certificate")] - fn certificate(&self) -> Option; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_connection_get_ciphersuite_name")] - #[doc(alias = "get_ciphersuite_name")] - fn ciphersuite_name(&self) -> Option; - - #[doc(alias = "g_tls_connection_get_database")] - #[doc(alias = "get_database")] - fn database(&self) -> Option; - - #[doc(alias = "g_tls_connection_get_interaction")] - #[doc(alias = "get_interaction")] - fn interaction(&self) -> Option; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "g_tls_connection_get_negotiated_protocol")] - #[doc(alias = "get_negotiated_protocol")] - fn negotiated_protocol(&self) -> Option; - - #[doc(alias = "g_tls_connection_get_peer_certificate")] - #[doc(alias = "get_peer_certificate")] - fn peer_certificate(&self) -> Option; - - #[doc(alias = "g_tls_connection_get_peer_certificate_errors")] - #[doc(alias = "get_peer_certificate_errors")] - fn peer_certificate_errors(&self) -> TlsCertificateFlags; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "g_tls_connection_get_protocol_version")] - #[doc(alias = "get_protocol_version")] - fn protocol_version(&self) -> TlsProtocolVersion; - - #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")] - #[allow(deprecated)] - #[doc(alias = "g_tls_connection_get_rehandshake_mode")] - #[doc(alias = "get_rehandshake_mode")] - fn rehandshake_mode(&self) -> TlsRehandshakeMode; - - #[doc(alias = "g_tls_connection_get_require_close_notify")] - #[doc(alias = "get_require_close_notify")] - fn requires_close_notify(&self) -> bool; - - #[doc(alias = "g_tls_connection_handshake")] - fn handshake(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error>; - - #[doc(alias = "g_tls_connection_handshake_async")] - fn handshake_async) + 'static>( - &self, - io_priority: glib::Priority, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn handshake_future( - &self, - io_priority: glib::Priority, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_tls_connection_set_certificate")] - fn set_certificate(&self, certificate: &impl IsA); - - #[doc(alias = "g_tls_connection_set_database")] - fn set_database(&self, database: Option<&impl IsA>); - - #[doc(alias = "g_tls_connection_set_interaction")] - fn set_interaction(&self, interaction: Option<&impl IsA>); - - #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")] - #[allow(deprecated)] - #[doc(alias = "g_tls_connection_set_rehandshake_mode")] - fn set_rehandshake_mode(&self, mode: TlsRehandshakeMode); - - #[doc(alias = "g_tls_connection_set_require_close_notify")] - fn set_require_close_notify(&self, require_close_notify: bool); - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "advertised-protocols")] - fn advertised_protocols(&self) -> Vec; - - #[doc(alias = "base-io-stream")] - fn base_io_stream(&self) -> Option; - - #[doc(alias = "accept-certificate")] - fn connect_accept_certificate< - F: Fn(&Self, &TlsCertificate, TlsCertificateFlags) -> bool + 'static, - >( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "advertised-protocols")] - fn connect_advertised_protocols_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "certificate")] - fn connect_certificate_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "ciphersuite-name")] - fn connect_ciphersuite_name_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "database")] - fn connect_database_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "interaction")] - fn connect_interaction_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v2_60"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] - #[doc(alias = "negotiated-protocol")] - fn connect_negotiated_protocol_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "peer-certificate")] - fn connect_peer_certificate_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "peer-certificate-errors")] - fn connect_peer_certificate_errors_notify( - &self, - f: F, - ) -> SignalHandlerId; - - #[cfg(any(feature = "v2_70"))] - #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] - #[doc(alias = "protocol-version")] - fn connect_protocol_version_notify(&self, f: F) -> SignalHandlerId; - - #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")] - #[doc(alias = "rehandshake-mode")] - fn connect_rehandshake_mode_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "require-close-notify")] - fn connect_require_close_notify_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TlsConnectionExt for O { fn emit_accept_certificate( &self, peer_cert: &impl IsA, @@ -196,6 +46,8 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_get_certificate")] + #[doc(alias = "get_certificate")] fn certificate(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_certificate( @@ -204,8 +56,10 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_connection_get_ciphersuite_name")] + #[doc(alias = "get_ciphersuite_name")] fn ciphersuite_name(&self) -> Option { unsafe { from_glib_full(ffi::g_tls_connection_get_ciphersuite_name( @@ -214,6 +68,8 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_get_database")] + #[doc(alias = "get_database")] fn database(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_database( @@ -222,6 +78,8 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_get_interaction")] + #[doc(alias = "get_interaction")] fn interaction(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_interaction( @@ -230,8 +88,10 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "g_tls_connection_get_negotiated_protocol")] + #[doc(alias = "get_negotiated_protocol")] fn negotiated_protocol(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_negotiated_protocol( @@ -240,6 +100,8 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_get_peer_certificate")] + #[doc(alias = "get_peer_certificate")] fn peer_certificate(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_peer_certificate( @@ -248,6 +110,8 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_get_peer_certificate_errors")] + #[doc(alias = "get_peer_certificate_errors")] fn peer_certificate_errors(&self) -> TlsCertificateFlags { unsafe { from_glib(ffi::g_tls_connection_get_peer_certificate_errors( @@ -256,8 +120,10 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "g_tls_connection_get_protocol_version")] + #[doc(alias = "get_protocol_version")] fn protocol_version(&self) -> TlsProtocolVersion { unsafe { from_glib(ffi::g_tls_connection_get_protocol_version( @@ -266,7 +132,10 @@ impl> TlsConnectionExt for O { } } + #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")] #[allow(deprecated)] + #[doc(alias = "g_tls_connection_get_rehandshake_mode")] + #[doc(alias = "get_rehandshake_mode")] fn rehandshake_mode(&self) -> TlsRehandshakeMode { unsafe { from_glib(ffi::g_tls_connection_get_rehandshake_mode( @@ -275,6 +144,8 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_get_require_close_notify")] + #[doc(alias = "get_require_close_notify")] fn requires_close_notify(&self) -> bool { unsafe { from_glib(ffi::g_tls_connection_get_require_close_notify( @@ -283,6 +154,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_handshake")] fn handshake(&self, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); @@ -300,6 +172,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_handshake_async")] fn handshake_async) + 'static>( &self, io_priority: glib::Priority, @@ -364,6 +237,7 @@ impl> TlsConnectionExt for O { )) } + #[doc(alias = "g_tls_connection_set_certificate")] fn set_certificate(&self, certificate: &impl IsA) { unsafe { ffi::g_tls_connection_set_certificate( @@ -373,6 +247,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_set_database")] fn set_database(&self, database: Option<&impl IsA>) { unsafe { ffi::g_tls_connection_set_database( @@ -382,6 +257,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_set_interaction")] fn set_interaction(&self, interaction: Option<&impl IsA>) { unsafe { ffi::g_tls_connection_set_interaction( @@ -391,7 +267,9 @@ impl> TlsConnectionExt for O { } } + #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")] #[allow(deprecated)] + #[doc(alias = "g_tls_connection_set_rehandshake_mode")] fn set_rehandshake_mode(&self, mode: TlsRehandshakeMode) { unsafe { ffi::g_tls_connection_set_rehandshake_mode( @@ -401,6 +279,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "g_tls_connection_set_require_close_notify")] fn set_require_close_notify(&self, require_close_notify: bool) { unsafe { ffi::g_tls_connection_set_require_close_notify( @@ -410,16 +289,19 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "advertised-protocols")] fn advertised_protocols(&self) -> Vec { glib::ObjectExt::property(self.as_ref(), "advertised-protocols") } + #[doc(alias = "base-io-stream")] fn base_io_stream(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "base-io-stream") } + #[doc(alias = "accept-certificate")] fn connect_accept_certificate< F: Fn(&Self, &TlsCertificate, TlsCertificateFlags) -> bool + 'static, >( @@ -456,8 +338,9 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "advertised-protocols")] fn connect_advertised_protocols_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_advertised_protocols_trampoline< P: IsA, @@ -483,6 +366,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "certificate")] fn connect_certificate_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_certificate_trampoline< P: IsA, @@ -508,8 +392,9 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "ciphersuite-name")] fn connect_ciphersuite_name_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_ciphersuite_name_trampoline< P: IsA, @@ -535,6 +420,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "database")] fn connect_database_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_database_trampoline< P: IsA, @@ -560,6 +446,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "interaction")] fn connect_interaction_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_interaction_trampoline< P: IsA, @@ -585,8 +472,9 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] + #[doc(alias = "negotiated-protocol")] fn connect_negotiated_protocol_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_negotiated_protocol_trampoline< P: IsA, @@ -612,6 +500,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "peer-certificate")] fn connect_peer_certificate_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_peer_certificate_trampoline< P: IsA, @@ -637,6 +526,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "peer-certificate-errors")] fn connect_peer_certificate_errors_notify( &self, f: F, @@ -665,8 +555,9 @@ impl> TlsConnectionExt for O { } } - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] + #[doc(alias = "protocol-version")] fn connect_protocol_version_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_protocol_version_trampoline< P: IsA, @@ -692,6 +583,8 @@ impl> TlsConnectionExt for O { } } + #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")] + #[doc(alias = "rehandshake-mode")] fn connect_rehandshake_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_rehandshake_mode_trampoline< P: IsA, @@ -717,6 +610,7 @@ impl> TlsConnectionExt for O { } } + #[doc(alias = "require-close-notify")] fn connect_require_close_notify_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_require_close_notify_trampoline< P: IsA, @@ -743,6 +637,8 @@ impl> TlsConnectionExt for O { } } +impl> TlsConnectionExt for O {} + impl fmt::Display for TlsConnection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsConnection") diff --git a/gio/src/auto/tls_database.rs b/gio/src/auto/tls_database.rs index ee31b4b25da7..af2e58f9307b 100644 --- a/gio/src/auto/tls_database.rs +++ b/gio/src/auto/tls_database.rs @@ -22,133 +22,8 @@ impl TlsDatabase { pub const NONE: Option<&'static TlsDatabase> = None; } -pub trait TlsDatabaseExt: 'static { +pub trait TlsDatabaseExt: IsA + 'static { #[doc(alias = "g_tls_database_create_certificate_handle")] - fn create_certificate_handle( - &self, - certificate: &impl IsA, - ) -> Option; - - #[doc(alias = "g_tls_database_lookup_certificate_for_handle")] - fn lookup_certificate_for_handle( - &self, - handle: &str, - interaction: Option<&impl IsA>, - flags: TlsDatabaseLookupFlags, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_tls_database_lookup_certificate_for_handle_async")] - fn lookup_certificate_for_handle_async< - P: FnOnce(Result) + 'static, - >( - &self, - handle: &str, - interaction: Option<&impl IsA>, - flags: TlsDatabaseLookupFlags, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_certificate_for_handle_future( - &self, - handle: &str, - interaction: Option<&(impl IsA + Clone + 'static)>, - flags: TlsDatabaseLookupFlags, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_tls_database_lookup_certificate_issuer")] - fn lookup_certificate_issuer( - &self, - certificate: &impl IsA, - interaction: Option<&impl IsA>, - flags: TlsDatabaseLookupFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_tls_database_lookup_certificate_issuer_async")] - fn lookup_certificate_issuer_async) + 'static>( - &self, - certificate: &impl IsA, - interaction: Option<&impl IsA>, - flags: TlsDatabaseLookupFlags, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_certificate_issuer_future( - &self, - certificate: &(impl IsA + Clone + 'static), - interaction: Option<&(impl IsA + Clone + 'static)>, - flags: TlsDatabaseLookupFlags, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_tls_database_lookup_certificates_issued_by")] - fn lookup_certificates_issued_by( - &self, - issuer_raw_dn: &glib::ByteArray, - interaction: Option<&impl IsA>, - flags: TlsDatabaseLookupFlags, - cancellable: Option<&impl IsA>, - ) -> Result, glib::Error>; - - #[doc(alias = "g_tls_database_lookup_certificates_issued_by_async")] - fn lookup_certificates_issued_by_async< - P: FnOnce(Result, glib::Error>) + 'static, - >( - &self, - issuer_raw_dn: &glib::ByteArray, - interaction: Option<&impl IsA>, - flags: TlsDatabaseLookupFlags, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn lookup_certificates_issued_by_future( - &self, - issuer_raw_dn: &glib::ByteArray, - interaction: Option<&(impl IsA + Clone + 'static)>, - flags: TlsDatabaseLookupFlags, - ) -> Pin< - Box_, glib::Error>> + 'static>, - >; - - #[doc(alias = "g_tls_database_verify_chain")] - fn verify_chain( - &self, - chain: &impl IsA, - purpose: &str, - identity: Option<&impl IsA>, - interaction: Option<&impl IsA>, - flags: TlsDatabaseVerifyFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_tls_database_verify_chain_async")] - fn verify_chain_async) + 'static>( - &self, - chain: &impl IsA, - purpose: &str, - identity: Option<&impl IsA>, - interaction: Option<&impl IsA>, - flags: TlsDatabaseVerifyFlags, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn verify_chain_future( - &self, - chain: &(impl IsA + Clone + 'static), - purpose: &str, - identity: Option<&(impl IsA + Clone + 'static)>, - interaction: Option<&(impl IsA + Clone + 'static)>, - flags: TlsDatabaseVerifyFlags, - ) -> Pin< - Box_> + 'static>, - >; -} - -impl> TlsDatabaseExt for O { fn create_certificate_handle( &self, certificate: &impl IsA, @@ -161,6 +36,7 @@ impl> TlsDatabaseExt for O { } } + #[doc(alias = "g_tls_database_lookup_certificate_for_handle")] fn lookup_certificate_for_handle( &self, handle: &str, @@ -186,6 +62,7 @@ impl> TlsDatabaseExt for O { } } + #[doc(alias = "g_tls_database_lookup_certificate_for_handle_async")] fn lookup_certificate_for_handle_async< P: FnOnce(Result) + 'static, >( @@ -270,6 +147,7 @@ impl> TlsDatabaseExt for O { )) } + #[doc(alias = "g_tls_database_lookup_certificate_issuer")] fn lookup_certificate_issuer( &self, certificate: &impl IsA, @@ -295,6 +173,7 @@ impl> TlsDatabaseExt for O { } } + #[doc(alias = "g_tls_database_lookup_certificate_issuer_async")] fn lookup_certificate_issuer_async) + 'static>( &self, certificate: &impl IsA, @@ -377,6 +256,7 @@ impl> TlsDatabaseExt for O { )) } + #[doc(alias = "g_tls_database_lookup_certificates_issued_by")] fn lookup_certificates_issued_by( &self, issuer_raw_dn: &glib::ByteArray, @@ -402,6 +282,7 @@ impl> TlsDatabaseExt for O { } } + #[doc(alias = "g_tls_database_lookup_certificates_issued_by_async")] fn lookup_certificates_issued_by_async< P: FnOnce(Result, glib::Error>) + 'static, >( @@ -487,6 +368,7 @@ impl> TlsDatabaseExt for O { )) } + #[doc(alias = "g_tls_database_verify_chain")] fn verify_chain( &self, chain: &impl IsA, @@ -516,6 +398,7 @@ impl> TlsDatabaseExt for O { } } + #[doc(alias = "g_tls_database_verify_chain_async")] fn verify_chain_async) + 'static>( &self, chain: &impl IsA, @@ -607,6 +490,8 @@ impl> TlsDatabaseExt for O { } } +impl> TlsDatabaseExt for O {} + impl fmt::Display for TlsDatabase { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsDatabase") diff --git a/gio/src/auto/tls_file_database.rs b/gio/src/auto/tls_file_database.rs index 434badb25e17..e667186f01ff 100644 --- a/gio/src/auto/tls_file_database.rs +++ b/gio/src/auto/tls_file_database.rs @@ -36,16 +36,7 @@ impl TlsFileDatabase { } } -pub trait TlsFileDatabaseExt: 'static { - fn anchors(&self) -> Option; - - fn set_anchors(&self, anchors: Option<&str>); - - #[doc(alias = "anchors")] - fn connect_anchors_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TlsFileDatabaseExt for O { +pub trait TlsFileDatabaseExt: IsA + 'static { fn anchors(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "anchors") } @@ -54,6 +45,7 @@ impl> TlsFileDatabaseExt for O { glib::ObjectExt::set_property(self.as_ref(), "anchors", anchors) } + #[doc(alias = "anchors")] fn connect_anchors_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_anchors_trampoline< P: IsA, @@ -80,6 +72,8 @@ impl> TlsFileDatabaseExt for O { } } +impl> TlsFileDatabaseExt for O {} + impl fmt::Display for TlsFileDatabase { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsFileDatabase") diff --git a/gio/src/auto/tls_interaction.rs b/gio/src/auto/tls_interaction.rs index 7fa4d73068eb..fa4e125dd8d7 100644 --- a/gio/src/auto/tls_interaction.rs +++ b/gio/src/auto/tls_interaction.rs @@ -22,71 +22,8 @@ impl TlsInteraction { pub const NONE: Option<&'static TlsInteraction> = None; } -pub trait TlsInteractionExt: 'static { +pub trait TlsInteractionExt: IsA + 'static { #[doc(alias = "g_tls_interaction_ask_password")] - fn ask_password( - &self, - password: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_tls_interaction_ask_password_async")] - fn ask_password_async) + 'static>( - &self, - password: &impl IsA, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn ask_password_future( - &self, - password: &(impl IsA + Clone + 'static), - ) -> Pin< - Box_> + 'static>, - >; - - #[doc(alias = "g_tls_interaction_invoke_ask_password")] - fn invoke_ask_password( - &self, - password: &impl IsA, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_tls_interaction_invoke_request_certificate")] - fn invoke_request_certificate( - &self, - connection: &impl IsA, - flags: TlsCertificateRequestFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_tls_interaction_request_certificate")] - fn request_certificate( - &self, - connection: &impl IsA, - flags: TlsCertificateRequestFlags, - cancellable: Option<&impl IsA>, - ) -> Result; - - #[doc(alias = "g_tls_interaction_request_certificate_async")] - fn request_certificate_async) + 'static>( - &self, - connection: &impl IsA, - flags: TlsCertificateRequestFlags, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn request_certificate_future( - &self, - connection: &(impl IsA + Clone + 'static), - flags: TlsCertificateRequestFlags, - ) -> Pin< - Box_> + 'static>, - >; -} - -impl> TlsInteractionExt for O { fn ask_password( &self, password: &impl IsA, @@ -108,6 +45,7 @@ impl> TlsInteractionExt for O { } } + #[doc(alias = "g_tls_interaction_ask_password_async")] fn ask_password_async) + 'static>( &self, password: &impl IsA, @@ -178,6 +116,7 @@ impl> TlsInteractionExt for O { )) } + #[doc(alias = "g_tls_interaction_invoke_ask_password")] fn invoke_ask_password( &self, password: &impl IsA, @@ -199,6 +138,7 @@ impl> TlsInteractionExt for O { } } + #[doc(alias = "g_tls_interaction_invoke_request_certificate")] fn invoke_request_certificate( &self, connection: &impl IsA, @@ -222,6 +162,7 @@ impl> TlsInteractionExt for O { } } + #[doc(alias = "g_tls_interaction_request_certificate")] fn request_certificate( &self, connection: &impl IsA, @@ -245,6 +186,7 @@ impl> TlsInteractionExt for O { } } + #[doc(alias = "g_tls_interaction_request_certificate_async")] fn request_certificate_async) + 'static>( &self, connection: &impl IsA, @@ -319,6 +261,8 @@ impl> TlsInteractionExt for O { } } +impl> TlsInteractionExt for O {} + impl fmt::Display for TlsInteraction { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsInteraction") diff --git a/gio/src/auto/tls_password.rs b/gio/src/auto/tls_password.rs index a72499277b2e..8ac3304cdff9 100644 --- a/gio/src/auto/tls_password.rs +++ b/gio/src/auto/tls_password.rs @@ -33,42 +33,9 @@ impl TlsPassword { } } -pub trait TlsPasswordExt: 'static { +pub trait TlsPasswordExt: IsA + 'static { #[doc(alias = "g_tls_password_get_description")] #[doc(alias = "get_description")] - fn description(&self) -> glib::GString; - - #[doc(alias = "g_tls_password_get_flags")] - #[doc(alias = "get_flags")] - fn flags(&self) -> TlsPasswordFlags; - - #[doc(alias = "g_tls_password_get_warning")] - #[doc(alias = "get_warning")] - fn warning(&self) -> glib::GString; - - #[doc(alias = "g_tls_password_set_description")] - fn set_description(&self, description: &str); - - #[doc(alias = "g_tls_password_set_flags")] - fn set_flags(&self, flags: TlsPasswordFlags); - - //#[doc(alias = "g_tls_password_set_value_full")] - //fn set_value_full(&self, value: &[u8]); - - #[doc(alias = "g_tls_password_set_warning")] - fn set_warning(&self, warning: &str); - - #[doc(alias = "description")] - fn connect_description_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "flags")] - fn connect_flags_notify(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "warning")] - fn connect_warning_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TlsPasswordExt for O { fn description(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_tls_password_get_description( @@ -77,6 +44,8 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "g_tls_password_get_flags")] + #[doc(alias = "get_flags")] fn flags(&self) -> TlsPasswordFlags { unsafe { from_glib(ffi::g_tls_password_get_flags( @@ -85,6 +54,8 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "g_tls_password_get_warning")] + #[doc(alias = "get_warning")] fn warning(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_tls_password_get_warning( @@ -93,6 +64,7 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "g_tls_password_set_description")] fn set_description(&self, description: &str) { unsafe { ffi::g_tls_password_set_description( @@ -102,16 +74,19 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "g_tls_password_set_flags")] fn set_flags(&self, flags: TlsPasswordFlags) { unsafe { ffi::g_tls_password_set_flags(self.as_ref().to_glib_none().0, flags.into_glib()); } } + //#[doc(alias = "g_tls_password_set_value_full")] //fn set_value_full(&self, value: &[u8]) { // unsafe { TODO: call ffi:g_tls_password_set_value_full() } //} + #[doc(alias = "g_tls_password_set_warning")] fn set_warning(&self, warning: &str) { unsafe { ffi::g_tls_password_set_warning( @@ -121,6 +96,7 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "description")] fn connect_description_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_description_trampoline< P: IsA, @@ -146,6 +122,7 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "flags")] fn connect_flags_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_flags_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GTlsPassword, @@ -168,6 +145,7 @@ impl> TlsPasswordExt for O { } } + #[doc(alias = "warning")] fn connect_warning_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_warning_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GTlsPassword, @@ -191,6 +169,8 @@ impl> TlsPasswordExt for O { } } +impl> TlsPasswordExt for O {} + impl fmt::Display for TlsPassword { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsPassword") diff --git a/gio/src/auto/tls_server_connection.rs b/gio/src/auto/tls_server_connection.rs index 5c1fe97f4ddd..083c6edaf47d 100644 --- a/gio/src/auto/tls_server_connection.rs +++ b/gio/src/auto/tls_server_connection.rs @@ -43,26 +43,18 @@ impl TlsServerConnection { } } -pub trait TlsServerConnectionExt: 'static { +pub trait TlsServerConnectionExt: IsA + 'static { #[doc(alias = "authentication-mode")] - fn authentication_mode(&self) -> TlsAuthenticationMode; - - #[doc(alias = "authentication-mode")] - fn set_authentication_mode(&self, authentication_mode: TlsAuthenticationMode); - - #[doc(alias = "authentication-mode")] - fn connect_authentication_mode_notify(&self, f: F) -> SignalHandlerId; -} - -impl> TlsServerConnectionExt for O { fn authentication_mode(&self) -> TlsAuthenticationMode { glib::ObjectExt::property(self.as_ref(), "authentication-mode") } + #[doc(alias = "authentication-mode")] fn set_authentication_mode(&self, authentication_mode: TlsAuthenticationMode) { glib::ObjectExt::set_property(self.as_ref(), "authentication-mode", authentication_mode) } + #[doc(alias = "authentication-mode")] fn connect_authentication_mode_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_authentication_mode_trampoline< P: IsA, @@ -89,6 +81,8 @@ impl> TlsServerConnectionExt for O { } } +impl> TlsServerConnectionExt for O {} + impl fmt::Display for TlsServerConnection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("TlsServerConnection") diff --git a/gio/src/auto/unix_credentials_message.rs b/gio/src/auto/unix_credentials_message.rs index 3246710c59c1..f11241986236 100644 --- a/gio/src/auto/unix_credentials_message.rs +++ b/gio/src/auto/unix_credentials_message.rs @@ -49,13 +49,9 @@ impl Default for UnixCredentialsMessage { } } -pub trait UnixCredentialsMessageExt: 'static { +pub trait UnixCredentialsMessageExt: IsA + 'static { #[doc(alias = "g_unix_credentials_message_get_credentials")] #[doc(alias = "get_credentials")] - fn credentials(&self) -> Credentials; -} - -impl> UnixCredentialsMessageExt for O { fn credentials(&self) -> Credentials { unsafe { from_glib_none(ffi::g_unix_credentials_message_get_credentials( @@ -65,6 +61,8 @@ impl> UnixCredentialsMessageExt for O { } } +impl> UnixCredentialsMessageExt for O {} + impl fmt::Display for UnixCredentialsMessage { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("UnixCredentialsMessage") diff --git a/gio/src/auto/unix_fd_list.rs b/gio/src/auto/unix_fd_list.rs index 5fad1ac67809..91c65794b04a 100644 --- a/gio/src/auto/unix_fd_list.rs +++ b/gio/src/auto/unix_fd_list.rs @@ -29,18 +29,16 @@ impl Default for UnixFDList { } } -pub trait UnixFDListExt: 'static { +pub trait UnixFDListExt: IsA + 'static { #[doc(alias = "g_unix_fd_list_get_length")] #[doc(alias = "get_length")] - fn length(&self) -> i32; -} - -impl> UnixFDListExt for O { fn length(&self) -> i32 { unsafe { ffi::g_unix_fd_list_get_length(self.as_ref().to_glib_none().0) } } } +impl> UnixFDListExt for O {} + impl fmt::Display for UnixFDList { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("UnixFDList") diff --git a/gio/src/auto/unix_fd_message.rs b/gio/src/auto/unix_fd_message.rs index 4d3e840bdbfa..b1dfdc4fe494 100644 --- a/gio/src/auto/unix_fd_message.rs +++ b/gio/src/auto/unix_fd_message.rs @@ -41,13 +41,9 @@ impl Default for UnixFDMessage { } } -pub trait UnixFDMessageExt: 'static { +pub trait UnixFDMessageExt: IsA + 'static { #[doc(alias = "g_unix_fd_message_get_fd_list")] #[doc(alias = "get_fd_list")] - fn fd_list(&self) -> UnixFDList; -} - -impl> UnixFDMessageExt for O { fn fd_list(&self) -> UnixFDList { unsafe { from_glib_none(ffi::g_unix_fd_message_get_fd_list( @@ -57,6 +53,8 @@ impl> UnixFDMessageExt for O { } } +impl> UnixFDMessageExt for O {} + impl fmt::Display for UnixFDMessage { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("UnixFDMessage") diff --git a/gio/src/auto/unix_input_stream.rs b/gio/src/auto/unix_input_stream.rs index 4f3ae0635077..7c33bdf12508 100644 --- a/gio/src/auto/unix_input_stream.rs +++ b/gio/src/auto/unix_input_stream.rs @@ -19,13 +19,9 @@ impl UnixInputStream { pub const NONE: Option<&'static UnixInputStream> = None; } -pub trait UnixInputStreamExt: 'static { +pub trait UnixInputStreamExt: IsA + 'static { #[doc(alias = "g_unix_input_stream_get_close_fd")] #[doc(alias = "get_close_fd")] - fn closes_fd(&self) -> bool; -} - -impl> UnixInputStreamExt for O { fn closes_fd(&self) -> bool { unsafe { from_glib(ffi::g_unix_input_stream_get_close_fd( @@ -35,6 +31,8 @@ impl> UnixInputStreamExt for O { } } +impl> UnixInputStreamExt for O {} + impl fmt::Display for UnixInputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("UnixInputStream") diff --git a/gio/src/auto/unix_mount_point.rs b/gio/src/auto/unix_mount_point.rs index b778b3011992..f371a54eb382 100644 --- a/gio/src/auto/unix_mount_point.rs +++ b/gio/src/auto/unix_mount_point.rs @@ -5,7 +5,7 @@ use crate::Icon; use glib::translate::*; use std::cmp; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] use std::mem; @@ -134,7 +134,7 @@ impl UnixMountPoint { } } - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(alias = "g_unix_mount_point_at")] pub fn at(mount_path: impl AsRef) -> (Option, u64) { diff --git a/gio/src/auto/unix_output_stream.rs b/gio/src/auto/unix_output_stream.rs index 1986470d2293..0ba41eba350d 100644 --- a/gio/src/auto/unix_output_stream.rs +++ b/gio/src/auto/unix_output_stream.rs @@ -19,13 +19,9 @@ impl UnixOutputStream { pub const NONE: Option<&'static UnixOutputStream> = None; } -pub trait UnixOutputStreamExt: 'static { +pub trait UnixOutputStreamExt: IsA + 'static { #[doc(alias = "g_unix_output_stream_get_close_fd")] #[doc(alias = "get_close_fd")] - fn closes_fd(&self) -> bool; -} - -impl> UnixOutputStreamExt for O { fn closes_fd(&self) -> bool { unsafe { from_glib(ffi::g_unix_output_stream_get_close_fd( @@ -35,6 +31,8 @@ impl> UnixOutputStreamExt for O { } } +impl> UnixOutputStreamExt for O {} + impl fmt::Display for UnixOutputStream { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("UnixOutputStream") diff --git a/gio/src/auto/unix_socket_address.rs b/gio/src/auto/unix_socket_address.rs index b8cd3ace3120..323040db7d1b 100644 --- a/gio/src/auto/unix_socket_address.rs +++ b/gio/src/auto/unix_socket_address.rs @@ -38,24 +38,9 @@ impl UnixSocketAddress { unsafe impl Send for UnixSocketAddress {} unsafe impl Sync for UnixSocketAddress {} -pub trait UnixSocketAddressExt: 'static { +pub trait UnixSocketAddressExt: IsA + 'static { #[doc(alias = "g_unix_socket_address_get_address_type")] #[doc(alias = "get_address_type")] - fn address_type(&self) -> UnixSocketAddressType; - - #[doc(alias = "g_unix_socket_address_get_is_abstract")] - #[doc(alias = "get_is_abstract")] - fn is_abstract(&self) -> bool; - - #[doc(alias = "g_unix_socket_address_get_path_len")] - #[doc(alias = "get_path_len")] - fn path_len(&self) -> usize; - - #[doc(alias = "path-as-array")] - fn path_as_array(&self) -> Option; -} - -impl> UnixSocketAddressExt for O { fn address_type(&self) -> UnixSocketAddressType { unsafe { from_glib(ffi::g_unix_socket_address_get_address_type( @@ -64,6 +49,8 @@ impl> UnixSocketAddressExt for O { } } + #[doc(alias = "g_unix_socket_address_get_is_abstract")] + #[doc(alias = "get_is_abstract")] fn is_abstract(&self) -> bool { unsafe { from_glib(ffi::g_unix_socket_address_get_is_abstract( @@ -72,15 +59,20 @@ impl> UnixSocketAddressExt for O { } } + #[doc(alias = "g_unix_socket_address_get_path_len")] + #[doc(alias = "get_path_len")] fn path_len(&self) -> usize { unsafe { ffi::g_unix_socket_address_get_path_len(self.as_ref().to_glib_none().0) } } + #[doc(alias = "path-as-array")] fn path_as_array(&self) -> Option { glib::ObjectExt::property(self.as_ref(), "path-as-array") } } +impl> UnixSocketAddressExt for O {} + impl fmt::Display for UnixSocketAddress { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("UnixSocketAddress") diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index 572441614b53..5dae17f3be8a 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 @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/gio/src/auto/vfs.rs b/gio/src/auto/vfs.rs index 5e16034abf93..49a4a721ccb1 100644 --- a/gio/src/auto/vfs.rs +++ b/gio/src/auto/vfs.rs @@ -35,38 +35,9 @@ impl Vfs { unsafe impl Send for Vfs {} unsafe impl Sync for Vfs {} -pub trait VfsExt: 'static { +pub trait VfsExt: IsA + 'static { #[doc(alias = "g_vfs_get_file_for_path")] #[doc(alias = "get_file_for_path")] - fn file_for_path(&self, path: &str) -> File; - - #[doc(alias = "g_vfs_get_file_for_uri")] - #[doc(alias = "get_file_for_uri")] - fn file_for_uri(&self, uri: &str) -> File; - - #[doc(alias = "g_vfs_get_supported_uri_schemes")] - #[doc(alias = "get_supported_uri_schemes")] - fn supported_uri_schemes(&self) -> Vec; - - #[doc(alias = "g_vfs_is_active")] - fn is_active(&self) -> bool; - - #[doc(alias = "g_vfs_parse_name")] - fn parse_name(&self, parse_name: &str) -> File; - - #[doc(alias = "g_vfs_register_uri_scheme")] - fn register_uri_scheme( - &self, - scheme: &str, - uri_func: Option File + 'static>>, - parse_name_func: Option File + 'static>>, - ) -> bool; - - #[doc(alias = "g_vfs_unregister_uri_scheme")] - fn unregister_uri_scheme(&self, scheme: &str) -> bool; -} - -impl> VfsExt for O { fn file_for_path(&self, path: &str) -> File { unsafe { from_glib_full(ffi::g_vfs_get_file_for_path( @@ -76,6 +47,8 @@ impl> VfsExt for O { } } + #[doc(alias = "g_vfs_get_file_for_uri")] + #[doc(alias = "get_file_for_uri")] fn file_for_uri(&self, uri: &str) -> File { unsafe { from_glib_full(ffi::g_vfs_get_file_for_uri( @@ -85,6 +58,8 @@ impl> VfsExt for O { } } + #[doc(alias = "g_vfs_get_supported_uri_schemes")] + #[doc(alias = "get_supported_uri_schemes")] fn supported_uri_schemes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_vfs_get_supported_uri_schemes( @@ -93,10 +68,12 @@ impl> VfsExt for O { } } + #[doc(alias = "g_vfs_is_active")] fn is_active(&self) -> bool { unsafe { from_glib(ffi::g_vfs_is_active(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_vfs_parse_name")] fn parse_name(&self, parse_name: &str) -> File { unsafe { from_glib_full(ffi::g_vfs_parse_name( @@ -106,6 +83,7 @@ impl> VfsExt for O { } } + #[doc(alias = "g_vfs_register_uri_scheme")] fn register_uri_scheme( &self, scheme: &str, @@ -186,6 +164,7 @@ impl> VfsExt for O { } } + #[doc(alias = "g_vfs_unregister_uri_scheme")] fn unregister_uri_scheme(&self, scheme: &str) -> bool { unsafe { from_glib(ffi::g_vfs_unregister_uri_scheme( @@ -196,6 +175,8 @@ impl> VfsExt for O { } } +impl> VfsExt for O {} + impl fmt::Display for Vfs { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Vfs") diff --git a/gio/src/auto/volume.rs b/gio/src/auto/volume.rs index bca23bf3b3e5..d5804474c500 100644 --- a/gio/src/auto/volume.rs +++ b/gio/src/auto/volume.rs @@ -26,100 +26,18 @@ impl Volume { pub const NONE: Option<&'static Volume> = None; } -pub trait VolumeExt: 'static { +pub trait VolumeExt: IsA + 'static { #[doc(alias = "g_volume_can_eject")] - fn can_eject(&self) -> bool; - - #[doc(alias = "g_volume_can_mount")] - fn can_mount(&self) -> bool; - - #[doc(alias = "g_volume_eject_with_operation")] - fn eject_with_operation) + 'static>( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn eject_with_operation_future( - &self, - flags: MountUnmountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_volume_enumerate_identifiers")] - fn enumerate_identifiers(&self) -> Vec; - - #[doc(alias = "g_volume_get_activation_root")] - #[doc(alias = "get_activation_root")] - fn activation_root(&self) -> Option; - - #[doc(alias = "g_volume_get_drive")] - #[doc(alias = "get_drive")] - fn drive(&self) -> Option; - - #[doc(alias = "g_volume_get_icon")] - #[doc(alias = "get_icon")] - fn icon(&self) -> Icon; - - #[doc(alias = "g_volume_get_identifier")] - #[doc(alias = "get_identifier")] - fn identifier(&self, kind: &str) -> Option; - - #[doc(alias = "g_volume_get_mount")] - fn get_mount(&self) -> Option; - - #[doc(alias = "g_volume_get_name")] - #[doc(alias = "get_name")] - fn name(&self) -> glib::GString; - - #[doc(alias = "g_volume_get_sort_key")] - #[doc(alias = "get_sort_key")] - fn sort_key(&self) -> Option; - - #[doc(alias = "g_volume_get_symbolic_icon")] - #[doc(alias = "get_symbolic_icon")] - fn symbolic_icon(&self) -> Icon; - - #[doc(alias = "g_volume_get_uuid")] - #[doc(alias = "get_uuid")] - fn uuid(&self) -> Option; - - #[doc(alias = "g_volume_mount")] - fn mount) + 'static>( - &self, - flags: MountMountFlags, - mount_operation: Option<&impl IsA>, - cancellable: Option<&impl IsA>, - callback: P, - ); - - fn mount_future( - &self, - flags: MountMountFlags, - mount_operation: Option<&(impl IsA + Clone + 'static)>, - ) -> Pin> + 'static>>; - - #[doc(alias = "g_volume_should_automount")] - fn should_automount(&self) -> bool; - - #[doc(alias = "changed")] - fn connect_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "removed")] - fn connect_removed(&self, f: F) -> SignalHandlerId; -} - -impl> VolumeExt for O { fn can_eject(&self) -> bool { unsafe { from_glib(ffi::g_volume_can_eject(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_can_mount")] fn can_mount(&self) -> bool { unsafe { from_glib(ffi::g_volume_can_mount(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_eject_with_operation")] fn eject_with_operation) + 'static>( &self, flags: MountUnmountFlags, @@ -196,6 +114,7 @@ impl> VolumeExt for O { )) } + #[doc(alias = "g_volume_enumerate_identifiers")] fn enumerate_identifiers(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_enumerate_identifiers( @@ -204,6 +123,8 @@ impl> VolumeExt for O { } } + #[doc(alias = "g_volume_get_activation_root")] + #[doc(alias = "get_activation_root")] fn activation_root(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_activation_root( @@ -212,14 +133,20 @@ impl> VolumeExt for O { } } + #[doc(alias = "g_volume_get_drive")] + #[doc(alias = "get_drive")] fn drive(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_drive(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_get_icon")] + #[doc(alias = "get_icon")] fn icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_volume_get_icon(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_get_identifier")] + #[doc(alias = "get_identifier")] fn identifier(&self, kind: &str) -> Option { unsafe { from_glib_full(ffi::g_volume_get_identifier( @@ -229,18 +156,25 @@ impl> VolumeExt for O { } } + #[doc(alias = "g_volume_get_mount")] fn get_mount(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_mount(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_get_name")] + #[doc(alias = "get_name")] fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_volume_get_name(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_get_sort_key")] + #[doc(alias = "get_sort_key")] fn sort_key(&self) -> Option { unsafe { from_glib_none(ffi::g_volume_get_sort_key(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_get_symbolic_icon")] + #[doc(alias = "get_symbolic_icon")] fn symbolic_icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_volume_get_symbolic_icon( @@ -249,10 +183,13 @@ impl> VolumeExt for O { } } + #[doc(alias = "g_volume_get_uuid")] + #[doc(alias = "get_uuid")] fn uuid(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_uuid(self.as_ref().to_glib_none().0)) } } + #[doc(alias = "g_volume_mount")] fn mount) + 'static>( &self, flags: MountMountFlags, @@ -323,6 +260,7 @@ impl> VolumeExt for O { )) } + #[doc(alias = "g_volume_should_automount")] fn should_automount(&self) -> bool { unsafe { from_glib(ffi::g_volume_should_automount( @@ -331,6 +269,7 @@ impl> VolumeExt for O { } } + #[doc(alias = "changed")] fn connect_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn changed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GVolume, @@ -352,6 +291,7 @@ impl> VolumeExt for O { } } + #[doc(alias = "removed")] fn connect_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn removed_trampoline, F: Fn(&P) + 'static>( this: *mut ffi::GVolume, @@ -374,6 +314,8 @@ impl> VolumeExt for O { } } +impl> VolumeExt for O {} + impl fmt::Display for Volume { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Volume") diff --git a/gio/src/auto/volume_monitor.rs b/gio/src/auto/volume_monitor.rs index 9121d5ebbf92..13100efaf90a 100644 --- a/gio/src/auto/volume_monitor.rs +++ b/gio/src/auto/volume_monitor.rs @@ -28,65 +28,9 @@ impl VolumeMonitor { } } -pub trait VolumeMonitorExt: 'static { +pub trait VolumeMonitorExt: IsA + 'static { #[doc(alias = "g_volume_monitor_get_connected_drives")] #[doc(alias = "get_connected_drives")] - fn connected_drives(&self) -> Vec; - - #[doc(alias = "g_volume_monitor_get_mount_for_uuid")] - #[doc(alias = "get_mount_for_uuid")] - fn mount_for_uuid(&self, uuid: &str) -> Option; - - #[doc(alias = "g_volume_monitor_get_mounts")] - #[doc(alias = "get_mounts")] - fn mounts(&self) -> Vec; - - #[doc(alias = "g_volume_monitor_get_volume_for_uuid")] - #[doc(alias = "get_volume_for_uuid")] - fn volume_for_uuid(&self, uuid: &str) -> Option; - - #[doc(alias = "g_volume_monitor_get_volumes")] - #[doc(alias = "get_volumes")] - fn volumes(&self) -> Vec; - - #[doc(alias = "drive-changed")] - fn connect_drive_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "drive-connected")] - fn connect_drive_connected(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "drive-disconnected")] - fn connect_drive_disconnected(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "drive-eject-button")] - fn connect_drive_eject_button(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "drive-stop-button")] - fn connect_drive_stop_button(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mount-added")] - fn connect_mount_added(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mount-changed")] - fn connect_mount_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mount-pre-unmount")] - fn connect_mount_pre_unmount(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "mount-removed")] - fn connect_mount_removed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "volume-added")] - fn connect_volume_added(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "volume-changed")] - fn connect_volume_changed(&self, f: F) -> SignalHandlerId; - - #[doc(alias = "volume-removed")] - fn connect_volume_removed(&self, f: F) -> SignalHandlerId; -} - -impl> VolumeMonitorExt for O { fn connected_drives(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_monitor_get_connected_drives( @@ -95,6 +39,8 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "g_volume_monitor_get_mount_for_uuid")] + #[doc(alias = "get_mount_for_uuid")] fn mount_for_uuid(&self, uuid: &str) -> Option { unsafe { from_glib_full(ffi::g_volume_monitor_get_mount_for_uuid( @@ -104,6 +50,8 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "g_volume_monitor_get_mounts")] + #[doc(alias = "get_mounts")] fn mounts(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_monitor_get_mounts( @@ -112,6 +60,8 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "g_volume_monitor_get_volume_for_uuid")] + #[doc(alias = "get_volume_for_uuid")] fn volume_for_uuid(&self, uuid: &str) -> Option { unsafe { from_glib_full(ffi::g_volume_monitor_get_volume_for_uuid( @@ -121,6 +71,8 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "g_volume_monitor_get_volumes")] + #[doc(alias = "get_volumes")] fn volumes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_monitor_get_volumes( @@ -129,6 +81,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "drive-changed")] fn connect_drive_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn drive_changed_trampoline< P: IsA, @@ -157,6 +110,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "drive-connected")] fn connect_drive_connected(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn drive_connected_trampoline< P: IsA, @@ -185,6 +139,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "drive-disconnected")] fn connect_drive_disconnected(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn drive_disconnected_trampoline< P: IsA, @@ -213,6 +168,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "drive-eject-button")] fn connect_drive_eject_button(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn drive_eject_button_trampoline< P: IsA, @@ -241,6 +197,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "drive-stop-button")] fn connect_drive_stop_button(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn drive_stop_button_trampoline< P: IsA, @@ -269,6 +226,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "mount-added")] fn connect_mount_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn mount_added_trampoline< P: IsA, @@ -297,6 +255,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "mount-changed")] fn connect_mount_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn mount_changed_trampoline< P: IsA, @@ -325,6 +284,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "mount-pre-unmount")] fn connect_mount_pre_unmount(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn mount_pre_unmount_trampoline< P: IsA, @@ -353,6 +313,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "mount-removed")] fn connect_mount_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn mount_removed_trampoline< P: IsA, @@ -381,6 +342,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "volume-added")] fn connect_volume_added(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn volume_added_trampoline< P: IsA, @@ -409,6 +371,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "volume-changed")] fn connect_volume_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn volume_changed_trampoline< P: IsA, @@ -437,6 +400,7 @@ impl> VolumeMonitorExt for O { } } + #[doc(alias = "volume-removed")] fn connect_volume_removed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn volume_removed_trampoline< P: IsA, @@ -466,6 +430,8 @@ impl> VolumeMonitorExt for O { } } +impl> VolumeMonitorExt for O {} + impl fmt::Display for VolumeMonitor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("VolumeMonitor") diff --git a/gio/sys/src/lib.rs b/gio/sys/src/lib.rs index 9521a530c513..bd1804f6f8e3 100644 --- a/gio/sys/src/lib.rs +++ b/gio/sys/src/lib.rs @@ -9307,7 +9307,7 @@ extern "C" { //========================================================================= // GMemoryMonitorWarningLevel //========================================================================= - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_memory_monitor_warning_level_get_type() -> GType; @@ -9334,7 +9334,7 @@ extern "C" { //========================================================================= // GPollableReturn //========================================================================= - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_pollable_return_get_type() -> GType; @@ -9393,17 +9393,17 @@ extern "C" { //========================================================================= // GTlsChannelBindingError //========================================================================= - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_tls_channel_binding_error_get_type() -> GType; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_tls_channel_binding_error_quark() -> glib::GQuark; //========================================================================= // GTlsChannelBindingType //========================================================================= - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_tls_channel_binding_type_get_type() -> GType; @@ -9426,7 +9426,7 @@ extern "C" { //========================================================================= // GTlsProtocolVersion //========================================================================= - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_protocol_version_get_type() -> GType; @@ -9593,7 +9593,7 @@ extern "C" { //========================================================================= // GResolverNameLookupFlags //========================================================================= - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_resolver_name_lookup_flags_get_type() -> GType; @@ -9993,7 +9993,7 @@ extern "C" { pub fn g_unix_mount_point_is_loopback(mount_point: *mut GUnixMountPoint) -> gboolean; pub fn g_unix_mount_point_is_readonly(mount_point: *mut GUnixMountPoint) -> gboolean; pub fn g_unix_mount_point_is_user_mountable(mount_point: *mut GUnixMountPoint) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_unix_mount_point_at( mount_path: *const c_char, @@ -10572,7 +10572,7 @@ extern "C" { connection: *mut GDBusConnection, ) -> GDBusCapabilityFlags; pub fn g_dbus_connection_get_exit_on_close(connection: *mut GDBusConnection) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_dbus_connection_get_flags(connection: *mut GDBusConnection) -> GDBusConnectionFlags; pub fn g_dbus_connection_get_guid(connection: *mut GDBusConnection) -> *const c_char; @@ -11387,17 +11387,17 @@ extern "C" { //========================================================================= // GDebugControllerDBus //========================================================================= - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_debug_controller_dbus_get_type() -> GType; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_debug_controller_dbus_new( connection: *mut GDBusConnection, cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> *mut GDebugControllerDBus; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_debug_controller_dbus_stop(self_: *mut GDebugControllerDBus); @@ -11440,7 +11440,7 @@ extern "C" { info: *mut GDesktopAppInfo, key: *const c_char, ) -> *mut c_char; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_desktop_app_info_get_string_list( info: *mut GDesktopAppInfo, @@ -11464,7 +11464,7 @@ extern "C" { pid_callback_data: gpointer, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_desktop_app_info_launch_uris_as_manager_with_fds( appinfo: *mut GDesktopAppInfo, @@ -11596,7 +11596,7 @@ extern "C" { pub fn g_file_info_clear_status(info: *mut GFileInfo); pub fn g_file_info_copy_into(src_info: *mut GFileInfo, dest_info: *mut GFileInfo); pub fn g_file_info_dup(other: *mut GFileInfo) -> *mut GFileInfo; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_file_info_get_access_date_time(info: *mut GFileInfo) -> *mut glib::GDateTime; pub fn g_file_info_get_attribute_as_string( @@ -11643,7 +11643,7 @@ extern "C" { pub fn g_file_info_get_attribute_uint32(info: *mut GFileInfo, attribute: *const c_char) -> u32; pub fn g_file_info_get_attribute_uint64(info: *mut GFileInfo, attribute: *const c_char) -> u64; pub fn g_file_info_get_content_type(info: *mut GFileInfo) -> *const c_char; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_file_info_get_creation_date_time(info: *mut GFileInfo) -> *mut glib::GDateTime; pub fn g_file_info_get_deletion_date(info: *mut GFileInfo) -> *mut glib::GDateTime; @@ -11655,7 +11655,7 @@ extern "C" { pub fn g_file_info_get_is_backup(info: *mut GFileInfo) -> gboolean; pub fn g_file_info_get_is_hidden(info: *mut GFileInfo) -> gboolean; pub fn g_file_info_get_is_symlink(info: *mut GFileInfo) -> gboolean; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_file_info_get_modification_date_time(info: *mut GFileInfo) -> *mut glib::GDateTime; pub fn g_file_info_get_modification_time(info: *mut GFileInfo, result: *mut glib::GTimeVal); @@ -11671,7 +11671,7 @@ extern "C" { name_space: *const c_char, ) -> *mut *mut c_char; pub fn g_file_info_remove_attribute(info: *mut GFileInfo, attribute: *const c_char); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_file_info_set_access_date_time(info: *mut GFileInfo, atime: *mut glib::GDateTime); pub fn g_file_info_set_attribute( @@ -11732,7 +11732,7 @@ extern "C" { attr_value: u64, ); pub fn g_file_info_set_content_type(info: *mut GFileInfo, content_type: *const c_char); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_file_info_set_creation_date_time( info: *mut GFileInfo, @@ -11744,7 +11744,7 @@ extern "C" { pub fn g_file_info_set_icon(info: *mut GFileInfo, icon: *mut GIcon); pub fn g_file_info_set_is_hidden(info: *mut GFileInfo, is_hidden: gboolean); pub fn g_file_info_set_is_symlink(info: *mut GFileInfo, is_symlink: gboolean); - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_file_info_set_modification_date_time( info: *mut GFileInfo, @@ -12109,14 +12109,14 @@ extern "C" { pub fn g_list_store_get_type() -> GType; pub fn g_list_store_new(item_type: GType) -> *mut GListStore; pub fn g_list_store_append(store: *mut GListStore, item: *mut gobject::GObject); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_list_store_find( store: *mut GListStore, item: *mut gobject::GObject, position: *mut c_uint, ) -> gboolean; - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_list_store_find_with_equal_func( store: *mut GListStore, @@ -12124,7 +12124,7 @@ extern "C" { equal_func: glib::GEqualFunc, position: *mut c_uint, ) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_list_store_find_with_equal_func_full( store: *mut GListStore, @@ -12371,15 +12371,15 @@ extern "C" { pub fn g_mount_operation_get_anonymous(op: *mut GMountOperation) -> gboolean; pub fn g_mount_operation_get_choice(op: *mut GMountOperation) -> c_int; pub fn g_mount_operation_get_domain(op: *mut GMountOperation) -> *const c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_mount_operation_get_is_tcrypt_hidden_volume(op: *mut GMountOperation) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_mount_operation_get_is_tcrypt_system_volume(op: *mut GMountOperation) -> gboolean; pub fn g_mount_operation_get_password(op: *mut GMountOperation) -> *const c_char; pub fn g_mount_operation_get_password_save(op: *mut GMountOperation) -> GPasswordSave; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_mount_operation_get_pim(op: *mut GMountOperation) -> c_uint; pub fn g_mount_operation_get_username(op: *mut GMountOperation) -> *const c_char; @@ -12387,13 +12387,13 @@ extern "C" { pub fn g_mount_operation_set_anonymous(op: *mut GMountOperation, anonymous: gboolean); pub fn g_mount_operation_set_choice(op: *mut GMountOperation, choice: c_int); pub fn g_mount_operation_set_domain(op: *mut GMountOperation, domain: *const c_char); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_mount_operation_set_is_tcrypt_hidden_volume( op: *mut GMountOperation, hidden_volume: gboolean, ); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_mount_operation_set_is_tcrypt_system_volume( op: *mut GMountOperation, @@ -12401,7 +12401,7 @@ extern "C" { ); pub fn g_mount_operation_set_password(op: *mut GMountOperation, password: *const c_char); pub fn g_mount_operation_set_password_save(op: *mut GMountOperation, save: GPasswordSave); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_mount_operation_set_pim(op: *mut GMountOperation, pim: c_uint); pub fn g_mount_operation_set_username(op: *mut GMountOperation, username: *const c_char); @@ -12476,7 +12476,7 @@ extern "C" { target: *mut glib::GVariant, ); pub fn g_notification_set_body(notification: *mut GNotification, body: *const c_char); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_notification_set_category(notification: *mut GNotification, category: *const c_char); pub fn g_notification_set_default_action( @@ -12641,7 +12641,7 @@ extern "C" { result: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> ssize_t; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_output_stream_writev( stream: *mut GOutputStream, @@ -12651,7 +12651,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_output_stream_writev_all( stream: *mut GOutputStream, @@ -12661,7 +12661,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_output_stream_writev_all_async( stream: *mut GOutputStream, @@ -12672,7 +12672,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_output_stream_writev_all_finish( stream: *mut GOutputStream, @@ -12680,7 +12680,7 @@ extern "C" { bytes_written: *mut size_t, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_output_stream_writev_async( stream: *mut GOutputStream, @@ -12691,7 +12691,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_output_stream_writev_finish( stream: *mut GOutputStream, @@ -12825,7 +12825,7 @@ extern "C" { result: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> *mut glib::GList; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_resolver_lookup_by_name_with_flags( resolver: *mut GResolver, @@ -12834,7 +12834,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> *mut glib::GList; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_resolver_lookup_by_name_with_flags_async( resolver: *mut GResolver, @@ -12844,7 +12844,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_resolver_lookup_by_name_with_flags_finish( resolver: *mut GResolver, @@ -13444,7 +13444,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> ssize_t; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_socket_send_message_with_timeout( socket: *mut GSocket, @@ -13905,16 +13905,16 @@ extern "C" { //========================================================================= pub fn g_subprocess_launcher_get_type() -> GType; pub fn g_subprocess_launcher_new(flags: GSubprocessFlags) -> *mut GSubprocessLauncher; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_close(self_: *mut GSubprocessLauncher); pub fn g_subprocess_launcher_getenv( self_: *mut GSubprocessLauncher, variable: *const c_char, ) -> *const c_char; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_set_child_setup( self_: *mut GSubprocessLauncher, @@ -13931,19 +13931,19 @@ extern "C" { self_: *mut GSubprocessLauncher, flags: GSubprocessFlags, ); - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_set_stderr_file_path( self_: *mut GSubprocessLauncher, path: *const c_char, ); - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_set_stdin_file_path( self_: *mut GSubprocessLauncher, path: *const c_char, ); - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_set_stdout_file_path( self_: *mut GSubprocessLauncher, @@ -13966,20 +13966,20 @@ extern "C" { argv: *const *const c_char, error: *mut *mut glib::GError, ) -> *mut GSubprocess; - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_take_fd( self_: *mut GSubprocessLauncher, source_fd: c_int, target_fd: c_int, ); - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_take_stderr_fd(self_: *mut GSubprocessLauncher, fd: c_int); - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_take_stdin_fd(self_: *mut GSubprocessLauncher, fd: c_int); - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_subprocess_launcher_take_stdout_fd(self_: *mut GSubprocessLauncher, fd: c_int); pub fn g_subprocess_launcher_unsetenv(self_: *mut GSubprocessLauncher, variable: *const c_char); @@ -14024,7 +14024,7 @@ extern "C" { pub fn g_task_get_check_cancellable(task: *mut GTask) -> gboolean; pub fn g_task_get_completed(task: *mut GTask) -> gboolean; pub fn g_task_get_context(task: *mut GTask) -> *mut glib::GMainContext; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_task_get_name(task: *mut GTask) -> *const c_char; pub fn g_task_get_priority(task: *mut GTask) -> c_int; @@ -14036,7 +14036,7 @@ extern "C" { pub fn g_task_propagate_boolean(task: *mut GTask, error: *mut *mut glib::GError) -> gboolean; pub fn g_task_propagate_int(task: *mut GTask, error: *mut *mut glib::GError) -> ssize_t; pub fn g_task_propagate_pointer(task: *mut GTask, error: *mut *mut glib::GError) -> gpointer; - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_task_propagate_value( task: *mut GTask, @@ -14059,19 +14059,19 @@ extern "C" { result: gpointer, result_destroy: glib::GDestroyNotify, ); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_task_return_value(task: *mut GTask, result: *mut gobject::GValue); pub fn g_task_run_in_thread(task: *mut GTask, task_func: GTaskThreadFunc); pub fn g_task_run_in_thread_sync(task: *mut GTask, task_func: GTaskThreadFunc); pub fn g_task_set_check_cancellable(task: *mut GTask, check_cancellable: gboolean); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_task_set_name(task: *mut GTask, name: *const c_char); pub fn g_task_set_priority(task: *mut GTask, priority: c_int); pub fn g_task_set_return_on_cancel(task: *mut GTask, return_on_cancel: gboolean) -> gboolean; pub fn g_task_set_source_tag(task: *mut GTask, source_tag: gpointer); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_task_set_static_name(task: *mut GTask, name: *const c_char); pub fn g_task_set_task_data( @@ -14143,7 +14143,7 @@ extern "C" { file: *const c_char, error: *mut *mut glib::GError, ) -> *mut GTlsCertificate; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_tls_certificate_new_from_file_with_password( file: *const c_char, @@ -14160,14 +14160,14 @@ extern "C" { length: ssize_t, error: *mut *mut glib::GError, ) -> *mut GTlsCertificate; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tls_certificate_new_from_pkcs11_uris( pkcs11_uri: *const c_char, private_key_pkcs11_uri: *const c_char, error: *mut *mut glib::GError, ) -> *mut GTlsCertificate; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_tls_certificate_new_from_pkcs12( data: *const u8, @@ -14179,27 +14179,27 @@ extern "C" { file: *const c_char, error: *mut *mut glib::GError, ) -> *mut glib::GList; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_certificate_get_dns_names(cert: *mut GTlsCertificate) -> *mut glib::GPtrArray; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_certificate_get_ip_addresses(cert: *mut GTlsCertificate) -> *mut glib::GPtrArray; pub fn g_tls_certificate_get_issuer(cert: *mut GTlsCertificate) -> *mut GTlsCertificate; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_certificate_get_issuer_name(cert: *mut GTlsCertificate) -> *mut c_char; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_certificate_get_not_valid_after( cert: *mut GTlsCertificate, ) -> *mut glib::GDateTime; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_certificate_get_not_valid_before( cert: *mut GTlsCertificate, ) -> *mut glib::GDateTime; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_certificate_get_subject_name(cert: *mut GTlsCertificate) -> *mut c_char; pub fn g_tls_certificate_is_same( @@ -14222,7 +14222,7 @@ extern "C" { errors: GTlsCertificateFlags, ) -> gboolean; pub fn g_tls_connection_get_certificate(conn: *mut GTlsConnection) -> *mut GTlsCertificate; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_tls_connection_get_channel_binding_data( conn: *mut GTlsConnection, @@ -14230,12 +14230,12 @@ extern "C" { data: *mut glib::GByteArray, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_connection_get_ciphersuite_name(conn: *mut GTlsConnection) -> *mut c_char; pub fn g_tls_connection_get_database(conn: *mut GTlsConnection) -> *mut GTlsDatabase; pub fn g_tls_connection_get_interaction(conn: *mut GTlsConnection) -> *mut GTlsInteraction; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_tls_connection_get_negotiated_protocol(conn: *mut GTlsConnection) -> *const c_char; pub fn g_tls_connection_get_peer_certificate(conn: *mut GTlsConnection) @@ -14243,7 +14243,7 @@ extern "C" { pub fn g_tls_connection_get_peer_certificate_errors( conn: *mut GTlsConnection, ) -> GTlsCertificateFlags; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tls_connection_get_protocol_version(conn: *mut GTlsConnection) -> GTlsProtocolVersion; pub fn g_tls_connection_get_rehandshake_mode(conn: *mut GTlsConnection) -> GTlsRehandshakeMode; @@ -14266,7 +14266,7 @@ extern "C" { result: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_tls_connection_set_advertised_protocols( conn: *mut GTlsConnection, @@ -14812,7 +14812,7 @@ extern "C" { content_type: *const c_char, must_support_uris: gboolean, ) -> *mut GAppInfo; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_app_info_get_default_for_type_async( content_type: *const c_char, @@ -14821,14 +14821,14 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_app_info_get_default_for_type_finish( result: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> *mut GAppInfo; pub fn g_app_info_get_default_for_uri_scheme(uri_scheme: *const c_char) -> *mut GAppInfo; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_app_info_get_default_for_uri_scheme_async( uri_scheme: *const c_char, @@ -14836,7 +14836,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_app_info_get_default_for_uri_scheme_finish( result: *mut GAsyncResult, @@ -14891,7 +14891,7 @@ extern "C" { context: *mut GAppLaunchContext, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_app_info_launch_uris_async( appinfo: *mut GAppInfo, @@ -14901,7 +14901,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_app_info_launch_uris_finish( appinfo: *mut GAppInfo, @@ -15081,13 +15081,13 @@ extern "C" { //========================================================================= // GDebugController //========================================================================= - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_debug_controller_get_type() -> GType; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_debug_controller_get_debug_enabled(self_: *mut GDebugController) -> gboolean; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_debug_controller_set_debug_enabled( self_: *mut GDebugController, @@ -15242,7 +15242,7 @@ extern "C" { errors: GTlsCertificateFlags, ) -> gboolean; pub fn g_dtls_connection_get_certificate(conn: *mut GDtlsConnection) -> *mut GTlsCertificate; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_dtls_connection_get_channel_binding_data( conn: *mut GDtlsConnection, @@ -15250,12 +15250,12 @@ extern "C" { data: *mut glib::GByteArray, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_dtls_connection_get_ciphersuite_name(conn: *mut GDtlsConnection) -> *mut c_char; pub fn g_dtls_connection_get_database(conn: *mut GDtlsConnection) -> *mut GTlsDatabase; pub fn g_dtls_connection_get_interaction(conn: *mut GDtlsConnection) -> *mut GTlsInteraction; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_dtls_connection_get_negotiated_protocol(conn: *mut GDtlsConnection) -> *const c_char; pub fn g_dtls_connection_get_peer_certificate( @@ -15264,7 +15264,7 @@ extern "C" { pub fn g_dtls_connection_get_peer_certificate_errors( conn: *mut GDtlsConnection, ) -> GTlsCertificateFlags; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_dtls_connection_get_protocol_version( conn: *mut GDtlsConnection, @@ -15290,7 +15290,7 @@ extern "C" { result: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_dtls_connection_set_advertised_protocols( conn: *mut GDtlsConnection, @@ -15362,7 +15362,7 @@ extern "C" { iostream: *mut *mut GFileIOStream, error: *mut *mut glib::GError, ) -> *mut GFile; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_file_new_tmp_async( tmpl: *const c_char, @@ -15371,7 +15371,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_file_new_tmp_dir_async( tmpl: *const c_char, @@ -15380,13 +15380,13 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_file_new_tmp_dir_finish( result: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> *mut GFile; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_file_new_tmp_finish( result: *mut GAsyncResult, @@ -15413,7 +15413,7 @@ extern "C" { res: *mut GAsyncResult, error: *mut *mut glib::GError, ) -> *mut GFileOutputStream; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_file_build_attribute_list_for_copy( file: *mut GFile, @@ -15674,7 +15674,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_file_make_symbolic_link_async( file: *mut GFile, @@ -15684,7 +15684,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_file_make_symbolic_link_finish( file: *mut GFile, @@ -15773,7 +15773,7 @@ extern "C" { progress_callback_data: gpointer, error: *mut *mut glib::GError, ) -> gboolean; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_file_move_async( source: *mut GFile, @@ -15786,7 +15786,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_file_move_finish( file: *mut GFile, @@ -15827,7 +15827,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> *mut GAppInfo; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_file_query_default_handler_async( file: *mut GFile, @@ -15836,7 +15836,7 @@ extern "C" { callback: GAsyncReadyCallback, user_data: gpointer, ); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_file_query_default_handler_finish( file: *mut GFile, @@ -16260,10 +16260,10 @@ extern "C" { //========================================================================= // GMemoryMonitor //========================================================================= - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_memory_monitor_get_type() -> GType; - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_memory_monitor_dup_default() -> *mut GMemoryMonitor; @@ -16431,7 +16431,7 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> ssize_t; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_pollable_output_stream_writev_nonblocking( stream: *mut GPollableOutputStream, @@ -16445,13 +16445,13 @@ extern "C" { //========================================================================= // GPowerProfileMonitor //========================================================================= - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_power_profile_monitor_get_type() -> GType; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_power_profile_monitor_dup_default() -> *mut GPowerProfileMonitor; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_power_profile_monitor_get_power_saver_enabled( monitor: *mut GPowerProfileMonitor, @@ -16571,7 +16571,7 @@ extern "C" { pub fn g_tls_backend_get_dtls_server_connection_type(backend: *mut GTlsBackend) -> GType; pub fn g_tls_backend_get_file_database_type(backend: *mut GTlsBackend) -> GType; pub fn g_tls_backend_get_server_connection_type(backend: *mut GTlsBackend) -> GType; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_tls_backend_set_default_database( backend: *mut GTlsBackend, @@ -16783,7 +16783,7 @@ extern "C" { pub fn g_content_type_get_description(type_: *const c_char) -> *mut c_char; pub fn g_content_type_get_generic_icon_name(type_: *const c_char) -> *mut c_char; pub fn g_content_type_get_icon(type_: *const c_char) -> *mut GIcon; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_content_type_get_mime_dirs() -> *const *const c_char; pub fn g_content_type_get_mime_type(type_: *const c_char) -> *mut c_char; @@ -16798,7 +16798,7 @@ extern "C" { pub fn g_content_type_is_a(type_: *const c_char, supertype: *const c_char) -> gboolean; pub fn g_content_type_is_mime_type(type_: *const c_char, mime_type: *const c_char) -> gboolean; pub fn g_content_type_is_unknown(type_: *const c_char) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_content_type_set_mime_dirs(dirs: *const *const c_char); pub fn g_content_types_get_registered() -> *mut glib::GList; @@ -16825,10 +16825,10 @@ extern "C" { cancellable: *mut GCancellable, error: *mut *mut glib::GError, ) -> *mut GIOStream; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_dbus_escape_object_path(s: *const c_char) -> *mut c_char; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_dbus_escape_object_path_bytestring(bytes: *const u8) -> *mut c_char; pub fn g_dbus_generate_guid() -> *mut c_char; @@ -16838,7 +16838,7 @@ extern "C" { ) -> *mut glib::GVariant; pub fn g_dbus_gvariant_to_gvalue(value: *mut glib::GVariant, out_gvalue: *mut gobject::GValue); pub fn g_dbus_is_address(string: *const c_char) -> gboolean; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_dbus_is_error_name(string: *const c_char) -> gboolean; pub fn g_dbus_is_guid(string: *const c_char) -> gboolean; @@ -16850,11 +16850,11 @@ extern "C" { error: *mut *mut glib::GError, ) -> gboolean; pub fn g_dbus_is_unique_name(string: *const c_char) -> gboolean; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_dbus_unescape_object_path(s: *const c_char) -> *mut u8; pub fn g_io_error_from_errno(err_no: c_int) -> GIOErrorEnum; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_io_error_from_file_error(file_error: glib::GFileError) -> GIOErrorEnum; pub fn g_io_error_quark() -> glib::GQuark; @@ -16974,10 +16974,10 @@ extern "C" { pub fn g_unix_mount_get_device_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; pub fn g_unix_mount_get_fs_type(mount_entry: *mut GUnixMountEntry) -> *const c_char; pub fn g_unix_mount_get_mount_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_unix_mount_get_options(mount_entry: *mut GUnixMountEntry) -> *const c_char; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_unix_mount_get_root_path(mount_entry: *mut GUnixMountEntry) -> *const c_char; pub fn g_unix_mount_guess_can_eject(mount_entry: *mut GUnixMountEntry) -> gboolean; diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index 572441614b53..5dae17f3be8a 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/glib/gobject-sys/src/lib.rs b/glib/gobject-sys/src/lib.rs index 2c628b4fe08c..a709fa23cd23 100644 --- a/glib/gobject-sys/src/lib.rs +++ b/glib/gobject-sys/src/lib.rs @@ -1751,7 +1751,7 @@ extern "C" { instance_type: GType, interface_type: GType, ) -> *mut GTypePlugin; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_type_interface_instantiatable_prerequisite(interface_type: GType) -> GType; pub fn g_type_interface_peek(instance_class: gpointer, iface_type: GType) -> gpointer; @@ -1813,7 +1813,7 @@ extern "C" { pub fn g_value_set_instance(value: *mut GValue, instance: gpointer); pub fn g_value_set_int(value: *mut GValue, v_int: c_int); pub fn g_value_set_int64(value: *mut GValue, v_int64: i64); - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_value_set_interned_string(value: *mut GValue, v_string: *const c_char); pub fn g_value_set_long(value: *mut GValue, v_long: c_long); @@ -1891,10 +1891,10 @@ extern "C" { // GBinding //========================================================================= pub fn g_binding_get_type() -> GType; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_binding_dup_source(binding: *mut GBinding) -> *mut GObject; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_binding_dup_target(binding: *mut GBinding) -> *mut GObject; pub fn g_binding_get_flags(binding: *mut GBinding) -> GBindingFlags; @@ -1907,13 +1907,13 @@ extern "C" { //========================================================================= // GBindingGroup //========================================================================= - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_get_type() -> GType; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_new() -> *mut GBindingGroup; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_bind( self_: *mut GBindingGroup, @@ -1922,7 +1922,7 @@ extern "C" { target_property: *const c_char, flags: GBindingFlags, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_bind_full( self_: *mut GBindingGroup, @@ -1935,7 +1935,7 @@ extern "C" { user_data: gpointer, user_data_destroy: glib::GDestroyNotify, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_bind_with_closures( self_: *mut GBindingGroup, @@ -1946,10 +1946,10 @@ extern "C" { transform_to: *mut GClosure, transform_from: *mut GClosure, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_dup_source(self_: *mut GBindingGroup) -> *mut GObject; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_binding_group_set_source(self_: *mut GBindingGroup, source: *mut GObject); @@ -2102,7 +2102,7 @@ extern "C" { ); pub fn g_object_steal_data(object: *mut GObject, key: *const c_char) -> gpointer; pub fn g_object_steal_qdata(object: *mut GObject, quark: glib::GQuark) -> gpointer; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_object_take_ref(object: *mut GObject) -> *mut GObject; pub fn g_object_thaw_notify(object: *mut GObject); @@ -2121,7 +2121,7 @@ extern "C" { blurb: *const c_char, flags: GParamFlags, ) -> *mut GParamSpec; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_param_spec_is_valid_name(name: *const c_char) -> gboolean; pub fn g_param_spec_get_blurb(pspec: *mut GParamSpec) -> *const c_char; @@ -2147,16 +2147,16 @@ extern "C" { //========================================================================= // GSignalGroup //========================================================================= - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_get_type() -> GType; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_new(target_type: GType) -> *mut GSignalGroup; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_block(self_: *mut GSignalGroup); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_connect( self_: *mut GSignalGroup, @@ -2164,7 +2164,7 @@ extern "C" { c_handler: GCallback, data: gpointer, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_connect_after( self_: *mut GSignalGroup, @@ -2172,7 +2172,7 @@ extern "C" { c_handler: GCallback, data: gpointer, ); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_signal_group_connect_closure( self_: *mut GSignalGroup, @@ -2180,7 +2180,7 @@ extern "C" { closure: *mut GClosure, after: gboolean, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_connect_data( self_: *mut GSignalGroup, @@ -2190,7 +2190,7 @@ extern "C" { notify: GClosureNotify, flags: GConnectFlags, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_connect_object( self_: *mut GSignalGroup, @@ -2199,7 +2199,7 @@ extern "C" { object: gpointer, flags: GConnectFlags, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_connect_swapped( self_: *mut GSignalGroup, @@ -2207,13 +2207,13 @@ extern "C" { c_handler: GCallback, data: gpointer, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_dup_target(self_: *mut GSignalGroup) -> *mut GObject; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_set_target(self_: *mut GSignalGroup, target: *mut GObject); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_signal_group_unblock(self_: *mut GSignalGroup); @@ -2278,7 +2278,7 @@ extern "C" { boxed_free: GBoxedFreeFunc, ) -> GType; pub fn g_clear_object(object_ptr: *mut *mut GObject); - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_clear_signal_handler(handler_id_ptr: *mut c_ulong, instance: *mut GObject); pub fn g_enum_complete_type_info( @@ -2514,7 +2514,7 @@ extern "C" { strict_validation: gboolean, ) -> gboolean; pub fn g_param_value_defaults(pspec: *mut GParamSpec, value: *const GValue) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_param_value_is_valid(pspec: *mut GParamSpec, value: *const GValue) -> gboolean; pub fn g_param_value_set_default(pspec: *mut GParamSpec, value: *mut GValue); @@ -2634,7 +2634,7 @@ extern "C" { detail: glib::GQuark, may_be_blocked: gboolean, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_signal_is_valid_name(name: *const c_char) -> gboolean; pub fn g_signal_list_ids(itype: GType, n_ids: *mut c_uint) -> *mut c_uint; diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index 572441614b53..5dae17f3be8a 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 @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/glib/src/auto/constants.rs b/glib/src/auto/constants.rs index f4ef228c26ef..02a07d153d3f 100644 --- a/glib/src/auto/constants.rs +++ b/glib/src/auto/constants.rs @@ -91,7 +91,7 @@ pub static OPTION_REMAINING: &GStr = #[doc(alias = "G_STR_DELIMITERS")] pub static STR_DELIMITERS: &GStr = unsafe { GStr::from_utf8_with_nul_unchecked(ffi::G_STR_DELIMITERS) }; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] #[doc(alias = "G_TEST_OPTION_ISOLATE_DIRS")] pub static TEST_OPTION_ISOLATE_DIRS: &GStr = diff --git a/glib/src/auto/date_time.rs b/glib/src/auto/date_time.rs index 6a198b69c9c5..6441eabf5d6f 100644 --- a/glib/src/auto/date_time.rs +++ b/glib/src/auto/date_time.rs @@ -288,7 +288,7 @@ impl DateTime { } } - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] #[doc(alias = "g_date_time_format_iso8601")] pub fn format_iso8601(&self) -> Result { @@ -352,7 +352,7 @@ impl DateTime { unsafe { ffi::g_date_time_get_seconds(self.to_glib_none().0) } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] #[doc(alias = "g_date_time_get_timezone")] #[doc(alias = "get_timezone")] diff --git a/glib/src/auto/enums.rs b/glib/src/auto/enums.rs index 19dc61fbaf2d..c106bd3d4814 100644 --- a/glib/src/auto/enums.rs +++ b/glib/src/auto/enums.rs @@ -1372,35 +1372,35 @@ pub enum UnicodeScript { KhitanSmallScript, #[doc(alias = "G_UNICODE_SCRIPT_YEZIDI")] Yezidi, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_UNICODE_SCRIPT_CYPRO_MINOAN")] CyproMinoan, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_UNICODE_SCRIPT_OLD_UYGHUR")] OldUyghur, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_UNICODE_SCRIPT_TANGSA")] Tangsa, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_UNICODE_SCRIPT_TOTO")] Toto, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_UNICODE_SCRIPT_VITHKUQI")] Vithkuqi, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "G_UNICODE_SCRIPT_MATH")] Math, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_UNICODE_SCRIPT_KAWI")] Kawi, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_UNICODE_SCRIPT_NAG_MUNDARI")] NagMundari, @@ -1572,21 +1572,21 @@ impl fmt::Display for UnicodeScript { Self::DivesAkuru => "DivesAkuru", Self::KhitanSmallScript => "KhitanSmallScript", Self::Yezidi => "Yezidi", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::CyproMinoan => "CyproMinoan", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::OldUyghur => "OldUyghur", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Tangsa => "Tangsa", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Toto => "Toto", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Vithkuqi => "Vithkuqi", - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Math => "Math", - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] Self::Kawi => "Kawi", - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] Self::NagMundari => "NagMundari", _ => "Unknown", } @@ -1758,21 +1758,21 @@ impl IntoGlib for UnicodeScript { Self::DivesAkuru => ffi::G_UNICODE_SCRIPT_DIVES_AKURU, Self::KhitanSmallScript => ffi::G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT, Self::Yezidi => ffi::G_UNICODE_SCRIPT_YEZIDI, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::CyproMinoan => ffi::G_UNICODE_SCRIPT_CYPRO_MINOAN, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::OldUyghur => ffi::G_UNICODE_SCRIPT_OLD_UYGHUR, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Tangsa => ffi::G_UNICODE_SCRIPT_TANGSA, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Toto => ffi::G_UNICODE_SCRIPT_TOTO, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Vithkuqi => ffi::G_UNICODE_SCRIPT_VITHKUQI, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] Self::Math => ffi::G_UNICODE_SCRIPT_MATH, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] Self::Kawi => ffi::G_UNICODE_SCRIPT_KAWI, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] Self::NagMundari => ffi::G_UNICODE_SCRIPT_NAG_MUNDARI, Self::__Unknown(value) => value, } @@ -1941,28 +1941,28 @@ impl FromGlib for UnicodeScript { ffi::G_UNICODE_SCRIPT_DIVES_AKURU => Self::DivesAkuru, ffi::G_UNICODE_SCRIPT_KHITAN_SMALL_SCRIPT => Self::KhitanSmallScript, ffi::G_UNICODE_SCRIPT_YEZIDI => Self::Yezidi, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_UNICODE_SCRIPT_CYPRO_MINOAN => Self::CyproMinoan, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_UNICODE_SCRIPT_OLD_UYGHUR => Self::OldUyghur, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_UNICODE_SCRIPT_TANGSA => Self::Tangsa, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_UNICODE_SCRIPT_TOTO => Self::Toto, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_UNICODE_SCRIPT_VITHKUQI => Self::Vithkuqi, - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] ffi::G_UNICODE_SCRIPT_MATH => Self::Math, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] ffi::G_UNICODE_SCRIPT_KAWI => Self::Kawi, - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] ffi::G_UNICODE_SCRIPT_NAG_MUNDARI => Self::NagMundari, value => Self::__Unknown(value), } } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -1992,7 +1992,7 @@ pub enum UriError { __Unknown(i32), } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl fmt::Display for UriError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -2016,7 +2016,7 @@ impl fmt::Display for UriError { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl IntoGlib for UriError { @@ -2040,7 +2040,7 @@ impl IntoGlib for UriError { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl FromGlib for UriError { @@ -2062,7 +2062,7 @@ impl FromGlib for UriError { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl ErrorDomain for UriError { #[inline] diff --git a/glib/src/auto/flags.rs b/glib/src/auto/flags.rs index 58b60bd77af1..c677404aa3ad 100644 --- a/glib/src/auto/flags.rs +++ b/glib/src/auto/flags.rs @@ -6,7 +6,7 @@ use crate::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; use bitflags::bitflags; use std::fmt; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(alias = "GFileSetContentsFlags")] @@ -22,7 +22,7 @@ bitflags! { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl fmt::Display for FileSetContentsFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -30,7 +30,7 @@ impl fmt::Display for FileSetContentsFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl IntoGlib for FileSetContentsFlags { @@ -42,7 +42,7 @@ impl IntoGlib for FileSetContentsFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl FromGlib for FileSetContentsFlags { @@ -103,11 +103,11 @@ bitflags! { const IEC_UNITS = ffi::G_FORMAT_SIZE_IEC_UNITS as _; #[doc(alias = "G_FORMAT_SIZE_BITS")] const BITS = ffi::G_FORMAT_SIZE_BITS as _; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_FORMAT_SIZE_ONLY_VALUE")] const ONLY_VALUE = ffi::G_FORMAT_SIZE_ONLY_VALUE as _; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_FORMAT_SIZE_ONLY_UNIT")] const ONLY_UNIT = ffi::G_FORMAT_SIZE_ONLY_UNIT as _; @@ -319,7 +319,7 @@ impl FromGlib for LogLevelFlags { } } -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "GMainContextFlags")] @@ -331,7 +331,7 @@ bitflags! { } } -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] impl fmt::Display for MainContextFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -339,7 +339,7 @@ impl fmt::Display for MainContextFlags { } } -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(hidden)] impl IntoGlib for MainContextFlags { @@ -351,7 +351,7 @@ impl IntoGlib for MainContextFlags { } } -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(hidden)] impl FromGlib for MainContextFlags { @@ -430,15 +430,15 @@ bitflags! { const SEARCH_PATH_FROM_ENVP = ffi::G_SPAWN_SEARCH_PATH_FROM_ENVP as _; #[doc(alias = "G_SPAWN_CLOEXEC_PIPES")] const CLOEXEC_PIPES = ffi::G_SPAWN_CLOEXEC_PIPES as _; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_SPAWN_CHILD_INHERITS_STDOUT")] const CHILD_INHERITS_STDOUT = ffi::G_SPAWN_CHILD_INHERITS_STDOUT as _; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_SPAWN_CHILD_INHERITS_STDERR")] const CHILD_INHERITS_STDERR = ffi::G_SPAWN_CHILD_INHERITS_STDERR as _; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] #[doc(alias = "G_SPAWN_STDIN_FROM_DEV_NULL")] const STDIN_FROM_DEV_NULL = ffi::G_SPAWN_STDIN_FROM_DEV_NULL as _; @@ -469,7 +469,7 @@ impl FromGlib for SpawnFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(alias = "GUriFlags")] @@ -497,7 +497,7 @@ bitflags! { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl fmt::Display for UriFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -505,7 +505,7 @@ impl fmt::Display for UriFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl IntoGlib for UriFlags { @@ -517,7 +517,7 @@ impl IntoGlib for UriFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl FromGlib for UriFlags { @@ -527,7 +527,7 @@ impl FromGlib for UriFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(alias = "GUriHideFlags")] @@ -547,7 +547,7 @@ bitflags! { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl fmt::Display for UriHideFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -555,7 +555,7 @@ impl fmt::Display for UriHideFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl IntoGlib for UriHideFlags { @@ -567,7 +567,7 @@ impl IntoGlib for UriHideFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl FromGlib for UriHideFlags { @@ -577,7 +577,7 @@ impl FromGlib for UriHideFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] bitflags! { #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(alias = "GUriParamsFlags")] @@ -593,7 +593,7 @@ bitflags! { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] impl fmt::Display for UriParamsFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -601,7 +601,7 @@ impl fmt::Display for UriParamsFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl IntoGlib for UriParamsFlags { @@ -613,7 +613,7 @@ impl IntoGlib for UriParamsFlags { } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(hidden)] impl FromGlib for UriParamsFlags { diff --git a/glib/src/auto/functions.rs b/glib/src/auto/functions.rs index 2666555cf9fc..ef2e4ff1592e 100644 --- a/glib/src/auto/functions.rs +++ b/glib/src/auto/functions.rs @@ -2,7 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] use crate::FileSetContentsFlags; use crate::{ @@ -210,7 +210,7 @@ pub fn file_set_contents( } } -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] #[doc(alias = "g_file_set_contents_full")] pub fn file_set_contents_full( @@ -335,7 +335,7 @@ pub fn codeset() -> crate::GString { unsafe { from_glib_full(ffi::g_get_codeset()) } } -#[cfg(any(feature = "v2_62"))] +#[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] #[doc(alias = "g_get_console_charset")] #[doc(alias = "get_console_charset")] @@ -381,7 +381,7 @@ pub fn language_names() -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_get_language_names()) } } -#[cfg(any(feature = "v2_58"))] +#[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] #[doc(alias = "g_get_language_names_with_category")] #[doc(alias = "get_language_names_with_category")] @@ -413,7 +413,7 @@ pub fn num_processors() -> u32 { unsafe { ffi::g_get_num_processors() } } -#[cfg(any(feature = "v2_64"))] +#[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] #[doc(alias = "g_get_os_info")] #[doc(alias = "get_os_info")] @@ -487,7 +487,7 @@ pub fn user_special_dir(directory: UserDirectory) -> Option unsafe { from_glib_none(ffi::g_get_user_special_dir(directory.into_glib())) } } -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "g_get_user_state_dir")] #[doc(alias = "get_user_state_dir")] @@ -746,7 +746,7 @@ pub fn spawn_async( } } -//#[cfg(any(feature = "v2_68"))] +//#[cfg(feature = "v2_68")] //#[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] //#[doc(alias = "g_spawn_async_with_pipes_and_fds")] //pub fn spawn_async_with_pipes_and_fds(working_directory: Option>, argv: &[&std::path::Path], envp: &[&std::path::Path], flags: SpawnFlags, child_setup: Option>, stdin_fd: i32, stdout_fd: i32, stderr_fd: i32, source_fds: &[i32], target_fds: &[i32], n_fds: usize) -> Result<(Pid, i32, i32, i32), crate::Error> { @@ -769,7 +769,7 @@ pub fn spawn_check_exit_status(wait_status: i32) -> Result<(), crate::Error> { } } -#[cfg(any(feature = "v2_70"))] +#[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] #[doc(alias = "g_spawn_check_wait_status")] pub fn spawn_check_wait_status(wait_status: i32) -> Result<(), crate::Error> { @@ -785,7 +785,7 @@ pub fn spawn_check_wait_status(wait_status: i32) -> Result<(), crate::Error> { } } -#[cfg(any(unix))] +#[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] #[doc(alias = "g_spawn_command_line_async")] pub fn spawn_command_line_async( @@ -824,9 +824,9 @@ pub fn unicode_script_to_iso15924(script: UnicodeScript) -> u32 { unsafe { ffi::g_unicode_script_to_iso15924(script.into_glib()) } } -//#[cfg(any(unix))] +//#[cfg(unix)] //#[cfg_attr(docsrs, doc(cfg(unix)))] -//#[cfg(any(feature = "v2_64"))] +//#[cfg(feature = "v2_64")] //#[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] //#[doc(alias = "g_unix_get_passwd_entry")] //pub fn unix_get_passwd_entry(user_name: &str) -> Result, crate::Error> { diff --git a/glib/src/auto/main_context.rs b/glib/src/auto/main_context.rs index e6d5b15deb63..cc4da920d7ff 100644 --- a/glib/src/auto/main_context.rs +++ b/glib/src/auto/main_context.rs @@ -3,7 +3,7 @@ // DO NOT EDIT use crate::translate::*; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] use crate::MainContextFlags; @@ -24,7 +24,7 @@ impl MainContext { unsafe { from_glib_full(ffi::g_main_context_new()) } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "g_main_context_new_with_flags")] #[doc(alias = "new_with_flags")] diff --git a/glib/src/auto/mod.rs b/glib/src/auto/mod.rs index 17851afdafb5..801f25bf3443 100644 --- a/glib/src/auto/mod.rs +++ b/glib/src/auto/mod.rs @@ -26,10 +26,10 @@ pub use self::source::Source; mod time_zone; pub use self::time_zone::TimeZone; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] mod uri; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::uri::Uri; @@ -47,13 +47,13 @@ pub use self::enums::OptionArg; pub use self::enums::SeekType; pub use self::enums::TimeType; pub use self::enums::UnicodeScript; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::enums::UriError; pub use self::enums::VariantClass; mod flags; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::flags::FileSetContentsFlags; pub(crate) use self::flags::FileTest; @@ -61,18 +61,18 @@ pub use self::flags::FormatSizeFlags; pub use self::flags::IOCondition; pub use self::flags::KeyFileFlags; pub use self::flags::LogLevelFlags; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use self::flags::MainContextFlags; pub use self::flags::OptionFlags; pub use self::flags::SpawnFlags; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::flags::UriFlags; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::flags::UriHideFlags; -#[cfg(any(feature = "v2_66"))] +#[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub use self::flags::UriParamsFlags; @@ -114,7 +114,7 @@ pub use self::constants::KEY_FILE_DESKTOP_TYPE_DIRECTORY; pub use self::constants::KEY_FILE_DESKTOP_TYPE_LINK; pub use self::constants::OPTION_REMAINING; pub use self::constants::STR_DELIMITERS; -#[cfg(any(feature = "v2_60"))] +#[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub use self::constants::TEST_OPTION_ISOLATE_DIRS; pub use self::constants::URI_RESERVED_CHARS_GENERIC_DELIMITERS; diff --git a/glib/src/auto/time_zone.rs b/glib/src/auto/time_zone.rs index 06a47c597eb8..23d3cef96b7c 100644 --- a/glib/src/auto/time_zone.rs +++ b/glib/src/auto/time_zone.rs @@ -23,7 +23,7 @@ impl TimeZone { unsafe { from_glib_full(ffi::g_time_zone_new(identifier.to_glib_none().0)) } } - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] #[doc(alias = "g_time_zone_new_identifier")] #[doc(alias = "new_identifier")] @@ -37,7 +37,7 @@ impl TimeZone { unsafe { from_glib_full(ffi::g_time_zone_new_local()) } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] #[doc(alias = "g_time_zone_new_offset")] #[doc(alias = "new_offset")] @@ -67,7 +67,7 @@ impl TimeZone { } } - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] #[doc(alias = "g_time_zone_get_identifier")] #[doc(alias = "get_identifier")] diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index 572441614b53..5dae17f3be8a 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 @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/glib/src/gobject/auto/binding_group.rs b/glib/src/gobject/auto/binding_group.rs index 774658f94a9e..72137e55670f 100644 --- a/glib/src/gobject/auto/binding_group.rs +++ b/glib/src/gobject/auto/binding_group.rs @@ -45,7 +45,7 @@ impl BindingGroup { } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "source")] pub fn connect_source_notify( @@ -76,7 +76,7 @@ impl BindingGroup { } } -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] impl Default for BindingGroup { fn default() -> Self { diff --git a/glib/src/gobject/auto/mod.rs b/glib/src/gobject/auto/mod.rs index 91d7cc50dc65..dbd122a8a0b5 100644 --- a/glib/src/gobject/auto/mod.rs +++ b/glib/src/gobject/auto/mod.rs @@ -5,17 +5,17 @@ mod binding; pub use self::binding::Binding; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] mod binding_group; -#[cfg(any(feature = "v2_72"))] +#[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub use self::binding_group::BindingGroup; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] mod signal_group; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub use self::signal_group::SignalGroup; diff --git a/glib/src/gobject/auto/signal_group.rs b/glib/src/gobject/auto/signal_group.rs index 763cff80b6a5..83b18e20e3f8 100644 --- a/glib/src/gobject/auto/signal_group.rs +++ b/glib/src/gobject/auto/signal_group.rs @@ -55,7 +55,7 @@ impl SignalGroup { } } - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] #[doc(alias = "target-type")] pub fn target_type(&self) -> crate::types::Type { diff --git a/glib/sys/Cargo.toml b/glib/sys/Cargo.toml index 1164d4adcf65..2c76c52eb4bf 100644 --- a/glib/sys/Cargo.toml +++ b/glib/sys/Cargo.toml @@ -19,6 +19,7 @@ v2_70 = ["v2_68"] v2_72 = ["v2_70"] v2_74 = ["v2_72"] v2_76 = ["v2_74"] +v2_78 = ["v2_76"] [lib] name = "glib_sys" @@ -76,6 +77,9 @@ version = "2.74" [package.metadata.system-deps.glib_2_0.v2_76] version = "2.76" +[package.metadata.system-deps.glib_2_0.v2_78] +version = "2.78" + [package.metadata.system-deps.gobject_2_0] name = "gobject-2.0" version = "2.56" diff --git a/glib/sys/src/lib.rs b/glib/sys/src/lib.rs index b35169b5849d..78267c00ddea 100644 --- a/glib/sys/src/lib.rs +++ b/glib/sys/src/lib.rs @@ -692,6 +692,7 @@ pub const G_VARIANT_PARSE_ERROR_RECURSION: GVariantParseError = 18; // Constants pub const G_ASCII_DTOSTR_BUF_SIZE: c_int = 39; +pub const G_ATOMIC_REF_COUNT_INIT: c_int = 1; pub const G_BIG_ENDIAN: c_int = 4321; pub const G_CSET_A_2_Z: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\0"; pub const G_CSET_DIGITS: &[u8] = b"0123456789\0"; @@ -745,6 +746,7 @@ pub const G_PRIORITY_DEFAULT_IDLE: c_int = 200; pub const G_PRIORITY_HIGH: c_int = -100; pub const G_PRIORITY_HIGH_IDLE: c_int = 100; pub const G_PRIORITY_LOW: c_int = 300; +pub const G_REF_COUNT_INIT: c_int = -1; pub const G_SOURCE_CONTINUE: gboolean = GTRUE; pub const G_SOURCE_REMOVE: gboolean = GFALSE; pub const G_SQRT2: c_double = 1.414214; @@ -922,13 +924,13 @@ pub const G_SPAWN_CHILD_INHERITS_STDIN: GSpawnFlags = 32; pub const G_SPAWN_FILE_AND_ARGV_ZERO: GSpawnFlags = 64; pub const G_SPAWN_SEARCH_PATH_FROM_ENVP: GSpawnFlags = 128; pub const G_SPAWN_CLOEXEC_PIPES: GSpawnFlags = 256; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub const G_SPAWN_CHILD_INHERITS_STDOUT: GSpawnFlags = 512; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub const G_SPAWN_CHILD_INHERITS_STDERR: GSpawnFlags = 1024; -#[cfg(any(feature = "v2_74"))] +#[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub const G_SPAWN_STDIN_FROM_DEV_NULL: GSpawnFlags = 2048; @@ -1058,7 +1060,7 @@ impl ::std::fmt::Debug for GTokenValue { #[repr(C)] pub union GVariantBuilder_u { pub s: GVariantBuilder_u_s, - pub x: [size_t; 16], + pub x: [uintptr_t; 16], } impl ::std::fmt::Debug for GVariantBuilder_u { @@ -1074,7 +1076,7 @@ impl ::std::fmt::Debug for GVariantBuilder_u { #[repr(C)] pub union GVariantDict_u { pub s: GVariantDict_u_s, - pub x: [size_t; 16], + pub x: [uintptr_t; 16], } impl ::std::fmt::Debug for GVariantDict_u { @@ -2340,7 +2342,7 @@ impl ::std::fmt::Debug for GVariantBuilder { pub struct GVariantBuilder_u_s { pub partial_magic: size_t, pub type_: *const GVariantType, - pub y: [size_t; 14], + pub y: [uintptr_t; 14], } impl ::std::fmt::Debug for GVariantBuilder_u_s { @@ -2372,7 +2374,7 @@ impl ::std::fmt::Debug for GVariantDict { pub struct GVariantDict_u_s { pub asv: *mut GVariant, pub partial_magic: size_t, - pub y: [size_t; 14], + pub y: [uintptr_t; 14], } impl ::std::fmt::Debug for GVariantDict_u_s { @@ -2388,7 +2390,7 @@ impl ::std::fmt::Debug for GVariantDict_u_s { #[derive(Copy, Clone)] #[repr(C)] pub struct GVariantIter { - pub x: [size_t; 16], + pub x: [uintptr_t; 16], } impl ::std::fmt::Debug for GVariantIter { @@ -2433,7 +2435,7 @@ extern "C" { pub fn g_array_get_type() -> GType; pub fn g_array_append_vals(array: *mut GArray, data: gconstpointer, len: c_uint) -> *mut GArray; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_array_binary_search( array: *mut GArray, @@ -2441,7 +2443,7 @@ extern "C" { compare_func: GCompareFunc, out_match_index: *mut c_uint, ) -> gboolean; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_array_copy(array: *mut GArray) -> *mut GArray; pub fn g_array_free(array: *mut GArray, free_segment: gboolean) -> *mut c_char; @@ -2457,7 +2459,7 @@ extern "C" { clear_: gboolean, element_size: c_uint, ) -> *mut GArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_array_new_take( data: gpointer, @@ -2465,7 +2467,7 @@ extern "C" { clear: gboolean, element_size: size_t, ) -> *mut GArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_array_new_take_zero_terminated( data: gpointer, @@ -2495,7 +2497,7 @@ extern "C" { compare_func: GCompareDataFunc, user_data: gpointer, ); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_array_steal(array: *mut GArray, len: *mut size_t) -> gpointer; pub fn g_array_unref(array: *mut GArray); @@ -2565,7 +2567,7 @@ extern "C" { uri: *const c_char, group: *const c_char, ); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_bookmark_file_copy(bookmark: *mut GBookmarkFile) -> *mut GBookmarkFile; pub fn g_bookmark_file_free(bookmark: *mut GBookmarkFile); @@ -2574,7 +2576,7 @@ extern "C" { uri: *const c_char, error: *mut *mut GError, ) -> c_long; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_get_added_date_time( bookmark: *mut GBookmarkFile, @@ -2590,7 +2592,7 @@ extern "C" { stamp: *mut c_long, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_get_application_info( bookmark: *mut GBookmarkFile, @@ -2640,7 +2642,7 @@ extern "C" { uri: *const c_char, error: *mut *mut GError, ) -> c_long; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_get_modified_date_time( bookmark: *mut GBookmarkFile, @@ -2662,7 +2664,7 @@ extern "C" { uri: *const c_char, error: *mut *mut GError, ) -> c_long; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_get_visited_date_time( bookmark: *mut GBookmarkFile, @@ -2727,7 +2729,7 @@ extern "C" { uri: *const c_char, added: c_long, ); - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_set_added_date_time( bookmark: *mut GBookmarkFile, @@ -2743,7 +2745,7 @@ extern "C" { stamp: c_long, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_set_application_info( bookmark: *mut GBookmarkFile, @@ -2786,7 +2788,7 @@ extern "C" { uri: *const c_char, modified: c_long, ); - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_set_modified_date_time( bookmark: *mut GBookmarkFile, @@ -2803,7 +2805,7 @@ extern "C" { uri: *const c_char, visited: c_long, ); - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_bookmark_file_set_visited_date_time( bookmark: *mut GBookmarkFile, @@ -2859,7 +2861,7 @@ extern "C" { compare_func: GCompareDataFunc, user_data: gpointer, ); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_byte_array_steal(array: *mut GByteArray, len: *mut size_t) -> *mut u8; pub fn g_byte_array_unref(array: *mut GByteArray); @@ -2880,7 +2882,7 @@ extern "C" { pub fn g_bytes_compare(bytes1: gconstpointer, bytes2: gconstpointer) -> c_int; pub fn g_bytes_equal(bytes1: gconstpointer, bytes2: gconstpointer) -> gboolean; pub fn g_bytes_get_data(bytes: *mut GBytes, size: *mut size_t) -> gconstpointer; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_bytes_get_region( bytes: *mut GBytes, @@ -3047,7 +3049,7 @@ extern "C" { pub fn g_date_time_difference(end: *mut GDateTime, begin: *mut GDateTime) -> GTimeSpan; pub fn g_date_time_equal(dt1: gconstpointer, dt2: gconstpointer) -> gboolean; pub fn g_date_time_format(datetime: *mut GDateTime, format: *const c_char) -> *mut c_char; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_date_time_format_iso8601(datetime: *mut GDateTime) -> *mut c_char; pub fn g_date_time_get_day_of_month(datetime: *mut GDateTime) -> c_int; @@ -3059,7 +3061,7 @@ extern "C" { pub fn g_date_time_get_month(datetime: *mut GDateTime) -> c_int; pub fn g_date_time_get_second(datetime: *mut GDateTime) -> c_int; pub fn g_date_time_get_seconds(datetime: *mut GDateTime) -> c_double; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_date_time_get_timezone(datetime: *mut GDateTime) -> *mut GTimeZone; pub fn g_date_time_get_timezone_abbreviation(datetime: *mut GDateTime) -> *const c_char; @@ -3102,7 +3104,7 @@ extern "C" { pub fn g_error_copy(error: *const GError) -> *mut GError; pub fn g_error_free(error: *mut GError); pub fn g_error_matches(error: *const GError, domain: GQuark, code: c_int) -> gboolean; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_error_domain_register( error_type_name: *const c_char, @@ -3111,7 +3113,7 @@ extern "C" { error_type_copy: GErrorCopyFunc, error_type_clear: GErrorClearFunc, ) -> GQuark; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_error_domain_register_static( error_type_name: *const c_char, @@ -3149,11 +3151,11 @@ extern "C" { hash_table: *mut GHashTable, length: *mut c_uint, ) -> *mut gpointer; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_hash_table_get_keys_as_ptr_array(hash_table: *mut GHashTable) -> *mut GPtrArray; pub fn g_hash_table_get_values(hash_table: *mut GHashTable) -> *mut GList; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_hash_table_get_values_as_ptr_array(hash_table: *mut GHashTable) -> *mut GPtrArray; pub fn g_hash_table_insert( @@ -3175,7 +3177,7 @@ extern "C" { key_destroy_func: GDestroyNotify, value_destroy_func: GDestroyNotify, ) -> *mut GHashTable; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_hash_table_new_similar(other_hash_table: *mut GHashTable) -> *mut GHashTable; pub fn g_hash_table_ref(hash_table: *mut GHashTable) -> *mut GHashTable; @@ -3189,13 +3191,13 @@ extern "C" { pub fn g_hash_table_size(hash_table: *mut GHashTable) -> c_uint; pub fn g_hash_table_steal(hash_table: *mut GHashTable, key: gconstpointer) -> gboolean; pub fn g_hash_table_steal_all(hash_table: *mut GHashTable); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_hash_table_steal_all_keys(hash_table: *mut GHashTable) -> *mut GPtrArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_hash_table_steal_all_values(hash_table: *mut GHashTable) -> *mut GPtrArray; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_hash_table_steal_extended( hash_table: *mut GHashTable, @@ -3720,7 +3722,7 @@ extern "C" { sibling: *mut GList, data: gpointer, ) -> *mut GList; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_list_insert_before_link( list: *mut GList, @@ -3758,7 +3760,7 @@ extern "C" { //========================================================================= pub fn g_main_context_get_type() -> GType; pub fn g_main_context_new() -> *mut GMainContext; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_main_context_new_with_flags(flags: GMainContextFlags) -> *mut GMainContext; pub fn g_main_context_acquire(context: *mut GMainContext) -> gboolean; @@ -4083,49 +4085,49 @@ extern "C" { //========================================================================= // GPathBuf //========================================================================= - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_clear(buf: *mut GPathBuf); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_clear_to_path(buf: *mut GPathBuf) -> *mut c_char; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_copy(buf: *mut GPathBuf) -> *mut GPathBuf; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_free(buf: *mut GPathBuf); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_free_to_path(buf: *mut GPathBuf) -> *mut c_char; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_init(buf: *mut GPathBuf) -> *mut GPathBuf; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_init_from_path(buf: *mut GPathBuf, path: *const c_char) -> *mut GPathBuf; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_pop(buf: *mut GPathBuf) -> gboolean; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_push(buf: *mut GPathBuf, path: *const c_char) -> *mut GPathBuf; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_set_extension(buf: *mut GPathBuf, extension: *const c_char) -> gboolean; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_set_filename(buf: *mut GPathBuf, file_name: *const c_char) -> gboolean; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_to_path(buf: *mut GPathBuf) -> *mut c_char; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_equal(v1: gconstpointer, v2: gconstpointer) -> gboolean; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_new() -> *mut GPathBuf; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_path_buf_new_from_path(path: *const c_char) -> *mut GPathBuf; @@ -4134,12 +4136,12 @@ extern "C" { //========================================================================= pub fn g_pattern_spec_get_type() -> GType; pub fn g_pattern_spec_new(pattern: *const c_char) -> *mut GPatternSpec; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_pattern_spec_copy(pspec: *mut GPatternSpec) -> *mut GPatternSpec; pub fn g_pattern_spec_equal(pspec1: *mut GPatternSpec, pspec2: *mut GPatternSpec) -> gboolean; pub fn g_pattern_spec_free(pspec: *mut GPatternSpec); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_pattern_spec_match( pspec: *mut GPatternSpec, @@ -4147,7 +4149,7 @@ extern "C" { string: *const c_char, string_reversed: *const c_char, ) -> gboolean; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_pattern_spec_match_string(pspec: *mut GPatternSpec, string: *const c_char) -> gboolean; @@ -4169,14 +4171,14 @@ extern "C" { //========================================================================= pub fn g_ptr_array_get_type() -> GType; pub fn g_ptr_array_add(array: *mut GPtrArray, data: gpointer); - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_ptr_array_copy( array: *mut GPtrArray, func: GCopyFunc, user_data: gpointer, ) -> *mut GPtrArray; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_ptr_array_extend( array_to_extend: *mut GPtrArray, @@ -4184,7 +4186,7 @@ extern "C" { func: GCopyFunc, user_data: gpointer, ); - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_ptr_array_extend_and_steal(array_to_extend: *mut GPtrArray, array: *mut GPtrArray); pub fn g_ptr_array_find( @@ -4201,11 +4203,11 @@ extern "C" { 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_insert(array: *mut GPtrArray, index_: c_int, data: gpointer); - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_ptr_array_is_null_terminated(array: *mut GPtrArray) -> gboolean; pub fn g_ptr_array_new() -> *mut GPtrArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_ptr_array_new_from_array( data: *mut gpointer, @@ -4214,7 +4216,7 @@ extern "C" { copy_func_user_data: gpointer, element_free_func: GDestroyNotify, ) -> *mut GPtrArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_ptr_array_new_from_null_terminated_array( data: *mut gpointer, @@ -4226,21 +4228,21 @@ extern "C" { reserved_size: c_uint, element_free_func: GDestroyNotify, ) -> *mut GPtrArray; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_ptr_array_new_null_terminated( reserved_size: c_uint, element_free_func: GDestroyNotify, null_terminated: gboolean, ) -> *mut GPtrArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_ptr_array_new_take( data: *mut gpointer, len: size_t, element_free_func: GDestroyNotify, ) -> *mut GPtrArray; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_ptr_array_new_take_null_terminated( data: *mut gpointer, @@ -4261,10 +4263,10 @@ extern "C" { pub fn g_ptr_array_set_size(array: *mut GPtrArray, length: c_int); pub fn g_ptr_array_sized_new(reserved_size: c_uint) -> *mut GPtrArray; pub fn g_ptr_array_sort(array: *mut GPtrArray, compare_func: GCompareFunc); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_ptr_array_sort_values(array: *mut GPtrArray, compare_func: GCompareFunc); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_ptr_array_sort_values_with_data( array: *mut GPtrArray, @@ -4276,13 +4278,13 @@ extern "C" { compare_func: GCompareDataFunc, user_data: gpointer, ); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_ptr_array_steal(array: *mut GPtrArray, len: *mut size_t) -> *mut gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ptr_array_steal_index(array: *mut GPtrArray, index_: c_uint) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ptr_array_steal_index_fast(array: *mut GPtrArray, index_: c_uint) -> gpointer; pub fn g_ptr_array_unref(array: *mut GPtrArray); @@ -4291,7 +4293,7 @@ extern "C" { // GQueue //========================================================================= pub fn g_queue_clear(queue: *mut GQueue); - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_queue_clear_full(queue: *mut GQueue, free_func: GDestroyNotify); pub fn g_queue_copy(queue: *mut GQueue) -> *mut GQueue; @@ -4309,11 +4311,11 @@ extern "C" { pub fn g_queue_index(queue: *mut GQueue, data: gconstpointer) -> c_int; pub fn g_queue_init(queue: *mut GQueue); pub fn g_queue_insert_after(queue: *mut GQueue, sibling: *mut GList, data: gpointer); - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_queue_insert_after_link(queue: *mut GQueue, sibling: *mut GList, link_: *mut GList); pub fn g_queue_insert_before(queue: *mut GQueue, sibling: *mut GList, data: gpointer); - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_queue_insert_before_link(queue: *mut GQueue, sibling: *mut GList, link_: *mut GList); pub fn g_queue_insert_sorted( @@ -4745,14 +4747,14 @@ extern "C" { callback_funcs: *mut GSourceCallbackFuncs, ); pub fn g_source_set_can_recurse(source: *mut GSource, can_recurse: gboolean); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_source_set_dispose_function(source: *mut GSource, dispose: GSourceDisposeFunc); pub fn g_source_set_funcs(source: *mut GSource, funcs: *mut GSourceFuncs); pub fn g_source_set_name(source: *mut GSource, name: *const c_char); pub fn g_source_set_priority(source: *mut GSource, priority: c_int); pub fn g_source_set_ready_time(source: *mut GSource, ready_time: i64); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_source_set_static_name(source: *mut GSource, name: *const c_char); pub fn g_source_unref(source: *mut GSource); @@ -4794,7 +4796,7 @@ extern "C" { pub fn g_string_equal(v: *const GString, v2: *const GString) -> gboolean; pub fn g_string_erase(string: *mut GString, pos: ssize_t, len: ssize_t) -> *mut GString; pub fn g_string_free(string: *mut GString, free_segment: gboolean) -> *mut c_char; - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_string_free_and_steal(string: *mut GString) -> *mut c_char; pub fn g_string_free_to_bytes(string: *mut GString) -> *mut GBytes; @@ -4828,7 +4830,7 @@ extern "C" { ) -> *mut GString; pub fn g_string_prepend_unichar(string: *mut GString, wc: u32) -> *mut GString; pub fn g_string_printf(string: *mut GString, format: *const c_char, ...); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_string_replace( string: *mut GString, @@ -4861,32 +4863,32 @@ extern "C" { //========================================================================= // GStrvBuilder //========================================================================= - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_add(builder: *mut GStrvBuilder, value: *const c_char); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_add_many(builder: *mut GStrvBuilder, ...); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_addv(builder: *mut GStrvBuilder, value: *mut *const c_char); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_end(builder: *mut GStrvBuilder) -> c_char; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_ref(builder: *mut GStrvBuilder) -> *mut GStrvBuilder; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_unref(builder: *mut GStrvBuilder); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_strv_builder_new() -> *mut GStrvBuilder; //========================================================================= // GTestCase //========================================================================= - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_test_case_free(test_case: *mut GTestCase); @@ -4908,7 +4910,7 @@ extern "C" { //========================================================================= pub fn g_test_suite_add(suite: *mut GTestSuite, test_case: *mut GTestCase); pub fn g_test_suite_add_suite(suite: *mut GTestSuite, nestedsuite: *mut GTestSuite); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_test_suite_free(suite: *mut GTestSuite); @@ -4964,7 +4966,7 @@ extern "C" { exclusive: gboolean, error: *mut *mut GError, ) -> *mut GThreadPool; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_thread_pool_new_full( func: GFunc, @@ -4990,18 +4992,18 @@ extern "C" { //========================================================================= pub fn g_time_zone_get_type() -> GType; pub fn g_time_zone_new(identifier: *const c_char) -> *mut GTimeZone; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_time_zone_new_identifier(identifier: *const c_char) -> *mut GTimeZone; pub fn g_time_zone_new_local() -> *mut GTimeZone; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_time_zone_new_offset(seconds: i32) -> *mut GTimeZone; pub fn g_time_zone_new_utc() -> *mut GTimeZone; pub fn g_time_zone_adjust_time(tz: *mut GTimeZone, type_: GTimeType, time_: *mut i64) -> c_int; pub fn g_time_zone_find_interval(tz: *mut GTimeZone, type_: GTimeType, time_: i64) -> c_int; pub fn g_time_zone_get_abbreviation(tz: *mut GTimeZone, interval: c_int) -> *const c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_time_zone_get_identifier(tz: *mut GTimeZone) -> *const c_char; pub fn g_time_zone_get_offset(tz: *mut GTimeZone, interval: c_int) -> i32; @@ -5015,7 +5017,7 @@ extern "C" { pub fn g_timer_continue(timer: *mut GTimer); pub fn g_timer_destroy(timer: *mut GTimer); pub fn g_timer_elapsed(timer: *mut GTimer, microseconds: *mut c_ulong) -> c_double; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_timer_is_active(timer: *mut GTimer) -> gboolean; pub fn g_timer_reset(timer: *mut GTimer); @@ -5048,12 +5050,12 @@ extern "C" { ) -> *mut GTree; pub fn g_tree_destroy(tree: *mut GTree); pub fn g_tree_foreach(tree: *mut GTree, func: GTraverseFunc, user_data: gpointer); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_foreach_node(tree: *mut GTree, func: GTraverseNodeFunc, user_data: gpointer); pub fn g_tree_height(tree: *mut GTree) -> c_int; pub fn g_tree_insert(tree: *mut GTree, key: gpointer, value: gpointer); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_insert_node(tree: *mut GTree, key: gpointer, value: gpointer) -> *mut GTreeNode; pub fn g_tree_lookup(tree: *mut GTree, key: gconstpointer) -> gpointer; @@ -5063,26 +5065,26 @@ extern "C" { orig_key: *mut gpointer, value: *mut gpointer, ) -> gboolean; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_lookup_node(tree: *mut GTree, key: gconstpointer) -> *mut GTreeNode; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_lower_bound(tree: *mut GTree, key: gconstpointer) -> *mut GTreeNode; pub fn g_tree_nnodes(tree: *mut GTree) -> c_int; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_node_first(tree: *mut GTree) -> *mut GTreeNode; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_node_last(tree: *mut GTree) -> *mut GTreeNode; pub fn g_tree_ref(tree: *mut GTree) -> *mut GTree; pub fn g_tree_remove(tree: *mut GTree, key: gconstpointer) -> gboolean; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_tree_remove_all(tree: *mut GTree); pub fn g_tree_replace(tree: *mut GTree, key: gpointer, value: gpointer); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_replace_node(tree: *mut GTree, key: gpointer, value: gpointer) -> *mut GTreeNode; pub fn g_tree_search( @@ -5090,7 +5092,7 @@ extern "C" { search_func: GCompareFunc, user_data: gconstpointer, ) -> gpointer; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_search_node( tree: *mut GTree, @@ -5105,66 +5107,66 @@ extern "C" { user_data: gpointer, ); pub fn g_tree_unref(tree: *mut GTree); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_upper_bound(tree: *mut GTree, key: gconstpointer) -> *mut GTreeNode; //========================================================================= // GTreeNode //========================================================================= - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_node_key(node: *mut GTreeNode) -> gpointer; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_node_next(node: *mut GTreeNode) -> *mut GTreeNode; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_node_previous(node: *mut GTreeNode) -> *mut GTreeNode; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_tree_node_value(node: *mut GTreeNode) -> gpointer; //========================================================================= // GUri //========================================================================= - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_type() -> GType; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_auth_params(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_flags(uri: *mut GUri) -> GUriFlags; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_fragment(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_host(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_password(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_path(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_port(uri: *mut GUri) -> c_int; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_query(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_scheme(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_user(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_get_userinfo(uri: *mut GUri) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_parse_relative( base_uri: *mut GUri, @@ -5172,19 +5174,19 @@ extern "C" { flags: GUriFlags, error: *mut *mut GError, ) -> *mut GUri; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_ref(uri: *mut GUri) -> *mut GUri; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_to_string(uri: *mut GUri) -> *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_to_string_partial(uri: *mut GUri, flags: GUriHideFlags) -> *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_unref(uri: *mut GUri); - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_build( flags: GUriFlags, @@ -5196,7 +5198,7 @@ extern "C" { query: *const c_char, fragment: *const c_char, ) -> *mut GUri; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_build_with_user( flags: GUriFlags, @@ -5210,10 +5212,10 @@ extern "C" { query: *const c_char, fragment: *const c_char, ) -> *mut GUri; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_error_quark() -> GQuark; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_escape_bytes( unescaped: *const u8, @@ -5225,14 +5227,14 @@ extern "C" { reserved_chars_allowed: *const c_char, allow_utf8: gboolean, ) -> *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_is_valid( uri_string: *const c_char, flags: GUriFlags, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_join( flags: GUriFlags, @@ -5244,7 +5246,7 @@ extern "C" { query: *const c_char, fragment: *const c_char, ) -> *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_join_with_user( flags: GUriFlags, @@ -5259,14 +5261,14 @@ extern "C" { fragment: *const c_char, ) -> *mut c_char; pub fn g_uri_list_extract_uris(uri_list: *const c_char) -> *mut *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_parse( uri_string: *const c_char, flags: GUriFlags, error: *mut *mut GError, ) -> *mut GUri; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_parse_params( params: *const c_char, @@ -5276,10 +5278,10 @@ extern "C" { error: *mut *mut GError, ) -> *mut GHashTable; pub fn g_uri_parse_scheme(uri: *const c_char) -> *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_peek_scheme(uri: *const c_char) -> *const c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_resolve_relative( base_uri_string: *const c_char, @@ -5287,7 +5289,7 @@ extern "C" { flags: GUriFlags, error: *mut *mut GError, ) -> *mut c_char; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_split( uri_ref: *const c_char, @@ -5301,7 +5303,7 @@ extern "C" { fragment: *mut *mut c_char, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_split_network( uri_string: *const c_char, @@ -5311,7 +5313,7 @@ extern "C" { port: *mut c_int, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_split_with_user( uri_ref: *const c_char, @@ -5327,7 +5329,7 @@ extern "C" { fragment: *mut *mut c_char, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_unescape_bytes( escaped_string: *const c_char, @@ -5348,7 +5350,7 @@ extern "C" { //========================================================================= // GUriParamsIter //========================================================================= - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_params_iter_init( iter: *mut GUriParamsIter, @@ -5357,7 +5359,7 @@ extern "C" { separators: *const c_char, flags: GUriParamsFlags, ); - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_uri_params_iter_next( iter: *mut GUriParamsIter, @@ -5652,17 +5654,17 @@ extern "C" { // Other functions //========================================================================= pub fn g_access(filename: *const c_char, mode: c_int) -> c_int; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_aligned_alloc(n_blocks: size_t, n_block_bytes: size_t, alignment: size_t) -> gpointer; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_aligned_alloc0(n_blocks: size_t, n_block_bytes: size_t, alignment: size_t) -> gpointer; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_aligned_free(mem: gpointer); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_aligned_free_sized(mem: gpointer, alignment: size_t, size: size_t); pub fn g_ascii_digit_value(c: c_char) -> c_int; @@ -5759,7 +5761,7 @@ extern "C" { oldval: c_int, newval: c_int, ) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_atomic_int_compare_and_exchange_full( atomic: *mut c_int, @@ -5768,7 +5770,7 @@ extern "C" { preval: *mut c_int, ) -> gboolean; pub fn g_atomic_int_dec_and_test(atomic: *mut c_int) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_atomic_int_exchange(atomic: *mut c_int, newval: c_int) -> c_int; pub fn g_atomic_int_exchange_and_add(atomic: *mut c_int, val: c_int) -> c_int; @@ -5784,7 +5786,7 @@ extern "C" { oldval: gpointer, newval: gpointer, ) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_atomic_pointer_compare_and_exchange_full( atomic: *mut c_void, @@ -5792,44 +5794,44 @@ extern "C" { newval: gpointer, preval: *mut c_void, ) -> gboolean; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_atomic_pointer_exchange(atomic: *mut c_void, newval: gpointer) -> gpointer; pub fn g_atomic_pointer_get(atomic: *mut c_void) -> gpointer; pub fn g_atomic_pointer_or(atomic: *mut c_void, val: size_t) -> size_t; pub fn g_atomic_pointer_set(atomic: *mut c_void, newval: gpointer); pub fn g_atomic_pointer_xor(atomic: *mut c_void, val: size_t) -> size_t; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_acquire(mem_block: gpointer) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_alloc(block_size: size_t) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_alloc0(block_size: size_t) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_dup(block_size: size_t, mem_block: gconstpointer) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_get_size(mem_block: gpointer) -> size_t; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_release(mem_block: gpointer); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_rc_box_release_full(mem_block: gpointer, clear_func: GDestroyNotify); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_ref_count_compare(arc: *mut c_int, val: c_int) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_ref_count_dec(arc: *mut c_int) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_ref_count_inc(arc: *mut c_int); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_atomic_ref_count_init(arc: *mut c_int); pub fn g_base64_decode(text: *const c_char, out_len: *mut size_t) -> *mut u8; @@ -5869,7 +5871,7 @@ extern "C" { pub fn g_build_path(separator: *const c_char, first_element: *const c_char, ...) -> *mut c_char; pub fn g_build_pathv(separator: *const c_char, args: *mut *mut c_char) -> *mut c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_canonicalize_filename( filename: *const c_char, @@ -5892,11 +5894,11 @@ extern "C" { pub fn g_child_watch_source_new(pid: GPid) -> *mut GSource; pub fn g_clear_error(error: *mut *mut GError); pub fn g_clear_handle_id(tag_ptr: *mut c_uint, clear_func: GClearHandleFunc); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_clear_list(list_ptr: *mut *mut GList, destroy: GDestroyNotify); pub fn g_clear_pointer(pp: *mut gpointer, destroy: GDestroyNotify); - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_clear_slist(slist_ptr: *mut *mut GSList, destroy: GDestroyNotify); pub fn g_close(fd: c_int, error: *mut *mut GError) -> gboolean; @@ -5976,7 +5978,7 @@ extern "C" { user_data: gpointer, ) -> gpointer; pub fn g_datalist_id_get_data(datalist: *mut *mut GData, key_id: GQuark) -> gpointer; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_datalist_id_remove_multiple( datalist: *mut *mut GData, @@ -6072,7 +6074,7 @@ extern "C" { length: ssize_t, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_66"))] + #[cfg(feature = "v2_66")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_66")))] pub fn g_file_set_contents_full( filename: *const c_char, @@ -6115,13 +6117,13 @@ extern "C" { pub fn g_format_size_full(size: u64, flags: GFormatSizeFlags) -> *mut c_char; pub fn g_fprintf(file: *mut FILE, format: *const c_char, ...) -> c_int; pub fn g_free(mem: gpointer); - #[cfg(any(feature = "v2_76"))] + #[cfg(feature = "v2_76")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_76")))] pub fn g_free_sized(mem: gpointer, size: size_t); pub fn g_get_application_name() -> *const c_char; pub fn g_get_charset(charset: *mut *const c_char) -> gboolean; pub fn g_get_codeset() -> *mut c_char; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_get_console_charset(charset: *mut *const c_char) -> gboolean; pub fn g_get_current_dir() -> *mut c_char; @@ -6131,14 +6133,14 @@ extern "C" { pub fn g_get_home_dir() -> *const c_char; pub fn g_get_host_name() -> *const c_char; pub fn g_get_language_names() -> *const *const c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_get_language_names_with_category(category_name: *const c_char) -> *const *const c_char; pub fn g_get_locale_variants(locale: *const c_char) -> *mut *mut c_char; pub fn g_get_monotonic_time() -> i64; pub fn g_get_num_processors() -> c_uint; - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] pub fn g_get_os_info(key_name: *const c_char) -> *mut c_char; pub fn g_get_prgname() -> *const c_char; @@ -6153,7 +6155,7 @@ extern "C" { pub fn g_get_user_name() -> *const c_char; pub fn g_get_user_runtime_dir() -> *const c_char; pub fn g_get_user_special_dir(directory: GUserDirectory) -> *const c_char; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_get_user_state_dir() -> *const c_char; pub fn g_getenv(variable: *const c_char) -> *const c_char; @@ -6176,7 +6178,7 @@ extern "C" { data: gpointer, notify: GDestroyNotify, ) -> c_uint; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_idle_add_once(function: GSourceOnceFunc, data: gpointer) -> c_uint; pub fn g_idle_remove_by_data(data: gpointer) -> gboolean; @@ -6224,12 +6226,12 @@ extern "C" { message: *const c_char, unused_data: gpointer, ); - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_log_get_debug_enabled() -> gboolean; pub fn g_log_remove_handler(log_domain: *const c_char, handler_id: c_uint); pub fn g_log_set_always_fatal(fatal_mask: GLogLevelFlags) -> GLogLevelFlags; - #[cfg(any(feature = "v2_72"))] + #[cfg(feature = "v2_72")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))] pub fn g_log_set_debug_enabled(enabled: gboolean); pub fn g_log_set_default_handler(log_func: GLogFunc, user_data: gpointer) -> GLogFunc; @@ -6281,10 +6283,10 @@ extern "C" { n_fields: size_t, user_data: gpointer, ) -> GLogWriterOutput; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_log_writer_default_set_use_stderr(use_stderr: gboolean); - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_log_writer_default_would_drop( log_level: GLogLevelFlags, @@ -6334,7 +6336,7 @@ extern "C" { pub fn g_mem_profile(); pub fn g_mem_set_vtable(vtable: *mut GMemVTable); pub fn g_memdup(mem: gconstpointer, byte_size: c_uint) -> gpointer; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_memdup2(mem: gconstpointer, byte_size: size_t) -> gpointer; pub fn g_mkdir_with_parents(pathname: *const c_char, mode: c_int) -> c_int; @@ -6369,7 +6371,7 @@ extern "C" { pub fn g_pointer_bit_unlock(address: *mut c_void, lock_bit: c_int); pub fn g_poll(fds: *mut GPollFD, nfds: c_uint, timeout: c_int) -> c_int; pub fn g_prefix_error(err: *mut *mut GError, format: *const c_char, ...); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_prefix_error_literal(err: *mut *mut GError, prefix: *const c_char); pub fn g_print(format: *const c_char, ...); @@ -6399,57 +6401,57 @@ extern "C" { pub fn g_random_int() -> u32; pub fn g_random_int_range(begin: i32, end: i32) -> i32; pub fn g_random_set_seed(seed: u32); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_acquire(mem_block: gpointer) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_alloc(block_size: size_t) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_alloc0(block_size: size_t) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_dup(block_size: size_t, mem_block: gconstpointer) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_get_size(mem_block: gpointer) -> size_t; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_release(mem_block: gpointer); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_rc_box_release_full(mem_block: gpointer, clear_func: GDestroyNotify); pub fn g_realloc(mem: gpointer, n_bytes: size_t) -> gpointer; pub fn g_realloc_n(mem: gpointer, n_blocks: size_t, n_block_bytes: size_t) -> gpointer; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_count_compare(rc: *mut c_int, val: c_int) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_count_dec(rc: *mut c_int) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_count_inc(rc: *mut c_int); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_count_init(rc: *mut c_int); - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_string_acquire(str: *mut c_char) -> *mut c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_string_length(str: *mut c_char) -> size_t; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_string_new(str: *const c_char) -> *mut c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_string_new_intern(str: *const c_char) -> *mut c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_string_new_len(str: *const c_char, len: ssize_t) -> *mut c_char; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_ref_string_release(str: *mut c_char); pub fn g_reload_user_special_dirs_cache(); @@ -6515,7 +6517,7 @@ extern "C" { child_pid: *mut GPid, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_58"))] + #[cfg(feature = "v2_58")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_58")))] pub fn g_spawn_async_with_fds( working_directory: *const c_char, @@ -6543,7 +6545,7 @@ extern "C" { standard_error: *mut c_int, error: *mut *mut GError, ) -> gboolean; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_spawn_async_with_pipes_and_fds( working_directory: *const c_char, @@ -6565,7 +6567,7 @@ extern "C" { error: *mut *mut GError, ) -> gboolean; pub fn g_spawn_check_exit_status(wait_status: c_int, error: *mut *mut GError) -> gboolean; - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_spawn_check_wait_status(wait_status: c_int, error: *mut *mut GError) -> gboolean; pub fn g_spawn_close_pid(pid: GPid); @@ -6670,7 +6672,7 @@ extern "C" { pub fn g_strtod(nptr: *const c_char, endptr: *mut *mut c_char) -> c_double; pub fn g_strup(string: *mut c_char) -> *mut c_char; pub fn g_strv_contains(strv: *const *const c_char, str: *const c_char) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_strv_equal(strv1: *const *const c_char, strv2: *const *const c_char) -> gboolean; pub fn g_strv_get_type() -> GType; @@ -6723,7 +6725,7 @@ extern "C" { pattern: *const c_char, ); pub fn g_test_fail(); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_test_fail_printf(format: *const c_char, ...); pub fn g_test_failed() -> gboolean; @@ -6733,12 +6735,12 @@ extern "C" { first_path: *const c_char, ... ) -> *const c_char; - #[cfg(any(feature = "v2_68"))] + #[cfg(feature = "v2_68")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_68")))] pub fn g_test_get_path() -> *const c_char; pub fn g_test_get_root() -> *mut GTestSuite; pub fn g_test_incomplete(msg: *const c_char); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_test_incomplete_printf(format: *const c_char, ...); pub fn g_test_init(argc: *mut c_int, argv: *mut *mut *mut c_char, ...); @@ -6757,11 +6759,11 @@ extern "C" { pub fn g_test_run_suite(suite: *mut GTestSuite) -> c_int; pub fn g_test_set_nonfatal_assertions(); pub fn g_test_skip(msg: *const c_char); - #[cfg(any(feature = "v2_70"))] + #[cfg(feature = "v2_70")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_70")))] pub fn g_test_skip_printf(format: *const c_char, ...); pub fn g_test_subprocess() -> gboolean; - #[cfg(any(feature = "v2_62"))] + #[cfg(feature = "v2_62")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_62")))] pub fn g_test_summary(summary: *const c_char); pub fn g_test_timer_elapsed() -> c_double; @@ -6791,7 +6793,7 @@ extern "C" { data: gpointer, notify: GDestroyNotify, ) -> c_uint; - #[cfg(any(feature = "v2_74"))] + #[cfg(feature = "v2_74")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_74")))] pub fn g_timeout_add_once( interval: c_uint, @@ -6886,9 +6888,9 @@ extern "C" { notify: GDestroyNotify, ) -> c_uint; pub fn g_unix_fd_source_new(fd: c_int, condition: GIOCondition) -> *mut GSource; - #[cfg(any(feature = "v2_64"))] + #[cfg(feature = "v2_64")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_64")))] - #[cfg(any(unix))] + #[cfg(unix)] #[cfg_attr(docsrs, doc(cfg(unix)))] pub fn g_unix_get_passwd_entry( user_name: *const c_char, @@ -6971,7 +6973,7 @@ extern "C" { error: *mut *mut GError, ) -> *mut u16; pub fn g_utf8_validate(str: *const u8, max_len: ssize_t, end: *mut *const c_char) -> gboolean; - #[cfg(any(feature = "v2_60"))] + #[cfg(feature = "v2_60")] #[cfg_attr(docsrs, doc(cfg(feature = "v2_60")))] pub fn g_utf8_validate_len( str: *const u8, diff --git a/glib/sys/tests/abi.rs b/glib/sys/tests/abi.rs index 9511b56dcf90..1dfe129eb508 100644 --- a/glib/sys/tests/abi.rs +++ b/glib/sys/tests/abi.rs @@ -988,6 +988,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) G_ASCII_SPACE", "256"), ("(guint) G_ASCII_UPPER", "512"), ("(guint) G_ASCII_XDIGIT", "1024"), + ("G_ATOMIC_REF_COUNT_INIT", "1"), ("G_BIG_ENDIAN", "4321"), ("(gint) G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED", "2"), ("(gint) G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND", "7"), @@ -1247,6 +1248,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("G_PRIORITY_HIGH", "-100"), ("G_PRIORITY_HIGH_IDLE", "100"), ("G_PRIORITY_LOW", "300"), + ("G_REF_COUNT_INIT", "-1"), ("(guint) G_REGEX_ANCHORED", "16"), ("(guint) G_REGEX_BSR_ANYCRLF", "8388608"), ("(guint) G_REGEX_CASELESS", "1"), diff --git a/glib/sys/tests/constant.c b/glib/sys/tests/constant.c index f5d83a767822..c3acfe696347 100644 --- a/glib/sys/tests/constant.c +++ b/glib/sys/tests/constant.c @@ -46,6 +46,7 @@ int main() { PRINT_CONSTANT((guint) G_ASCII_SPACE); PRINT_CONSTANT((guint) G_ASCII_UPPER); PRINT_CONSTANT((guint) G_ASCII_XDIGIT); + PRINT_CONSTANT(G_ATOMIC_REF_COUNT_INIT); PRINT_CONSTANT(G_BIG_ENDIAN); PRINT_CONSTANT((gint) G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED); PRINT_CONSTANT((gint) G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND); @@ -305,6 +306,7 @@ int main() { PRINT_CONSTANT(G_PRIORITY_HIGH); PRINT_CONSTANT(G_PRIORITY_HIGH_IDLE); PRINT_CONSTANT(G_PRIORITY_LOW); + PRINT_CONSTANT(G_REF_COUNT_INIT); PRINT_CONSTANT((guint) G_REGEX_ANCHORED); PRINT_CONSTANT((guint) G_REGEX_BSR_ANYCRLF); PRINT_CONSTANT((guint) G_REGEX_CASELESS); diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index 572441614b53..5dae17f3be8a 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index 572441614b53..5dae17f3be8a 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 @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index 572441614b53..5dae17f3be8a 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 6a0603f52c3c) -from gir-files (https://github.com/gtk-rs/gir-files @ b42700b30bb2) +Generated by gir (https://github.com/gtk-rs/gir @ bf8c5e344a73) +from gir-files (https://github.com/gtk-rs/gir-files @ 43cac7495ff5) diff --git a/pango/src/auto/attr_list.rs b/pango/src/auto/attr_list.rs index 7ac6dafe5463..5272582d0abf 100644 --- a/pango/src/auto/attr_list.rs +++ b/pango/src/auto/attr_list.rs @@ -4,7 +4,7 @@ use crate::{AttrIterator, Attribute}; use glib::translate::*; -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] use std::fmt; @@ -54,7 +54,7 @@ impl AttrList { } } - #[cfg(any(feature = "v1_44"))] + #[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] #[doc(alias = "pango_attr_list_get_attributes")] #[doc(alias = "get_attributes")] @@ -79,7 +79,7 @@ impl AttrList { } } - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "pango_attr_list_to_string")] #[doc(alias = "to_string")] @@ -87,7 +87,7 @@ impl AttrList { unsafe { from_glib_full(ffi::pango_attr_list_to_string(self.to_glib_none().0)) } } - #[cfg(any(feature = "v1_44"))] + #[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] #[doc(alias = "pango_attr_list_update")] pub fn update(&self, pos: i32, remove: i32, add: i32) { @@ -96,7 +96,7 @@ impl AttrList { } } - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "pango_attr_list_from_string")] pub fn from_string(text: &str) -> Result { @@ -113,7 +113,7 @@ impl Default for AttrList { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl fmt::Display for AttrList { #[inline] diff --git a/pango/src/auto/attribute.rs b/pango/src/auto/attribute.rs index cfef69ccf0cf..92fb101096cc 100644 --- a/pango/src/auto/attribute.rs +++ b/pango/src/auto/attribute.rs @@ -4,7 +4,7 @@ use glib::translate::*; -#[cfg(any(feature = "v1_44"))] +#[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] glib::wrapper! { #[derive(Debug, PartialOrd, Ord, Hash)] diff --git a/pango/src/auto/context.rs b/pango/src/auto/context.rs index 5eb5064133a1..62c73968159d 100644 --- a/pango/src/auto/context.rs +++ b/pango/src/auto/context.rs @@ -99,7 +99,7 @@ impl Context { } } - #[cfg(any(feature = "v1_44"))] + #[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] #[doc(alias = "pango_context_get_round_glyph_positions")] #[doc(alias = "get_round_glyph_positions")] @@ -207,7 +207,7 @@ impl Context { } } - #[cfg(any(feature = "v1_44"))] + #[cfg(feature = "v1_44")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))] #[doc(alias = "pango_context_set_round_glyph_positions")] pub fn set_round_glyph_positions(&self, round_positions: bool) { diff --git a/pango/src/auto/enums.rs b/pango/src/auto/enums.rs index 9d2395a1cd5f..6e727c3f2328 100644 --- a/pango/src/auto/enums.rs +++ b/pango/src/auto/enums.rs @@ -182,31 +182,31 @@ pub enum AttrType { Overline, #[doc(alias = "PANGO_ATTR_OVERLINE_COLOR")] OverlineColor, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_LINE_HEIGHT")] LineHeight, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_ABSOLUTE_LINE_HEIGHT")] AbsoluteLineHeight, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_TEXT_TRANSFORM")] TextTransform, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_WORD")] Word, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_SENTENCE")] Sentence, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_BASELINE_SHIFT")] BaselineShift, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(alias = "PANGO_ATTR_FONT_SCALE")] FontScale, @@ -259,19 +259,19 @@ impl fmt::Display for AttrType { Self::InsertHyphens => "InsertHyphens", Self::Overline => "Overline", Self::OverlineColor => "OverlineColor", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::LineHeight => "LineHeight", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::AbsoluteLineHeight => "AbsoluteLineHeight", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::TextTransform => "TextTransform", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::Word => "Word", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::Sentence => "Sentence", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::BaselineShift => "BaselineShift", - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::FontScale => "FontScale", _ => "Unknown", } @@ -316,19 +316,19 @@ impl IntoGlib for AttrType { Self::InsertHyphens => ffi::PANGO_ATTR_INSERT_HYPHENS, Self::Overline => ffi::PANGO_ATTR_OVERLINE, Self::OverlineColor => ffi::PANGO_ATTR_OVERLINE_COLOR, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::LineHeight => ffi::PANGO_ATTR_LINE_HEIGHT, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::AbsoluteLineHeight => ffi::PANGO_ATTR_ABSOLUTE_LINE_HEIGHT, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::TextTransform => ffi::PANGO_ATTR_TEXT_TRANSFORM, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::Word => ffi::PANGO_ATTR_WORD, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::Sentence => ffi::PANGO_ATTR_SENTENCE, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::BaselineShift => ffi::PANGO_ATTR_BASELINE_SHIFT, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] Self::FontScale => ffi::PANGO_ATTR_FONT_SCALE, Self::__Unknown(value) => value, } @@ -370,19 +370,19 @@ impl FromGlib for AttrType { ffi::PANGO_ATTR_INSERT_HYPHENS => Self::InsertHyphens, ffi::PANGO_ATTR_OVERLINE => Self::Overline, ffi::PANGO_ATTR_OVERLINE_COLOR => Self::OverlineColor, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_LINE_HEIGHT => Self::LineHeight, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_ABSOLUTE_LINE_HEIGHT => Self::AbsoluteLineHeight, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_TEXT_TRANSFORM => Self::TextTransform, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_WORD => Self::Word, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_SENTENCE => Self::Sentence, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_BASELINE_SHIFT => Self::BaselineShift, - #[cfg(any(feature = "v1_50"))] + #[cfg(feature = "v1_50")] ffi::PANGO_ATTR_FONT_SCALE => Self::FontScale, value => Self::__Unknown(value), } @@ -442,7 +442,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -458,7 +458,7 @@ pub enum BaselineShift { __Unknown(i32), } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl fmt::Display for BaselineShift { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -475,7 +475,7 @@ impl fmt::Display for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] impl IntoGlib for BaselineShift { @@ -492,7 +492,7 @@ impl IntoGlib for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] impl FromGlib for BaselineShift { @@ -507,7 +507,7 @@ impl FromGlib for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for BaselineShift { #[inline] @@ -516,7 +516,7 @@ impl StaticType for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl glib::HasParamSpec for BaselineShift { type ParamSpec = glib::ParamSpecEnum; @@ -528,13 +528,13 @@ impl glib::HasParamSpec for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl glib::value::ValueType for BaselineShift { type Type = Self; } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] unsafe impl<'a> FromValue<'a> for BaselineShift { type Checker = glib::value::GenericValueTypeChecker; @@ -545,7 +545,7 @@ unsafe impl<'a> FromValue<'a> for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl ToValue for BaselineShift { #[inline] @@ -563,7 +563,7 @@ impl ToValue for BaselineShift { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl From for glib::Value { #[inline] @@ -1158,7 +1158,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -1176,7 +1176,7 @@ pub enum FontScale { __Unknown(i32), } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl fmt::Display for FontScale { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1194,7 +1194,7 @@ impl fmt::Display for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] impl IntoGlib for FontScale { @@ -1212,7 +1212,7 @@ impl IntoGlib for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] #[doc(hidden)] impl FromGlib for FontScale { @@ -1228,7 +1228,7 @@ impl FromGlib for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl StaticType for FontScale { #[inline] @@ -1237,7 +1237,7 @@ impl StaticType for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl glib::HasParamSpec for FontScale { type ParamSpec = glib::ParamSpecEnum; @@ -1249,13 +1249,13 @@ impl glib::HasParamSpec for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl glib::value::ValueType for FontScale { type Type = Self; } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] unsafe impl<'a> FromValue<'a> for FontScale { type Checker = glib::value::GenericValueTypeChecker; @@ -1266,7 +1266,7 @@ unsafe impl<'a> FromValue<'a> for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl ToValue for FontScale { #[inline] @@ -1284,7 +1284,7 @@ impl ToValue for FontScale { } } -#[cfg(any(feature = "v1_50"))] +#[cfg(feature = "v1_50")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))] impl From for glib::Value { #[inline] @@ -1566,7 +1566,7 @@ impl From for glib::Value { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -1580,7 +1580,7 @@ pub enum Overline { __Unknown(i32), } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl fmt::Display for Overline { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -1596,7 +1596,7 @@ impl fmt::Display for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] #[doc(hidden)] impl IntoGlib for Overline { @@ -1612,7 +1612,7 @@ impl IntoGlib for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] #[doc(hidden)] impl FromGlib for Overline { @@ -1626,7 +1626,7 @@ impl FromGlib for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl StaticType for Overline { #[inline] @@ -1635,7 +1635,7 @@ impl StaticType for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl glib::HasParamSpec for Overline { type ParamSpec = glib::ParamSpecEnum; @@ -1647,13 +1647,13 @@ impl glib::HasParamSpec for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl glib::value::ValueType for Overline { type Type = Self; } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] unsafe impl<'a> FromValue<'a> for Overline { type Checker = glib::value::GenericValueTypeChecker; @@ -1664,7 +1664,7 @@ unsafe impl<'a> FromValue<'a> for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl ToValue for Overline { #[inline] @@ -1682,7 +1682,7 @@ impl ToValue for Overline { } } -#[cfg(any(feature = "v1_46"))] +#[cfg(feature = "v1_46")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_46")))] impl From for glib::Value { #[inline] @@ -2765,15 +2765,15 @@ impl From