diff --git a/gdk-pixbuf/src/auto/pixbuf.rs b/gdk-pixbuf/src/auto/pixbuf.rs index af8e35813f01..041c1f9b4f39 100644 --- a/gdk-pixbuf/src/auto/pixbuf.rs +++ b/gdk-pixbuf/src/auto/pixbuf.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::str; use crate::Colorspace; use crate::InterpType; use crate::PixbufFormat; @@ -160,8 +161,12 @@ impl Pixbuf { #[doc(alias = "gdk_pixbuf_new_from_xpm_data")] #[doc(alias = "new_from_xpm_data")] - pub fn from_xpm_data(data: &[&str]) -> Pixbuf { - unsafe { from_glib_full(ffi::gdk_pixbuf_new_from_xpm_data(data.to_glib_none().0)) } + pub fn from_xpm_data>(data: &[P]) -> Pixbuf { + unsafe { + from_glib_full(ffi::gdk_pixbuf_new_from_xpm_data( + data.as_ref().to_glib_none().0, + )) + } } #[doc(alias = "gdk_pixbuf_add_alpha")] @@ -479,7 +484,7 @@ impl Pixbuf { //} //#[doc(alias = "gdk_pixbuf_save_to_callbackv")] - //pub fn save_to_callbackv, usize, &glib::Error) -> bool>(&self, save_func: P, type_: &str, option_keys: &[&str], option_values: &[&str]) -> Result<(), glib::Error> { + //pub fn save_to_callbackv, usize, &glib::Error) -> bool, Q: AsRef, R: AsRef>(&self, save_func: P, type_: &str, option_keys: &[Q], option_values: &[R]) -> Result<(), glib::Error> { // unsafe { TODO: call ffi:gdk_pixbuf_save_to_callbackv() } //} diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index a1ec65b08d29..088f571ba55b 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 @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index a1ec65b08d29..088f571ba55b 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 @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gio/src/app_info.rs b/gio/src/app_info.rs index 1bbc64973cf0..d8ddee4fbd34 100644 --- a/gio/src/app_info.rs +++ b/gio/src/app_info.rs @@ -98,7 +98,12 @@ impl> AppInfoExtManual for O { uris: &[S], context: Option<&P>, ) -> Pin> + 'static>> { - let uris = uris.as_ref().iter().copied().map(String::from).collect::>(); + let uris = uris + .as_ref() + .iter() + .copied() + .map(String::from) + .collect::>(); let context = context.map(ToOwned::to_owned); Box_::pin(crate::GioFuture::new(self, move |obj, send| { let cancellable = Cancellable::new(); diff --git a/gio/src/auto/app_info.rs b/gio/src/auto/app_info.rs index 553f445aaf0c..27170ff0ead3 100644 --- a/gio/src/auto/app_info.rs +++ b/gio/src/auto/app_info.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::str; use crate::AppInfoCreateFlags; use crate::AppLaunchContext; #[cfg(any(feature = "v2_50", feature = "dox"))] @@ -266,10 +267,10 @@ pub trait AppInfoExt: 'static { ) -> Result<(), glib::Error>; #[doc(alias = "g_app_info_launch_uris")] - fn launch_uris>( + fn launch_uris, Q: IsA>( &self, - uris: &[&str], - context: Option<&P>, + uris: &[P], + context: Option<&Q>, ) -> Result<(), glib::Error>; #[doc(alias = "g_app_info_remove_supports_type")] @@ -416,16 +417,16 @@ impl> AppInfoExt for O { } } - fn launch_uris>( + fn launch_uris, Q: IsA>( &self, - uris: &[&str], - context: Option<&P>, + uris: &[P], + context: Option<&Q>, ) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_app_info_launch_uris( self.as_ref().to_glib_none().0, - uris.to_glib_none().0, + uris.as_ref().to_glib_none().0, context.map(|p| p.as_ref()).to_glib_none().0, &mut error, ); diff --git a/gio/src/auto/desktop_app_info.rs b/gio/src/auto/desktop_app_info.rs index 9f641e20141e..2fae1c0d32ef 100644 --- a/gio/src/auto/desktop_app_info.rs +++ b/gio/src/auto/desktop_app_info.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::str; use crate::AppInfo; use crate::AppLaunchContext; use glib::object::IsA; @@ -207,16 +208,16 @@ impl DesktopAppInfo { } #[doc(alias = "g_desktop_app_info_launch_uris_as_manager")] - pub fn launch_uris_as_manager>( + pub fn launch_uris_as_manager, Q: IsA>( &self, - uris: &[&str], - launch_context: Option<&P>, + uris: &[P], + launch_context: Option<&Q>, spawn_flags: glib::SpawnFlags, user_setup: Option>, pid_callback: Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))>, ) -> Result<(), glib::Error> { let user_setup_data: Box_>> = Box_::new(user_setup); - unsafe extern "C" fn user_setup_func>( + unsafe extern "C" fn user_setup_func, Q: IsA>( user_data: glib::ffi::gpointer, ) { let callback: Box_>> = @@ -225,12 +226,12 @@ impl DesktopAppInfo { callback() } let user_setup = if user_setup_data.is_some() { - Some(user_setup_func::

as _) + Some(user_setup_func:: as _) } else { None }; let pid_callback_data: Option<&mut dyn (FnMut(&DesktopAppInfo, glib::Pid))> = pid_callback; - unsafe extern "C" fn pid_callback_func>( + unsafe extern "C" fn pid_callback_func, Q: IsA>( appinfo: *mut ffi::GDesktopAppInfo, pid: glib::ffi::GPid, user_data: glib::ffi::gpointer, @@ -247,7 +248,7 @@ impl DesktopAppInfo { }; } let pid_callback = if pid_callback_data.is_some() { - Some(pid_callback_func::

as _) + Some(pid_callback_func:: as _) } else { None }; @@ -258,7 +259,7 @@ impl DesktopAppInfo { let mut error = ptr::null_mut(); let _ = ffi::g_desktop_app_info_launch_uris_as_manager( self.to_glib_none().0, - uris.to_glib_none().0, + uris.as_ref().to_glib_none().0, launch_context.map(|p| p.as_ref()).to_glib_none().0, spawn_flags.into_glib(), user_setup, diff --git a/gio/src/auto/file_info.rs b/gio/src/auto/file_info.rs index 3a3de9e5ac08..73eb5464521d 100644 --- a/gio/src/auto/file_info.rs +++ b/gio/src/auto/file_info.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::str; use crate::FileAttributeMatcher; use crate::FileAttributeStatus; use crate::FileAttributeType; @@ -399,12 +400,12 @@ impl FileInfo { } #[doc(alias = "g_file_info_set_attribute_stringv")] - pub fn set_attribute_stringv(&self, attribute: &str, attr_value: &[&str]) { + pub fn set_attribute_stringv>(&self, attribute: &str, attr_value: &[P]) { unsafe { ffi::g_file_info_set_attribute_stringv( self.to_glib_none().0, attribute.to_glib_none().0, - attr_value.to_glib_none().0, + attr_value.as_ref().to_glib_none().0, ); } } diff --git a/gio/src/auto/functions.rs b/gio/src/auto/functions.rs index 97c3621c0ea5..9186c1589799 100644 --- a/gio/src/auto/functions.rs +++ b/gio/src/auto/functions.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(any(feature = "v2_60", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] +use crate::str; use crate::AsyncResult; use crate::BusType; use crate::Cancellable; @@ -235,9 +238,9 @@ pub fn content_type_is_unknown(type_: &str) -> bool { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] #[doc(alias = "g_content_type_set_mime_dirs")] -pub fn content_type_set_mime_dirs(dirs: &[&str]) { +pub fn content_type_set_mime_dirs>(dirs: &[P]) { unsafe { - ffi::g_content_type_set_mime_dirs(dirs.to_glib_none().0); + ffi::g_content_type_set_mime_dirs(dirs.as_ref().to_glib_none().0); } } diff --git a/gio/src/auto/settings.rs b/gio/src/auto/settings.rs index 9196bebf1851..4de08ed534eb 100644 --- a/gio/src/auto/settings.rs +++ b/gio/src/auto/settings.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::str; use crate::Action; use crate::SettingsBackend; use crate::SettingsSchema; @@ -228,7 +229,8 @@ pub trait SettingsExt: 'static { fn set_string(&self, key: &str, value: &str) -> Result<(), glib::error::BoolError>; #[doc(alias = "g_settings_set_strv")] - fn set_strv(&self, key: &str, value: &[&str]) -> Result<(), glib::error::BoolError>; + fn set_strv>(&self, key: &str, value: &[P]) + -> Result<(), glib::error::BoolError>; #[doc(alias = "g_settings_set_uint")] fn set_uint(&self, key: &str, value: u32) -> Result<(), glib::error::BoolError>; @@ -561,13 +563,17 @@ impl> SettingsExt for O { } } - fn set_strv(&self, key: &str, value: &[&str]) -> Result<(), glib::error::BoolError> { + fn set_strv>( + &self, + key: &str, + value: &[P], + ) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::g_settings_set_strv( self.as_ref().to_glib_none().0, key.to_glib_none().0, - value.to_glib_none().0 + value.as_ref().to_glib_none().0 ), "Can't set readonly key" ) diff --git a/gio/src/auto/settings_backend.rs b/gio/src/auto/settings_backend.rs index b99e0a5ea40d..14f97c5bfca2 100644 --- a/gio/src/auto/settings_backend.rs +++ b/gio/src/auto/settings_backend.rs @@ -37,7 +37,7 @@ pub trait SettingsBackendExt: 'static { //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); + //fn keys_changed>(&self, path: &str, items: &[P], origin_tag: /*Unimplemented*/Option); //#[doc(alias = "g_settings_backend_path_changed")] //fn path_changed(&self, path: &str, origin_tag: /*Unimplemented*/Option); @@ -58,7 +58,7 @@ impl> SettingsBackendExt for O { // unsafe { TODO: call ffi:g_settings_backend_changed_tree() } //} - //fn keys_changed(&self, path: &str, items: &[&str], origin_tag: /*Unimplemented*/Option) { + //fn keys_changed>(&self, path: &str, items: &[P], origin_tag: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:g_settings_backend_keys_changed() } //} diff --git a/gio/src/auto/themed_icon.rs b/gio/src/auto/themed_icon.rs index dd3eb0786919..e4f0fb214b66 100644 --- a/gio/src/auto/themed_icon.rs +++ b/gio/src/auto/themed_icon.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::str; use crate::Icon; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; @@ -28,11 +29,11 @@ impl ThemedIcon { #[doc(alias = "g_themed_icon_new_from_names")] #[doc(alias = "new_from_names")] - pub fn from_names(iconnames: &[&str]) -> ThemedIcon { + pub fn from_names>(iconnames: &[P]) -> ThemedIcon { let len = iconnames.len() as i32; unsafe { from_glib_full(ffi::g_themed_icon_new_from_names( - iconnames.to_glib_none().0, + iconnames.as_ref().to_glib_none().0, len, )) } diff --git a/gio/src/auto/tls_connection.rs b/gio/src/auto/tls_connection.rs index bfe1029c3236..ccb18e401792 100644 --- a/gio/src/auto/tls_connection.rs +++ b/gio/src/auto/tls_connection.rs @@ -2,6 +2,9 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(any(feature = "v2_60", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] +use crate::str; use crate::AsyncResult; use crate::Cancellable; use crate::IOStream; @@ -94,7 +97,7 @@ pub trait TlsConnectionExt: 'static { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] #[doc(alias = "g_tls_connection_set_advertised_protocols")] - fn set_advertised_protocols(&self, protocols: &[&str]); + fn set_advertised_protocols>(&self, protocols: &[P]); #[doc(alias = "g_tls_connection_set_certificate")] fn set_certificate>(&self, certificate: &P); @@ -314,11 +317,11 @@ impl> TlsConnectionExt for O { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] - fn set_advertised_protocols(&self, protocols: &[&str]) { + fn set_advertised_protocols>(&self, protocols: &[P]) { unsafe { ffi::g_tls_connection_set_advertised_protocols( self.as_ref().to_glib_none().0, - protocols.to_glib_none().0, + protocols.as_ref().to_glib_none().0, ); } } diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index a1ec65b08d29..088f571ba55b 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 @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index a1ec65b08d29..088f571ba55b 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 @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index a1ec65b08d29..088f571ba55b 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 @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/glib/src/functions.rs b/glib/src/functions.rs index e926076c1981..373b7cd31313 100644 --- a/glib/src/functions.rs +++ b/glib/src/functions.rs @@ -27,7 +27,14 @@ use std::ptr; #[cfg_attr(feature = "dox", doc(cfg(all(feature = "v2_58", not(windows)))))] #[allow(clippy::too_many_arguments)] #[doc(alias = "g_spawn_async_with_fds")] -pub fn spawn_async_with_fds, T: AsRawFd, U: AsRawFd, V: AsRawFd, A: AsRef, E: AsRef>( +pub fn spawn_async_with_fds< + P: AsRef, + T: AsRawFd, + U: AsRawFd, + V: AsRawFd, + A: AsRef, + E: AsRef, +>( working_directory: P, argv: &[A], envp: &[E], diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index a1ec65b08d29..088f571ba55b 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 @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/pango/src/auto/versions.txt b/pango/src/auto/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/pango/src/auto/versions.txt +++ b/pango/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/pango/sys/versions.txt b/pango/sys/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/pango/sys/versions.txt +++ b/pango/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/pangocairo/src/auto/versions.txt b/pangocairo/src/auto/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/pangocairo/src/auto/versions.txt +++ b/pangocairo/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/pangocairo/sys/versions.txt b/pangocairo/sys/versions.txt index a1ec65b08d29..088f571ba55b 100644 --- a/pangocairo/sys/versions.txt +++ b/pangocairo/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 41ab88c) +Generated by gir (https://github.com/gtk-rs/gir @ b823540+) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6)