Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Revert "Remove callback_guard" #208

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/auto/app_launch_context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -125,6 +125,7 @@ impl<O: IsA<AppLaunchContext> + IsA<glib::object::Object>> AppLaunchContextExt f

unsafe extern "C" fn notify_display_trampoline<P>(this: *mut ffi::GdkAppLaunchContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<AppLaunchContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&AppLaunchContext::from_glib_borrow(this).downcast_unchecked())
}
4 changes: 3 additions & 1 deletion src/auto/cursor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -131,12 +131,14 @@ impl<O: IsA<Cursor> + IsA<glib::object::Object>> CursorExt for O {

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

unsafe extern "C" fn notify_display_trampoline<P>(this: *mut ffi::GdkCursor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Cursor> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Cursor::from_glib_borrow(this).downcast_unchecked())
}
19 changes: 18 additions & 1 deletion src/auto/device.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -616,109 +616,126 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {

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

#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn tool_changed_trampoline<P>(this: *mut ffi::GdkDevice, tool: *mut ffi::GdkDeviceTool, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P, &DeviceTool) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(tool))
}

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

#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn notify_axes_trampoline<P>(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked())
}

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

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

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

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

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

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

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

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn notify_num_touches_trampoline<P>(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_16", feature = "dox"))]
unsafe extern "C" fn notify_product_id_trampoline<P>(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn notify_seat_trampoline<P>(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn notify_tool_trampoline<P>(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked())
}

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

#[cfg(any(feature = "v3_16", feature = "dox"))]
unsafe extern "C" fn notify_vendor_id_trampoline<P>(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Device> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Device::from_glib_borrow(this).downcast_unchecked())
}
6 changes: 5 additions & 1 deletion src/auto/device_manager.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -99,24 +99,28 @@ impl<O: IsA<DeviceManager> + IsA<glib::object::Object>> DeviceManagerExt for O {

unsafe extern "C" fn device_added_trampoline<P>(this: *mut ffi::GdkDeviceManager, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer)
where P: IsA<DeviceManager> {
callback_guard!();
let f: &&(Fn(&P, &Device) + 'static) = transmute(f);
f(&DeviceManager::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(device))
}

unsafe extern "C" fn device_changed_trampoline<P>(this: *mut ffi::GdkDeviceManager, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer)
where P: IsA<DeviceManager> {
callback_guard!();
let f: &&(Fn(&P, &Device) + 'static) = transmute(f);
f(&DeviceManager::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(device))
}

unsafe extern "C" fn device_removed_trampoline<P>(this: *mut ffi::GdkDeviceManager, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer)
where P: IsA<DeviceManager> {
callback_guard!();
let f: &&(Fn(&P, &Device) + 'static) = transmute(f);
f(&DeviceManager::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(device))
}

unsafe extern "C" fn notify_display_trampoline<P>(this: *mut ffi::GdkDeviceManager, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<DeviceManager> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&DeviceManager::from_glib_borrow(this).downcast_unchecked())
}
6 changes: 5 additions & 1 deletion src/auto/device_tool.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -144,24 +144,28 @@ impl<O: IsA<DeviceTool> + IsA<glib::object::Object>> DeviceToolExt for O {

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

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

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

unsafe extern "C" fn notify_tool_type_trampoline<P>(this: *mut ffi::GdkDeviceTool, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<DeviceTool> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&DeviceTool::from_glib_borrow(this).downcast_unchecked())
}
8 changes: 7 additions & 1 deletion src/auto/display.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -531,40 +531,46 @@ impl<O: IsA<Display> + IsA<glib::object::Object>> DisplayExt for O {

unsafe extern "C" fn closed_trampoline<P>(this: *mut ffi::GdkDisplay, is_error: glib_ffi::gboolean, f: glib_ffi::gpointer)
where P: IsA<Display> {
callback_guard!();
let f: &&(Fn(&P, bool) + 'static) = transmute(f);
f(&Display::from_glib_borrow(this).downcast_unchecked(), from_glib(is_error))
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn monitor_added_trampoline<P>(this: *mut ffi::GdkDisplay, monitor: *mut ffi::GdkMonitor, f: glib_ffi::gpointer)
where P: IsA<Display> {
callback_guard!();
let f: &&(Fn(&P, &Monitor) + 'static) = transmute(f);
f(&Display::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(monitor))
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn monitor_removed_trampoline<P>(this: *mut ffi::GdkDisplay, monitor: *mut ffi::GdkMonitor, f: glib_ffi::gpointer)
where P: IsA<Display> {
callback_guard!();
let f: &&(Fn(&P, &Monitor) + 'static) = transmute(f);
f(&Display::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(monitor))
}

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

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn seat_added_trampoline<P>(this: *mut ffi::GdkDisplay, seat: *mut ffi::GdkSeat, f: glib_ffi::gpointer)
where P: IsA<Display> {
callback_guard!();
let f: &&(Fn(&P, &Seat) + 'static) = transmute(f);
f(&Display::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(seat))
}

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn seat_removed_trampoline<P>(this: *mut ffi::GdkDisplay, seat: *mut ffi::GdkSeat, f: glib_ffi::gpointer)
where P: IsA<Display> {
callback_guard!();
let f: &&(Fn(&P, &Seat) + 'static) = transmute(f);
f(&Display::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(seat))
}
4 changes: 3 additions & 1 deletion src/auto/display_manager.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -92,12 +92,14 @@ impl<O: IsA<DisplayManager> + IsA<glib::object::Object>> DisplayManagerExt for O

unsafe extern "C" fn display_opened_trampoline<P>(this: *mut ffi::GdkDisplayManager, display: *mut ffi::GdkDisplay, f: glib_ffi::gpointer)
where P: IsA<DisplayManager> {
callback_guard!();
let f: &&(Fn(&P, &Display) + 'static) = transmute(f);
f(&DisplayManager::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(display))
}

unsafe extern "C" fn notify_default_display_trampoline<P>(this: *mut ffi::GdkDisplayManager, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<DisplayManager> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&DisplayManager::from_glib_borrow(this).downcast_unchecked())
}
6 changes: 5 additions & 1 deletion src/auto/drag_context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -195,27 +195,31 @@ impl<O: IsA<DragContext> + IsA<glib::object::Object>> DragContextExt for O {
#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn action_changed_trampoline<P>(this: *mut ffi::GdkDragContext, action: ffi::GdkDragAction, f: glib_ffi::gpointer)
where P: IsA<DragContext> {
callback_guard!();
let f: &&(Fn(&P, DragAction) + 'static) = transmute(f);
f(&DragContext::from_glib_borrow(this).downcast_unchecked(), from_glib(action))
}

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn cancel_trampoline<P>(this: *mut ffi::GdkDragContext, reason: ffi::GdkDragCancelReason, f: glib_ffi::gpointer)
where P: IsA<DragContext> {
callback_guard!();
let f: &&(Fn(&P, DragCancelReason) + 'static) = transmute(f);
f(&DragContext::from_glib_borrow(this).downcast_unchecked(), from_glib(reason))
}

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn dnd_finished_trampoline<P>(this: *mut ffi::GdkDragContext, f: glib_ffi::gpointer)
where P: IsA<DragContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&DragContext::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_20", feature = "dox"))]
unsafe extern "C" fn drop_performed_trampoline<P>(this: *mut ffi::GdkDragContext, time: libc::c_int, f: glib_ffi::gpointer)
where P: IsA<DragContext> {
callback_guard!();
let f: &&(Fn(&P, i32) + 'static) = transmute(f);
f(&DragContext::from_glib_borrow(this).downcast_unchecked(), time)
}
4 changes: 3 additions & 1 deletion src/auto/drawing_context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down Expand Up @@ -104,13 +104,15 @@ impl<O: IsA<DrawingContext> + IsA<glib::object::Object>> DrawingContextExt for O
#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn notify_clip_trampoline<P>(this: *mut ffi::GdkDrawingContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<DrawingContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&DrawingContext::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_22", feature = "dox"))]
unsafe extern "C" fn notify_window_trampoline<P>(this: *mut ffi::GdkDrawingContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<DrawingContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&DrawingContext::from_glib_borrow(this).downcast_unchecked())
}
2 changes: 1 addition & 1 deletion src/auto/enums.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down
2 changes: 1 addition & 1 deletion src/auto/flags.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// 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

Expand Down
Loading