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

Changes as part of gtk-rs/gir#354 #154

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 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 (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use Display;
Expand Down
10 changes: 5 additions & 5 deletions src/auto/cursor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use CursorType;
Expand Down Expand Up @@ -28,14 +28,14 @@ impl Cursor {
pub fn new(cursor_type: CursorType) -> Cursor {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::gdk_cursor_new(cursor_type.to_glib()))
from_glib_full(ffi::gdk_cursor_new(cursor_type))
}
}

pub fn new_for_display(display: &Display, cursor_type: CursorType) -> Cursor {
skip_assert_initialized!();
unsafe {
from_glib_full(ffi::gdk_cursor_new_for_display(display.to_glib_none().0, cursor_type.to_glib()))
from_glib_full(ffi::gdk_cursor_new_for_display(display.to_glib_none().0, cursor_type))
}
}

Expand Down Expand Up @@ -80,7 +80,7 @@ pub trait CursorExt {
impl<O: IsA<Cursor> + IsA<glib::object::Object>> CursorExt for O {
fn get_cursor_type(&self) -> CursorType {
unsafe {
from_glib(ffi::gdk_cursor_get_cursor_type(self.to_glib_none().0))
ffi::gdk_cursor_get_cursor_type(self.to_glib_none().0)
}
}

Expand Down Expand Up @@ -110,7 +110,7 @@ impl<O: IsA<Cursor> + IsA<glib::object::Object>> CursorExt for O {
let mut value = Value::from(&0);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "cursor-type".to_glib_none().0, value.to_glib_none_mut().0);
from_glib(transmute(value.get::<i32>().unwrap()))
transmute(value.get::<i32>().unwrap())
}
}

Expand Down
30 changes: 15 additions & 15 deletions src/auto/device.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use Atom;
Expand Down Expand Up @@ -165,7 +165,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
#[cfg(feature = "v3_22")]
fn get_axes(&self) -> AxisFlags {
unsafe {
from_glib(ffi::gdk_device_get_axes(self.to_glib_none().0))
ffi::gdk_device_get_axes(self.to_glib_none().0)
}
}

Expand All @@ -175,7 +175,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {

fn get_axis_use(&self, index_: u32) -> AxisUse {
unsafe {
from_glib(ffi::gdk_device_get_axis_use(self.to_glib_none().0, index_))
ffi::gdk_device_get_axis_use(self.to_glib_none().0, index_)
}
}

Expand All @@ -185,7 +185,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {

fn get_device_type(&self) -> DeviceType {
unsafe {
from_glib(ffi::gdk_device_get_device_type(self.to_glib_none().0))
ffi::gdk_device_get_device_type(self.to_glib_none().0)
}
}

Expand All @@ -210,7 +210,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
let mut keyval = mem::uninitialized();
let mut modifiers = mem::uninitialized();
let ret = from_glib(ffi::gdk_device_get_key(self.to_glib_none().0, index_, &mut keyval, &mut modifiers));
if ret { Some((keyval, from_glib(modifiers))) } else { None }
if ret { Some((keyval, modifiers)) } else { None }
}
}

Expand All @@ -223,7 +223,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {

fn get_mode(&self) -> InputMode {
unsafe {
from_glib(ffi::gdk_device_get_mode(self.to_glib_none().0))
ffi::gdk_device_get_mode(self.to_glib_none().0)
}
}

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

fn get_source(&self) -> InputSource {
unsafe {
from_glib(ffi::gdk_device_get_source(self.to_glib_none().0))
ffi::gdk_device_get_source(self.to_glib_none().0)
}
}

Expand Down Expand Up @@ -319,7 +319,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
let cursor = cursor.into();
let cursor = cursor.to_glib_none();
unsafe {
from_glib(ffi::gdk_device_grab(self.to_glib_none().0, window.to_glib_none().0, grab_ownership.to_glib(), owner_events.to_glib(), event_mask.to_glib(), cursor.0, time_))
ffi::gdk_device_grab(self.to_glib_none().0, window.to_glib_none().0, grab_ownership, owner_events.to_glib(), event_mask, cursor.0, time_)
}
}

Expand All @@ -337,19 +337,19 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {

fn set_axis_use(&self, index_: u32, use_: AxisUse) {
unsafe {
ffi::gdk_device_set_axis_use(self.to_glib_none().0, index_, use_.to_glib());
ffi::gdk_device_set_axis_use(self.to_glib_none().0, index_, use_);
}
}

fn set_key(&self, index_: u32, keyval: u32, modifiers: ModifierType) {
unsafe {
ffi::gdk_device_set_key(self.to_glib_none().0, index_, keyval, modifiers.to_glib());
ffi::gdk_device_set_key(self.to_glib_none().0, index_, keyval, modifiers);
}
}

fn set_mode(&self, mode: InputMode) -> bool {
unsafe {
from_glib(ffi::gdk_device_set_mode(self.to_glib_none().0, mode.to_glib()))
from_glib(ffi::gdk_device_set_mode(self.to_glib_none().0, mode))
}
}

Expand Down Expand Up @@ -377,12 +377,12 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
let mut value = Value::from(&0);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "input-mode".to_glib_none().0, value.to_glib_none_mut().0);
from_glib(transmute(value.get::<i32>().unwrap()))
transmute(value.get::<i32>().unwrap())
}
}

fn set_property_input_mode(&self, input_mode: InputMode) {
let input_mode = input_mode.to_glib() as i32;
let input_mode = input_mode as i32;
unsafe {
gobject_ffi::g_object_set_property(self.to_glib_none().0, "input-mode".to_glib_none().0, Value::from(&input_mode).to_glib_none().0);
}
Expand All @@ -392,7 +392,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
let mut value = Value::from(&0);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "input-source".to_glib_none().0, value.to_glib_none_mut().0);
from_glib(transmute(value.get::<i32>().unwrap()))
transmute(value.get::<i32>().unwrap())
}
}

Expand Down Expand Up @@ -425,7 +425,7 @@ impl<O: IsA<Device> + IsA<glib::object::Object>> DeviceExt for O {
let mut value = Value::from(&0);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "type".to_glib_none().0, value.to_glib_none_mut().0);
from_glib(transmute(value.get::<i32>().unwrap()))
transmute(value.get::<i32>().unwrap())
}
}

Expand Down
4 changes: 2 additions & 2 deletions 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 (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use Device;
Expand Down Expand Up @@ -55,7 +55,7 @@ impl<O: IsA<DeviceManager> + IsA<glib::object::Object>> DeviceManagerExt for O {

fn list_devices(&self, type_: DeviceType) -> Vec<Device> {
unsafe {
FromGlibPtrContainer::from_glib_container(ffi::gdk_device_manager_list_devices(self.to_glib_none().0, type_.to_glib()))
FromGlibPtrContainer::from_glib_container(ffi::gdk_device_manager_list_devices(self.to_glib_none().0, type_))
}
}

Expand Down
8 changes: 4 additions & 4 deletions 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 (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use AxisFlags;
Expand Down Expand Up @@ -56,15 +56,15 @@ impl<O: IsA<DeviceTool> + IsA<glib::object::Object>> DeviceToolExt for O {
#[cfg(feature = "v3_22")]
fn get_tool_type(&self) -> DeviceToolType {
unsafe {
from_glib(ffi::gdk_device_tool_get_tool_type(self.to_glib_none().0))
ffi::gdk_device_tool_get_tool_type(self.to_glib_none().0)
}
}

fn get_property_axes(&self) -> AxisFlags {
let mut value = Value::from(&0u32);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "axes".to_glib_none().0, value.to_glib_none_mut().0);
from_glib(transmute(value.get::<u32>().unwrap()))
transmute(value.get::<u32>().unwrap())
}
}

Expand All @@ -88,7 +88,7 @@ impl<O: IsA<DeviceTool> + IsA<glib::object::Object>> DeviceToolExt for O {
let mut value = Value::from(&0);
unsafe {
gobject_ffi::g_object_get_property(self.to_glib_none().0, "tool-type".to_glib_none().0, value.to_glib_none_mut().0);
from_glib(transmute(value.get::<i32>().unwrap()))
transmute(value.get::<i32>().unwrap())
}
}
}
4 changes: 2 additions & 2 deletions src/auto/display.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use AppLaunchContext;
Expand Down Expand Up @@ -293,7 +293,7 @@ impl<O: IsA<Display> + IsA<glib::object::Object>> DisplayExt for O {
let mut y = mem::uninitialized();
let mut mask = mem::uninitialized();
ffi::gdk_display_get_pointer(self.to_glib_none().0, &mut screen, &mut x, &mut y, &mut mask);
(from_glib_none(screen), x, y, from_glib(mask))
(from_glib_none(screen), x, y, mask)
}
}

Expand Down
2 changes: 1 addition & 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 (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use Display;
Expand Down
16 changes: 8 additions & 8 deletions 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 (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

use Atom;
Expand Down Expand Up @@ -77,7 +77,7 @@ pub trait DragContextExt {
impl<O: IsA<DragContext> + IsA<glib::object::Object>> DragContextExt for O {
fn get_actions(&self) -> DragAction {
unsafe {
from_glib(ffi::gdk_drag_context_get_actions(self.to_glib_none().0))
ffi::gdk_drag_context_get_actions(self.to_glib_none().0)
}
}

Expand All @@ -102,13 +102,13 @@ impl<O: IsA<DragContext> + IsA<glib::object::Object>> DragContextExt for O {

fn get_protocol(&self) -> DragProtocol {
unsafe {
from_glib(ffi::gdk_drag_context_get_protocol(self.to_glib_none().0))
ffi::gdk_drag_context_get_protocol(self.to_glib_none().0)
}
}

fn get_selected_action(&self) -> DragAction {
unsafe {
from_glib(ffi::gdk_drag_context_get_selected_action(self.to_glib_none().0))
ffi::gdk_drag_context_get_selected_action(self.to_glib_none().0)
}
}

Expand All @@ -120,7 +120,7 @@ impl<O: IsA<DragContext> + IsA<glib::object::Object>> DragContextExt for O {

fn get_suggested_action(&self) -> DragAction {
unsafe {
from_glib(ffi::gdk_drag_context_get_suggested_action(self.to_glib_none().0))
ffi::gdk_drag_context_get_suggested_action(self.to_glib_none().0)
}
}

Expand All @@ -133,7 +133,7 @@ impl<O: IsA<DragContext> + IsA<glib::object::Object>> DragContextExt for O {
#[cfg(feature = "v3_20")]
fn manage_dnd(&self, ipc_window: &Window, actions: DragAction) -> bool {
unsafe {
from_glib(ffi::gdk_drag_context_manage_dnd(self.to_glib_none().0, ipc_window.to_glib_none().0, actions.to_glib()))
from_glib(ffi::gdk_drag_context_manage_dnd(self.to_glib_none().0, ipc_window.to_glib_none().0, actions))
}
}

Expand Down Expand Up @@ -192,15 +192,15 @@ unsafe extern "C" fn action_changed_trampoline<P>(this: *mut ffi::GdkDragContext
where P: IsA<DragContext> {
callback_guard!();
let f: &Box_<Fn(&P, DragAction) + 'static> = transmute(f);
f(&DragContext::from_glib_none(this).downcast_unchecked(), from_glib(action))
f(&DragContext::from_glib_none(this).downcast_unchecked(), action)
}

#[cfg(feature = "v3_20")]
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: &Box_<Fn(&P, DragCancelReason) + 'static> = transmute(f);
f(&DragContext::from_glib_none(this).downcast_unchecked(), from_glib(reason))
f(&DragContext::from_glib_none(this).downcast_unchecked(), reason)
}

#[cfg(feature = "v3_20")]
Expand Down
2 changes: 1 addition & 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 (d121f7e) from gir-files (71d73f0)
// This file was generated by gir (add4ad6) from gir-files (0bcaef9)
// DO NOT EDIT

#[cfg(feature = "v3_22")]
Expand Down
Loading