diff --git a/Cargo.toml b/Cargo.toml index e53bc4a4..25f3ff33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ git = "https://github.com/gtk-rs/lgpl-docs" [dependencies] libc = "0.2" bitflags = "1.0" +lazy_static = "1.0" [dependencies.gio-sys] version = "0.5.0" diff --git a/gir b/gir index bd67955b..fbb95f48 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit bd67955b670e1d61dba6bd96ca6f3ec5073ecf0b +Subproject commit fbb95f484ed5f202af9594b6c8d4f59fc0501bf1 diff --git a/src/application.rs b/src/application.rs index acc860b6..1275e2dc 100644 --- a/src/application.rs +++ b/src/application.rs @@ -36,6 +36,7 @@ impl + IsA> ApplicationExtManual for O #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] unsafe extern "C" fn open_trampoline

(this: *mut ffi::GApplication, files: *const *mut ffi::GFile, n_files: libc::c_int, hint: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &[File], &str) + 'static) = transmute(f); let files: Vec = FromGlibContainer::from_glib_none_num(files, n_files as usize); f(&Application::from_glib_none(this).downcast_unchecked(), &files, &String::from_glib_none(hint)) diff --git a/src/auto/action.rs b/src/auto/action.rs index c145b2bd..ab72f52c 100644 --- a/src/auto/action.rs +++ b/src/auto/action.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -177,30 +177,35 @@ impl + IsA> ActionExt for O { unsafe extern "C" fn notify_enabled_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_parameter_type_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_state_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_state_type_trampoline

(this: *mut ffi::GAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Action::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/action_group.rs b/src/auto/action_group.rs index f75fe0a4..8f00480c 100644 --- a/src/auto/action_group.rs +++ b/src/auto/action_group.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -177,24 +177,28 @@ impl + IsA> ActionGroupExt for O { unsafe extern "C" fn action_added_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name)) } unsafe extern "C" fn action_enabled_changed_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, enabled: glib_ffi::gboolean, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str, bool) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name), from_glib(enabled)) } unsafe extern "C" fn action_removed_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name)) } unsafe extern "C" fn action_state_changed_trampoline

(this: *mut ffi::GActionGroup, action_name: *mut libc::c_char, value: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str, &glib::Variant) + 'static) = transmute(f); f(&ActionGroup::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(action_name), &from_glib_borrow(value)) } diff --git a/src/auto/action_map.rs b/src/auto/action_map.rs index 86b30174..e40d6e9d 100644 --- a/src/auto/action_map.rs +++ b/src/auto/action_map.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/app_info.rs b/src/auto/app_info.rs index 9e19a26b..a85bfc4c 100644 --- a/src/auto/app_info.rs +++ b/src/auto/app_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -90,6 +90,7 @@ impl AppInfo { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn launch_default_for_uri_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_app_info_launch_default_for_uri_finish(res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/app_launch_context.rs b/src/auto/app_launch_context.rs index 80ab6e3e..787abe64 100644 --- a/src/auto/app_launch_context.rs +++ b/src/auto/app_launch_context.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -126,6 +126,7 @@ impl + IsA> AppLaunchContextExt f #[cfg(any(feature = "v2_36", feature = "dox"))] unsafe extern "C" fn launch_failed_trampoline

(this: *mut ffi::GAppLaunchContext, startup_notify_id: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&AppLaunchContext::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(startup_notify_id)) } @@ -133,6 +134,7 @@ where P: IsA { #[cfg(any(feature = "v2_36", feature = "dox"))] unsafe extern "C" fn launched_trampoline

(this: *mut ffi::GAppLaunchContext, info: *mut ffi::GAppInfo, platform_data: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &AppInfo, &glib::Variant) + 'static) = transmute(f); f(&AppLaunchContext::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(info), &from_glib_borrow(platform_data)) } diff --git a/src/auto/application.rs b/src/auto/application.rs index 0df6bfd3..79574e53 100644 --- a/src/auto/application.rs +++ b/src/auto/application.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -480,42 +480,49 @@ impl + IsA> ApplicationExt for O { unsafe extern "C" fn activate_trampoline

(this: *mut ffi::GApplication, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn shutdown_trampoline

(this: *mut ffi::GApplication, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn startup_trampoline

(this: *mut ffi::GApplication, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_action_group_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_application_id_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flags_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_inactivity_timeout_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } @@ -523,24 +530,28 @@ where P: IsA { #[cfg(any(feature = "v2_44", feature = "dox"))] unsafe extern "C" fn notify_is_busy_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_registered_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_remote_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_resource_base_path_trampoline

(this: *mut ffi::GApplication, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Application::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/buffered_input_stream.rs b/src/auto/buffered_input_stream.rs index 7abfb1c0..cdf4b4e6 100644 --- a/src/auto/buffered_input_stream.rs +++ b/src/auto/buffered_input_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -78,6 +78,7 @@ impl + IsA> BufferedInputStrea let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn fill_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_buffered_input_stream_fill_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; @@ -137,6 +138,7 @@ impl + IsA> BufferedInputStrea unsafe extern "C" fn notify_buffer_size_trampoline

(this: *mut ffi::GBufferedInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BufferedInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/buffered_output_stream.rs b/src/auto/buffered_output_stream.rs index 46fcf726..3fccb46c 100644 --- a/src/auto/buffered_output_stream.rs +++ b/src/auto/buffered_output_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -99,12 +99,14 @@ impl + IsA> BufferedOutputStr unsafe extern "C" fn notify_auto_grow_trampoline

(this: *mut ffi::GBufferedOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BufferedOutputStream::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_buffer_size_trampoline

(this: *mut ffi::GBufferedOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&BufferedOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/cancellable.rs b/src/auto/cancellable.rs index e171c2c2..9633b21a 100644 --- a/src/auto/cancellable.rs +++ b/src/auto/cancellable.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -156,6 +156,7 @@ impl + IsA> CancellableExt for O { unsafe extern "C" fn cancelled_trampoline

(this: *mut ffi::GCancellable, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Cancellable::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/constants.rs b/src/auto/constants.rs new file mode 100644 index 00000000..64e36758 --- /dev/null +++ b/src/auto/constants.rs @@ -0,0 +1,328 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) +// DO NOT EDIT + +use ffi; +use std::ffi::CStr; + +lazy_static! { + pub static ref DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ACCESS_CAN_DELETE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ACCESS_CAN_READ: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ACCESS_CAN_READ).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ACCESS_CAN_RENAME: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ACCESS_CAN_TRASH: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ACCESS_CAN_WRITE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_DOS_IS_ARCHIVE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_DOS_IS_SYSTEM: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_DOS_IS_SYSTEM).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ETAG_VALUE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ETAG_VALUE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_FREE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_FREE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_READONLY: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_READONLY).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_REMOTE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_SIZE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_SIZE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_TYPE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_USED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_USED).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_GVFS_BACKEND: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_GVFS_BACKEND).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ID_FILE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ID_FILE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_ID_FILESYSTEM: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_ID_FILESYSTEM).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_START: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_OWNER_GROUP: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_OWNER_GROUP).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_OWNER_USER: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_OWNER_USER).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_OWNER_USER_REAL: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_OWNER_USER_REAL).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_PREVIEW_ICON: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_PREVIEW_ICON).to_str().unwrap()}; +} +#[cfg(any(feature = "v2_52", feature = "dox"))] +lazy_static! { + pub static ref FILE_ATTRIBUTE_RECENT_MODIFIED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_RECENT_MODIFIED).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_SELINUX_CONTEXT: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_SELINUX_CONTEXT).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_COPY_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_COPY_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_DESCRIPTION: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_EDIT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_ICON: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_ICON).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_IS_BACKUP: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_IS_HIDDEN: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_IS_SYMLINK: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL).to_str().unwrap()}; +} +#[cfg(any(feature = "v2_46", feature = "dox"))] +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_IS_VOLATILE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_SIZE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_SIZE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_SORT_ORDER: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER).to_str().unwrap()}; +} +#[cfg(any(feature = "v2_34", feature = "dox"))] +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_TARGET_URI: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_TARGET_URI).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_STANDARD_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_STANDARD_TYPE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_THUMBNAILING_FAILED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_THUMBNAILING_FAILED).to_str().unwrap()}; +} +#[cfg(any(feature = "v2_40", feature = "dox"))] +lazy_static! { + pub static ref FILE_ATTRIBUTE_THUMBNAIL_IS_VALID: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_THUMBNAIL_PATH: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_THUMBNAIL_PATH).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_ACCESS: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_ACCESS).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_ACCESS_USEC: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_ACCESS_USEC).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_CHANGED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_CHANGED).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_CHANGED_USEC: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_CHANGED_USEC).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_CREATED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_CREATED).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_CREATED_USEC: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_CREATED_USEC).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_MODIFIED: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_MODIFIED).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TIME_MODIFIED_USEC: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TRASH_DELETION_DATE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TRASH_DELETION_DATE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TRASH_ITEM_COUNT: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_TRASH_ORIG_PATH: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_TRASH_ORIG_PATH).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_BLOCKS: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_BLOCKS).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_BLOCK_SIZE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_DEVICE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_DEVICE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_GID: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_GID).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_INODE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_INODE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_MODE: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_MODE).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_NLINK: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_NLINK).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_RDEV: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_RDEV).to_str().unwrap()}; +} +lazy_static! { + pub static ref FILE_ATTRIBUTE_UNIX_UID: &'static str = unsafe{CStr::from_ptr(ffi::G_FILE_ATTRIBUTE_UNIX_UID).to_str().unwrap()}; +} +lazy_static! { + pub static ref MENU_ATTRIBUTE_ACTION: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_ATTRIBUTE_ACTION).to_str().unwrap()}; +} +#[cfg(any(feature = "v2_36", feature = "dox"))] +lazy_static! { + pub static ref MENU_ATTRIBUTE_ACTION_NAMESPACE: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_ATTRIBUTE_ACTION_NAMESPACE).to_str().unwrap()}; +} +#[cfg(any(feature = "v2_38", feature = "dox"))] +lazy_static! { + pub static ref MENU_ATTRIBUTE_ICON: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_ATTRIBUTE_ICON).to_str().unwrap()}; +} +lazy_static! { + pub static ref MENU_ATTRIBUTE_LABEL: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_ATTRIBUTE_LABEL).to_str().unwrap()}; +} +lazy_static! { + pub static ref MENU_ATTRIBUTE_TARGET: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_ATTRIBUTE_TARGET).to_str().unwrap()}; +} +lazy_static! { + pub static ref MENU_LINK_SECTION: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_LINK_SECTION).to_str().unwrap()}; +} +lazy_static! { + pub static ref MENU_LINK_SUBMENU: &'static str = unsafe{CStr::from_ptr(ffi::G_MENU_LINK_SUBMENU).to_str().unwrap()}; +} +lazy_static! { + pub static ref NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref NETWORK_MONITOR_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_NETWORK_MONITOR_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref PROXY_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_PROXY_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref PROXY_RESOLVER_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_PROXY_RESOLVER_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref SETTINGS_BACKEND_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_SETTINGS_BACKEND_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref TLS_BACKEND_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_TLS_BACKEND_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT: &'static str = unsafe{CStr::from_ptr(ffi::G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT).to_str().unwrap()}; +} +lazy_static! { + pub static ref TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER: &'static str = unsafe{CStr::from_ptr(ffi::G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER).to_str().unwrap()}; +} +lazy_static! { + pub static ref VFS_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_VFS_EXTENSION_POINT_NAME).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_IDENTIFIER_KIND_CLASS: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_IDENTIFIER_KIND_CLASS).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_IDENTIFIER_KIND_HAL_UDI: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_IDENTIFIER_KIND_HAL_UDI).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_IDENTIFIER_KIND_LABEL: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_IDENTIFIER_KIND_LABEL).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_IDENTIFIER_KIND_NFS_MOUNT: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_IDENTIFIER_KIND_UNIX_DEVICE: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_IDENTIFIER_KIND_UUID: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_IDENTIFIER_KIND_UUID).to_str().unwrap()}; +} +lazy_static! { + pub static ref VOLUME_MONITOR_EXTENSION_POINT_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_VOLUME_MONITOR_EXTENSION_POINT_NAME).to_str().unwrap()}; +} diff --git a/src/auto/data_input_stream.rs b/src/auto/data_input_stream.rs index 4af3714f..6a65de34 100644 --- a/src/auto/data_input_stream.rs +++ b/src/auto/data_input_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -195,6 +195,7 @@ impl + IsA> DataInputStreamExt for let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_until_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut length = mem::uninitialized(); let ret = ffi::g_data_input_stream_read_until_finish(_source_object as *mut _, res, &mut length, &mut error); @@ -227,6 +228,7 @@ impl + IsA> DataInputStreamExt for let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_upto_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut length = mem::uninitialized(); let ret = ffi::g_data_input_stream_read_upto_finish(_source_object as *mut _, res, &mut length, &mut error); @@ -271,12 +273,14 @@ impl + IsA> DataInputStreamExt for unsafe extern "C" fn notify_byte_order_trampoline

(this: *mut ffi::GDataInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DataInputStream::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_newline_type_trampoline

(this: *mut ffi::GDataInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DataInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/data_output_stream.rs b/src/auto/data_output_stream.rs index 32ccca1c..4ea080ee 100644 --- a/src/auto/data_output_stream.rs +++ b/src/auto/data_output_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -166,6 +166,7 @@ impl + IsA> DataOutputStreamExt f unsafe extern "C" fn notify_byte_order_trampoline

(this: *mut ffi::GDataOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&DataOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/enums.rs b/src/auto/enums.rs index 969b26a6..d0ce7274 100644 --- a/src/auto/enums.rs +++ b/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/file.rs b/src/auto/file.rs index f6681db8..af81d779 100644 --- a/src/auto/file.rs +++ b/src/auto/file.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -269,6 +269,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn append_to_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_append_to_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -309,6 +310,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn create_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_create_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -337,6 +339,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn create_readwrite_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_create_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -366,6 +369,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn delete_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_delete_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -507,6 +511,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn load_contents_async_trampoline, String), Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut contents = ptr::null_mut(); let mut length = mem::uninitialized(); @@ -543,6 +548,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn make_directory_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_make_directory_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -625,6 +631,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn open_readwrite_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_open_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -683,6 +690,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_filesystem_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_query_filesystem_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -711,6 +719,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -747,6 +756,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_read_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -779,6 +789,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn replace_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_replace_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -814,6 +825,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn replace_contents_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut new_etag = ptr::null_mut(); let _ = ffi::g_file_replace_contents_finish(_source_object as *mut _, res, &mut new_etag, &mut error); @@ -852,6 +864,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn replace_readwrite_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_replace_readwrite_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -940,6 +953,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn set_attributes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut info = ptr::null_mut(); let _ = ffi::g_file_set_attributes_finish(_source_object as *mut _, res, &mut info, &mut error); @@ -979,6 +993,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn set_display_name_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_set_display_name_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -1022,6 +1037,7 @@ impl> FileExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn trash_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_file_trash_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/file_i_o_stream.rs b/src/auto/file_i_o_stream.rs index 5e68e364..63f60b3d 100644 --- a/src/auto/file_i_o_stream.rs +++ b/src/auto/file_i_o_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -55,6 +55,7 @@ impl> FileIOStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_io_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/file_info.rs b/src/auto/file_info.rs index 52fe746e..7db6a601 100644 --- a/src/auto/file_info.rs +++ b/src/auto/file_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/file_input_stream.rs b/src/auto/file_input_stream.rs index f4fb5be7..37c1838c 100644 --- a/src/auto/file_input_stream.rs +++ b/src/auto/file_input_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -47,6 +47,7 @@ impl> FileInputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_input_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/file_output_stream.rs b/src/auto/file_output_stream.rs index 573f2a34..4d7ce2f8 100644 --- a/src/auto/file_output_stream.rs +++ b/src/auto/file_output_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -55,6 +55,7 @@ impl> FileOutputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn query_info_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_file_output_stream_query_info_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/filter_input_stream.rs b/src/auto/filter_input_stream.rs index 6f7c62a3..01aaf519 100644 --- a/src/auto/filter_input_stream.rs +++ b/src/auto/filter_input_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -65,6 +65,7 @@ impl + IsA> FilterInputStreamExt unsafe extern "C" fn notify_close_base_stream_trampoline

(this: *mut ffi::GFilterInputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&FilterInputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/filter_output_stream.rs b/src/auto/filter_output_stream.rs index a17f0b17..0bb316f1 100644 --- a/src/auto/filter_output_stream.rs +++ b/src/auto/filter_output_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -65,6 +65,7 @@ impl + IsA> FilterOutputStreamE unsafe extern "C" fn notify_close_base_stream_trampoline

(this: *mut ffi::GFilterOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&FilterOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/flags.rs b/src/auto/flags.rs index 1bbd1fee..88058b8c 100644 --- a/src/auto/flags.rs +++ b/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/functions.rs b/src/auto/functions.rs index 0e25ce79..a19fbbe1 100644 --- a/src/auto/functions.rs +++ b/src/auto/functions.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/i_o_stream.rs b/src/auto/i_o_stream.rs index 8ebf487f..347dc049 100644 --- a/src/auto/i_o_stream.rs +++ b/src/auto/i_o_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -77,6 +77,7 @@ impl + IsA> IOStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn close_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_io_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -140,6 +141,7 @@ impl + IsA> IOStreamExt for O { unsafe extern "C" fn notify_closed_trampoline

(this: *mut ffi::GIOStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&IOStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/icon.rs b/src/auto/icon.rs index c3a7f171..48b31735 100644 --- a/src/auto/icon.rs +++ b/src/auto/icon.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/inet_address.rs b/src/auto/inet_address.rs index 9d49d7cb..743c9742 100644 --- a/src/auto/inet_address.rs +++ b/src/auto/inet_address.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -277,72 +277,84 @@ impl + IsA> InetAddressExt for O { unsafe extern "C" fn notify_bytes_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_any_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_link_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_loopback_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_global_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_link_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_node_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_org_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_mc_site_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_multicast_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_is_site_local_trampoline

(this: *mut ffi::GInetAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/inet_socket_address.rs b/src/auto/inet_socket_address.rs index d1495434..f75fafb7 100644 --- a/src/auto/inet_socket_address.rs +++ b/src/auto/inet_socket_address.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -120,24 +120,28 @@ impl + IsA> InetSocketAddressExt unsafe extern "C" fn notify_address_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flowinfo_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_port_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_scope_id_trampoline

(this: *mut ffi::GInetSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&InetSocketAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/input_stream.rs b/src/auto/input_stream.rs index e2d5a141..cea5f012 100644 --- a/src/auto/input_stream.rs +++ b/src/auto/input_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -68,6 +68,7 @@ impl> InputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn close_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_input_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -110,6 +111,7 @@ impl> InputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn read_bytes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_input_stream_read_bytes_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -146,6 +148,7 @@ impl> InputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn skip_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_input_stream_skip_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/memory_input_stream.rs b/src/auto/memory_input_stream.rs index 0199044c..c0d6b3a9 100644 --- a/src/auto/memory_input_stream.rs +++ b/src/auto/memory_input_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/memory_output_stream.rs b/src/auto/memory_output_stream.rs index 6b03161c..e8c40d31 100644 --- a/src/auto/memory_output_stream.rs +++ b/src/auto/memory_output_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -69,6 +69,7 @@ impl + IsA> MemoryOutputStreamE unsafe extern "C" fn notify_data_size_trampoline

(this: *mut ffi::GMemoryOutputStream, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MemoryOutputStream::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/menu.rs b/src/auto/menu.rs index 69260616..8649c0ca 100644 --- a/src/auto/menu.rs +++ b/src/auto/menu.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/menu_attribute_iter.rs b/src/auto/menu_attribute_iter.rs index 6e120732..d119df99 100644 --- a/src/auto/menu_attribute_iter.rs +++ b/src/auto/menu_attribute_iter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/menu_item.rs b/src/auto/menu_item.rs index 4f6c0c6a..7bfb3879 100644 --- a/src/auto/menu_item.rs +++ b/src/auto/menu_item.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/menu_link_iter.rs b/src/auto/menu_link_iter.rs index 67e75cdf..7eac0f55 100644 --- a/src/auto/menu_link_iter.rs +++ b/src/auto/menu_link_iter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/menu_model.rs b/src/auto/menu_model.rs index 29b8d3ce..f57b9719 100644 --- a/src/auto/menu_model.rs +++ b/src/auto/menu_model.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -107,6 +107,7 @@ impl + IsA> MenuModelExt for O { unsafe extern "C" fn items_changed_trampoline

(this: *mut ffi::GMenuModel, position: libc::c_int, removed: libc::c_int, added: libc::c_int, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, i32, i32, i32) + 'static) = transmute(f); f(&MenuModel::from_glib_borrow(this).downcast_unchecked(), position, removed, added) } diff --git a/src/auto/mod.rs b/src/auto/mod.rs index 65d18eed..40643ec7 100644 --- a/src/auto/mod.rs +++ b/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -307,6 +307,119 @@ pub use self::flags::TlsPasswordFlags; pub mod functions; +mod constants; +pub use self::constants::DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME; +pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_DELETE; +pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE; +pub use self::constants::FILE_ATTRIBUTE_ACCESS_CAN_READ; +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; +pub use self::constants::FILE_ATTRIBUTE_DOS_IS_SYSTEM; +pub use self::constants::FILE_ATTRIBUTE_ETAG_VALUE; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_FREE; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_READONLY; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_REMOTE; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_SIZE; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_TYPE; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_USED; +pub use self::constants::FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW; +pub use self::constants::FILE_ATTRIBUTE_GVFS_BACKEND; +pub use self::constants::FILE_ATTRIBUTE_ID_FILE; +pub use self::constants::FILE_ATTRIBUTE_ID_FILESYSTEM; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_START; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE; +pub use self::constants::FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE; +pub use self::constants::FILE_ATTRIBUTE_OWNER_GROUP; +pub use self::constants::FILE_ATTRIBUTE_OWNER_USER; +pub use self::constants::FILE_ATTRIBUTE_OWNER_USER_REAL; +pub use self::constants::FILE_ATTRIBUTE_PREVIEW_ICON; +#[cfg(any(feature = "v2_52", feature = "dox"))] +pub use self::constants::FILE_ATTRIBUTE_RECENT_MODIFIED; +pub use self::constants::FILE_ATTRIBUTE_SELINUX_CONTEXT; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_COPY_NAME; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_DESCRIPTION; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_EDIT_NAME; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_ICON; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_IS_BACKUP; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_IS_HIDDEN; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_IS_SYMLINK; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL; +#[cfg(any(feature = "v2_46", feature = "dox"))] +pub use self::constants::FILE_ATTRIBUTE_STANDARD_IS_VOLATILE; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_NAME; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_SIZE; +pub use self::constants::FILE_ATTRIBUTE_STANDARD_SORT_ORDER; +#[cfg(any(feature = "v2_34", feature = "dox"))] +pub use self::constants::FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON; +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_40", feature = "dox"))] +pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_IS_VALID; +pub use self::constants::FILE_ATTRIBUTE_THUMBNAIL_PATH; +pub use self::constants::FILE_ATTRIBUTE_TIME_ACCESS; +pub use self::constants::FILE_ATTRIBUTE_TIME_ACCESS_USEC; +pub use self::constants::FILE_ATTRIBUTE_TIME_CHANGED; +pub use self::constants::FILE_ATTRIBUTE_TIME_CHANGED_USEC; +pub use self::constants::FILE_ATTRIBUTE_TIME_CREATED; +pub use self::constants::FILE_ATTRIBUTE_TIME_CREATED_USEC; +pub use self::constants::FILE_ATTRIBUTE_TIME_MODIFIED; +pub use self::constants::FILE_ATTRIBUTE_TIME_MODIFIED_USEC; +pub use self::constants::FILE_ATTRIBUTE_TRASH_DELETION_DATE; +pub use self::constants::FILE_ATTRIBUTE_TRASH_ITEM_COUNT; +pub use self::constants::FILE_ATTRIBUTE_TRASH_ORIG_PATH; +pub use self::constants::FILE_ATTRIBUTE_UNIX_BLOCKS; +pub use self::constants::FILE_ATTRIBUTE_UNIX_BLOCK_SIZE; +pub use self::constants::FILE_ATTRIBUTE_UNIX_DEVICE; +pub use self::constants::FILE_ATTRIBUTE_UNIX_GID; +pub use self::constants::FILE_ATTRIBUTE_UNIX_INODE; +pub use self::constants::FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT; +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; +pub use self::constants::MENU_ATTRIBUTE_ACTION; +#[cfg(any(feature = "v2_36", feature = "dox"))] +pub use self::constants::MENU_ATTRIBUTE_ACTION_NAMESPACE; +#[cfg(any(feature = "v2_38", feature = "dox"))] +pub use self::constants::MENU_ATTRIBUTE_ICON; +pub use self::constants::MENU_ATTRIBUTE_LABEL; +pub use self::constants::MENU_ATTRIBUTE_TARGET; +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; +pub use self::constants::PROXY_EXTENSION_POINT_NAME; +pub use self::constants::PROXY_RESOLVER_EXTENSION_POINT_NAME; +pub use self::constants::SETTINGS_BACKEND_EXTENSION_POINT_NAME; +pub use self::constants::TLS_BACKEND_EXTENSION_POINT_NAME; +pub use self::constants::TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT; +pub use self::constants::TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER; +pub use self::constants::VFS_EXTENSION_POINT_NAME; +pub use self::constants::VOLUME_IDENTIFIER_KIND_CLASS; +pub use self::constants::VOLUME_IDENTIFIER_KIND_HAL_UDI; +pub use self::constants::VOLUME_IDENTIFIER_KIND_LABEL; +pub use self::constants::VOLUME_IDENTIFIER_KIND_NFS_MOUNT; +pub use self::constants::VOLUME_IDENTIFIER_KIND_UNIX_DEVICE; +pub use self::constants::VOLUME_IDENTIFIER_KIND_UUID; +pub use self::constants::VOLUME_MONITOR_EXTENSION_POINT_NAME; + #[doc(hidden)] pub mod traits { pub use super::ActionExt; diff --git a/src/auto/mount_operation.rs b/src/auto/mount_operation.rs index fd655da6..cf3e3387 100644 --- a/src/auto/mount_operation.rs +++ b/src/auto/mount_operation.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -267,18 +267,21 @@ impl + IsA> MountOperationExt for O unsafe extern "C" fn aborted_trampoline

(this: *mut ffi::GMountOperation, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn ask_password_trampoline

(this: *mut ffi::GMountOperation, message: *mut libc::c_char, default_user: *mut libc::c_char, default_domain: *mut libc::c_char, flags: ffi::GAskPasswordFlags, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str, &str, &str, AskPasswordFlags) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(message), &String::from_glib_none(default_user), &String::from_glib_none(default_domain), from_glib(flags)) } unsafe extern "C" fn reply_trampoline

(this: *mut ffi::GMountOperation, result: ffi::GMountOperationResult, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, MountOperationResult) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked(), from_glib(result)) } @@ -286,42 +289,49 @@ where P: IsA { #[cfg(any(feature = "v2_34", feature = "dox"))] unsafe extern "C" fn show_unmount_progress_trampoline

(this: *mut ffi::GMountOperation, message: *mut libc::c_char, time_left: i64, bytes_left: i64, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str, i64, i64) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(message), time_left, bytes_left) } unsafe extern "C" fn notify_anonymous_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_choice_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_domain_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_password_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_password_save_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_username_trampoline

(this: *mut ffi::GMountOperation, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&MountOperation::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/network_address.rs b/src/auto/network_address.rs index df21182a..ca628fb0 100644 --- a/src/auto/network_address.rs +++ b/src/auto/network_address.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -117,18 +117,21 @@ impl + IsA> NetworkAddressExt for O unsafe extern "C" fn notify_hostname_trampoline

(this: *mut ffi::GNetworkAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_port_trampoline

(this: *mut ffi::GNetworkAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkAddress::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_scheme_trampoline

(this: *mut ffi::GNetworkAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/network_service.rs b/src/auto/network_service.rs index 07ca3b63..262750fc 100644 --- a/src/auto/network_service.rs +++ b/src/auto/network_service.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -119,24 +119,28 @@ impl + IsA> NetworkServiceExt for O unsafe extern "C" fn notify_domain_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_protocol_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_scheme_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_service_trampoline

(this: *mut ffi::GNetworkService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&NetworkService::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/notification.rs b/src/auto/notification.rs index bbdd1e13..8d52f50f 100644 --- a/src/auto/notification.rs +++ b/src/auto/notification.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/output_stream.rs b/src/auto/output_stream.rs index 1f9703f1..90fad8b1 100644 --- a/src/auto/output_stream.rs +++ b/src/auto/output_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -84,6 +84,7 @@ impl> OutputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn close_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_output_stream_close_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -112,6 +113,7 @@ impl> OutputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn flush_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_output_stream_flush_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -171,6 +173,7 @@ impl> OutputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn splice_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_output_stream_splice_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; @@ -227,6 +230,7 @@ impl> OutputStreamExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn write_bytes_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_output_stream_write_bytes_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(ret) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/permission.rs b/src/auto/permission.rs index 0ba74512..49cbcdbc 100644 --- a/src/auto/permission.rs +++ b/src/auto/permission.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -67,6 +67,7 @@ impl + IsA> PermissionExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn acquire_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_permission_acquire_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -119,6 +120,7 @@ impl + IsA> PermissionExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn release_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_permission_release_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -158,18 +160,21 @@ impl + IsA> PermissionExt for O { unsafe extern "C" fn notify_allowed_trampoline

(this: *mut ffi::GPermission, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Permission::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_can_acquire_trampoline

(this: *mut ffi::GPermission, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Permission::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_can_release_trampoline

(this: *mut ffi::GPermission, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Permission::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/resolver.rs b/src/auto/resolver.rs index f7d0fe21..2a33af90 100644 --- a/src/auto/resolver.rs +++ b/src/auto/resolver.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -87,6 +87,7 @@ impl + IsA> ResolverExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_by_address_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_address_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -115,6 +116,7 @@ impl + IsA> ResolverExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_by_name_async_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_by_name_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -145,6 +147,7 @@ impl + IsA> ResolverExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_records_async_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_records_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -173,6 +176,7 @@ impl + IsA> ResolverExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_service_async_trampoline, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_resolver_lookup_service_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(FromGlibPtrContainer::from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -202,6 +206,7 @@ impl + IsA> ResolverExt for O { unsafe extern "C" fn reload_trampoline

(this: *mut ffi::GResolver, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Resolver::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/resource.rs b/src/auto/resource.rs index b2ab99f5..c5e6eaeb 100644 --- a/src/auto/resource.rs +++ b/src/auto/resource.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/seekable.rs b/src/auto/seekable.rs index c96294cb..6773b561 100644 --- a/src/auto/seekable.rs +++ b/src/auto/seekable.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/settings.rs b/src/auto/settings.rs index e69ae6ac..efb4c8b8 100644 --- a/src/auto/settings.rs +++ b/src/auto/settings.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -599,60 +599,70 @@ impl + IsA> SettingsExt for O { unsafe extern "C" fn changed_trampoline

(this: *mut ffi::GSettings, key: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(key)) } unsafe extern "C" fn writable_change_event_trampoline

(this: *mut ffi::GSettings, key: libc::c_uint, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { + callback_guard!(); let f: &&(Fn(&P, u32) -> Inhibit + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked(), key).to_glib() } unsafe extern "C" fn writable_changed_trampoline

(this: *mut ffi::GSettings, key: *mut libc::c_char, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &str) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(key)) } unsafe extern "C" fn notify_backend_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_delay_apply_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_has_unapplied_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_path_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_schema_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_schema_id_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_settings_schema_trampoline

(this: *mut ffi::GSettings, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Settings::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/settings_schema.rs b/src/auto/settings_schema.rs index 6c248763..fb681be2 100644 --- a/src/auto/settings_schema.rs +++ b/src/auto/settings_schema.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/settings_schema_key.rs b/src/auto/settings_schema_key.rs index 73fcfaf0..a29d6b5c 100644 --- a/src/auto/settings_schema_key.rs +++ b/src/auto/settings_schema_key.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/simple_action.rs b/src/auto/simple_action.rs index 6cf23e1a..3782f7b6 100644 --- a/src/auto/simple_action.rs +++ b/src/auto/simple_action.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -127,30 +127,35 @@ impl + IsA> SimpleActionExt for O { unsafe extern "C" fn activate_trampoline

(this: *mut ffi::GSimpleAction, parameter: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &Option) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(parameter)) } unsafe extern "C" fn change_state_trampoline

(this: *mut ffi::GSimpleAction, value: *mut glib_ffi::GVariant, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &Option) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(value)) } unsafe extern "C" fn notify_enabled_trampoline

(this: *mut ffi::GSimpleAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GSimpleAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_state_type_trampoline

(this: *mut ffi::GSimpleAction, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SimpleAction::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/simple_action_group.rs b/src/auto/simple_action_group.rs index 7b023995..2ddd2ceb 100644 --- a/src/auto/simple_action_group.rs +++ b/src/auto/simple_action_group.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/simple_i_o_stream.rs b/src/auto/simple_i_o_stream.rs index 8746940e..00705f1f 100644 --- a/src/auto/simple_i_o_stream.rs +++ b/src/auto/simple_i_o_stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/simple_permission.rs b/src/auto/simple_permission.rs index 60077fde..da439ffa 100644 --- a/src/auto/simple_permission.rs +++ b/src/auto/simple_permission.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/socket.rs b/src/auto/socket.rs index 12078e2e..c8271e16 100644 --- a/src/auto/socket.rs +++ b/src/auto/socket.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -563,78 +563,91 @@ impl + IsA> SocketExt for O { unsafe extern "C" fn notify_blocking_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_broadcast_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_keepalive_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_listen_backlog_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_local_address_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_multicast_loopback_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_multicast_ttl_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_protocol_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_remote_address_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_timeout_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_ttl_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_type_trampoline

(this: *mut ffi::GSocket, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Socket::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_address.rs b/src/auto/socket_address.rs index b4781096..417d2f9c 100644 --- a/src/auto/socket_address.rs +++ b/src/auto/socket_address.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -70,6 +70,7 @@ impl + IsA> SocketAddressExt for O { unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GSocketAddress, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketAddress::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_address_enumerator.rs b/src/auto/socket_address_enumerator.rs index 860847e2..29dd8e65 100644 --- a/src/auto/socket_address_enumerator.rs +++ b/src/auto/socket_address_enumerator.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -44,6 +44,7 @@ impl> SocketAddressEnumeratorExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn next_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_address_enumerator_next_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/socket_client.rs b/src/auto/socket_client.rs index ec2bff21..1594cf7d 100644 --- a/src/auto/socket_client.rs +++ b/src/auto/socket_client.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -157,6 +157,7 @@ impl + IsA> SocketClientExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -185,6 +186,7 @@ impl + IsA> SocketClientExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_to_host_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_host_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -213,6 +215,7 @@ impl + IsA> SocketClientExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_to_service_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_service_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -241,6 +244,7 @@ impl + IsA> SocketClientExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_to_uri_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_socket_client_connect_to_uri_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -459,30 +463,35 @@ impl + IsA> SocketClientExt for O { unsafe extern "C" fn event_trampoline

(this: *mut ffi::GSocketClient, event: ffi::GSocketClientEvent, connectable: *mut ffi::GSocketConnectable, connection: *mut ffi::GIOStream, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, SocketClientEvent, &SocketConnectable, &Option) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked(), from_glib(event), &from_glib_borrow(connectable), &from_glib_borrow(connection)) } unsafe extern "C" fn notify_enable_proxy_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_family_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_local_address_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_protocol_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } @@ -490,30 +499,35 @@ where P: IsA { #[cfg(any(feature = "v2_36", feature = "dox"))] unsafe extern "C" fn notify_proxy_resolver_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_timeout_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_tls_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_tls_validation_flags_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_type_trampoline

(this: *mut ffi::GSocketClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketClient::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_connectable.rs b/src/auto/socket_connectable.rs index 00a1f94a..5ed8226c 100644 --- a/src/auto/socket_connectable.rs +++ b/src/auto/socket_connectable.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/socket_connection.rs b/src/auto/socket_connection.rs index 08315fb2..ef16fff8 100644 --- a/src/auto/socket_connection.rs +++ b/src/auto/socket_connection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -78,6 +78,7 @@ impl + IsA> SocketConnectionExt f let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn connect_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_socket_connection_connect_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -129,6 +130,7 @@ impl + IsA> SocketConnectionExt f unsafe extern "C" fn notify_socket_trampoline

(this: *mut ffi::GSocketConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_listener.rs b/src/auto/socket_listener.rs index 6ef301a6..91031483 100644 --- a/src/auto/socket_listener.rs +++ b/src/auto/socket_listener.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -96,6 +96,7 @@ impl + IsA> SocketListenerExt for O let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn accept_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut source_object = ptr::null_mut(); let ret = ffi::g_socket_listener_accept_finish(_source_object as *mut _, res, &mut source_object, &mut error); @@ -208,12 +209,14 @@ impl + IsA> SocketListenerExt for O #[cfg(any(feature = "v2_46", feature = "dox"))] unsafe extern "C" fn event_trampoline

(this: *mut ffi::GSocketListener, event: ffi::GSocketListenerEvent, socket: *mut ffi::GSocket, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P, SocketListenerEvent, &Socket) + 'static) = transmute(f); f(&SocketListener::from_glib_borrow(this).downcast_unchecked(), from_glib(event), &from_glib_borrow(socket)) } unsafe extern "C" fn notify_listen_backlog_trampoline

(this: *mut ffi::GSocketListener, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketListener::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/socket_service.rs b/src/auto/socket_service.rs index 67a6de2e..c01b6d2b 100644 --- a/src/auto/socket_service.rs +++ b/src/auto/socket_service.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -118,6 +118,7 @@ impl + IsA> SocketServiceExt for O { unsafe extern "C" fn incoming_trampoline

(this: *mut ffi::GSocketService, connection: *mut ffi::GSocketConnection, source_object: *mut gobject_ffi::GObject, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &SocketConnection, &Option) -> bool + 'static) = transmute(f); f(&SocketService::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(connection), &from_glib_borrow(source_object)).to_glib() } @@ -125,6 +126,7 @@ where P: IsA { #[cfg(any(feature = "v2_46", feature = "dox"))] unsafe extern "C" fn notify_active_trampoline

(this: *mut ffi::GSocketService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&SocketService::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/srv_target.rs b/src/auto/srv_target.rs index 0c1a5166..4ac44f8a 100644 --- a/src/auto/srv_target.rs +++ b/src/auto/srv_target.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT diff --git a/src/auto/tcp_connection.rs b/src/auto/tcp_connection.rs index d05f5f7c..46e55b4d 100644 --- a/src/auto/tcp_connection.rs +++ b/src/auto/tcp_connection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -58,6 +58,7 @@ impl + IsA> TcpConnectionExt for O { unsafe extern "C" fn notify_graceful_disconnect_trampoline

(this: *mut ffi::GTcpConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TcpConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/themed_icon.rs b/src/auto/themed_icon.rs index 9a3aedf9..0b29d395 100644 --- a/src/auto/themed_icon.rs +++ b/src/auto/themed_icon.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -118,18 +118,21 @@ impl + IsA> ThemedIconExt for O { unsafe extern "C" fn notify_name_trampoline

(this: *mut ffi::GThemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThemedIcon::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_names_trampoline

(this: *mut ffi::GThemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThemedIcon::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_default_fallbacks_trampoline

(this: *mut ffi::GThemedIcon, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThemedIcon::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/threaded_socket_service.rs b/src/auto/threaded_socket_service.rs index 432e2ed6..f3035064 100644 --- a/src/auto/threaded_socket_service.rs +++ b/src/auto/threaded_socket_service.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -73,12 +73,14 @@ impl + IsA> ThreadedSocketSe unsafe extern "C" fn run_trampoline

(this: *mut ffi::GThreadedSocketService, connection: *mut ffi::GSocketConnection, source_object: *mut gobject_ffi::GObject, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &SocketConnection, &glib::Object) -> bool + 'static) = transmute(f); f(&ThreadedSocketService::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(connection), &from_glib_borrow(source_object)).to_glib() } unsafe extern "C" fn notify_max_threads_trampoline

(this: *mut ffi::GThreadedSocketService, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ThreadedSocketService::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_certificate.rs b/src/auto/tls_certificate.rs index b1b9eca4..83dcf631 100644 --- a/src/auto/tls_certificate.rs +++ b/src/auto/tls_certificate.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -171,30 +171,35 @@ impl + IsA> TlsCertificateExt for O unsafe extern "C" fn notify_certificate_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_certificate_pem_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_issuer_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_private_key_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_private_key_pem_trampoline

(this: *mut ffi::GTlsCertificate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsCertificate::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_client_connection.rs b/src/auto/tls_client_connection.rs index 29f9964c..8bdf6577 100644 --- a/src/auto/tls_client_connection.rs +++ b/src/auto/tls_client_connection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -151,24 +151,28 @@ impl + IsA> TlsClientConnectio unsafe extern "C" fn notify_accepted_cas_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_server_identity_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_ssl3_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_validation_flags_trampoline

(this: *mut ffi::GTlsClientConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsClientConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_connection.rs b/src/auto/tls_connection.rs index 095470c6..c8b3639e 100644 --- a/src/auto/tls_connection.rs +++ b/src/auto/tls_connection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -166,6 +166,7 @@ impl + IsA> TlsConnectionExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn handshake_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let _ = ffi::g_tls_connection_handshake_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }; @@ -307,60 +308,70 @@ impl + IsA> TlsConnectionExt for O { unsafe extern "C" fn accept_certificate_trampoline

(this: *mut ffi::GTlsConnection, peer_cert: *mut ffi::GTlsCertificate, errors: ffi::GTlsCertificateFlags, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { + callback_guard!(); let f: &&(Fn(&P, &TlsCertificate, TlsCertificateFlags) -> bool + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(peer_cert), from_glib(errors)).to_glib() } unsafe extern "C" fn notify_base_io_stream_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_certificate_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_database_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_interaction_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_peer_certificate_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_peer_certificate_errors_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_rehandshake_mode_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_require_close_notify_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_system_certdb_trampoline

(this: *mut ffi::GTlsConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_database.rs b/src/auto/tls_database.rs index bad8f3fe..9b70c458 100644 --- a/src/auto/tls_database.rs +++ b/src/auto/tls_database.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -73,6 +73,7 @@ impl> TlsDatabaseExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_certificate_for_handle_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_for_handle_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -105,6 +106,7 @@ impl> TlsDatabaseExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn lookup_certificate_issuer_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_database_lookup_certificate_issuer_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }; @@ -149,6 +151,7 @@ impl> TlsDatabaseExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn verify_chain_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_database_verify_chain_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/tls_file_database.rs b/src/auto/tls_file_database.rs index ab7d0d1d..907b0b2f 100644 --- a/src/auto/tls_file_database.rs +++ b/src/auto/tls_file_database.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -73,6 +73,7 @@ impl + IsA> TlsFileDatabaseExt for unsafe extern "C" fn notify_anchors_trampoline

(this: *mut ffi::GTlsFileDatabase, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsFileDatabase::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_interaction.rs b/src/auto/tls_interaction.rs index 649af10c..72b1d442 100644 --- a/src/auto/tls_interaction.rs +++ b/src/auto/tls_interaction.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -60,6 +60,7 @@ impl> TlsInteractionExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn ask_password_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_interaction_ask_password_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib(ret)) } else { Err(from_glib_full(error)) }; @@ -111,6 +112,7 @@ impl> TlsInteractionExt for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn request_certificate_async_trampoline) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let ret = ffi::g_tls_interaction_request_certificate_finish(_source_object as *mut _, res, &mut error); let result = if error.is_null() { Ok(from_glib(ret)) } else { Err(from_glib_full(error)) }; diff --git a/src/auto/tls_password.rs b/src/auto/tls_password.rs index 468efb7c..587a39a6 100644 --- a/src/auto/tls_password.rs +++ b/src/auto/tls_password.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -123,18 +123,21 @@ impl + IsA> TlsPasswordExt for O { unsafe extern "C" fn notify_description_trampoline

(this: *mut ffi::GTlsPassword, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsPassword::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_flags_trampoline

(this: *mut ffi::GTlsPassword, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsPassword::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_warning_trampoline

(this: *mut ffi::GTlsPassword, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsPassword::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/tls_server_connection.rs b/src/auto/tls_server_connection.rs index aee8899c..51268a5b 100644 --- a/src/auto/tls_server_connection.rs +++ b/src/auto/tls_server_connection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ bd67955) +// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) // from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70) // DO NOT EDIT @@ -77,6 +77,7 @@ impl + IsA> TlsServerConnectio unsafe extern "C" fn notify_authentication_mode_trampoline

(this: *mut ffi::GTlsServerConnection, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { + callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&TlsServerConnection::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/input_stream.rs b/src/input_stream.rs index 80cdd614..1c8b734e 100644 --- a/src/input_stream.rs +++ b/src/input_stream.rs @@ -77,6 +77,8 @@ impl> InputStreamExtManual for O { let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn read_all_async_trampoline + Send + 'static, Q: FnOnce(Result<(B, usize, Option), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); + let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; @@ -112,6 +114,7 @@ impl> InputStreamExtManual for O { let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn read_async_trampoline + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; diff --git a/src/lib.rs b/src/lib.rs index a4ca2f7b..b92fe51c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,8 @@ #[macro_use] extern crate bitflags; #[macro_use] +extern crate lazy_static; +#[macro_use] extern crate glib; extern crate gio_sys as ffi; @@ -12,6 +14,12 @@ extern crate glib_sys as glib_ffi; extern crate gobject_sys as gobject_ffi; extern crate libc; +macro_rules! callback_guard { + () => ( + let _guard = ::glib::CallbackGuard::new(); + ) +} + mod application; mod input_stream; mod memory_input_stream; diff --git a/src/output_stream.rs b/src/output_stream.rs index 60f1454b..606fa5db 100644 --- a/src/output_stream.rs +++ b/src/output_stream.rs @@ -34,6 +34,7 @@ impl> OutputStreamExtManual for O { let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn write_async_trampoline + Send + 'static, Q:FnOnce(Result<(B, usize), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; @@ -65,6 +66,7 @@ impl> OutputStreamExtManual for O { let user_data: Box, Box)>> = Box::new(Some((Box::new(callback), buffer))); unsafe extern "C" fn write_all_async_trampoline + Send + 'static, Q: FnOnce(Result<(B, usize, Option), (B, Error)>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut user_data: Box, Box)>> = Box::from_raw(user_data as *mut _); let (callback, buffer) = user_data.take().unwrap(); let buffer = *buffer; diff --git a/src/socket.rs b/src/socket.rs index df5c3210..332eff72 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -209,11 +209,13 @@ impl> SocketExtManual for O { #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] unsafe extern "C" fn trampoline(socket: *mut ffi::GSocket, condition: glib_ffi::GIOCondition, func: glib_ffi::gpointer) -> glib_ffi::gboolean { + callback_guard!(); let func: &RefCell glib::Continue + 'static>> = transmute(func); (&mut *func.borrow_mut())(&from_glib_borrow(socket), from_glib(condition)).to_glib() } unsafe extern "C" fn destroy_closure(ptr: glib_ffi::gpointer) { + callback_guard!(); Box:: glib::Continue + 'static>>>::from_raw(ptr as *mut _); } diff --git a/src/socket_listener.rs b/src/socket_listener.rs index dcee9fa8..66977c9c 100644 --- a/src/socket_listener.rs +++ b/src/socket_listener.rs @@ -25,6 +25,7 @@ impl> SocketListenerExtManual for O { let user_data: Box> = Box::new(Box::new(callback)); unsafe extern "C" fn accept_socket_async_trampoline), Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut ffi::GAsyncResult, user_data: glib_ffi::gpointer) { + callback_guard!(); let mut error = ptr::null_mut(); let mut source_object = ptr::null_mut(); let res = ffi::g_socket_listener_accept_socket_finish(_source_object as *mut _, res, &mut source_object, &mut error);