From f85ba7168d4e144ac194354f965d3f6a3beae141 Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 23 Jun 2018 12:49:31 +0300 Subject: [PATCH 1/3] Update submodules --- gir | 2 +- gir-files | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gir b/gir index c530bb94e4..9eab494254 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit c530bb94e4bae7f31a626d3ae2924b6b237a639b +Subproject commit 9eab494254d574bbcb72c6987562cfef40f88717 diff --git a/gir-files b/gir-files index a788da4cc8..47c69e69d9 160000 --- a/gir-files +++ b/gir-files @@ -1 +1 @@ -Subproject commit a788da4cc8e013eb9164d626211894438f7e4ef1 +Subproject commit 47c69e69d993acdeaa286ea690cd06044e46380c From d95c9e191b0190054d231fedb46bb56bfd80642b Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 23 Jun 2018 12:52:33 +0300 Subject: [PATCH 2/3] Remove callback_guard from manual parts --- check_init_asserts | 3 +-- src/assistant.rs | 2 -- src/clipboard.rs | 2 -- src/rt.rs | 9 --------- src/signal.rs | 10 ---------- 5 files changed, 1 insertion(+), 25 deletions(-) diff --git a/check_init_asserts b/check_init_asserts index 005c1ce2c4..09f3b5b149 100755 --- a/check_init_asserts +++ b/check_init_asserts @@ -10,8 +10,7 @@ while (/^(\N*)\V*fn\s+(\w+)\s*(<[^(]+>)?\s*(\([^{;]+)\{\N*\n^(\N*)$/gms) { $first_line =~ /^\s*( assert_initialized_main_thread | assert_not_initialized | - skip_assert_initialized | - callback_guard + skip_assert_initialized )!\(\)/x) { print "$ARGV: $name$signature\n"; $e = 1 diff --git a/src/assistant.rs b/src/assistant.rs index 0485113665..49034f03d6 100644 --- a/src/assistant.rs +++ b/src/assistant.rs @@ -21,12 +21,10 @@ impl> AssistantExtManual for O { } unsafe extern "C" fn forward_page_trampoline(current_page: i32, f: glib_ffi::gpointer) -> i32 { - callback_guard!(); let f: &&(Fn(i32) -> i32 + 'static) = transmute(f); f(current_page) } unsafe extern "C" fn destroy_closure(ptr: glib_ffi::gpointer) { - callback_guard!(); Box_:: i32 + 'static>>::from_raw(ptr as *mut _); } diff --git a/src/clipboard.rs b/src/clipboard.rs index f0f8228613..8a3d36d20e 100644 --- a/src/clipboard.rs +++ b/src/clipboard.rs @@ -46,13 +46,11 @@ impl> ClipboardExtManual for O { } unsafe extern "C" fn trampoline(clipboard: *mut ffi::GtkClipboard, selection_data: *mut ffi::GtkSelectionData, info: c_uint, user_data: gpointer) { - callback_guard!(); let f: &&(Fn(&Clipboard, &SelectionData, u32) + 'static) = transmute(user_data); f(&from_glib_borrow(clipboard), &from_glib_borrow(selection_data), info); } unsafe extern "C" fn cleanup(_clipboard: *mut ffi::GtkClipboard, user_data: gpointer) { - callback_guard!(); Box_::>::from_raw(user_data as *mut _); } diff --git a/src/rt.rs b/src/rt.rs index 0089dd08bf..f58dc7f092 100644 --- a/src/rt.rs +++ b/src/rt.rs @@ -47,15 +47,6 @@ macro_rules! assert_not_initialized { ) } -macro_rules! callback_guard { - () => ( - let _guard = ::glib::CallbackGuard::new(); - if cfg!(debug_assertions) { - assert_initialized_main_thread!(); - } - ) -} - /// Returns `true` if GTK has been initialized. #[inline] pub fn is_initialized() -> bool { diff --git a/src/signal.rs b/src/signal.rs index a8c64f1df8..1daf466f6a 100644 --- a/src/signal.rs +++ b/src/signal.rs @@ -23,13 +23,11 @@ use { // idle_add and timeout_add fixed to the main thread unsafe extern "C" fn trampoline(func: gpointer) -> gboolean { - callback_guard!(); let func: &RefCell Continue + 'static>> = transmute(func); (&mut *func.borrow_mut())().to_glib() } unsafe extern "C" fn destroy_closure(ptr: gpointer) { - callback_guard!(); Box:: Continue + 'static>>>::from_raw(ptr as *mut _); } @@ -150,7 +148,6 @@ mod editable { unsafe extern "C" fn trampoline(this: *mut GtkEditable, f: &&(Fn(&T) + 'static)) where T: IsA { - callback_guard!(); f(&Editable::from_glib_borrow(this).downcast_unchecked()); } @@ -159,7 +156,6 @@ mod editable { end_pos: c_int, f: &&(Fn(&T, i32, i32) + 'static)) where T: IsA { - callback_guard!(); f(&Editable::from_glib_borrow(this).downcast_unchecked(), start_pos, end_pos); } @@ -169,7 +165,6 @@ mod editable { position: *mut c_int, f: &&(Fn(&T, &str, &mut i32) + 'static)) where T: IsA { - callback_guard!(); let buf = if new_text_length != -1 { slice::from_raw_parts(new_text as *mut c_uchar, new_text_length as usize) @@ -263,7 +258,6 @@ mod spin_button { unsafe extern "C" fn change_trampoline(this: *mut GtkSpinButton, scroll: ScrollType, f: &&(Fn(&SpinButton, ScrollType) + 'static)) { - callback_guard!(); f(&from_glib_borrow(this), scroll) } @@ -271,7 +265,6 @@ mod spin_button { new_value: *mut c_double, f: &&(Fn(&SpinButton) -> Option> + 'static)) -> c_int { - callback_guard!(); match f(&from_glib_borrow(this)) { Some(Ok(v)) => { *new_value = v; @@ -285,13 +278,11 @@ mod spin_button { unsafe extern "C" fn output_trampoline(this: *mut GtkSpinButton, f: &&(Fn(&SpinButton) -> Inhibit + 'static)) -> gboolean { - callback_guard!(); f(&from_glib_borrow(this)).to_glib() } unsafe extern "C" fn trampoline(this: *mut GtkSpinButton, f: &&(Fn(&SpinButton) + 'static)) { - callback_guard!(); f(&from_glib_borrow(this)) } } @@ -344,7 +335,6 @@ mod overlay { where T: IsA + IsA, { - callback_guard!(); let f: &&(Fn(&T, &Widget) -> Option + 'static) = transmute(f); match f( &Overlay::from_glib_borrow(this).downcast_unchecked(), From fad29591c44ebb80351f918a06b34930d7fa37ad Mon Sep 17 00:00:00 2001 From: Evgenii Pashkin Date: Sat, 23 Jun 2018 12:52:59 +0300 Subject: [PATCH 3/3] Regen --- src/auto/about_dialog.rs | 16 ----- src/auto/accel_group.rs | 3 - src/auto/actionable.rs | 1 - src/auto/adjustment.rs | 8 --- src/auto/alignment.rs | 8 --- src/auto/app_chooser_button.rs | 4 -- src/auto/app_chooser_dialog.rs | 2 - src/auto/app_chooser_widget.rs | 9 --- src/auto/application.rs | 6 -- src/auto/application_window.rs | 1 - src/auto/arrow.rs | 2 - src/auto/aspect_frame.rs | 4 -- src/auto/assistant.rs | 6 -- src/auto/box_.rs | 3 - src/auto/builder.rs | 1 - src/auto/button.rs | 11 --- src/auto/button_box.rs | 1 - src/auto/calendar.rs | 17 ----- src/auto/cell_area.rs | 7 -- src/auto/cell_area_box.rs | 1 - src/auto/cell_area_context.rs | 5 -- src/auto/cell_editable.rs | 3 - src/auto/cell_renderer.rs | 17 ----- src/auto/cell_renderer_accel.rs | 6 -- src/auto/cell_renderer_combo.rs | 4 -- src/auto/cell_renderer_pixbuf.rs | 9 --- src/auto/cell_renderer_progress.rs | 6 -- src/auto/cell_renderer_spin.rs | 3 - src/auto/cell_renderer_spinner.rs | 3 - src/auto/cell_renderer_text.rs | 45 ------------ src/auto/cell_renderer_toggle.rs | 6 -- src/auto/cell_view.rs | 8 --- src/auto/check_menu_item.rs | 4 -- src/auto/color_button.rs | 6 -- src/auto/color_chooser.rs | 3 - src/auto/color_chooser_dialog.rs | 1 - src/auto/color_chooser_widget.rs | 1 - src/auto/combo_box.rs | 21 ------ src/auto/container.rs | 7 -- src/auto/css_provider.rs | 1 - src/auto/dialog.rs | 3 - src/auto/entry.rs | 62 ----------------- src/auto/entry_completion.rs | 14 ---- src/auto/event_box.rs | 2 - src/auto/event_controller.rs | 2 - src/auto/expander.rs | 9 --- src/auto/file_chooser.rs | 16 ----- src/auto/file_chooser_button.rs | 4 -- src/auto/file_chooser_native.rs | 2 - src/auto/file_chooser_widget.rs | 14 ---- src/auto/flow_box.rs | 14 ---- src/auto/flow_box_child.rs | 1 - src/auto/font_button.rs | 7 -- src/auto/font_chooser.rs | 5 -- src/auto/frame.rs | 5 -- src/auto/gesture.rs | 2 - src/auto/gesture_drag.rs | 3 - src/auto/gesture_long_press.rs | 3 - src/auto/gesture_multi_press.rs | 3 - src/auto/gesture_pan.rs | 2 - src/auto/gesture_rotate.rs | 1 - src/auto/gesture_single.rs | 3 - src/auto/gesture_swipe.rs | 1 - src/auto/gesture_zoom.rs | 1 - src/auto/gl_area.rs | 9 --- src/auto/grid.rs | 5 -- src/auto/header_bar.rs | 8 --- src/auto/icon_info.rs | 3 - src/auto/icon_theme.rs | 1 - src/auto/icon_view.rs | 25 ------- src/auto/im_context.rs | 8 --- src/auto/image.rs | 11 --- src/auto/image_menu_item.rs | 4 -- src/auto/info_bar.rs | 5 -- src/auto/invisible.rs | 1 - src/auto/label.rs | 27 -------- src/auto/layout.rs | 2 - src/auto/level_bar.rs | 6 -- src/auto/link_button.rs | 3 - src/auto/list_box.rs | 10 --- src/auto/list_box_row.rs | 3 - src/auto/lock_button.rs | 6 -- src/auto/menu.rs | 13 ---- src/auto/menu_bar.rs | 2 - src/auto/menu_button.rs | 6 -- src/auto/menu_item.rs | 10 --- src/auto/menu_shell.rs | 9 --- src/auto/menu_tool_button.rs | 2 - src/auto/message_dialog.rs | 8 --- src/auto/misc.rs | 4 -- src/auto/model_button.rs | 8 --- src/auto/mount_operation.rs | 3 - src/auto/native_dialog.rs | 5 -- src/auto/notebook.rs | 17 ----- src/auto/orientable.rs | 1 - src/auto/pad_controller.rs | 2 - src/auto/paned.rs | 11 --- src/auto/places_sidebar.rs | 21 ------ src/auto/plug.rs | 3 - src/auto/popover.rs | 7 -- src/auto/popover_menu.rs | 1 - src/auto/print_operation.rs | 29 -------- src/auto/print_operation_preview.rs | 2 - src/auto/progress_bar.rs | 6 -- src/auto/radio_button.rs | 1 - src/auto/radio_menu_item.rs | 1 - src/auto/range.rs | 12 ---- src/auto/recent_chooser.rs | 12 ---- src/auto/recent_manager.rs | 3 - src/auto/revealer.rs | 4 -- src/auto/scale.rs | 5 -- src/auto/scale_button.rs | 7 -- src/auto/scrollable.rs | 4 -- src/auto/scrolled_window.rs | 19 ------ src/auto/search_bar.rs | 2 - src/auto/search_entry.rs | 4 -- src/auto/separator_tool_item.rs | 1 - src/auto/settings.rs | 82 ---------------------- src/auto/shortcuts_window.rs | 4 -- src/auto/size_group.rs | 2 - src/auto/socket.rs | 2 - src/auto/spin_button.rs | 8 --- src/auto/spinner.rs | 1 - src/auto/stack.rs | 9 --- src/auto/stack_sidebar.rs | 1 - src/auto/stack_switcher.rs | 2 - src/auto/status_icon.rs | 22 ------ src/auto/statusbar.rs | 2 - src/auto/style_context.rs | 5 -- src/auto/switch.rs | 4 -- src/auto/text_buffer.rs | 18 ----- src/auto/text_mark.rs | 2 - src/auto/text_tag.rs | 70 ------------------- src/auto/text_tag_table.rs | 3 - src/auto/text_view.rs | 37 ---------- src/auto/toggle_button.rs | 4 -- src/auto/toggle_tool_button.rs | 2 - src/auto/tool_button.rs | 7 -- src/auto/tool_item.rs | 5 -- src/auto/tool_item_group.rs | 5 -- src/auto/tool_palette.rs | 3 - src/auto/toolbar.rs | 8 --- src/auto/tree_model.rs | 4 -- src/auto/tree_model_filter.rs | 1 - src/auto/tree_selection.rs | 2 - src/auto/tree_sortable.rs | 1 - src/auto/tree_view.rs | 34 ---------- src/auto/tree_view_column.rs | 20 ------ src/auto/versions.txt | 6 +- src/auto/viewport.rs | 1 - src/auto/volume_button.rs | 1 - src/auto/widget.rs | 102 ---------------------------- src/auto/window.rs | 38 ----------- src/switch.rs | 1 - src/text_buffer.rs | 1 - src/tree_model_filter.rs | 2 - src/tree_sortable.rs | 2 - src/widget.rs | 3 - 158 files changed, 2 insertions(+), 1356 deletions(-) diff --git a/src/auto/about_dialog.rs b/src/auto/about_dialog.rs index 760a2c81de..289b7f975c 100644 --- a/src/auto/about_dialog.rs +++ b/src/auto/about_dialog.rs @@ -481,112 +481,96 @@ impl + IsA> AboutDialogExt for O { unsafe extern "C" fn activate_link_trampoline

(this: *mut ffi::GtkAboutDialog, uri: *mut libc::c_char, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &str) -> Inhibit + 'static) = transmute(f); f(&AboutDialog::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(uri)).to_glib() } unsafe extern "C" fn notify_artists_trampoline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(this: *mut ffi::GtkAboutDialog, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AboutDialog::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/accel_group.rs b/src/auto/accel_group.rs index f702d308aa..1ec70e9f8a 100644 --- a/src/auto/accel_group.rs +++ b/src/auto/accel_group.rs @@ -158,21 +158,18 @@ impl + IsA> AccelGroupExt for O { unsafe extern "C" fn accel_activate_trampoline

(this: *mut ffi::GtkAccelGroup, acceleratable: *mut gobject_ffi::GObject, keyval: libc::c_uint, modifier: gdk_ffi::GdkModifierType, f: glib_ffi::gpointer) -> glib_ffi::gboolean where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &glib::Object, u32, gdk::ModifierType) -> bool + 'static) = transmute(f); f(&AccelGroup::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(acceleratable), keyval, from_glib(modifier)).to_glib() } unsafe extern "C" fn notify_is_locked_trampoline

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

(this: *mut ffi::GtkAccelGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AccelGroup::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/actionable.rs b/src/auto/actionable.rs index b946048cbe..a64e438f1d 100644 --- a/src/auto/actionable.rs +++ b/src/auto/actionable.rs @@ -90,7 +90,6 @@ impl + IsA> ActionableExt for O { unsafe extern "C" fn notify_action_name_trampoline

(this: *mut ffi::GtkActionable, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Actionable::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/adjustment.rs b/src/auto/adjustment.rs index bdc796afdd..d8e5775459 100644 --- a/src/auto/adjustment.rs +++ b/src/auto/adjustment.rs @@ -257,56 +257,48 @@ impl + IsA> AdjustmentExt for O { unsafe extern "C" fn changed_trampoline

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

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

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

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

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

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

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

(this: *mut ffi::GtkAdjustment, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Adjustment::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/alignment.rs b/src/auto/alignment.rs index 3188087236..3108b08ae6 100644 --- a/src/auto/alignment.rs +++ b/src/auto/alignment.rs @@ -326,56 +326,48 @@ impl + IsA> AlignmentExt for O { unsafe extern "C" fn notify_bottom_padding_trampoline

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

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

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

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

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

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

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

(this: *mut ffi::GtkAlignment, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Alignment::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/app_chooser_button.rs b/src/auto/app_chooser_button.rs index b734e9980c..b6dc49219b 100644 --- a/src/auto/app_chooser_button.rs +++ b/src/auto/app_chooser_button.rs @@ -161,28 +161,24 @@ impl + IsA> AppChooserButtonExt f unsafe extern "C" fn custom_item_activated_trampoline

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

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

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

(this: *mut ffi::GtkAppChooserButton, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AppChooserButton::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/app_chooser_dialog.rs b/src/auto/app_chooser_dialog.rs index 283f40c577..ae233c8ddc 100644 --- a/src/auto/app_chooser_dialog.rs +++ b/src/auto/app_chooser_dialog.rs @@ -115,14 +115,12 @@ impl + IsA> AppChooserDialogExt f unsafe extern "C" fn notify_gfile_trampoline

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

(this: *mut ffi::GtkAppChooserDialog, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AppChooserDialog::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/app_chooser_widget.rs b/src/auto/app_chooser_widget.rs index ae7f801f58..245d0c5459 100644 --- a/src/auto/app_chooser_widget.rs +++ b/src/auto/app_chooser_widget.rs @@ -234,63 +234,54 @@ impl + IsA> AppChooserWidgetExt f unsafe extern "C" fn application_activated_trampoline

(this: *mut ffi::GtkAppChooserWidget, application: *mut gio_ffi::GAppInfo, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &gio::AppInfo) + 'static) = transmute(f); f(&AppChooserWidget::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(application)) } unsafe extern "C" fn application_selected_trampoline

(this: *mut ffi::GtkAppChooserWidget, application: *mut gio_ffi::GAppInfo, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &gio::AppInfo) + 'static) = transmute(f); f(&AppChooserWidget::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(application)) } unsafe extern "C" fn populate_popup_trampoline

(this: *mut ffi::GtkAppChooserWidget, menu: *mut ffi::GtkMenu, application: *mut gio_ffi::GAppInfo, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Menu, &gio::AppInfo) + 'static) = transmute(f); f(&AppChooserWidget::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(menu), &from_glib_borrow(application)) } unsafe extern "C" fn notify_default_text_trampoline

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

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

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

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

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

(this: *mut ffi::GtkAppChooserWidget, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AppChooserWidget::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/application.rs b/src/auto/application.rs index 95c9b05b2f..bc454ce252 100644 --- a/src/auto/application.rs +++ b/src/auto/application.rs @@ -318,42 +318,36 @@ impl + IsA> GtkApplicationExt for O { unsafe extern "C" fn window_added_trampoline

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

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

(this: *mut ffi::GtkApplication, _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_app_menu_trampoline

(this: *mut ffi::GtkApplication, _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_menubar_trampoline

(this: *mut ffi::GtkApplication, _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_register_session_trampoline

(this: *mut ffi::GtkApplication, _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/application_window.rs b/src/auto/application_window.rs index a70b75eb72..d3c9a08147 100644 --- a/src/auto/application_window.rs +++ b/src/auto/application_window.rs @@ -105,7 +105,6 @@ impl + IsA> ApplicationWindowExt unsafe extern "C" fn notify_show_menubar_trampoline

(this: *mut ffi::GtkApplicationWindow, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&ApplicationWindow::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/arrow.rs b/src/auto/arrow.rs index ac65bf4ec1..6bba5b9fcb 100644 --- a/src/auto/arrow.rs +++ b/src/auto/arrow.rs @@ -112,14 +112,12 @@ impl + IsA> ArrowExt for O { unsafe extern "C" fn notify_arrow_type_trampoline

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

(this: *mut ffi::GtkArrow, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Arrow::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/aspect_frame.rs b/src/auto/aspect_frame.rs index dd6d0fd124..eddad84a2a 100644 --- a/src/auto/aspect_frame.rs +++ b/src/auto/aspect_frame.rs @@ -168,28 +168,24 @@ impl + IsA> AspectFrameExt for O { unsafe extern "C" fn notify_obey_child_trampoline

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

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

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

(this: *mut ffi::GtkAspectFrame, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&AspectFrame::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/assistant.rs b/src/auto/assistant.rs index 7c17033399..060d12c7a3 100644 --- a/src/auto/assistant.rs +++ b/src/auto/assistant.rs @@ -392,35 +392,30 @@ impl + IsA + IsA + glib::obje unsafe extern "C" fn apply_trampoline

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

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

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

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

(this: *mut ffi::GtkAssistant, page: *mut ffi::GtkWidget, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P, &Widget) + 'static) = transmute(f); f(&Assistant::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(page)) } @@ -428,7 +423,6 @@ where P: IsA { #[cfg(any(feature = "v3_12", feature = "dox"))] unsafe extern "C" fn notify_use_header_bar_trampoline

(this: *mut ffi::GtkAssistant, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Assistant::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/box_.rs b/src/auto/box_.rs index fb1d7cdb80..aed1fbc518 100644 --- a/src/auto/box_.rs +++ b/src/auto/box_.rs @@ -307,21 +307,18 @@ impl + IsA + IsA> BoxExt for O { #[cfg(any(feature = "v3_10", feature = "dox"))] unsafe extern "C" fn notify_baseline_position_trampoline

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

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

(this: *mut ffi::GtkBox, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Box::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/builder.rs b/src/auto/builder.rs index a27755eed9..07664e15e5 100644 --- a/src/auto/builder.rs +++ b/src/auto/builder.rs @@ -246,7 +246,6 @@ impl + IsA> BuilderExt for O { unsafe extern "C" fn notify_translation_domain_trampoline

(this: *mut ffi::GtkBuilder, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { - callback_guard!(); let f: &&(Fn(&P) + 'static) = transmute(f); f(&Builder::from_glib_borrow(this).downcast_unchecked()) } diff --git a/src/auto/button.rs b/src/auto/button.rs index 24226ccea7..226c1cb715 100644 --- a/src/auto/button.rs +++ b/src/auto/button.rs @@ -433,14 +433,12 @@ impl + IsA + glib::object::ObjectExt> Butto unsafe extern "C" fn activate_trampoline

(this: *mut ffi::GtkButton, f: glib_ffi::gpointer) where P: IsA