From d384b508a184df17a19128041068602da8bc9fba Mon Sep 17 00:00:00 2001 From: Xiang Fan Date: Sat, 2 Mar 2019 13:53:28 +0800 Subject: [PATCH] graphene: Remove unused files --- src/atom.rs | 221 --- src/auto/app_launch_context.rs | 69 - src/auto/cursor.rs | 91 - src/auto/device.rs | 466 ----- src/auto/device_manager.rs | 91 - src/auto/device_pad.rs | 71 - src/auto/device_tool.rs | 82 - src/auto/display.rs | 387 ---- src/auto/display_manager.rs | 87 - src/auto/drag_context.rs | 180 -- src/auto/drawing_context.rs | 72 - src/auto/enums.rs | 3083 -------------------------------- src/auto/event_sequence.rs | 17 - src/auto/flags.rs | 677 ------- src/auto/frame_clock.rs | 212 --- src/auto/frame_timings.rs | 37 - src/auto/functions.rs | 424 ----- src/auto/gl_context.rs | 162 -- src/auto/mod.rs | 147 -- src/auto/monitor.rs | 396 ---- src/auto/screen.rs | 337 ---- src/auto/seat.rs | 173 -- src/auto/versions.txt | 2 - src/auto/visual.rs | 152 -- src/auto/window.rs | 1428 --------------- src/cairo_interaction.rs | 117 -- src/change_data.rs | 40 - src/device.rs | 14 - src/device_manager.rs | 13 - src/drag_context.rs | 99 - src/enums.rs | 2281 ----------------------- src/event.rs | 480 ----- src/event_button.rs | 52 - src/event_configure.rs | 25 - src/event_crossing.rs | 50 - src/event_dnd.rs | 28 - src/event_expose.rs | 28 - src/event_focus.rs | 18 - src/event_grab_broken.rs | 26 - src/event_key.rs | 45 - src/event_motion.rs | 56 - src/event_owner_change.rs | 34 - src/event_pad_axis.rs | 34 - src/event_pad_button.rs | 30 - src/event_pad_group_mode.rs | 26 - src/event_property.rs | 26 - src/event_proximity.rs | 22 - src/event_scroll.rs | 53 - src/event_selection.rs | 34 - src/event_setting.rs | 23 - src/event_touch.rs | 58 - src/event_touchpad_pinch.rs | 56 - src/event_touchpad_swipe.rs | 48 - src/event_visibility.rs | 18 - src/event_window_state.rs | 22 - src/frame_clock.rs | 19 - src/frame_timings.rs | 40 - src/functions.rs | 67 - src/geometry.rs | 70 - src/keys.rs | 28 - src/lib.rs | 127 -- src/prelude.rs | 2 - src/rectangle.rs | 163 -- src/rgba.rs | 214 --- src/rt.rs | 80 - src/screen.rs | 33 - src/visual.rs | 22 - src/window.rs | 213 --- 68 files changed, 13998 deletions(-) delete mode 100644 src/atom.rs delete mode 100644 src/auto/app_launch_context.rs delete mode 100644 src/auto/cursor.rs delete mode 100644 src/auto/device.rs delete mode 100644 src/auto/device_manager.rs delete mode 100644 src/auto/device_pad.rs delete mode 100644 src/auto/device_tool.rs delete mode 100644 src/auto/display.rs delete mode 100644 src/auto/display_manager.rs delete mode 100644 src/auto/drag_context.rs delete mode 100644 src/auto/drawing_context.rs delete mode 100644 src/auto/enums.rs delete mode 100644 src/auto/event_sequence.rs delete mode 100644 src/auto/flags.rs delete mode 100644 src/auto/frame_clock.rs delete mode 100644 src/auto/frame_timings.rs delete mode 100644 src/auto/functions.rs delete mode 100644 src/auto/gl_context.rs delete mode 100644 src/auto/mod.rs delete mode 100644 src/auto/monitor.rs delete mode 100644 src/auto/screen.rs delete mode 100644 src/auto/seat.rs delete mode 100644 src/auto/versions.txt delete mode 100644 src/auto/visual.rs delete mode 100644 src/auto/window.rs delete mode 100644 src/cairo_interaction.rs delete mode 100644 src/change_data.rs delete mode 100644 src/device.rs delete mode 100644 src/device_manager.rs delete mode 100644 src/drag_context.rs delete mode 100644 src/enums.rs delete mode 100644 src/event.rs delete mode 100644 src/event_button.rs delete mode 100644 src/event_configure.rs delete mode 100644 src/event_crossing.rs delete mode 100644 src/event_dnd.rs delete mode 100644 src/event_expose.rs delete mode 100644 src/event_focus.rs delete mode 100644 src/event_grab_broken.rs delete mode 100644 src/event_key.rs delete mode 100644 src/event_motion.rs delete mode 100644 src/event_owner_change.rs delete mode 100644 src/event_pad_axis.rs delete mode 100644 src/event_pad_button.rs delete mode 100644 src/event_pad_group_mode.rs delete mode 100644 src/event_property.rs delete mode 100644 src/event_proximity.rs delete mode 100644 src/event_scroll.rs delete mode 100644 src/event_selection.rs delete mode 100644 src/event_setting.rs delete mode 100644 src/event_touch.rs delete mode 100644 src/event_touchpad_pinch.rs delete mode 100644 src/event_touchpad_swipe.rs delete mode 100644 src/event_visibility.rs delete mode 100644 src/event_window_state.rs delete mode 100644 src/frame_clock.rs delete mode 100644 src/frame_timings.rs delete mode 100644 src/functions.rs delete mode 100644 src/geometry.rs delete mode 100644 src/keys.rs delete mode 100644 src/rectangle.rs delete mode 100644 src/rgba.rs delete mode 100644 src/rt.rs delete mode 100644 src/screen.rs delete mode 100644 src/visual.rs delete mode 100644 src/window.rs diff --git a/src/atom.rs b/src/atom.rs deleted file mode 100644 index 46e75af53fcd..000000000000 --- a/src/atom.rs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use ffi; -use glib::GString; -use glib_ffi; -use std::ptr; -use std::mem; -use glib::translate::*; - -#[derive(Copy, Clone, PartialEq, Eq)] -pub struct Atom(ffi::GdkAtom); - -pub const NONE: Atom = Atom(0 as *mut _); -pub const SELECTION_PRIMARY: Atom = Atom(1 as *mut _); -pub const SELECTION_SECONDARY: Atom = Atom(2 as *mut _); -pub const SELECTION_CLIPBOARD: Atom = Atom(69 as *mut _); -pub const TARGET_BITMAP: Atom = Atom(5 as *mut _); -pub const TARGET_COLORMAP: Atom = Atom(7 as *mut _); -pub const TARGET_DRAWABLE: Atom = Atom(17 as *mut _); -pub const TARGET_PIXMAP: Atom = Atom(20 as *mut _); -pub const TARGET_STRING: Atom = Atom(31 as *mut _); -pub const SELECTION_TYPE_ATOM: Atom = Atom(4 as *mut _); -pub const SELECTION_TYPE_BITMAP: Atom = Atom(5 as *mut _); -pub const SELECTION_TYPE_COLORMAP: Atom = Atom(7 as *mut _); -pub const SELECTION_TYPE_DRAWABLE: Atom = Atom(17 as *mut _); -pub const SELECTION_TYPE_INTEGER: Atom = Atom(19 as *mut _); -pub const SELECTION_TYPE_PIXMAP: Atom = Atom(20 as *mut _); -pub const SELECTION_TYPE_WINDOW: Atom = Atom(33 as *mut _); -pub const SELECTION_TYPE_STRING: Atom = Atom(31 as *mut _); - -impl Atom { - pub fn intern(atom_name: &str) -> Atom { - assert_initialized_main_thread!(); - unsafe { Atom(ffi::gdk_atom_intern(atom_name.to_glib_none().0, false.to_glib())) } - } - - pub fn name(self) -> GString { - unsafe { from_glib_full(ffi::gdk_atom_name(self.0)) } - } - - pub unsafe fn value(self) -> usize { - self.0 as usize - } -} - -impl GlibPtrDefault for Atom { - type GlibType = ffi::GdkAtom; -} - -#[doc(hidden)] -impl Uninitialized for Atom { - #[inline] - unsafe fn uninitialized() -> Self { - mem::uninitialized() - } -} - -impl<'a> ToGlibPtr<'a, ffi::GdkAtom> for Atom { - type Storage = (); - - #[inline] - fn to_glib_none(&self) -> Stash<'a, ffi::GdkAtom, Atom> { - Stash(self.0, ()) - } -} - -impl<'a> ToGlibPtrMut<'a, *mut ffi::GdkAtom> for Atom { - type Storage = (); - - #[inline] - fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GdkAtom, Atom> { - StashMut(&mut self.0, ()) - } -} - -impl<'a> ToGlibContainerFromSlice<'a, *mut ffi::GdkAtom> for &'a Atom { - type Storage = (Vec>, Option>); - - fn to_glib_none_from_slice(t: &'a [&'a Atom]) -> (*mut ffi::GdkAtom, Self::Storage) { - skip_assert_initialized!(); - - let v: Vec<_> = t.iter().map(|s| s.to_glib_none()).collect(); - let mut v_ptr: Vec<_> = v.iter().map(|s| s.0).collect(); - v_ptr.push(ptr::null_mut()); - - (v_ptr.as_ptr() as *mut ffi::GdkAtom, (v, Some(v_ptr))) - } - - fn to_glib_container_from_slice(t: &'a [&'a Atom]) -> (*mut ffi::GdkAtom, Self::Storage) { - skip_assert_initialized!(); - - let v: Vec<_> = t.iter().map(|s| s.to_glib_none()).collect(); - - let v_ptr = unsafe { - let v_ptr = glib_ffi::g_malloc0(mem::size_of::() * (t.len() + 1)) as *mut ffi::GdkAtom; - - for (i, s) in v.iter().enumerate() { - ptr::write(v_ptr.offset(i as isize), s.0); - } - - v_ptr - }; - - (v_ptr, (v, None)) - } - - fn to_glib_full_from_slice(_: &[&'a Atom]) -> *mut ffi::GdkAtom { - skip_assert_initialized!(); - - unimplemented!() - } -} - -impl<'a> ToGlibContainerFromSlice<'a, *const ffi::GdkAtom> for &'a Atom { - type Storage = (Vec>, Option>); - - fn to_glib_none_from_slice(t: &'a [&'a Atom]) -> (*const ffi::GdkAtom, Self::Storage) { - skip_assert_initialized!(); - - let v: Vec<_> = t.iter().map(|s| s.to_glib_none()).collect(); - let mut v_ptr: Vec<_> = v.iter().map(|s| s.0).collect(); - v_ptr.push(ptr::null_mut()); - - (v_ptr.as_ptr() as *const ffi::GdkAtom, (v, Some(v_ptr))) - } - - fn to_glib_container_from_slice(t: &'a [&'a Atom]) -> (*const ffi::GdkAtom, Self::Storage) { - skip_assert_initialized!(); - - let v: Vec<_> = t.iter().map(|s| s.to_glib_none()).collect(); - - let v_ptr = unsafe { - let v_ptr = glib_ffi::g_malloc0(mem::size_of::() * (t.len() + 1)) as *mut ffi::GdkAtom; - - for (i, s) in v.iter().enumerate() { - ptr::write(v_ptr.offset(i as isize), s.0); - } - - v_ptr as *const ffi::GdkAtom - }; - - (v_ptr, (v, None)) - } - - fn to_glib_full_from_slice(_: &[&'a Atom]) -> *const ffi::GdkAtom { - skip_assert_initialized!(); - - unimplemented!() - } -} - -impl FromGlibPtrNone for Atom { - #[inline] - unsafe fn from_glib_none(ptr: ffi::GdkAtom) -> Atom { Atom(ptr) } -} - -impl FromGlibPtrBorrow for Atom { - #[inline] - unsafe fn from_glib_borrow(ptr: ffi::GdkAtom) -> Atom { Atom(ptr) } -} - -impl FromGlibPtrFull for Atom { - #[inline] - unsafe fn from_glib_full(_: ffi::GdkAtom) -> Atom { unimplemented!() } -} - -impl FromGlibContainerAsVec for Atom { - unsafe fn from_glib_none_num_as_vec(ptr: *mut ffi::GdkAtom, num: usize) -> Vec { - if num == 0 || ptr.is_null() { - return Vec::new(); - } - - let mut res = Vec::with_capacity(num); - for i in 0..num { - res.push(from_glib_none(ptr::read(ptr.offset(i as isize)))); - } - res - } - - unsafe fn from_glib_container_num_as_vec(ptr: *mut ffi::GdkAtom, num: usize) -> Vec { - let res = FromGlibContainerAsVec::from_glib_none_num_as_vec(ptr, num); - glib_ffi::g_free(ptr as *mut _); - res - } - - unsafe fn from_glib_full_num_as_vec(ptr: *mut ffi::GdkAtom, num: usize) -> Vec { - if num == 0 || ptr.is_null() { - return Vec::new(); - } - - let mut res = Vec::with_capacity(num); - for i in 0..num { - res.push(from_glib_full(ptr::read(ptr.offset(i as isize)))); - } - glib_ffi::g_free(ptr as *mut _); - res - } -} - -impl FromGlibPtrArrayContainerAsVec for Atom { - unsafe fn from_glib_none_as_vec(ptr: *mut ffi::GdkAtom) -> Vec { - FromGlibContainerAsVec::from_glib_none_num_as_vec(ptr, c_ptr_array_len(ptr)) - } - - unsafe fn from_glib_container_as_vec(ptr: *mut ffi::GdkAtom) -> Vec { - FromGlibContainerAsVec::from_glib_container_num_as_vec(ptr, c_ptr_array_len(ptr)) - } - - unsafe fn from_glib_full_as_vec(ptr: *mut ffi::GdkAtom) -> Vec { - FromGlibContainerAsVec::from_glib_full_num_as_vec(ptr, c_ptr_array_len(ptr)) - } -} - -impl<'a> From<&'a str> for Atom { - fn from(r: &'a str) -> Atom { - skip_assert_initialized!(); - Atom::intern(r) - } -} diff --git a/src/auto/app_launch_context.rs b/src/auto/app_launch_context.rs deleted file mode 100644 index c5c180457329..000000000000 --- a/src/auto/app_launch_context.rs +++ /dev/null @@ -1,69 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Display; -use Screen; -use ffi; -use gio; -use glib::StaticType; -use glib::Value; -use glib::object::IsA; -use glib::object::ObjectType; -use glib::translate::*; -use gobject_ffi; -use std::fmt; - -glib_wrapper! { - pub struct AppLaunchContext(Object) @extends gio::AppLaunchContext; - - match fn { - get_type => || ffi::gdk_app_launch_context_get_type(), - } -} - -impl AppLaunchContext { - pub fn set_desktop(&self, desktop: i32) { - unsafe { - ffi::gdk_app_launch_context_set_desktop(self.to_glib_none().0, desktop); - } - } - - pub fn set_icon>(&self, icon: Option<&P>) { - unsafe { - ffi::gdk_app_launch_context_set_icon(self.to_glib_none().0, icon.map(|p| p.as_ref()).to_glib_none().0); - } - } - - pub fn set_icon_name(&self, icon_name: Option<&str>) { - unsafe { - ffi::gdk_app_launch_context_set_icon_name(self.to_glib_none().0, icon_name.to_glib_none().0); - } - } - - pub fn set_screen(&self, screen: &Screen) { - unsafe { - ffi::gdk_app_launch_context_set_screen(self.to_glib_none().0, screen.to_glib_none().0); - } - } - - pub fn set_timestamp(&self, timestamp: u32) { - unsafe { - ffi::gdk_app_launch_context_set_timestamp(self.to_glib_none().0, timestamp); - } - } - - pub fn get_property_display(&self) -> Option { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"display\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get() - } - } -} - -impl fmt::Display for AppLaunchContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "AppLaunchContext") - } -} diff --git a/src/auto/cursor.rs b/src/auto/cursor.rs deleted file mode 100644 index 685399dc3f55..000000000000 --- a/src/auto/cursor.rs +++ /dev/null @@ -1,91 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use CursorType; -use Display; -use cairo; -use ffi; -use gdk_pixbuf; -use glib::translate::*; -use std::fmt; -use std::mem; - -glib_wrapper! { - pub struct Cursor(Object); - - match fn { - get_type => || ffi::gdk_cursor_get_type(), - } -} - -impl Cursor { - #[cfg_attr(feature = "v3_16", deprecated)] - pub fn new(cursor_type: CursorType) -> Cursor { - assert_initialized_main_thread!(); - unsafe { - from_glib_full(ffi::gdk_cursor_new(cursor_type.to_glib())) - } - } - - 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())) - } - } - - pub fn new_from_name(display: &Display, name: &str) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_cursor_new_from_name(display.to_glib_none().0, name.to_glib_none().0)) - } - } - - pub fn new_from_pixbuf(display: &Display, pixbuf: &gdk_pixbuf::Pixbuf, x: i32, y: i32) -> Cursor { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_cursor_new_from_pixbuf(display.to_glib_none().0, pixbuf.to_glib_none().0, x, y)) - } - } - - pub fn new_from_surface(display: &Display, surface: &cairo::Surface, x: f64, y: f64) -> Cursor { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_cursor_new_from_surface(display.to_glib_none().0, mut_override(surface.to_glib_none().0), x, y)) - } - } - - pub fn get_cursor_type(&self) -> CursorType { - unsafe { - from_glib(ffi::gdk_cursor_get_cursor_type(self.to_glib_none().0)) - } - } - - pub fn get_display(&self) -> Display { - unsafe { - from_glib_none(ffi::gdk_cursor_get_display(self.to_glib_none().0)) - } - } - - pub fn get_image(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_cursor_get_image(self.to_glib_none().0)) - } - } - - pub fn get_surface(&self) -> (Option, f64, f64) { - unsafe { - let mut x_hot = mem::uninitialized(); - let mut y_hot = mem::uninitialized(); - let ret = from_glib_full(ffi::gdk_cursor_get_surface(self.to_glib_none().0, &mut x_hot, &mut y_hot)); - (ret, x_hot, y_hot) - } - } -} - -impl fmt::Display for Cursor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Cursor") - } -} diff --git a/src/auto/device.rs b/src/auto/device.rs deleted file mode 100644 index 81135b0d76bc..000000000000 --- a/src/auto/device.rs +++ /dev/null @@ -1,466 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Atom; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use AxisFlags; -use AxisUse; -use Cursor; -use DeviceManager; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use DeviceTool; -use DeviceType; -use Display; -use EventMask; -use GrabOwnership; -use GrabStatus; -use InputMode; -use InputSource; -use ModifierType; -use Screen; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Seat; -use Window; -use ffi; -use glib::GString; -use glib::StaticType; -use glib::Value; -use glib::object::IsA; -use glib::object::ObjectType; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem; -use std::mem::transmute; -use std::ptr; - -glib_wrapper! { - pub struct Device(Object); - - match fn { - get_type => || ffi::gdk_device_get_type(), - } -} - -impl Device { - pub fn get_associated_device(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_get_associated_device(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_axes(&self) -> AxisFlags { - unsafe { - from_glib(ffi::gdk_device_get_axes(self.to_glib_none().0)) - } - } - - //pub fn get_axis(&self, axes: &[f64], use_: AxisUse) -> Option { - // unsafe { TODO: call ffi::gdk_device_get_axis() } - //} - - pub fn get_axis_use(&self, index_: u32) -> AxisUse { - unsafe { - from_glib(ffi::gdk_device_get_axis_use(self.to_glib_none().0, index_)) - } - } - - //pub fn get_axis_value(&self, axes: &[f64], axis_label: &Atom) -> Option { - // unsafe { TODO: call ffi::gdk_device_get_axis_value() } - //} - - pub fn get_device_type(&self) -> DeviceType { - unsafe { - from_glib(ffi::gdk_device_get_device_type(self.to_glib_none().0)) - } - } - - pub fn get_display(&self) -> Display { - unsafe { - from_glib_none(ffi::gdk_device_get_display(self.to_glib_none().0)) - } - } - - pub fn get_has_cursor(&self) -> bool { - unsafe { - from_glib(ffi::gdk_device_get_has_cursor(self.to_glib_none().0)) - } - } - - //pub fn get_history>(&self, window: &P, start: u32, stop: u32, events: /*Ignored*/Vec) -> Option { - // unsafe { TODO: call ffi::gdk_device_get_history() } - //} - - pub fn get_key(&self, index_: u32) -> Option<(u32, ModifierType)> { - unsafe { - 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 } - } - } - - pub fn get_last_event_window(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_get_last_event_window(self.to_glib_none().0)) - } - } - - pub fn get_mode(&self) -> InputMode { - unsafe { - from_glib(ffi::gdk_device_get_mode(self.to_glib_none().0)) - } - } - - pub fn get_n_axes(&self) -> i32 { - unsafe { - ffi::gdk_device_get_n_axes(self.to_glib_none().0) - } - } - - pub fn get_n_keys(&self) -> i32 { - unsafe { - ffi::gdk_device_get_n_keys(self.to_glib_none().0) - } - } - - pub fn get_name(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_get_name(self.to_glib_none().0)) - } - } - - pub fn get_position(&self) -> (Screen, i32, i32) { - unsafe { - let mut screen = ptr::null_mut(); - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - ffi::gdk_device_get_position(self.to_glib_none().0, &mut screen, &mut x, &mut y); - (from_glib_none(screen), x, y) - } - } - - pub fn get_position_double(&self) -> (Screen, f64, f64) { - unsafe { - let mut screen = ptr::null_mut(); - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - ffi::gdk_device_get_position_double(self.to_glib_none().0, &mut screen, &mut x, &mut y); - (from_glib_none(screen), x, y) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_product_id(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_get_product_id(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_seat(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_get_seat(self.to_glib_none().0)) - } - } - - pub fn get_source(&self) -> InputSource { - unsafe { - from_glib(ffi::gdk_device_get_source(self.to_glib_none().0)) - } - } - - //pub fn get_state>(&self, window: &P, axes: &[f64]) -> ModifierType { - // unsafe { TODO: call ffi::gdk_device_get_state() } - //} - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_vendor_id(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_get_vendor_id(self.to_glib_none().0)) - } - } - - pub fn get_window_at_position(&self) -> (Option, i32, i32) { - unsafe { - let mut win_x = mem::uninitialized(); - let mut win_y = mem::uninitialized(); - let ret = from_glib_none(ffi::gdk_device_get_window_at_position(self.to_glib_none().0, &mut win_x, &mut win_y)); - (ret, win_x, win_y) - } - } - - pub fn get_window_at_position_double(&self) -> (Option, f64, f64) { - unsafe { - let mut win_x = mem::uninitialized(); - let mut win_y = mem::uninitialized(); - let ret = from_glib_none(ffi::gdk_device_get_window_at_position_double(self.to_glib_none().0, &mut win_x, &mut win_y)); - (ret, win_x, win_y) - } - } - - #[cfg_attr(feature = "v3_20", deprecated)] - pub fn grab>(&self, window: &P, grab_ownership: GrabOwnership, owner_events: bool, event_mask: EventMask, cursor: Option<&Cursor>, time_: u32) -> GrabStatus { - unsafe { - from_glib(ffi::gdk_device_grab(self.to_glib_none().0, window.as_ref().to_glib_none().0, grab_ownership.to_glib(), owner_events.to_glib(), event_mask.to_glib(), cursor.to_glib_none().0, time_)) - } - } - - pub fn list_axes(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_device_list_axes(self.to_glib_none().0)) - } - } - - pub fn list_slave_devices(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_device_list_slave_devices(self.to_glib_none().0)) - } - } - - pub 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()); - } - } - - pub 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()); - } - } - - pub fn set_mode(&self, mode: InputMode) -> bool { - unsafe { - from_glib(ffi::gdk_device_set_mode(self.to_glib_none().0, mode.to_glib())) - } - } - - #[cfg_attr(feature = "v3_20", deprecated)] - pub fn ungrab(&self, time_: u32) { - unsafe { - ffi::gdk_device_ungrab(self.to_glib_none().0, time_); - } - } - - pub fn warp(&self, screen: &Screen, x: i32, y: i32) { - unsafe { - ffi::gdk_device_warp(self.to_glib_none().0, screen.to_glib_none().0, x, y); - } - } - - pub fn get_property_device_manager(&self) -> Option { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"device-manager\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get() - } - } - - pub fn get_property_input_mode(&self) -> InputMode { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - pub fn set_property_input_mode(&self, input_mode: InputMode) { - unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-mode\0".as_ptr() as *const _, Value::from(&input_mode).to_glib_none().0); - } - } - - pub fn get_property_input_source(&self) -> InputSource { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-source\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_property_num_touches(&self) -> u32 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"num-touches\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn set_property_seat(&self, seat: Option<&Seat>) { - unsafe { - gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"seat\0".as_ptr() as *const _, Value::from(seat).to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_property_tool(&self) -> Option { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"tool\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get() - } - } - - pub fn get_property_type(&self) -> DeviceType { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"type\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - //pub fn free_history(events: /*Ignored*/&[&TimeCoord]) { - // unsafe { TODO: call ffi::gdk_device_free_history() } - //} - - #[cfg_attr(feature = "v3_16", deprecated)] - pub fn grab_info_libgtk_only(display: &Display, device: &Device) -> Option<(Window, bool)> { - skip_assert_initialized!(); - unsafe { - let mut grab_window = ptr::null_mut(); - let mut owner_events = mem::uninitialized(); - let ret = from_glib(ffi::gdk_device_grab_info_libgtk_only(display.to_glib_none().0, device.to_glib_none().0, &mut grab_window, &mut owner_events)); - if ret { Some((from_glib_none(grab_window), from_glib(owner_events))) } else { None } - } - } - - pub fn connect_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, - Some(transmute(changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_tool_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"tool-changed\0".as_ptr() as *const _, - Some(transmute(tool_changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_associated_device_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::associated-device\0".as_ptr() as *const _, - Some(transmute(notify_associated_device_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_property_axes_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::axes\0".as_ptr() as *const _, - Some(transmute(notify_axes_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_input_mode_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::input-mode\0".as_ptr() as *const _, - Some(transmute(notify_input_mode_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_n_axes_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::n-axes\0".as_ptr() as *const _, - Some(transmute(notify_n_axes_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_property_seat_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::seat\0".as_ptr() as *const _, - Some(transmute(notify_seat_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_property_tool_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::tool\0".as_ptr() as *const _, - Some(transmute(notify_tool_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_type_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::type\0".as_ptr() as *const _, - Some(transmute(notify_type_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn changed_trampoline(this: *mut ffi::GdkDevice, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn tool_changed_trampoline(this: *mut ffi::GdkDevice, tool: *mut ffi::GdkDeviceTool, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(tool)) -} - -unsafe extern "C" fn notify_associated_device_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn notify_axes_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn notify_input_mode_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn notify_n_axes_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn notify_seat_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn notify_tool_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn notify_type_trampoline(this: *mut ffi::GdkDevice, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -impl fmt::Display for Device { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Device") - } -} diff --git a/src/auto/device_manager.rs b/src/auto/device_manager.rs deleted file mode 100644 index 7f108a17219f..000000000000 --- a/src/auto/device_manager.rs +++ /dev/null @@ -1,91 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Device; -use DeviceType; -use Display; -use ffi; -use glib::object::ObjectType; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; - -glib_wrapper! { - pub struct DeviceManager(Object); - - match fn { - get_type => || ffi::gdk_device_manager_get_type(), - } -} - -impl DeviceManager { - #[cfg_attr(feature = "v3_20", deprecated)] - pub fn get_client_pointer(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_manager_get_client_pointer(self.to_glib_none().0)) - } - } - - pub fn get_display(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_device_manager_get_display(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_20", deprecated)] - pub fn list_devices(&self, type_: DeviceType) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_device_manager_list_devices(self.to_glib_none().0, type_.to_glib())) - } - } - - pub fn connect_device_added(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"device-added\0".as_ptr() as *const _, - Some(transmute(device_added_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_device_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"device-changed\0".as_ptr() as *const _, - Some(transmute(device_changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_device_removed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"device-removed\0".as_ptr() as *const _, - Some(transmute(device_removed_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn device_added_trampoline(this: *mut ffi::GdkDeviceManager, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(device)) -} - -unsafe extern "C" fn device_changed_trampoline(this: *mut ffi::GdkDeviceManager, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(device)) -} - -unsafe extern "C" fn device_removed_trampoline(this: *mut ffi::GdkDeviceManager, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(device)) -} - -impl fmt::Display for DeviceManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DeviceManager") - } -} diff --git a/src/auto/device_pad.rs b/src/auto/device_pad.rs deleted file mode 100644 index fa9152110ab8..000000000000 --- a/src/auto/device_pad.rs +++ /dev/null @@ -1,71 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Device; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use DevicePadFeature; -use ffi; -use glib::object::IsA; -use glib::translate::*; -use std::fmt; - -glib_wrapper! { - pub struct DevicePad(Interface) @requires Device; - - match fn { - get_type => || ffi::gdk_device_pad_get_type(), - } -} - -pub const NONE_DEVICE_PAD: Option<&DevicePad> = None; - -pub trait DevicePadExt: 'static { - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_feature_group(&self, feature: DevicePadFeature, feature_idx: i32) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_group_n_modes(&self, group_idx: i32) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_n_features(&self, feature: DevicePadFeature) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_n_groups(&self) -> i32; -} - -impl> DevicePadExt for O { - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_feature_group(&self, feature: DevicePadFeature, feature_idx: i32) -> i32 { - unsafe { - ffi::gdk_device_pad_get_feature_group(self.as_ref().to_glib_none().0, feature.to_glib(), feature_idx) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_group_n_modes(&self, group_idx: i32) -> i32 { - unsafe { - ffi::gdk_device_pad_get_group_n_modes(self.as_ref().to_glib_none().0, group_idx) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_n_features(&self, feature: DevicePadFeature) -> i32 { - unsafe { - ffi::gdk_device_pad_get_n_features(self.as_ref().to_glib_none().0, feature.to_glib()) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_n_groups(&self) -> i32 { - unsafe { - ffi::gdk_device_pad_get_n_groups(self.as_ref().to_glib_none().0) - } - } -} - -impl fmt::Display for DevicePad { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DevicePad") - } -} diff --git a/src/auto/device_tool.rs b/src/auto/device_tool.rs deleted file mode 100644 index 6adc8880a683..000000000000 --- a/src/auto/device_tool.rs +++ /dev/null @@ -1,82 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use AxisFlags; -use DeviceToolType; -use ffi; -use glib::StaticType; -use glib::Value; -use glib::object::ObjectType; -use glib::translate::*; -use gobject_ffi; -use std::fmt; - -glib_wrapper! { - pub struct DeviceTool(Object); - - match fn { - get_type => || ffi::gdk_device_tool_get_type(), - } -} - -impl DeviceTool { - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_hardware_id(&self) -> u64 { - unsafe { - ffi::gdk_device_tool_get_hardware_id(self.to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_serial(&self) -> u64 { - unsafe { - ffi::gdk_device_tool_get_serial(self.to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_tool_type(&self) -> DeviceToolType { - unsafe { - from_glib(ffi::gdk_device_tool_get_tool_type(self.to_glib_none().0)) - } - } - - pub fn get_property_axes(&self) -> AxisFlags { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"axes\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - pub fn get_property_hardware_id(&self) -> u64 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"hardware-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - pub fn get_property_serial(&self) -> u64 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"serial\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - pub fn get_property_tool_type(&self) -> DeviceToolType { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"tool-type\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } -} - -impl fmt::Display for DeviceTool { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DeviceTool") - } -} diff --git a/src/auto/display.rs b/src/auto/display.rs deleted file mode 100644 index d3474f34c4b0..000000000000 --- a/src/auto/display.rs +++ /dev/null @@ -1,387 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use AppLaunchContext; -use Atom; -use Device; -use DeviceManager; -use Event; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use Monitor; -use Screen; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Seat; -use Window; -use ffi; -use glib::GString; -use glib::object::IsA; -use glib::object::ObjectType; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem; -use std::mem::transmute; - -glib_wrapper! { - pub struct Display(Object); - - match fn { - get_type => || ffi::gdk_display_get_type(), - } -} - -impl Display { - pub fn beep(&self) { - unsafe { - ffi::gdk_display_beep(self.to_glib_none().0); - } - } - - pub fn close(&self) { - unsafe { - ffi::gdk_display_close(self.to_glib_none().0); - } - } - - pub fn device_is_grabbed(&self, device: &Device) -> bool { - unsafe { - from_glib(ffi::gdk_display_device_is_grabbed(self.to_glib_none().0, device.to_glib_none().0)) - } - } - - pub fn flush(&self) { - unsafe { - ffi::gdk_display_flush(self.to_glib_none().0); - } - } - - pub fn get_app_launch_context(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_display_get_app_launch_context(self.to_glib_none().0)) - } - } - - pub fn get_default_cursor_size(&self) -> u32 { - unsafe { - ffi::gdk_display_get_default_cursor_size(self.to_glib_none().0) - } - } - - pub fn get_default_group(&self) -> Window { - unsafe { - from_glib_none(ffi::gdk_display_get_default_group(self.to_glib_none().0)) - } - } - - pub fn get_default_screen(&self) -> Screen { - unsafe { - from_glib_none(ffi::gdk_display_get_default_screen(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_default_seat(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_get_default_seat(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_20", deprecated)] - pub fn get_device_manager(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_get_device_manager(self.to_glib_none().0)) - } - } - - pub fn get_event(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_display_get_event(self.to_glib_none().0)) - } - } - - pub fn get_maximal_cursor_size(&self) -> (u32, u32) { - unsafe { - let mut width = mem::uninitialized(); - let mut height = mem::uninitialized(); - ffi::gdk_display_get_maximal_cursor_size(self.to_glib_none().0, &mut width, &mut height); - (width, height) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_monitor(&self, monitor_num: i32) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_get_monitor(self.to_glib_none().0, monitor_num)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_monitor_at_point(&self, x: i32, y: i32) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_get_monitor_at_point(self.to_glib_none().0, x, y)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_monitor_at_window>(&self, window: &P) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_get_monitor_at_window(self.to_glib_none().0, window.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_n_monitors(&self) -> i32 { - unsafe { - ffi::gdk_display_get_n_monitors(self.to_glib_none().0) - } - } - - pub fn get_name(&self) -> GString { - unsafe { - from_glib_none(ffi::gdk_display_get_name(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_primary_monitor(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_get_primary_monitor(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_20", deprecated)] - pub fn get_screen(&self, screen_num: i32) -> Screen { - unsafe { - from_glib_none(ffi::gdk_display_get_screen(self.to_glib_none().0, screen_num)) - } - } - - pub fn has_pending(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_has_pending(self.to_glib_none().0)) - } - } - - pub fn is_closed(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_is_closed(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn list_seats(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_display_list_seats(self.to_glib_none().0)) - } - } - - pub fn notify_startup_complete(&self, startup_id: &str) { - unsafe { - ffi::gdk_display_notify_startup_complete(self.to_glib_none().0, startup_id.to_glib_none().0); - } - } - - pub fn peek_event(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_display_peek_event(self.to_glib_none().0)) - } - } - - pub fn put_event(&self, event: &Event) { - unsafe { - ffi::gdk_display_put_event(self.to_glib_none().0, event.to_glib_none().0); - } - } - - pub fn request_selection_notification(&self, selection: &Atom) -> bool { - unsafe { - from_glib(ffi::gdk_display_request_selection_notification(self.to_glib_none().0, selection.to_glib_none().0)) - } - } - - pub fn set_double_click_distance(&self, distance: u32) { - unsafe { - ffi::gdk_display_set_double_click_distance(self.to_glib_none().0, distance); - } - } - - pub fn set_double_click_time(&self, msec: u32) { - unsafe { - ffi::gdk_display_set_double_click_time(self.to_glib_none().0, msec); - } - } - - pub fn store_clipboard>(&self, clipboard_window: &P, time_: u32, targets: &[&Atom]) { - let n_targets = targets.len() as i32; - unsafe { - ffi::gdk_display_store_clipboard(self.to_glib_none().0, clipboard_window.as_ref().to_glib_none().0, time_, targets.to_glib_none().0, n_targets); - } - } - - pub fn supports_clipboard_persistence(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_clipboard_persistence(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_16", deprecated)] - pub fn supports_composite(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_composite(self.to_glib_none().0)) - } - } - - pub fn supports_cursor_alpha(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_cursor_alpha(self.to_glib_none().0)) - } - } - - pub fn supports_cursor_color(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_cursor_color(self.to_glib_none().0)) - } - } - - pub fn supports_input_shapes(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_input_shapes(self.to_glib_none().0)) - } - } - - pub fn supports_selection_notification(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_selection_notification(self.to_glib_none().0)) - } - } - - pub fn supports_shapes(&self) -> bool { - unsafe { - from_glib(ffi::gdk_display_supports_shapes(self.to_glib_none().0)) - } - } - - pub fn sync(&self) { - unsafe { - ffi::gdk_display_sync(self.to_glib_none().0); - } - } - - pub fn get_default() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_display_get_default()) - } - } - - pub fn open(display_name: &str) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_display_open(display_name.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_16", deprecated)] - pub fn open_default_libgtk_only() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_display_open_default_libgtk_only()) - } - } - - pub fn connect_closed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, - Some(transmute(closed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_monitor_added(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"monitor-added\0".as_ptr() as *const _, - Some(transmute(monitor_added_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_monitor_removed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"monitor-removed\0".as_ptr() as *const _, - Some(transmute(monitor_removed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_opened(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"opened\0".as_ptr() as *const _, - Some(transmute(opened_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_seat_added(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"seat-added\0".as_ptr() as *const _, - Some(transmute(seat_added_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_seat_removed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"seat-removed\0".as_ptr() as *const _, - Some(transmute(seat_removed_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn closed_trampoline(this: *mut ffi::GdkDisplay, is_error: glib_ffi::gboolean, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), from_glib(is_error)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn monitor_added_trampoline(this: *mut ffi::GdkDisplay, monitor: *mut ffi::GdkMonitor, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(monitor)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn monitor_removed_trampoline(this: *mut ffi::GdkDisplay, monitor: *mut ffi::GdkMonitor, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(monitor)) -} - -unsafe extern "C" fn opened_trampoline(this: *mut ffi::GdkDisplay, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn seat_added_trampoline(this: *mut ffi::GdkDisplay, seat: *mut ffi::GdkSeat, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(seat)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn seat_removed_trampoline(this: *mut ffi::GdkDisplay, seat: *mut ffi::GdkSeat, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(seat)) -} - -impl fmt::Display for Display { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Display") - } -} diff --git a/src/auto/display_manager.rs b/src/auto/display_manager.rs deleted file mode 100644 index b904a17b26ae..000000000000 --- a/src/auto/display_manager.rs +++ /dev/null @@ -1,87 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Display; -use ffi; -use glib::object::ObjectType; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; - -glib_wrapper! { - pub struct DisplayManager(Object); - - match fn { - get_type => || ffi::gdk_display_manager_get_type(), - } -} - -impl DisplayManager { - pub fn get_default_display(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_manager_get_default_display(self.to_glib_none().0)) - } - } - - pub fn list_displays(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_display_manager_list_displays(self.to_glib_none().0)) - } - } - - pub fn open_display(&self, name: &str) -> Option { - unsafe { - from_glib_none(ffi::gdk_display_manager_open_display(self.to_glib_none().0, name.to_glib_none().0)) - } - } - - pub fn set_default_display(&self, display: &Display) { - unsafe { - ffi::gdk_display_manager_set_default_display(self.to_glib_none().0, display.to_glib_none().0); - } - } - - pub fn get() -> DisplayManager { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_display_manager_get()) - } - } - - pub fn connect_display_opened(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"display-opened\0".as_ptr() as *const _, - Some(transmute(display_opened_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_default_display_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::default-display\0".as_ptr() as *const _, - Some(transmute(notify_default_display_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn display_opened_trampoline(this: *mut ffi::GdkDisplayManager, display: *mut ffi::GdkDisplay, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(display)) -} - -unsafe extern "C" fn notify_default_display_trampoline(this: *mut ffi::GdkDisplayManager, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -impl fmt::Display for DisplayManager { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DisplayManager") - } -} diff --git a/src/auto/drag_context.rs b/src/auto/drag_context.rs deleted file mode 100644 index 97e8c31ce683..000000000000 --- a/src/auto/drag_context.rs +++ /dev/null @@ -1,180 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Atom; -use Device; -use DragAction; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use DragCancelReason; -use DragProtocol; -use Window; -use ffi; -use glib::object::IsA; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib::object::ObjectType; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib::signal::SignalHandlerId; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib::signal::connect_raw; -use glib::translate::*; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib_ffi; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use libc; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use std::boxed::Box as Box_; -use std::fmt; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use std::mem::transmute; - -glib_wrapper! { - pub struct DragContext(Object); - - match fn { - get_type => || ffi::gdk_drag_context_get_type(), - } -} - -impl DragContext { - pub fn get_actions(&self) -> DragAction { - unsafe { - from_glib(ffi::gdk_drag_context_get_actions(self.to_glib_none().0)) - } - } - - pub fn get_dest_window(&self) -> Window { - unsafe { - from_glib_none(ffi::gdk_drag_context_get_dest_window(self.to_glib_none().0)) - } - } - - pub fn get_device(&self) -> Device { - unsafe { - from_glib_none(ffi::gdk_drag_context_get_device(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_drag_window(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_drag_context_get_drag_window(self.to_glib_none().0)) - } - } - - pub fn get_protocol(&self) -> DragProtocol { - unsafe { - from_glib(ffi::gdk_drag_context_get_protocol(self.to_glib_none().0)) - } - } - - pub fn get_selected_action(&self) -> DragAction { - unsafe { - from_glib(ffi::gdk_drag_context_get_selected_action(self.to_glib_none().0)) - } - } - - pub fn get_source_window(&self) -> Window { - unsafe { - from_glib_none(ffi::gdk_drag_context_get_source_window(self.to_glib_none().0)) - } - } - - pub fn get_suggested_action(&self) -> DragAction { - unsafe { - from_glib(ffi::gdk_drag_context_get_suggested_action(self.to_glib_none().0)) - } - } - - pub fn list_targets(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gdk_drag_context_list_targets(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn manage_dnd>(&self, ipc_window: &P, actions: DragAction) -> bool { - unsafe { - from_glib(ffi::gdk_drag_context_manage_dnd(self.to_glib_none().0, ipc_window.as_ref().to_glib_none().0, actions.to_glib())) - } - } - - pub fn set_device(&self, device: &Device) { - unsafe { - ffi::gdk_drag_context_set_device(self.to_glib_none().0, device.to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn set_hotspot(&self, hot_x: i32, hot_y: i32) { - unsafe { - ffi::gdk_drag_context_set_hotspot(self.to_glib_none().0, hot_x, hot_y); - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_action_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"action-changed\0".as_ptr() as *const _, - Some(transmute(action_changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_cancel(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"cancel\0".as_ptr() as *const _, - Some(transmute(cancel_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_dnd_finished(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"dnd-finished\0".as_ptr() as *const _, - Some(transmute(dnd_finished_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_drop_performed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"drop-performed\0".as_ptr() as *const _, - Some(transmute(drop_performed_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn action_changed_trampoline(this: *mut ffi::GdkDragContext, action: ffi::GdkDragAction, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), from_glib(action)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn cancel_trampoline(this: *mut ffi::GdkDragContext, reason: ffi::GdkDragCancelReason, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), from_glib(reason)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn dnd_finished_trampoline(this: *mut ffi::GdkDragContext, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn drop_performed_trampoline(this: *mut ffi::GdkDragContext, time: libc::c_int, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), time) -} - -impl fmt::Display for DragContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DragContext") - } -} diff --git a/src/auto/drawing_context.rs b/src/auto/drawing_context.rs deleted file mode 100644 index 796f6f81d1f7..000000000000 --- a/src/auto/drawing_context.rs +++ /dev/null @@ -1,72 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -#[cfg(any(feature = "v3_22", feature = "dox"))] -use Window; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use cairo; -use ffi; -use glib::object::IsA; -use glib::translate::*; -use std::fmt; - -glib_wrapper! { - pub struct DrawingContext(Object); - - match fn { - get_type => || ffi::gdk_drawing_context_get_type(), - } -} - -pub const NONE_DRAWING_CONTEXT: Option<&DrawingContext> = None; - -pub trait DrawingContextExt: 'static { - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_cairo_context(&self) -> Option; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_clip(&self) -> Option; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_window(&self) -> Option; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn is_valid(&self) -> bool; -} - -impl> DrawingContextExt for O { - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_cairo_context(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_drawing_context_get_cairo_context(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_clip(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_drawing_context_get_clip(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_window(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_drawing_context_get_window(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn is_valid(&self) -> bool { - unsafe { - from_glib(ffi::gdk_drawing_context_is_valid(self.as_ref().to_glib_none().0)) - } - } -} - -impl fmt::Display for DrawingContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DrawingContext") - } -} diff --git a/src/auto/enums.rs b/src/auto/enums.rs deleted file mode 100644 index d9ba49bae7cf..000000000000 --- a/src/auto/enums.rs +++ /dev/null @@ -1,3083 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use ffi; -use glib::Quark; -use glib::StaticType; -use glib::Type; -use glib::error::ErrorDomain; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::FromValueOptional; -use glib::value::SetValue; -use glib::value::Value; -use gobject_ffi; -use std::fmt; - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum AxisUse { - Ignore, - X, - Y, - Pressure, - Xtilt, - Ytilt, - Wheel, - Distance, - Rotation, - Slider, - Last, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for AxisUse { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "AxisUse::{}", match *self { - AxisUse::Ignore => "Ignore", - AxisUse::X => "X", - AxisUse::Y => "Y", - AxisUse::Pressure => "Pressure", - AxisUse::Xtilt => "Xtilt", - AxisUse::Ytilt => "Ytilt", - AxisUse::Wheel => "Wheel", - AxisUse::Distance => "Distance", - AxisUse::Rotation => "Rotation", - AxisUse::Slider => "Slider", - AxisUse::Last => "Last", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for AxisUse { - type GlibType = ffi::GdkAxisUse; - - fn to_glib(&self) -> ffi::GdkAxisUse { - match *self { - AxisUse::Ignore => ffi::GDK_AXIS_IGNORE, - AxisUse::X => ffi::GDK_AXIS_X, - AxisUse::Y => ffi::GDK_AXIS_Y, - AxisUse::Pressure => ffi::GDK_AXIS_PRESSURE, - AxisUse::Xtilt => ffi::GDK_AXIS_XTILT, - AxisUse::Ytilt => ffi::GDK_AXIS_YTILT, - AxisUse::Wheel => ffi::GDK_AXIS_WHEEL, - AxisUse::Distance => ffi::GDK_AXIS_DISTANCE, - AxisUse::Rotation => ffi::GDK_AXIS_ROTATION, - AxisUse::Slider => ffi::GDK_AXIS_SLIDER, - AxisUse::Last => ffi::GDK_AXIS_LAST, - AxisUse::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for AxisUse { - fn from_glib(value: ffi::GdkAxisUse) -> Self { - skip_assert_initialized!(); - match value { - 0 => AxisUse::Ignore, - 1 => AxisUse::X, - 2 => AxisUse::Y, - 3 => AxisUse::Pressure, - 4 => AxisUse::Xtilt, - 5 => AxisUse::Ytilt, - 6 => AxisUse::Wheel, - 7 => AxisUse::Distance, - 8 => AxisUse::Rotation, - 9 => AxisUse::Slider, - 10 => AxisUse::Last, - value => AxisUse::__Unknown(value), - } - } -} - -impl StaticType for AxisUse { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_axis_use_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for AxisUse { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for AxisUse { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for AxisUse { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum ByteOrder { - LsbFirst, - MsbFirst, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for ByteOrder { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "ByteOrder::{}", match *self { - ByteOrder::LsbFirst => "LsbFirst", - ByteOrder::MsbFirst => "MsbFirst", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for ByteOrder { - type GlibType = ffi::GdkByteOrder; - - fn to_glib(&self) -> ffi::GdkByteOrder { - match *self { - ByteOrder::LsbFirst => ffi::GDK_LSB_FIRST, - ByteOrder::MsbFirst => ffi::GDK_MSB_FIRST, - ByteOrder::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for ByteOrder { - fn from_glib(value: ffi::GdkByteOrder) -> Self { - skip_assert_initialized!(); - match value { - 0 => ByteOrder::LsbFirst, - 1 => ByteOrder::MsbFirst, - value => ByteOrder::__Unknown(value), - } - } -} - -impl StaticType for ByteOrder { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_byte_order_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for ByteOrder { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for ByteOrder { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for ByteOrder { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum CrossingMode { - Normal, - Grab, - Ungrab, - GtkGrab, - GtkUngrab, - StateChanged, - TouchBegin, - TouchEnd, - DeviceSwitch, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for CrossingMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "CrossingMode::{}", match *self { - CrossingMode::Normal => "Normal", - CrossingMode::Grab => "Grab", - CrossingMode::Ungrab => "Ungrab", - CrossingMode::GtkGrab => "GtkGrab", - CrossingMode::GtkUngrab => "GtkUngrab", - CrossingMode::StateChanged => "StateChanged", - CrossingMode::TouchBegin => "TouchBegin", - CrossingMode::TouchEnd => "TouchEnd", - CrossingMode::DeviceSwitch => "DeviceSwitch", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for CrossingMode { - type GlibType = ffi::GdkCrossingMode; - - fn to_glib(&self) -> ffi::GdkCrossingMode { - match *self { - CrossingMode::Normal => ffi::GDK_CROSSING_NORMAL, - CrossingMode::Grab => ffi::GDK_CROSSING_GRAB, - CrossingMode::Ungrab => ffi::GDK_CROSSING_UNGRAB, - CrossingMode::GtkGrab => ffi::GDK_CROSSING_GTK_GRAB, - CrossingMode::GtkUngrab => ffi::GDK_CROSSING_GTK_UNGRAB, - CrossingMode::StateChanged => ffi::GDK_CROSSING_STATE_CHANGED, - CrossingMode::TouchBegin => ffi::GDK_CROSSING_TOUCH_BEGIN, - CrossingMode::TouchEnd => ffi::GDK_CROSSING_TOUCH_END, - CrossingMode::DeviceSwitch => ffi::GDK_CROSSING_DEVICE_SWITCH, - CrossingMode::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for CrossingMode { - fn from_glib(value: ffi::GdkCrossingMode) -> Self { - skip_assert_initialized!(); - match value { - 0 => CrossingMode::Normal, - 1 => CrossingMode::Grab, - 2 => CrossingMode::Ungrab, - 3 => CrossingMode::GtkGrab, - 4 => CrossingMode::GtkUngrab, - 5 => CrossingMode::StateChanged, - 6 => CrossingMode::TouchBegin, - 7 => CrossingMode::TouchEnd, - 8 => CrossingMode::DeviceSwitch, - value => CrossingMode::__Unknown(value), - } - } -} - -impl StaticType for CrossingMode { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_crossing_mode_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for CrossingMode { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for CrossingMode { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for CrossingMode { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum CursorType { - XCursor, - Arrow, - BasedArrowDown, - BasedArrowUp, - Boat, - Bogosity, - BottomLeftCorner, - BottomRightCorner, - BottomSide, - BottomTee, - BoxSpiral, - CenterPtr, - Circle, - Clock, - CoffeeMug, - Cross, - CrossReverse, - Crosshair, - DiamondCross, - Dot, - Dotbox, - DoubleArrow, - DraftLarge, - DraftSmall, - DrapedBox, - Exchange, - Fleur, - Gobbler, - Gumby, - Hand1, - Hand2, - Heart, - Icon, - IronCross, - LeftPtr, - LeftSide, - LeftTee, - Leftbutton, - LlAngle, - LrAngle, - Man, - Middlebutton, - Mouse, - Pencil, - Pirate, - Plus, - QuestionArrow, - RightPtr, - RightSide, - RightTee, - Rightbutton, - RtlLogo, - Sailboat, - SbDownArrow, - SbHDoubleArrow, - SbLeftArrow, - SbRightArrow, - SbUpArrow, - SbVDoubleArrow, - Shuttle, - Sizing, - Spider, - Spraycan, - Star, - Target, - Tcross, - TopLeftArrow, - TopLeftCorner, - TopRightCorner, - TopSide, - TopTee, - Trek, - UlAngle, - Umbrella, - UrAngle, - Watch, - Xterm, - LastCursor, - BlankCursor, - CursorIsPixmap, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for CursorType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "CursorType::{}", match *self { - CursorType::XCursor => "XCursor", - CursorType::Arrow => "Arrow", - CursorType::BasedArrowDown => "BasedArrowDown", - CursorType::BasedArrowUp => "BasedArrowUp", - CursorType::Boat => "Boat", - CursorType::Bogosity => "Bogosity", - CursorType::BottomLeftCorner => "BottomLeftCorner", - CursorType::BottomRightCorner => "BottomRightCorner", - CursorType::BottomSide => "BottomSide", - CursorType::BottomTee => "BottomTee", - CursorType::BoxSpiral => "BoxSpiral", - CursorType::CenterPtr => "CenterPtr", - CursorType::Circle => "Circle", - CursorType::Clock => "Clock", - CursorType::CoffeeMug => "CoffeeMug", - CursorType::Cross => "Cross", - CursorType::CrossReverse => "CrossReverse", - CursorType::Crosshair => "Crosshair", - CursorType::DiamondCross => "DiamondCross", - CursorType::Dot => "Dot", - CursorType::Dotbox => "Dotbox", - CursorType::DoubleArrow => "DoubleArrow", - CursorType::DraftLarge => "DraftLarge", - CursorType::DraftSmall => "DraftSmall", - CursorType::DrapedBox => "DrapedBox", - CursorType::Exchange => "Exchange", - CursorType::Fleur => "Fleur", - CursorType::Gobbler => "Gobbler", - CursorType::Gumby => "Gumby", - CursorType::Hand1 => "Hand1", - CursorType::Hand2 => "Hand2", - CursorType::Heart => "Heart", - CursorType::Icon => "Icon", - CursorType::IronCross => "IronCross", - CursorType::LeftPtr => "LeftPtr", - CursorType::LeftSide => "LeftSide", - CursorType::LeftTee => "LeftTee", - CursorType::Leftbutton => "Leftbutton", - CursorType::LlAngle => "LlAngle", - CursorType::LrAngle => "LrAngle", - CursorType::Man => "Man", - CursorType::Middlebutton => "Middlebutton", - CursorType::Mouse => "Mouse", - CursorType::Pencil => "Pencil", - CursorType::Pirate => "Pirate", - CursorType::Plus => "Plus", - CursorType::QuestionArrow => "QuestionArrow", - CursorType::RightPtr => "RightPtr", - CursorType::RightSide => "RightSide", - CursorType::RightTee => "RightTee", - CursorType::Rightbutton => "Rightbutton", - CursorType::RtlLogo => "RtlLogo", - CursorType::Sailboat => "Sailboat", - CursorType::SbDownArrow => "SbDownArrow", - CursorType::SbHDoubleArrow => "SbHDoubleArrow", - CursorType::SbLeftArrow => "SbLeftArrow", - CursorType::SbRightArrow => "SbRightArrow", - CursorType::SbUpArrow => "SbUpArrow", - CursorType::SbVDoubleArrow => "SbVDoubleArrow", - CursorType::Shuttle => "Shuttle", - CursorType::Sizing => "Sizing", - CursorType::Spider => "Spider", - CursorType::Spraycan => "Spraycan", - CursorType::Star => "Star", - CursorType::Target => "Target", - CursorType::Tcross => "Tcross", - CursorType::TopLeftArrow => "TopLeftArrow", - CursorType::TopLeftCorner => "TopLeftCorner", - CursorType::TopRightCorner => "TopRightCorner", - CursorType::TopSide => "TopSide", - CursorType::TopTee => "TopTee", - CursorType::Trek => "Trek", - CursorType::UlAngle => "UlAngle", - CursorType::Umbrella => "Umbrella", - CursorType::UrAngle => "UrAngle", - CursorType::Watch => "Watch", - CursorType::Xterm => "Xterm", - CursorType::LastCursor => "LastCursor", - CursorType::BlankCursor => "BlankCursor", - CursorType::CursorIsPixmap => "CursorIsPixmap", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for CursorType { - type GlibType = ffi::GdkCursorType; - - fn to_glib(&self) -> ffi::GdkCursorType { - match *self { - CursorType::XCursor => ffi::GDK_X_CURSOR, - CursorType::Arrow => ffi::GDK_ARROW, - CursorType::BasedArrowDown => ffi::GDK_BASED_ARROW_DOWN, - CursorType::BasedArrowUp => ffi::GDK_BASED_ARROW_UP, - CursorType::Boat => ffi::GDK_BOAT, - CursorType::Bogosity => ffi::GDK_BOGOSITY, - CursorType::BottomLeftCorner => ffi::GDK_BOTTOM_LEFT_CORNER, - CursorType::BottomRightCorner => ffi::GDK_BOTTOM_RIGHT_CORNER, - CursorType::BottomSide => ffi::GDK_BOTTOM_SIDE, - CursorType::BottomTee => ffi::GDK_BOTTOM_TEE, - CursorType::BoxSpiral => ffi::GDK_BOX_SPIRAL, - CursorType::CenterPtr => ffi::GDK_CENTER_PTR, - CursorType::Circle => ffi::GDK_CIRCLE, - CursorType::Clock => ffi::GDK_CLOCK, - CursorType::CoffeeMug => ffi::GDK_COFFEE_MUG, - CursorType::Cross => ffi::GDK_CROSS, - CursorType::CrossReverse => ffi::GDK_CROSS_REVERSE, - CursorType::Crosshair => ffi::GDK_CROSSHAIR, - CursorType::DiamondCross => ffi::GDK_DIAMOND_CROSS, - CursorType::Dot => ffi::GDK_DOT, - CursorType::Dotbox => ffi::GDK_DOTBOX, - CursorType::DoubleArrow => ffi::GDK_DOUBLE_ARROW, - CursorType::DraftLarge => ffi::GDK_DRAFT_LARGE, - CursorType::DraftSmall => ffi::GDK_DRAFT_SMALL, - CursorType::DrapedBox => ffi::GDK_DRAPED_BOX, - CursorType::Exchange => ffi::GDK_EXCHANGE, - CursorType::Fleur => ffi::GDK_FLEUR, - CursorType::Gobbler => ffi::GDK_GOBBLER, - CursorType::Gumby => ffi::GDK_GUMBY, - CursorType::Hand1 => ffi::GDK_HAND1, - CursorType::Hand2 => ffi::GDK_HAND2, - CursorType::Heart => ffi::GDK_HEART, - CursorType::Icon => ffi::GDK_ICON, - CursorType::IronCross => ffi::GDK_IRON_CROSS, - CursorType::LeftPtr => ffi::GDK_LEFT_PTR, - CursorType::LeftSide => ffi::GDK_LEFT_SIDE, - CursorType::LeftTee => ffi::GDK_LEFT_TEE, - CursorType::Leftbutton => ffi::GDK_LEFTBUTTON, - CursorType::LlAngle => ffi::GDK_LL_ANGLE, - CursorType::LrAngle => ffi::GDK_LR_ANGLE, - CursorType::Man => ffi::GDK_MAN, - CursorType::Middlebutton => ffi::GDK_MIDDLEBUTTON, - CursorType::Mouse => ffi::GDK_MOUSE, - CursorType::Pencil => ffi::GDK_PENCIL, - CursorType::Pirate => ffi::GDK_PIRATE, - CursorType::Plus => ffi::GDK_PLUS, - CursorType::QuestionArrow => ffi::GDK_QUESTION_ARROW, - CursorType::RightPtr => ffi::GDK_RIGHT_PTR, - CursorType::RightSide => ffi::GDK_RIGHT_SIDE, - CursorType::RightTee => ffi::GDK_RIGHT_TEE, - CursorType::Rightbutton => ffi::GDK_RIGHTBUTTON, - CursorType::RtlLogo => ffi::GDK_RTL_LOGO, - CursorType::Sailboat => ffi::GDK_SAILBOAT, - CursorType::SbDownArrow => ffi::GDK_SB_DOWN_ARROW, - CursorType::SbHDoubleArrow => ffi::GDK_SB_H_DOUBLE_ARROW, - CursorType::SbLeftArrow => ffi::GDK_SB_LEFT_ARROW, - CursorType::SbRightArrow => ffi::GDK_SB_RIGHT_ARROW, - CursorType::SbUpArrow => ffi::GDK_SB_UP_ARROW, - CursorType::SbVDoubleArrow => ffi::GDK_SB_V_DOUBLE_ARROW, - CursorType::Shuttle => ffi::GDK_SHUTTLE, - CursorType::Sizing => ffi::GDK_SIZING, - CursorType::Spider => ffi::GDK_SPIDER, - CursorType::Spraycan => ffi::GDK_SPRAYCAN, - CursorType::Star => ffi::GDK_STAR, - CursorType::Target => ffi::GDK_TARGET, - CursorType::Tcross => ffi::GDK_TCROSS, - CursorType::TopLeftArrow => ffi::GDK_TOP_LEFT_ARROW, - CursorType::TopLeftCorner => ffi::GDK_TOP_LEFT_CORNER, - CursorType::TopRightCorner => ffi::GDK_TOP_RIGHT_CORNER, - CursorType::TopSide => ffi::GDK_TOP_SIDE, - CursorType::TopTee => ffi::GDK_TOP_TEE, - CursorType::Trek => ffi::GDK_TREK, - CursorType::UlAngle => ffi::GDK_UL_ANGLE, - CursorType::Umbrella => ffi::GDK_UMBRELLA, - CursorType::UrAngle => ffi::GDK_UR_ANGLE, - CursorType::Watch => ffi::GDK_WATCH, - CursorType::Xterm => ffi::GDK_XTERM, - CursorType::LastCursor => ffi::GDK_LAST_CURSOR, - CursorType::BlankCursor => ffi::GDK_BLANK_CURSOR, - CursorType::CursorIsPixmap => ffi::GDK_CURSOR_IS_PIXMAP, - CursorType::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for CursorType { - fn from_glib(value: ffi::GdkCursorType) -> Self { - skip_assert_initialized!(); - match value { - 0 => CursorType::XCursor, - 2 => CursorType::Arrow, - 4 => CursorType::BasedArrowDown, - 6 => CursorType::BasedArrowUp, - 8 => CursorType::Boat, - 10 => CursorType::Bogosity, - 12 => CursorType::BottomLeftCorner, - 14 => CursorType::BottomRightCorner, - 16 => CursorType::BottomSide, - 18 => CursorType::BottomTee, - 20 => CursorType::BoxSpiral, - 22 => CursorType::CenterPtr, - 24 => CursorType::Circle, - 26 => CursorType::Clock, - 28 => CursorType::CoffeeMug, - 30 => CursorType::Cross, - 32 => CursorType::CrossReverse, - 34 => CursorType::Crosshair, - 36 => CursorType::DiamondCross, - 38 => CursorType::Dot, - 40 => CursorType::Dotbox, - 42 => CursorType::DoubleArrow, - 44 => CursorType::DraftLarge, - 46 => CursorType::DraftSmall, - 48 => CursorType::DrapedBox, - 50 => CursorType::Exchange, - 52 => CursorType::Fleur, - 54 => CursorType::Gobbler, - 56 => CursorType::Gumby, - 58 => CursorType::Hand1, - 60 => CursorType::Hand2, - 62 => CursorType::Heart, - 64 => CursorType::Icon, - 66 => CursorType::IronCross, - 68 => CursorType::LeftPtr, - 70 => CursorType::LeftSide, - 72 => CursorType::LeftTee, - 74 => CursorType::Leftbutton, - 76 => CursorType::LlAngle, - 78 => CursorType::LrAngle, - 80 => CursorType::Man, - 82 => CursorType::Middlebutton, - 84 => CursorType::Mouse, - 86 => CursorType::Pencil, - 88 => CursorType::Pirate, - 90 => CursorType::Plus, - 92 => CursorType::QuestionArrow, - 94 => CursorType::RightPtr, - 96 => CursorType::RightSide, - 98 => CursorType::RightTee, - 100 => CursorType::Rightbutton, - 102 => CursorType::RtlLogo, - 104 => CursorType::Sailboat, - 106 => CursorType::SbDownArrow, - 108 => CursorType::SbHDoubleArrow, - 110 => CursorType::SbLeftArrow, - 112 => CursorType::SbRightArrow, - 114 => CursorType::SbUpArrow, - 116 => CursorType::SbVDoubleArrow, - 118 => CursorType::Shuttle, - 120 => CursorType::Sizing, - 122 => CursorType::Spider, - 124 => CursorType::Spraycan, - 126 => CursorType::Star, - 128 => CursorType::Target, - 130 => CursorType::Tcross, - 132 => CursorType::TopLeftArrow, - 134 => CursorType::TopLeftCorner, - 136 => CursorType::TopRightCorner, - 138 => CursorType::TopSide, - 140 => CursorType::TopTee, - 142 => CursorType::Trek, - 144 => CursorType::UlAngle, - 146 => CursorType::Umbrella, - 148 => CursorType::UrAngle, - 150 => CursorType::Watch, - 152 => CursorType::Xterm, - 153 => CursorType::LastCursor, - -2 => CursorType::BlankCursor, - -1 => CursorType::CursorIsPixmap, - value => CursorType::__Unknown(value), - } - } -} - -impl StaticType for CursorType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_cursor_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for CursorType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for CursorType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for CursorType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum DevicePadFeature { - Button, - Ring, - Strip, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for DevicePadFeature { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DevicePadFeature::{}", match *self { - DevicePadFeature::Button => "Button", - DevicePadFeature::Ring => "Ring", - DevicePadFeature::Strip => "Strip", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for DevicePadFeature { - type GlibType = ffi::GdkDevicePadFeature; - - fn to_glib(&self) -> ffi::GdkDevicePadFeature { - match *self { - DevicePadFeature::Button => ffi::GDK_DEVICE_PAD_FEATURE_BUTTON, - DevicePadFeature::Ring => ffi::GDK_DEVICE_PAD_FEATURE_RING, - DevicePadFeature::Strip => ffi::GDK_DEVICE_PAD_FEATURE_STRIP, - DevicePadFeature::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for DevicePadFeature { - fn from_glib(value: ffi::GdkDevicePadFeature) -> Self { - skip_assert_initialized!(); - match value { - 0 => DevicePadFeature::Button, - 1 => DevicePadFeature::Ring, - 2 => DevicePadFeature::Strip, - value => DevicePadFeature::__Unknown(value), - } - } -} - -impl StaticType for DevicePadFeature { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_device_pad_feature_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for DevicePadFeature { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for DevicePadFeature { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for DevicePadFeature { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum DeviceToolType { - Unknown, - Pen, - Eraser, - Brush, - Pencil, - Airbrush, - Mouse, - Lens, - #[doc(hidden)] - __Unknown(i32), -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl fmt::Display for DeviceToolType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DeviceToolType::{}", match *self { - DeviceToolType::Unknown => "Unknown", - DeviceToolType::Pen => "Pen", - DeviceToolType::Eraser => "Eraser", - DeviceToolType::Brush => "Brush", - DeviceToolType::Pencil => "Pencil", - DeviceToolType::Airbrush => "Airbrush", - DeviceToolType::Mouse => "Mouse", - DeviceToolType::Lens => "Lens", - _ => "Unknown", - }) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for DeviceToolType { - type GlibType = ffi::GdkDeviceToolType; - - fn to_glib(&self) -> ffi::GdkDeviceToolType { - match *self { - DeviceToolType::Unknown => ffi::GDK_DEVICE_TOOL_TYPE_UNKNOWN, - DeviceToolType::Pen => ffi::GDK_DEVICE_TOOL_TYPE_PEN, - DeviceToolType::Eraser => ffi::GDK_DEVICE_TOOL_TYPE_ERASER, - DeviceToolType::Brush => ffi::GDK_DEVICE_TOOL_TYPE_BRUSH, - DeviceToolType::Pencil => ffi::GDK_DEVICE_TOOL_TYPE_PENCIL, - DeviceToolType::Airbrush => ffi::GDK_DEVICE_TOOL_TYPE_AIRBRUSH, - DeviceToolType::Mouse => ffi::GDK_DEVICE_TOOL_TYPE_MOUSE, - DeviceToolType::Lens => ffi::GDK_DEVICE_TOOL_TYPE_LENS, - DeviceToolType::__Unknown(value) => value - } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for DeviceToolType { - fn from_glib(value: ffi::GdkDeviceToolType) -> Self { - skip_assert_initialized!(); - match value { - 0 => DeviceToolType::Unknown, - 1 => DeviceToolType::Pen, - 2 => DeviceToolType::Eraser, - 3 => DeviceToolType::Brush, - 4 => DeviceToolType::Pencil, - 5 => DeviceToolType::Airbrush, - 6 => DeviceToolType::Mouse, - 7 => DeviceToolType::Lens, - value => DeviceToolType::__Unknown(value), - } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl StaticType for DeviceToolType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_device_tool_type_get_type()) } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValueOptional<'a> for DeviceToolType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValue<'a> for DeviceToolType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl SetValue for DeviceToolType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum DeviceType { - Master, - Slave, - Floating, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for DeviceType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DeviceType::{}", match *self { - DeviceType::Master => "Master", - DeviceType::Slave => "Slave", - DeviceType::Floating => "Floating", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for DeviceType { - type GlibType = ffi::GdkDeviceType; - - fn to_glib(&self) -> ffi::GdkDeviceType { - match *self { - DeviceType::Master => ffi::GDK_DEVICE_TYPE_MASTER, - DeviceType::Slave => ffi::GDK_DEVICE_TYPE_SLAVE, - DeviceType::Floating => ffi::GDK_DEVICE_TYPE_FLOATING, - DeviceType::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for DeviceType { - fn from_glib(value: ffi::GdkDeviceType) -> Self { - skip_assert_initialized!(); - match value { - 0 => DeviceType::Master, - 1 => DeviceType::Slave, - 2 => DeviceType::Floating, - value => DeviceType::__Unknown(value), - } - } -} - -impl StaticType for DeviceType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_device_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for DeviceType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for DeviceType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for DeviceType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum DragCancelReason { - NoTarget, - UserCancelled, - Error, - #[doc(hidden)] - __Unknown(i32), -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl fmt::Display for DragCancelReason { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DragCancelReason::{}", match *self { - DragCancelReason::NoTarget => "NoTarget", - DragCancelReason::UserCancelled => "UserCancelled", - DragCancelReason::Error => "Error", - _ => "Unknown", - }) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for DragCancelReason { - type GlibType = ffi::GdkDragCancelReason; - - fn to_glib(&self) -> ffi::GdkDragCancelReason { - match *self { - DragCancelReason::NoTarget => ffi::GDK_DRAG_CANCEL_NO_TARGET, - DragCancelReason::UserCancelled => ffi::GDK_DRAG_CANCEL_USER_CANCELLED, - DragCancelReason::Error => ffi::GDK_DRAG_CANCEL_ERROR, - DragCancelReason::__Unknown(value) => value - } - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for DragCancelReason { - fn from_glib(value: ffi::GdkDragCancelReason) -> Self { - skip_assert_initialized!(); - match value { - 0 => DragCancelReason::NoTarget, - 1 => DragCancelReason::UserCancelled, - 2 => DragCancelReason::Error, - value => DragCancelReason::__Unknown(value), - } - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl StaticType for DragCancelReason { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_drag_cancel_reason_get_type()) } - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl<'a> FromValueOptional<'a> for DragCancelReason { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl<'a> FromValue<'a> for DragCancelReason { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl SetValue for DragCancelReason { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum DragProtocol { - None, - Motif, - Xdnd, - Rootwin, - Win32Dropfiles, - Ole2, - Local, - Wayland, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for DragProtocol { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "DragProtocol::{}", match *self { - DragProtocol::None => "None", - DragProtocol::Motif => "Motif", - DragProtocol::Xdnd => "Xdnd", - DragProtocol::Rootwin => "Rootwin", - DragProtocol::Win32Dropfiles => "Win32Dropfiles", - DragProtocol::Ole2 => "Ole2", - DragProtocol::Local => "Local", - DragProtocol::Wayland => "Wayland", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for DragProtocol { - type GlibType = ffi::GdkDragProtocol; - - fn to_glib(&self) -> ffi::GdkDragProtocol { - match *self { - DragProtocol::None => ffi::GDK_DRAG_PROTO_NONE, - DragProtocol::Motif => ffi::GDK_DRAG_PROTO_MOTIF, - DragProtocol::Xdnd => ffi::GDK_DRAG_PROTO_XDND, - DragProtocol::Rootwin => ffi::GDK_DRAG_PROTO_ROOTWIN, - DragProtocol::Win32Dropfiles => ffi::GDK_DRAG_PROTO_WIN32_DROPFILES, - DragProtocol::Ole2 => ffi::GDK_DRAG_PROTO_OLE2, - DragProtocol::Local => ffi::GDK_DRAG_PROTO_LOCAL, - DragProtocol::Wayland => ffi::GDK_DRAG_PROTO_WAYLAND, - DragProtocol::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for DragProtocol { - fn from_glib(value: ffi::GdkDragProtocol) -> Self { - skip_assert_initialized!(); - match value { - 0 => DragProtocol::None, - 1 => DragProtocol::Motif, - 2 => DragProtocol::Xdnd, - 3 => DragProtocol::Rootwin, - 4 => DragProtocol::Win32Dropfiles, - 5 => DragProtocol::Ole2, - 6 => DragProtocol::Local, - 7 => DragProtocol::Wayland, - value => DragProtocol::__Unknown(value), - } - } -} - -impl StaticType for DragProtocol { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_drag_protocol_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for DragProtocol { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for DragProtocol { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for DragProtocol { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum EventType { - Nothing, - Delete, - Destroy, - Expose, - MotionNotify, - ButtonPress, - DoubleButtonPress, - TripleButtonPress, - ButtonRelease, - KeyPress, - KeyRelease, - EnterNotify, - LeaveNotify, - FocusChange, - Configure, - Map, - Unmap, - PropertyNotify, - SelectionClear, - SelectionRequest, - SelectionNotify, - ProximityIn, - ProximityOut, - DragEnter, - DragLeave, - DragMotion, - DragStatus, - DropStart, - DropFinished, - ClientEvent, - VisibilityNotify, - Scroll, - WindowState, - Setting, - OwnerChange, - GrabBroken, - Damage, - TouchBegin, - TouchUpdate, - TouchEnd, - TouchCancel, - #[cfg(any(feature = "v3_18", feature = "dox"))] - TouchpadSwipe, - #[cfg(any(feature = "v3_18", feature = "dox"))] - TouchpadPinch, - PadButtonPress, - PadButtonRelease, - PadRing, - PadStrip, - PadGroupMode, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for EventType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "EventType::{}", match *self { - EventType::Nothing => "Nothing", - EventType::Delete => "Delete", - EventType::Destroy => "Destroy", - EventType::Expose => "Expose", - EventType::MotionNotify => "MotionNotify", - EventType::ButtonPress => "ButtonPress", - EventType::DoubleButtonPress => "DoubleButtonPress", - EventType::TripleButtonPress => "TripleButtonPress", - EventType::ButtonRelease => "ButtonRelease", - EventType::KeyPress => "KeyPress", - EventType::KeyRelease => "KeyRelease", - EventType::EnterNotify => "EnterNotify", - EventType::LeaveNotify => "LeaveNotify", - EventType::FocusChange => "FocusChange", - EventType::Configure => "Configure", - EventType::Map => "Map", - EventType::Unmap => "Unmap", - EventType::PropertyNotify => "PropertyNotify", - EventType::SelectionClear => "SelectionClear", - EventType::SelectionRequest => "SelectionRequest", - EventType::SelectionNotify => "SelectionNotify", - EventType::ProximityIn => "ProximityIn", - EventType::ProximityOut => "ProximityOut", - EventType::DragEnter => "DragEnter", - EventType::DragLeave => "DragLeave", - EventType::DragMotion => "DragMotion", - EventType::DragStatus => "DragStatus", - EventType::DropStart => "DropStart", - EventType::DropFinished => "DropFinished", - EventType::ClientEvent => "ClientEvent", - EventType::VisibilityNotify => "VisibilityNotify", - EventType::Scroll => "Scroll", - EventType::WindowState => "WindowState", - EventType::Setting => "Setting", - EventType::OwnerChange => "OwnerChange", - EventType::GrabBroken => "GrabBroken", - EventType::Damage => "Damage", - EventType::TouchBegin => "TouchBegin", - EventType::TouchUpdate => "TouchUpdate", - EventType::TouchEnd => "TouchEnd", - EventType::TouchCancel => "TouchCancel", - #[cfg(any(feature = "v3_18", feature = "dox"))] - EventType::TouchpadSwipe => "TouchpadSwipe", - #[cfg(any(feature = "v3_18", feature = "dox"))] - EventType::TouchpadPinch => "TouchpadPinch", - EventType::PadButtonPress => "PadButtonPress", - EventType::PadButtonRelease => "PadButtonRelease", - EventType::PadRing => "PadRing", - EventType::PadStrip => "PadStrip", - EventType::PadGroupMode => "PadGroupMode", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for EventType { - type GlibType = ffi::GdkEventType; - - fn to_glib(&self) -> ffi::GdkEventType { - match *self { - EventType::Nothing => ffi::GDK_NOTHING, - EventType::Delete => ffi::GDK_DELETE, - EventType::Destroy => ffi::GDK_DESTROY, - EventType::Expose => ffi::GDK_EXPOSE, - EventType::MotionNotify => ffi::GDK_MOTION_NOTIFY, - EventType::ButtonPress => ffi::GDK_BUTTON_PRESS, - EventType::DoubleButtonPress => ffi::GDK_DOUBLE_BUTTON_PRESS, - EventType::TripleButtonPress => ffi::GDK_TRIPLE_BUTTON_PRESS, - EventType::ButtonRelease => ffi::GDK_BUTTON_RELEASE, - EventType::KeyPress => ffi::GDK_KEY_PRESS, - EventType::KeyRelease => ffi::GDK_KEY_RELEASE, - EventType::EnterNotify => ffi::GDK_ENTER_NOTIFY, - EventType::LeaveNotify => ffi::GDK_LEAVE_NOTIFY, - EventType::FocusChange => ffi::GDK_FOCUS_CHANGE, - EventType::Configure => ffi::GDK_CONFIGURE, - EventType::Map => ffi::GDK_MAP, - EventType::Unmap => ffi::GDK_UNMAP, - EventType::PropertyNotify => ffi::GDK_PROPERTY_NOTIFY, - EventType::SelectionClear => ffi::GDK_SELECTION_CLEAR, - EventType::SelectionRequest => ffi::GDK_SELECTION_REQUEST, - EventType::SelectionNotify => ffi::GDK_SELECTION_NOTIFY, - EventType::ProximityIn => ffi::GDK_PROXIMITY_IN, - EventType::ProximityOut => ffi::GDK_PROXIMITY_OUT, - EventType::DragEnter => ffi::GDK_DRAG_ENTER, - EventType::DragLeave => ffi::GDK_DRAG_LEAVE, - EventType::DragMotion => ffi::GDK_DRAG_MOTION, - EventType::DragStatus => ffi::GDK_DRAG_STATUS, - EventType::DropStart => ffi::GDK_DROP_START, - EventType::DropFinished => ffi::GDK_DROP_FINISHED, - EventType::ClientEvent => ffi::GDK_CLIENT_EVENT, - EventType::VisibilityNotify => ffi::GDK_VISIBILITY_NOTIFY, - EventType::Scroll => ffi::GDK_SCROLL, - EventType::WindowState => ffi::GDK_WINDOW_STATE, - EventType::Setting => ffi::GDK_SETTING, - EventType::OwnerChange => ffi::GDK_OWNER_CHANGE, - EventType::GrabBroken => ffi::GDK_GRAB_BROKEN, - EventType::Damage => ffi::GDK_DAMAGE, - EventType::TouchBegin => ffi::GDK_TOUCH_BEGIN, - EventType::TouchUpdate => ffi::GDK_TOUCH_UPDATE, - EventType::TouchEnd => ffi::GDK_TOUCH_END, - EventType::TouchCancel => ffi::GDK_TOUCH_CANCEL, - #[cfg(any(feature = "v3_18", feature = "dox"))] - EventType::TouchpadSwipe => ffi::GDK_TOUCHPAD_SWIPE, - #[cfg(any(feature = "v3_18", feature = "dox"))] - EventType::TouchpadPinch => ffi::GDK_TOUCHPAD_PINCH, - EventType::PadButtonPress => ffi::GDK_PAD_BUTTON_PRESS, - EventType::PadButtonRelease => ffi::GDK_PAD_BUTTON_RELEASE, - EventType::PadRing => ffi::GDK_PAD_RING, - EventType::PadStrip => ffi::GDK_PAD_STRIP, - EventType::PadGroupMode => ffi::GDK_PAD_GROUP_MODE, - EventType::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for EventType { - fn from_glib(value: ffi::GdkEventType) -> Self { - skip_assert_initialized!(); - match value { - -1 => EventType::Nothing, - 0 => EventType::Delete, - 1 => EventType::Destroy, - 2 => EventType::Expose, - 3 => EventType::MotionNotify, - 4 => EventType::ButtonPress, - 5 => EventType::DoubleButtonPress, - 6 => EventType::TripleButtonPress, - 7 => EventType::ButtonRelease, - 8 => EventType::KeyPress, - 9 => EventType::KeyRelease, - 10 => EventType::EnterNotify, - 11 => EventType::LeaveNotify, - 12 => EventType::FocusChange, - 13 => EventType::Configure, - 14 => EventType::Map, - 15 => EventType::Unmap, - 16 => EventType::PropertyNotify, - 17 => EventType::SelectionClear, - 18 => EventType::SelectionRequest, - 19 => EventType::SelectionNotify, - 20 => EventType::ProximityIn, - 21 => EventType::ProximityOut, - 22 => EventType::DragEnter, - 23 => EventType::DragLeave, - 24 => EventType::DragMotion, - 25 => EventType::DragStatus, - 26 => EventType::DropStart, - 27 => EventType::DropFinished, - 28 => EventType::ClientEvent, - 29 => EventType::VisibilityNotify, - 31 => EventType::Scroll, - 32 => EventType::WindowState, - 33 => EventType::Setting, - 34 => EventType::OwnerChange, - 35 => EventType::GrabBroken, - 36 => EventType::Damage, - 37 => EventType::TouchBegin, - 38 => EventType::TouchUpdate, - 39 => EventType::TouchEnd, - 40 => EventType::TouchCancel, - #[cfg(any(feature = "v3_18", feature = "dox"))] - 41 => EventType::TouchpadSwipe, - #[cfg(any(feature = "v3_18", feature = "dox"))] - 42 => EventType::TouchpadPinch, - 43 => EventType::PadButtonPress, - 44 => EventType::PadButtonRelease, - 45 => EventType::PadRing, - 46 => EventType::PadStrip, - 47 => EventType::PadGroupMode, - value => EventType::__Unknown(value), - } - } -} - -impl StaticType for EventType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_event_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for EventType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for EventType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for EventType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum FullscreenMode { - CurrentMonitor, - AllMonitors, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for FullscreenMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "FullscreenMode::{}", match *self { - FullscreenMode::CurrentMonitor => "CurrentMonitor", - FullscreenMode::AllMonitors => "AllMonitors", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for FullscreenMode { - type GlibType = ffi::GdkFullscreenMode; - - fn to_glib(&self) -> ffi::GdkFullscreenMode { - match *self { - FullscreenMode::CurrentMonitor => ffi::GDK_FULLSCREEN_ON_CURRENT_MONITOR, - FullscreenMode::AllMonitors => ffi::GDK_FULLSCREEN_ON_ALL_MONITORS, - FullscreenMode::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for FullscreenMode { - fn from_glib(value: ffi::GdkFullscreenMode) -> Self { - skip_assert_initialized!(); - match value { - 0 => FullscreenMode::CurrentMonitor, - 1 => FullscreenMode::AllMonitors, - value => FullscreenMode::__Unknown(value), - } - } -} - -impl StaticType for FullscreenMode { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_fullscreen_mode_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for FullscreenMode { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for FullscreenMode { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for FullscreenMode { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum GLError { - NotAvailable, - UnsupportedFormat, - UnsupportedProfile, - #[doc(hidden)] - __Unknown(i32), -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -impl fmt::Display for GLError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "GLError::{}", match *self { - GLError::NotAvailable => "NotAvailable", - GLError::UnsupportedFormat => "UnsupportedFormat", - GLError::UnsupportedProfile => "UnsupportedProfile", - _ => "Unknown", - }) - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for GLError { - type GlibType = ffi::GdkGLError; - - fn to_glib(&self) -> ffi::GdkGLError { - match *self { - GLError::NotAvailable => ffi::GDK_GL_ERROR_NOT_AVAILABLE, - GLError::UnsupportedFormat => ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT, - GLError::UnsupportedProfile => ffi::GDK_GL_ERROR_UNSUPPORTED_PROFILE, - GLError::__Unknown(value) => value - } - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for GLError { - fn from_glib(value: ffi::GdkGLError) -> Self { - skip_assert_initialized!(); - match value { - 0 => GLError::NotAvailable, - 1 => GLError::UnsupportedFormat, - 2 => GLError::UnsupportedProfile, - value => GLError::__Unknown(value), - } - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -impl ErrorDomain for GLError { - fn domain() -> Quark { - skip_assert_initialized!(); - unsafe { from_glib(ffi::gdk_gl_error_quark()) } - } - - fn code(self) -> i32 { - self.to_glib() - } - - fn from(code: i32) -> Option { - skip_assert_initialized!(); - match code { - 0 => Some(GLError::NotAvailable), - 1 => Some(GLError::UnsupportedFormat), - 2 => Some(GLError::UnsupportedProfile), - value => Some(GLError::__Unknown(value)), - } - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -impl StaticType for GLError { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_gl_error_get_type()) } - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -impl<'a> FromValueOptional<'a> for GLError { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -impl<'a> FromValue<'a> for GLError { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_16", feature = "dox"))] -impl SetValue for GLError { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum GrabOwnership { - None, - Window, - Application, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for GrabOwnership { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "GrabOwnership::{}", match *self { - GrabOwnership::None => "None", - GrabOwnership::Window => "Window", - GrabOwnership::Application => "Application", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for GrabOwnership { - type GlibType = ffi::GdkGrabOwnership; - - fn to_glib(&self) -> ffi::GdkGrabOwnership { - match *self { - GrabOwnership::None => ffi::GDK_OWNERSHIP_NONE, - GrabOwnership::Window => ffi::GDK_OWNERSHIP_WINDOW, - GrabOwnership::Application => ffi::GDK_OWNERSHIP_APPLICATION, - GrabOwnership::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for GrabOwnership { - fn from_glib(value: ffi::GdkGrabOwnership) -> Self { - skip_assert_initialized!(); - match value { - 0 => GrabOwnership::None, - 1 => GrabOwnership::Window, - 2 => GrabOwnership::Application, - value => GrabOwnership::__Unknown(value), - } - } -} - -impl StaticType for GrabOwnership { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_grab_ownership_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for GrabOwnership { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for GrabOwnership { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for GrabOwnership { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum GrabStatus { - Success, - AlreadyGrabbed, - InvalidTime, - NotViewable, - Frozen, - Failed, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for GrabStatus { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "GrabStatus::{}", match *self { - GrabStatus::Success => "Success", - GrabStatus::AlreadyGrabbed => "AlreadyGrabbed", - GrabStatus::InvalidTime => "InvalidTime", - GrabStatus::NotViewable => "NotViewable", - GrabStatus::Frozen => "Frozen", - GrabStatus::Failed => "Failed", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for GrabStatus { - type GlibType = ffi::GdkGrabStatus; - - fn to_glib(&self) -> ffi::GdkGrabStatus { - match *self { - GrabStatus::Success => ffi::GDK_GRAB_SUCCESS, - GrabStatus::AlreadyGrabbed => ffi::GDK_GRAB_ALREADY_GRABBED, - GrabStatus::InvalidTime => ffi::GDK_GRAB_INVALID_TIME, - GrabStatus::NotViewable => ffi::GDK_GRAB_NOT_VIEWABLE, - GrabStatus::Frozen => ffi::GDK_GRAB_FROZEN, - GrabStatus::Failed => ffi::GDK_GRAB_FAILED, - GrabStatus::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for GrabStatus { - fn from_glib(value: ffi::GdkGrabStatus) -> Self { - skip_assert_initialized!(); - match value { - 0 => GrabStatus::Success, - 1 => GrabStatus::AlreadyGrabbed, - 2 => GrabStatus::InvalidTime, - 3 => GrabStatus::NotViewable, - 4 => GrabStatus::Frozen, - 5 => GrabStatus::Failed, - value => GrabStatus::__Unknown(value), - } - } -} - -impl StaticType for GrabStatus { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_grab_status_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for GrabStatus { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for GrabStatus { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for GrabStatus { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum Gravity { - NorthWest, - North, - NorthEast, - West, - Center, - East, - SouthWest, - South, - SouthEast, - Static, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for Gravity { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Gravity::{}", match *self { - Gravity::NorthWest => "NorthWest", - Gravity::North => "North", - Gravity::NorthEast => "NorthEast", - Gravity::West => "West", - Gravity::Center => "Center", - Gravity::East => "East", - Gravity::SouthWest => "SouthWest", - Gravity::South => "South", - Gravity::SouthEast => "SouthEast", - Gravity::Static => "Static", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for Gravity { - type GlibType = ffi::GdkGravity; - - fn to_glib(&self) -> ffi::GdkGravity { - match *self { - Gravity::NorthWest => ffi::GDK_GRAVITY_NORTH_WEST, - Gravity::North => ffi::GDK_GRAVITY_NORTH, - Gravity::NorthEast => ffi::GDK_GRAVITY_NORTH_EAST, - Gravity::West => ffi::GDK_GRAVITY_WEST, - Gravity::Center => ffi::GDK_GRAVITY_CENTER, - Gravity::East => ffi::GDK_GRAVITY_EAST, - Gravity::SouthWest => ffi::GDK_GRAVITY_SOUTH_WEST, - Gravity::South => ffi::GDK_GRAVITY_SOUTH, - Gravity::SouthEast => ffi::GDK_GRAVITY_SOUTH_EAST, - Gravity::Static => ffi::GDK_GRAVITY_STATIC, - Gravity::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for Gravity { - fn from_glib(value: ffi::GdkGravity) -> Self { - skip_assert_initialized!(); - match value { - 1 => Gravity::NorthWest, - 2 => Gravity::North, - 3 => Gravity::NorthEast, - 4 => Gravity::West, - 5 => Gravity::Center, - 6 => Gravity::East, - 7 => Gravity::SouthWest, - 8 => Gravity::South, - 9 => Gravity::SouthEast, - 10 => Gravity::Static, - value => Gravity::__Unknown(value), - } - } -} - -impl StaticType for Gravity { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_gravity_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for Gravity { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for Gravity { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for Gravity { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum InputMode { - Disabled, - Screen, - Window, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for InputMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "InputMode::{}", match *self { - InputMode::Disabled => "Disabled", - InputMode::Screen => "Screen", - InputMode::Window => "Window", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for InputMode { - type GlibType = ffi::GdkInputMode; - - fn to_glib(&self) -> ffi::GdkInputMode { - match *self { - InputMode::Disabled => ffi::GDK_MODE_DISABLED, - InputMode::Screen => ffi::GDK_MODE_SCREEN, - InputMode::Window => ffi::GDK_MODE_WINDOW, - InputMode::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for InputMode { - fn from_glib(value: ffi::GdkInputMode) -> Self { - skip_assert_initialized!(); - match value { - 0 => InputMode::Disabled, - 1 => InputMode::Screen, - 2 => InputMode::Window, - value => InputMode::__Unknown(value), - } - } -} - -impl StaticType for InputMode { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_input_mode_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for InputMode { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for InputMode { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for InputMode { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum InputSource { - Mouse, - Pen, - Eraser, - Cursor, - Keyboard, - Touchscreen, - Touchpad, - Trackpoint, - TabletPad, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for InputSource { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "InputSource::{}", match *self { - InputSource::Mouse => "Mouse", - InputSource::Pen => "Pen", - InputSource::Eraser => "Eraser", - InputSource::Cursor => "Cursor", - InputSource::Keyboard => "Keyboard", - InputSource::Touchscreen => "Touchscreen", - InputSource::Touchpad => "Touchpad", - InputSource::Trackpoint => "Trackpoint", - InputSource::TabletPad => "TabletPad", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for InputSource { - type GlibType = ffi::GdkInputSource; - - fn to_glib(&self) -> ffi::GdkInputSource { - match *self { - InputSource::Mouse => ffi::GDK_SOURCE_MOUSE, - InputSource::Pen => ffi::GDK_SOURCE_PEN, - InputSource::Eraser => ffi::GDK_SOURCE_ERASER, - InputSource::Cursor => ffi::GDK_SOURCE_CURSOR, - InputSource::Keyboard => ffi::GDK_SOURCE_KEYBOARD, - InputSource::Touchscreen => ffi::GDK_SOURCE_TOUCHSCREEN, - InputSource::Touchpad => ffi::GDK_SOURCE_TOUCHPAD, - InputSource::Trackpoint => ffi::GDK_SOURCE_TRACKPOINT, - InputSource::TabletPad => ffi::GDK_SOURCE_TABLET_PAD, - InputSource::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for InputSource { - fn from_glib(value: ffi::GdkInputSource) -> Self { - skip_assert_initialized!(); - match value { - 0 => InputSource::Mouse, - 1 => InputSource::Pen, - 2 => InputSource::Eraser, - 3 => InputSource::Cursor, - 4 => InputSource::Keyboard, - 5 => InputSource::Touchscreen, - 6 => InputSource::Touchpad, - 7 => InputSource::Trackpoint, - 8 => InputSource::TabletPad, - value => InputSource::__Unknown(value), - } - } -} - -impl StaticType for InputSource { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_input_source_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for InputSource { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for InputSource { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for InputSource { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum ModifierIntent { - PrimaryAccelerator, - ContextMenu, - ExtendSelection, - ModifySelection, - NoTextInput, - ShiftGroup, - DefaultModMask, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for ModifierIntent { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "ModifierIntent::{}", match *self { - ModifierIntent::PrimaryAccelerator => "PrimaryAccelerator", - ModifierIntent::ContextMenu => "ContextMenu", - ModifierIntent::ExtendSelection => "ExtendSelection", - ModifierIntent::ModifySelection => "ModifySelection", - ModifierIntent::NoTextInput => "NoTextInput", - ModifierIntent::ShiftGroup => "ShiftGroup", - ModifierIntent::DefaultModMask => "DefaultModMask", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for ModifierIntent { - type GlibType = ffi::GdkModifierIntent; - - fn to_glib(&self) -> ffi::GdkModifierIntent { - match *self { - ModifierIntent::PrimaryAccelerator => ffi::GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR, - ModifierIntent::ContextMenu => ffi::GDK_MODIFIER_INTENT_CONTEXT_MENU, - ModifierIntent::ExtendSelection => ffi::GDK_MODIFIER_INTENT_EXTEND_SELECTION, - ModifierIntent::ModifySelection => ffi::GDK_MODIFIER_INTENT_MODIFY_SELECTION, - ModifierIntent::NoTextInput => ffi::GDK_MODIFIER_INTENT_NO_TEXT_INPUT, - ModifierIntent::ShiftGroup => ffi::GDK_MODIFIER_INTENT_SHIFT_GROUP, - ModifierIntent::DefaultModMask => ffi::GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK, - ModifierIntent::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for ModifierIntent { - fn from_glib(value: ffi::GdkModifierIntent) -> Self { - skip_assert_initialized!(); - match value { - 0 => ModifierIntent::PrimaryAccelerator, - 1 => ModifierIntent::ContextMenu, - 2 => ModifierIntent::ExtendSelection, - 3 => ModifierIntent::ModifySelection, - 4 => ModifierIntent::NoTextInput, - 5 => ModifierIntent::ShiftGroup, - 6 => ModifierIntent::DefaultModMask, - value => ModifierIntent::__Unknown(value), - } - } -} - -impl StaticType for ModifierIntent { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_modifier_intent_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for ModifierIntent { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for ModifierIntent { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for ModifierIntent { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum NotifyType { - Ancestor, - Virtual, - Inferior, - Nonlinear, - NonlinearVirtual, - Unknown, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for NotifyType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "NotifyType::{}", match *self { - NotifyType::Ancestor => "Ancestor", - NotifyType::Virtual => "Virtual", - NotifyType::Inferior => "Inferior", - NotifyType::Nonlinear => "Nonlinear", - NotifyType::NonlinearVirtual => "NonlinearVirtual", - NotifyType::Unknown => "Unknown", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for NotifyType { - type GlibType = ffi::GdkNotifyType; - - fn to_glib(&self) -> ffi::GdkNotifyType { - match *self { - NotifyType::Ancestor => ffi::GDK_NOTIFY_ANCESTOR, - NotifyType::Virtual => ffi::GDK_NOTIFY_VIRTUAL, - NotifyType::Inferior => ffi::GDK_NOTIFY_INFERIOR, - NotifyType::Nonlinear => ffi::GDK_NOTIFY_NONLINEAR, - NotifyType::NonlinearVirtual => ffi::GDK_NOTIFY_NONLINEAR_VIRTUAL, - NotifyType::Unknown => ffi::GDK_NOTIFY_UNKNOWN, - NotifyType::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for NotifyType { - fn from_glib(value: ffi::GdkNotifyType) -> Self { - skip_assert_initialized!(); - match value { - 0 => NotifyType::Ancestor, - 1 => NotifyType::Virtual, - 2 => NotifyType::Inferior, - 3 => NotifyType::Nonlinear, - 4 => NotifyType::NonlinearVirtual, - 5 => NotifyType::Unknown, - value => NotifyType::__Unknown(value), - } - } -} - -impl StaticType for NotifyType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_notify_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for NotifyType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for NotifyType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for NotifyType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum OwnerChange { - NewOwner, - Destroy, - Close, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for OwnerChange { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "OwnerChange::{}", match *self { - OwnerChange::NewOwner => "NewOwner", - OwnerChange::Destroy => "Destroy", - OwnerChange::Close => "Close", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for OwnerChange { - type GlibType = ffi::GdkOwnerChange; - - fn to_glib(&self) -> ffi::GdkOwnerChange { - match *self { - OwnerChange::NewOwner => ffi::GDK_OWNER_CHANGE_NEW_OWNER, - OwnerChange::Destroy => ffi::GDK_OWNER_CHANGE_DESTROY, - OwnerChange::Close => ffi::GDK_OWNER_CHANGE_CLOSE, - OwnerChange::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for OwnerChange { - fn from_glib(value: ffi::GdkOwnerChange) -> Self { - skip_assert_initialized!(); - match value { - 0 => OwnerChange::NewOwner, - 1 => OwnerChange::Destroy, - 2 => OwnerChange::Close, - value => OwnerChange::__Unknown(value), - } - } -} - -impl StaticType for OwnerChange { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_owner_change_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for OwnerChange { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for OwnerChange { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for OwnerChange { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum PropMode { - Replace, - Prepend, - Append, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for PropMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "PropMode::{}", match *self { - PropMode::Replace => "Replace", - PropMode::Prepend => "Prepend", - PropMode::Append => "Append", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for PropMode { - type GlibType = ffi::GdkPropMode; - - fn to_glib(&self) -> ffi::GdkPropMode { - match *self { - PropMode::Replace => ffi::GDK_PROP_MODE_REPLACE, - PropMode::Prepend => ffi::GDK_PROP_MODE_PREPEND, - PropMode::Append => ffi::GDK_PROP_MODE_APPEND, - PropMode::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for PropMode { - fn from_glib(value: ffi::GdkPropMode) -> Self { - skip_assert_initialized!(); - match value { - 0 => PropMode::Replace, - 1 => PropMode::Prepend, - 2 => PropMode::Append, - value => PropMode::__Unknown(value), - } - } -} - -impl StaticType for PropMode { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_prop_mode_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for PropMode { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for PropMode { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for PropMode { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum PropertyState { - NewValue, - Delete, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for PropertyState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "PropertyState::{}", match *self { - PropertyState::NewValue => "NewValue", - PropertyState::Delete => "Delete", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for PropertyState { - type GlibType = ffi::GdkPropertyState; - - fn to_glib(&self) -> ffi::GdkPropertyState { - match *self { - PropertyState::NewValue => ffi::GDK_PROPERTY_NEW_VALUE, - PropertyState::Delete => ffi::GDK_PROPERTY_DELETE, - PropertyState::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for PropertyState { - fn from_glib(value: ffi::GdkPropertyState) -> Self { - skip_assert_initialized!(); - match value { - 0 => PropertyState::NewValue, - 1 => PropertyState::Delete, - value => PropertyState::__Unknown(value), - } - } -} - -impl StaticType for PropertyState { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_property_state_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for PropertyState { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for PropertyState { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for PropertyState { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum ScrollDirection { - Up, - Down, - Left, - Right, - Smooth, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for ScrollDirection { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "ScrollDirection::{}", match *self { - ScrollDirection::Up => "Up", - ScrollDirection::Down => "Down", - ScrollDirection::Left => "Left", - ScrollDirection::Right => "Right", - ScrollDirection::Smooth => "Smooth", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for ScrollDirection { - type GlibType = ffi::GdkScrollDirection; - - fn to_glib(&self) -> ffi::GdkScrollDirection { - match *self { - ScrollDirection::Up => ffi::GDK_SCROLL_UP, - ScrollDirection::Down => ffi::GDK_SCROLL_DOWN, - ScrollDirection::Left => ffi::GDK_SCROLL_LEFT, - ScrollDirection::Right => ffi::GDK_SCROLL_RIGHT, - ScrollDirection::Smooth => ffi::GDK_SCROLL_SMOOTH, - ScrollDirection::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for ScrollDirection { - fn from_glib(value: ffi::GdkScrollDirection) -> Self { - skip_assert_initialized!(); - match value { - 0 => ScrollDirection::Up, - 1 => ScrollDirection::Down, - 2 => ScrollDirection::Left, - 3 => ScrollDirection::Right, - 4 => ScrollDirection::Smooth, - value => ScrollDirection::__Unknown(value), - } - } -} - -impl StaticType for ScrollDirection { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_scroll_direction_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for ScrollDirection { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for ScrollDirection { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for ScrollDirection { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum SettingAction { - New, - Changed, - Deleted, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for SettingAction { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "SettingAction::{}", match *self { - SettingAction::New => "New", - SettingAction::Changed => "Changed", - SettingAction::Deleted => "Deleted", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for SettingAction { - type GlibType = ffi::GdkSettingAction; - - fn to_glib(&self) -> ffi::GdkSettingAction { - match *self { - SettingAction::New => ffi::GDK_SETTING_ACTION_NEW, - SettingAction::Changed => ffi::GDK_SETTING_ACTION_CHANGED, - SettingAction::Deleted => ffi::GDK_SETTING_ACTION_DELETED, - SettingAction::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for SettingAction { - fn from_glib(value: ffi::GdkSettingAction) -> Self { - skip_assert_initialized!(); - match value { - 0 => SettingAction::New, - 1 => SettingAction::Changed, - 2 => SettingAction::Deleted, - value => SettingAction::__Unknown(value), - } - } -} - -impl StaticType for SettingAction { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_setting_action_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for SettingAction { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for SettingAction { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for SettingAction { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum SubpixelLayout { - Unknown, - None, - HorizontalRgb, - HorizontalBgr, - VerticalRgb, - VerticalBgr, - #[doc(hidden)] - __Unknown(i32), -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl fmt::Display for SubpixelLayout { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "SubpixelLayout::{}", match *self { - SubpixelLayout::Unknown => "Unknown", - SubpixelLayout::None => "None", - SubpixelLayout::HorizontalRgb => "HorizontalRgb", - SubpixelLayout::HorizontalBgr => "HorizontalBgr", - SubpixelLayout::VerticalRgb => "VerticalRgb", - SubpixelLayout::VerticalBgr => "VerticalBgr", - _ => "Unknown", - }) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for SubpixelLayout { - type GlibType = ffi::GdkSubpixelLayout; - - fn to_glib(&self) -> ffi::GdkSubpixelLayout { - match *self { - SubpixelLayout::Unknown => ffi::GDK_SUBPIXEL_LAYOUT_UNKNOWN, - SubpixelLayout::None => ffi::GDK_SUBPIXEL_LAYOUT_NONE, - SubpixelLayout::HorizontalRgb => ffi::GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB, - SubpixelLayout::HorizontalBgr => ffi::GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR, - SubpixelLayout::VerticalRgb => ffi::GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB, - SubpixelLayout::VerticalBgr => ffi::GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR, - SubpixelLayout::__Unknown(value) => value - } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for SubpixelLayout { - fn from_glib(value: ffi::GdkSubpixelLayout) -> Self { - skip_assert_initialized!(); - match value { - 0 => SubpixelLayout::Unknown, - 1 => SubpixelLayout::None, - 2 => SubpixelLayout::HorizontalRgb, - 3 => SubpixelLayout::HorizontalBgr, - 4 => SubpixelLayout::VerticalRgb, - 5 => SubpixelLayout::VerticalBgr, - value => SubpixelLayout::__Unknown(value), - } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl StaticType for SubpixelLayout { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_subpixel_layout_get_type()) } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValueOptional<'a> for SubpixelLayout { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValue<'a> for SubpixelLayout { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl SetValue for SubpixelLayout { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum VisibilityState { - Unobscured, - Partial, - FullyObscured, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for VisibilityState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "VisibilityState::{}", match *self { - VisibilityState::Unobscured => "Unobscured", - VisibilityState::Partial => "Partial", - VisibilityState::FullyObscured => "FullyObscured", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for VisibilityState { - type GlibType = ffi::GdkVisibilityState; - - fn to_glib(&self) -> ffi::GdkVisibilityState { - match *self { - VisibilityState::Unobscured => ffi::GDK_VISIBILITY_UNOBSCURED, - VisibilityState::Partial => ffi::GDK_VISIBILITY_PARTIAL, - VisibilityState::FullyObscured => ffi::GDK_VISIBILITY_FULLY_OBSCURED, - VisibilityState::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for VisibilityState { - fn from_glib(value: ffi::GdkVisibilityState) -> Self { - skip_assert_initialized!(); - match value { - 0 => VisibilityState::Unobscured, - 1 => VisibilityState::Partial, - 2 => VisibilityState::FullyObscured, - value => VisibilityState::__Unknown(value), - } - } -} - -impl StaticType for VisibilityState { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_visibility_state_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for VisibilityState { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for VisibilityState { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for VisibilityState { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum VisualType { - StaticGray, - Grayscale, - StaticColor, - PseudoColor, - TrueColor, - DirectColor, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for VisualType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "VisualType::{}", match *self { - VisualType::StaticGray => "StaticGray", - VisualType::Grayscale => "Grayscale", - VisualType::StaticColor => "StaticColor", - VisualType::PseudoColor => "PseudoColor", - VisualType::TrueColor => "TrueColor", - VisualType::DirectColor => "DirectColor", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for VisualType { - type GlibType = ffi::GdkVisualType; - - fn to_glib(&self) -> ffi::GdkVisualType { - match *self { - VisualType::StaticGray => ffi::GDK_VISUAL_STATIC_GRAY, - VisualType::Grayscale => ffi::GDK_VISUAL_GRAYSCALE, - VisualType::StaticColor => ffi::GDK_VISUAL_STATIC_COLOR, - VisualType::PseudoColor => ffi::GDK_VISUAL_PSEUDO_COLOR, - VisualType::TrueColor => ffi::GDK_VISUAL_TRUE_COLOR, - VisualType::DirectColor => ffi::GDK_VISUAL_DIRECT_COLOR, - VisualType::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for VisualType { - fn from_glib(value: ffi::GdkVisualType) -> Self { - skip_assert_initialized!(); - match value { - 0 => VisualType::StaticGray, - 1 => VisualType::Grayscale, - 2 => VisualType::StaticColor, - 3 => VisualType::PseudoColor, - 4 => VisualType::TrueColor, - 5 => VisualType::DirectColor, - value => VisualType::__Unknown(value), - } - } -} - -impl StaticType for VisualType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_visual_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for VisualType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for VisualType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for VisualType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum WindowEdge { - NorthWest, - North, - NorthEast, - West, - East, - SouthWest, - South, - SouthEast, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for WindowEdge { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "WindowEdge::{}", match *self { - WindowEdge::NorthWest => "NorthWest", - WindowEdge::North => "North", - WindowEdge::NorthEast => "NorthEast", - WindowEdge::West => "West", - WindowEdge::East => "East", - WindowEdge::SouthWest => "SouthWest", - WindowEdge::South => "South", - WindowEdge::SouthEast => "SouthEast", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for WindowEdge { - type GlibType = ffi::GdkWindowEdge; - - fn to_glib(&self) -> ffi::GdkWindowEdge { - match *self { - WindowEdge::NorthWest => ffi::GDK_WINDOW_EDGE_NORTH_WEST, - WindowEdge::North => ffi::GDK_WINDOW_EDGE_NORTH, - WindowEdge::NorthEast => ffi::GDK_WINDOW_EDGE_NORTH_EAST, - WindowEdge::West => ffi::GDK_WINDOW_EDGE_WEST, - WindowEdge::East => ffi::GDK_WINDOW_EDGE_EAST, - WindowEdge::SouthWest => ffi::GDK_WINDOW_EDGE_SOUTH_WEST, - WindowEdge::South => ffi::GDK_WINDOW_EDGE_SOUTH, - WindowEdge::SouthEast => ffi::GDK_WINDOW_EDGE_SOUTH_EAST, - WindowEdge::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for WindowEdge { - fn from_glib(value: ffi::GdkWindowEdge) -> Self { - skip_assert_initialized!(); - match value { - 0 => WindowEdge::NorthWest, - 1 => WindowEdge::North, - 2 => WindowEdge::NorthEast, - 3 => WindowEdge::West, - 4 => WindowEdge::East, - 5 => WindowEdge::SouthWest, - 6 => WindowEdge::South, - 7 => WindowEdge::SouthEast, - value => WindowEdge::__Unknown(value), - } - } -} - -impl StaticType for WindowEdge { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_window_edge_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WindowEdge { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WindowEdge { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for WindowEdge { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum WindowType { - Root, - Toplevel, - Child, - Temp, - Foreign, - Offscreen, - Subsurface, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for WindowType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "WindowType::{}", match *self { - WindowType::Root => "Root", - WindowType::Toplevel => "Toplevel", - WindowType::Child => "Child", - WindowType::Temp => "Temp", - WindowType::Foreign => "Foreign", - WindowType::Offscreen => "Offscreen", - WindowType::Subsurface => "Subsurface", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for WindowType { - type GlibType = ffi::GdkWindowType; - - fn to_glib(&self) -> ffi::GdkWindowType { - match *self { - WindowType::Root => ffi::GDK_WINDOW_ROOT, - WindowType::Toplevel => ffi::GDK_WINDOW_TOPLEVEL, - WindowType::Child => ffi::GDK_WINDOW_CHILD, - WindowType::Temp => ffi::GDK_WINDOW_TEMP, - WindowType::Foreign => ffi::GDK_WINDOW_FOREIGN, - WindowType::Offscreen => ffi::GDK_WINDOW_OFFSCREEN, - WindowType::Subsurface => ffi::GDK_WINDOW_SUBSURFACE, - WindowType::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for WindowType { - fn from_glib(value: ffi::GdkWindowType) -> Self { - skip_assert_initialized!(); - match value { - 0 => WindowType::Root, - 1 => WindowType::Toplevel, - 2 => WindowType::Child, - 3 => WindowType::Temp, - 4 => WindowType::Foreign, - 5 => WindowType::Offscreen, - 6 => WindowType::Subsurface, - value => WindowType::__Unknown(value), - } - } -} - -impl StaticType for WindowType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_window_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WindowType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WindowType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for WindowType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum WindowTypeHint { - Normal, - Dialog, - Menu, - Toolbar, - Splashscreen, - Utility, - Dock, - Desktop, - DropdownMenu, - PopupMenu, - Tooltip, - Notification, - Combo, - Dnd, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for WindowTypeHint { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "WindowTypeHint::{}", match *self { - WindowTypeHint::Normal => "Normal", - WindowTypeHint::Dialog => "Dialog", - WindowTypeHint::Menu => "Menu", - WindowTypeHint::Toolbar => "Toolbar", - WindowTypeHint::Splashscreen => "Splashscreen", - WindowTypeHint::Utility => "Utility", - WindowTypeHint::Dock => "Dock", - WindowTypeHint::Desktop => "Desktop", - WindowTypeHint::DropdownMenu => "DropdownMenu", - WindowTypeHint::PopupMenu => "PopupMenu", - WindowTypeHint::Tooltip => "Tooltip", - WindowTypeHint::Notification => "Notification", - WindowTypeHint::Combo => "Combo", - WindowTypeHint::Dnd => "Dnd", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for WindowTypeHint { - type GlibType = ffi::GdkWindowTypeHint; - - fn to_glib(&self) -> ffi::GdkWindowTypeHint { - match *self { - WindowTypeHint::Normal => ffi::GDK_WINDOW_TYPE_HINT_NORMAL, - WindowTypeHint::Dialog => ffi::GDK_WINDOW_TYPE_HINT_DIALOG, - WindowTypeHint::Menu => ffi::GDK_WINDOW_TYPE_HINT_MENU, - WindowTypeHint::Toolbar => ffi::GDK_WINDOW_TYPE_HINT_TOOLBAR, - WindowTypeHint::Splashscreen => ffi::GDK_WINDOW_TYPE_HINT_SPLASHSCREEN, - WindowTypeHint::Utility => ffi::GDK_WINDOW_TYPE_HINT_UTILITY, - WindowTypeHint::Dock => ffi::GDK_WINDOW_TYPE_HINT_DOCK, - WindowTypeHint::Desktop => ffi::GDK_WINDOW_TYPE_HINT_DESKTOP, - WindowTypeHint::DropdownMenu => ffi::GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, - WindowTypeHint::PopupMenu => ffi::GDK_WINDOW_TYPE_HINT_POPUP_MENU, - WindowTypeHint::Tooltip => ffi::GDK_WINDOW_TYPE_HINT_TOOLTIP, - WindowTypeHint::Notification => ffi::GDK_WINDOW_TYPE_HINT_NOTIFICATION, - WindowTypeHint::Combo => ffi::GDK_WINDOW_TYPE_HINT_COMBO, - WindowTypeHint::Dnd => ffi::GDK_WINDOW_TYPE_HINT_DND, - WindowTypeHint::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for WindowTypeHint { - fn from_glib(value: ffi::GdkWindowTypeHint) -> Self { - skip_assert_initialized!(); - match value { - 0 => WindowTypeHint::Normal, - 1 => WindowTypeHint::Dialog, - 2 => WindowTypeHint::Menu, - 3 => WindowTypeHint::Toolbar, - 4 => WindowTypeHint::Splashscreen, - 5 => WindowTypeHint::Utility, - 6 => WindowTypeHint::Dock, - 7 => WindowTypeHint::Desktop, - 8 => WindowTypeHint::DropdownMenu, - 9 => WindowTypeHint::PopupMenu, - 10 => WindowTypeHint::Tooltip, - 11 => WindowTypeHint::Notification, - 12 => WindowTypeHint::Combo, - 13 => WindowTypeHint::Dnd, - value => WindowTypeHint::__Unknown(value), - } - } -} - -impl StaticType for WindowTypeHint { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_window_type_hint_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WindowTypeHint { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WindowTypeHint { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for WindowTypeHint { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -pub enum WindowWindowClass { - InputOutput, - InputOnly, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for WindowWindowClass { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "WindowWindowClass::{}", match *self { - WindowWindowClass::InputOutput => "InputOutput", - WindowWindowClass::InputOnly => "InputOnly", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for WindowWindowClass { - type GlibType = ffi::GdkWindowWindowClass; - - fn to_glib(&self) -> ffi::GdkWindowWindowClass { - match *self { - WindowWindowClass::InputOutput => ffi::GDK_INPUT_OUTPUT, - WindowWindowClass::InputOnly => ffi::GDK_INPUT_ONLY, - WindowWindowClass::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for WindowWindowClass { - fn from_glib(value: ffi::GdkWindowWindowClass) -> Self { - skip_assert_initialized!(); - match value { - 0 => WindowWindowClass::InputOutput, - 1 => WindowWindowClass::InputOnly, - value => WindowWindowClass::__Unknown(value), - } - } -} - -impl StaticType for WindowWindowClass { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_window_window_class_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WindowWindowClass { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WindowWindowClass { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) - } -} - -impl SetValue for WindowWindowClass { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) - } -} - diff --git a/src/auto/event_sequence.rs b/src/auto/event_sequence.rs deleted file mode 100644 index feae2653b218..000000000000 --- a/src/auto/event_sequence.rs +++ /dev/null @@ -1,17 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use ffi; -use gobject_ffi; - -glib_wrapper! { - #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct EventSequence(Boxed); - - match fn { - copy => |ptr| gobject_ffi::g_boxed_copy(ffi::gdk_event_sequence_get_type(), ptr as *mut _) as *mut ffi::GdkEventSequence, - free => |ptr| gobject_ffi::g_boxed_free(ffi::gdk_event_sequence_get_type(), ptr as *mut _), - get_type => || ffi::gdk_event_sequence_get_type(), - } -} diff --git a/src/auto/flags.rs b/src/auto/flags.rs deleted file mode 100644 index 0264278d560b..000000000000 --- a/src/auto/flags.rs +++ /dev/null @@ -1,677 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use ffi; -use glib::StaticType; -use glib::Type; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::FromValueOptional; -use glib::value::SetValue; -use glib::value::Value; -use gobject_ffi; - -#[cfg(any(feature = "v3_22", feature = "dox"))] -bitflags! { - pub struct AnchorHints: u32 { - const FLIP_X = 1; - const FLIP_Y = 2; - const SLIDE_X = 4; - const SLIDE_Y = 8; - const RESIZE_X = 16; - const RESIZE_Y = 32; - const FLIP = 3; - const SLIDE = 12; - const RESIZE = 48; - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for AnchorHints { - type GlibType = ffi::GdkAnchorHints; - - fn to_glib(&self) -> ffi::GdkAnchorHints { - self.bits() - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for AnchorHints { - fn from_glib(value: ffi::GdkAnchorHints) -> AnchorHints { - skip_assert_initialized!(); - AnchorHints::from_bits_truncate(value) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl StaticType for AnchorHints { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_anchor_hints_get_type()) } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValueOptional<'a> for AnchorHints { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValue<'a> for AnchorHints { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl SetValue for AnchorHints { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -bitflags! { - pub struct AxisFlags: u32 { - const X = 2; - const Y = 4; - const PRESSURE = 8; - const XTILT = 16; - const YTILT = 32; - const WHEEL = 64; - const DISTANCE = 128; - const ROTATION = 256; - const SLIDER = 512; - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for AxisFlags { - type GlibType = ffi::GdkAxisFlags; - - fn to_glib(&self) -> ffi::GdkAxisFlags { - self.bits() - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for AxisFlags { - fn from_glib(value: ffi::GdkAxisFlags) -> AxisFlags { - skip_assert_initialized!(); - AxisFlags::from_bits_truncate(value) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl StaticType for AxisFlags { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_axis_flags_get_type()) } - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValueOptional<'a> for AxisFlags { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl<'a> FromValue<'a> for AxisFlags { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -impl SetValue for AxisFlags { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct DragAction: u32 { - const DEFAULT = 1; - const COPY = 2; - const MOVE = 4; - const LINK = 8; - const PRIVATE = 16; - const ASK = 32; - } -} - -#[doc(hidden)] -impl ToGlib for DragAction { - type GlibType = ffi::GdkDragAction; - - fn to_glib(&self) -> ffi::GdkDragAction { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for DragAction { - fn from_glib(value: ffi::GdkDragAction) -> DragAction { - skip_assert_initialized!(); - DragAction::from_bits_truncate(value) - } -} - -impl StaticType for DragAction { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_drag_action_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for DragAction { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for DragAction { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for DragAction { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct EventMask: u32 { - const EXPOSURE_MASK = 2; - const POINTER_MOTION_MASK = 4; - const POINTER_MOTION_HINT_MASK = 8; - const BUTTON_MOTION_MASK = 16; - const BUTTON1_MOTION_MASK = 32; - const BUTTON2_MOTION_MASK = 64; - const BUTTON3_MOTION_MASK = 128; - const BUTTON_PRESS_MASK = 256; - const BUTTON_RELEASE_MASK = 512; - const KEY_PRESS_MASK = 1024; - const KEY_RELEASE_MASK = 2048; - const ENTER_NOTIFY_MASK = 4096; - const LEAVE_NOTIFY_MASK = 8192; - const FOCUS_CHANGE_MASK = 16384; - const STRUCTURE_MASK = 32768; - const PROPERTY_CHANGE_MASK = 65536; - const VISIBILITY_NOTIFY_MASK = 131072; - const PROXIMITY_IN_MASK = 262144; - const PROXIMITY_OUT_MASK = 524288; - const SUBSTRUCTURE_MASK = 1048576; - const SCROLL_MASK = 2097152; - const TOUCH_MASK = 4194304; - const SMOOTH_SCROLL_MASK = 8388608; - const TOUCHPAD_GESTURE_MASK = 16777216; - const TABLET_PAD_MASK = 33554432; - const ALL_EVENTS_MASK = 67108862; - } -} - -#[doc(hidden)] -impl ToGlib for EventMask { - type GlibType = ffi::GdkEventMask; - - fn to_glib(&self) -> ffi::GdkEventMask { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for EventMask { - fn from_glib(value: ffi::GdkEventMask) -> EventMask { - skip_assert_initialized!(); - EventMask::from_bits_truncate(value) - } -} - -impl StaticType for EventMask { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_event_mask_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for EventMask { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for EventMask { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for EventMask { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct FrameClockPhase: u32 { - const NONE = 0; - const FLUSH_EVENTS = 1; - const BEFORE_PAINT = 2; - const UPDATE = 4; - const LAYOUT = 8; - const PAINT = 16; - const RESUME_EVENTS = 32; - const AFTER_PAINT = 64; - } -} - -#[doc(hidden)] -impl ToGlib for FrameClockPhase { - type GlibType = ffi::GdkFrameClockPhase; - - fn to_glib(&self) -> ffi::GdkFrameClockPhase { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for FrameClockPhase { - fn from_glib(value: ffi::GdkFrameClockPhase) -> FrameClockPhase { - skip_assert_initialized!(); - FrameClockPhase::from_bits_truncate(value) - } -} - -impl StaticType for FrameClockPhase { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_frame_clock_phase_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for FrameClockPhase { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for FrameClockPhase { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for FrameClockPhase { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct ModifierType: u32 { - const SHIFT_MASK = 1; - const LOCK_MASK = 2; - const CONTROL_MASK = 4; - const MOD1_MASK = 8; - const MOD2_MASK = 16; - const MOD3_MASK = 32; - const MOD4_MASK = 64; - const MOD5_MASK = 128; - const BUTTON1_MASK = 256; - const BUTTON2_MASK = 512; - const BUTTON3_MASK = 1024; - const BUTTON4_MASK = 2048; - const BUTTON5_MASK = 4096; - const MODIFIER_RESERVED_13_MASK = 8192; - const MODIFIER_RESERVED_14_MASK = 16384; - const MODIFIER_RESERVED_15_MASK = 32768; - const MODIFIER_RESERVED_16_MASK = 65536; - const MODIFIER_RESERVED_17_MASK = 131072; - const MODIFIER_RESERVED_18_MASK = 262144; - const MODIFIER_RESERVED_19_MASK = 524288; - const MODIFIER_RESERVED_20_MASK = 1048576; - const MODIFIER_RESERVED_21_MASK = 2097152; - const MODIFIER_RESERVED_22_MASK = 4194304; - const MODIFIER_RESERVED_23_MASK = 8388608; - const MODIFIER_RESERVED_24_MASK = 16777216; - const MODIFIER_RESERVED_25_MASK = 33554432; - const SUPER_MASK = 67108864; - const HYPER_MASK = 134217728; - const META_MASK = 268435456; - const MODIFIER_RESERVED_29_MASK = 536870912; - const RELEASE_MASK = 1073741824; - const MODIFIER_MASK = 1543512063; - } -} - -#[doc(hidden)] -impl ToGlib for ModifierType { - type GlibType = ffi::GdkModifierType; - - fn to_glib(&self) -> ffi::GdkModifierType { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for ModifierType { - fn from_glib(value: ffi::GdkModifierType) -> ModifierType { - skip_assert_initialized!(); - ModifierType::from_bits_truncate(value) - } -} - -impl StaticType for ModifierType { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_modifier_type_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for ModifierType { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for ModifierType { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for ModifierType { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -bitflags! { - pub struct SeatCapabilities: u32 { - const NONE = 0; - const POINTER = 1; - const TOUCH = 2; - const TABLET_STYLUS = 4; - const KEYBOARD = 8; - const ALL_POINTING = 7; - const ALL = 15; - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[doc(hidden)] -impl ToGlib for SeatCapabilities { - type GlibType = ffi::GdkSeatCapabilities; - - fn to_glib(&self) -> ffi::GdkSeatCapabilities { - self.bits() - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -#[doc(hidden)] -impl FromGlib for SeatCapabilities { - fn from_glib(value: ffi::GdkSeatCapabilities) -> SeatCapabilities { - skip_assert_initialized!(); - SeatCapabilities::from_bits_truncate(value) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl StaticType for SeatCapabilities { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_seat_capabilities_get_type()) } - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl<'a> FromValueOptional<'a> for SeatCapabilities { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl<'a> FromValue<'a> for SeatCapabilities { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -impl SetValue for SeatCapabilities { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct WMDecoration: u32 { - const ALL = 1; - const BORDER = 2; - const RESIZEH = 4; - const TITLE = 8; - const MENU = 16; - const MINIMIZE = 32; - const MAXIMIZE = 64; - } -} - -#[doc(hidden)] -impl ToGlib for WMDecoration { - type GlibType = ffi::GdkWMDecoration; - - fn to_glib(&self) -> ffi::GdkWMDecoration { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for WMDecoration { - fn from_glib(value: ffi::GdkWMDecoration) -> WMDecoration { - skip_assert_initialized!(); - WMDecoration::from_bits_truncate(value) - } -} - -impl StaticType for WMDecoration { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_wm_decoration_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WMDecoration { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WMDecoration { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for WMDecoration { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct WMFunction: u32 { - const ALL = 1; - const RESIZE = 2; - const MOVE = 4; - const MINIMIZE = 8; - const MAXIMIZE = 16; - const CLOSE = 32; - } -} - -#[doc(hidden)] -impl ToGlib for WMFunction { - type GlibType = ffi::GdkWMFunction; - - fn to_glib(&self) -> ffi::GdkWMFunction { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for WMFunction { - fn from_glib(value: ffi::GdkWMFunction) -> WMFunction { - skip_assert_initialized!(); - WMFunction::from_bits_truncate(value) - } -} - -impl StaticType for WMFunction { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_wm_function_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WMFunction { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WMFunction { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for WMFunction { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct WindowHints: u32 { - const POS = 1; - const MIN_SIZE = 2; - const MAX_SIZE = 4; - const BASE_SIZE = 8; - const ASPECT = 16; - const RESIZE_INC = 32; - const WIN_GRAVITY = 64; - const USER_POS = 128; - const USER_SIZE = 256; - } -} - -#[doc(hidden)] -impl ToGlib for WindowHints { - type GlibType = ffi::GdkWindowHints; - - fn to_glib(&self) -> ffi::GdkWindowHints { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for WindowHints { - fn from_glib(value: ffi::GdkWindowHints) -> WindowHints { - skip_assert_initialized!(); - WindowHints::from_bits_truncate(value) - } -} - -impl StaticType for WindowHints { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_window_hints_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WindowHints { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WindowHints { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for WindowHints { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - -bitflags! { - pub struct WindowState: u32 { - const WITHDRAWN = 1; - const ICONIFIED = 2; - const MAXIMIZED = 4; - const STICKY = 8; - const FULLSCREEN = 16; - const ABOVE = 32; - const BELOW = 64; - const FOCUSED = 128; - const TILED = 256; - const TOP_TILED = 512; - const TOP_RESIZABLE = 1024; - const RIGHT_TILED = 2048; - const RIGHT_RESIZABLE = 4096; - const BOTTOM_TILED = 8192; - const BOTTOM_RESIZABLE = 16384; - const LEFT_TILED = 32768; - const LEFT_RESIZABLE = 65536; - } -} - -#[doc(hidden)] -impl ToGlib for WindowState { - type GlibType = ffi::GdkWindowState; - - fn to_glib(&self) -> ffi::GdkWindowState { - self.bits() - } -} - -#[doc(hidden)] -impl FromGlib for WindowState { - fn from_glib(value: ffi::GdkWindowState) -> WindowState { - skip_assert_initialized!(); - WindowState::from_bits_truncate(value) - } -} - -impl StaticType for WindowState { - fn static_type() -> Type { - unsafe { from_glib(ffi::gdk_window_state_get_type()) } - } -} - -impl<'a> FromValueOptional<'a> for WindowState { - unsafe fn from_value_optional(value: &Value) -> Option { - Some(FromValue::from_value(value)) - } -} - -impl<'a> FromValue<'a> for WindowState { - unsafe fn from_value(value: &Value) -> Self { - from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0)) - } -} - -impl SetValue for WindowState { - unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) - } -} - diff --git a/src/auto/frame_clock.rs b/src/auto/frame_clock.rs deleted file mode 100644 index 7727df259ff1..000000000000 --- a/src/auto/frame_clock.rs +++ /dev/null @@ -1,212 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use FrameClockPhase; -use FrameTimings; -use ffi; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; - -glib_wrapper! { - pub struct FrameClock(Object); - - match fn { - get_type => || ffi::gdk_frame_clock_get_type(), - } -} - -pub const NONE_FRAME_CLOCK: Option<&FrameClock> = None; - -pub trait FrameClockExt: 'static { - fn begin_updating(&self); - - fn end_updating(&self); - - fn get_current_timings(&self) -> Option; - - fn get_frame_counter(&self) -> i64; - - fn get_frame_time(&self) -> i64; - - fn get_history_start(&self) -> i64; - - fn get_timings(&self, frame_counter: i64) -> Option; - - fn request_phase(&self, phase: FrameClockPhase); - - fn connect_after_paint(&self, f: F) -> SignalHandlerId; - - fn connect_before_paint(&self, f: F) -> SignalHandlerId; - - fn connect_flush_events(&self, f: F) -> SignalHandlerId; - - fn connect_layout(&self, f: F) -> SignalHandlerId; - - fn connect_paint(&self, f: F) -> SignalHandlerId; - - fn connect_resume_events(&self, f: F) -> SignalHandlerId; - - fn connect_update(&self, f: F) -> SignalHandlerId; -} - -impl> FrameClockExt for O { - fn begin_updating(&self) { - unsafe { - ffi::gdk_frame_clock_begin_updating(self.as_ref().to_glib_none().0); - } - } - - fn end_updating(&self) { - unsafe { - ffi::gdk_frame_clock_end_updating(self.as_ref().to_glib_none().0); - } - } - - fn get_current_timings(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_frame_clock_get_current_timings(self.as_ref().to_glib_none().0)) - } - } - - fn get_frame_counter(&self) -> i64 { - unsafe { - ffi::gdk_frame_clock_get_frame_counter(self.as_ref().to_glib_none().0) - } - } - - fn get_frame_time(&self) -> i64 { - unsafe { - ffi::gdk_frame_clock_get_frame_time(self.as_ref().to_glib_none().0) - } - } - - fn get_history_start(&self) -> i64 { - unsafe { - ffi::gdk_frame_clock_get_history_start(self.as_ref().to_glib_none().0) - } - } - - fn get_timings(&self, frame_counter: i64) -> Option { - unsafe { - from_glib_none(ffi::gdk_frame_clock_get_timings(self.as_ref().to_glib_none().0, frame_counter)) - } - } - - fn request_phase(&self, phase: FrameClockPhase) { - unsafe { - ffi::gdk_frame_clock_request_phase(self.as_ref().to_glib_none().0, phase.to_glib()); - } - } - - fn connect_after_paint(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"after-paint\0".as_ptr() as *const _, - Some(transmute(after_paint_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_before_paint(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"before-paint\0".as_ptr() as *const _, - Some(transmute(before_paint_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_flush_events(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"flush-events\0".as_ptr() as *const _, - Some(transmute(flush_events_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_layout(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"layout\0".as_ptr() as *const _, - Some(transmute(layout_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_paint(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"paint\0".as_ptr() as *const _, - Some(transmute(paint_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_resume_events(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"resume-events\0".as_ptr() as *const _, - Some(transmute(resume_events_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_update(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"update\0".as_ptr() as *const _, - Some(transmute(update_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn after_paint_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn before_paint_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn flush_events_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn layout_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn paint_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn resume_events_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn update_trampoline(this: *mut ffi::GdkFrameClock, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&FrameClock::from_glib_borrow(this).unsafe_cast()) -} - -impl fmt::Display for FrameClock { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "FrameClock") - } -} diff --git a/src/auto/frame_timings.rs b/src/auto/frame_timings.rs deleted file mode 100644 index 41ac316f2cb5..000000000000 --- a/src/auto/frame_timings.rs +++ /dev/null @@ -1,37 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use ffi; -use glib::translate::*; - -glib_wrapper! { - #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct FrameTimings(Shared); - - match fn { - ref => |ptr| ffi::gdk_frame_timings_ref(ptr), - unref => |ptr| ffi::gdk_frame_timings_unref(ptr), - get_type => || ffi::gdk_frame_timings_get_type(), - } -} - -impl FrameTimings { - pub fn get_complete(&self) -> bool { - unsafe { - from_glib(ffi::gdk_frame_timings_get_complete(self.to_glib_none().0)) - } - } - - pub fn get_frame_counter(&self) -> i64 { - unsafe { - ffi::gdk_frame_timings_get_frame_counter(self.to_glib_none().0) - } - } - - pub fn get_frame_time(&self) -> i64 { - unsafe { - ffi::gdk_frame_timings_get_frame_time(self.to_glib_none().0) - } - } -} diff --git a/src/auto/functions.rs b/src/auto/functions.rs deleted file mode 100644 index fbbc174d23bc..000000000000 --- a/src/auto/functions.rs +++ /dev/null @@ -1,424 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Atom; -use Display; -use Event; -use EventType; -use ModifierType; -use Screen; -use Visual; -use Window; -use WindowState; -use cairo; -use ffi; -use gdk_pixbuf; -use glib::GString; -use glib::object::IsA; -use glib::translate::*; -use libc; -use pango; -use std::mem; -use std::ptr; - - -//#[cfg_attr(feature = "v3_16", deprecated)] -//pub fn add_option_entries_libgtk_only(group: /*Ignored*/&glib::OptionGroup) { -// unsafe { TODO: call ffi::gdk_add_option_entries_libgtk_only() } -//} - -pub fn beep() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_beep(); - } -} - -pub fn error_trap_pop() -> i32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_error_trap_pop() - } -} - -pub fn error_trap_pop_ignored() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_error_trap_pop_ignored(); - } -} - -pub fn error_trap_push() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_error_trap_push(); - } -} - -pub fn events_get_angle(event1: &mut Event, event2: &mut Event) -> Option { - assert_initialized_main_thread!(); - unsafe { - let mut angle = mem::uninitialized(); - let ret = from_glib(ffi::gdk_events_get_angle(event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, &mut angle)); - if ret { Some(angle) } else { None } - } -} - -pub fn events_get_center(event1: &mut Event, event2: &mut Event) -> Option<(f64, f64)> { - assert_initialized_main_thread!(); - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - let ret = from_glib(ffi::gdk_events_get_center(event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, &mut x, &mut y)); - if ret { Some((x, y)) } else { None } - } -} - -pub fn events_get_distance(event1: &mut Event, event2: &mut Event) -> Option { - assert_initialized_main_thread!(); - unsafe { - let mut distance = mem::uninitialized(); - let ret = from_glib(ffi::gdk_events_get_distance(event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, &mut distance)); - if ret { Some(distance) } else { None } - } -} - -pub fn events_pending() -> bool { - assert_initialized_main_thread!(); - unsafe { - from_glib(ffi::gdk_events_pending()) - } -} - -pub fn flush() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_flush(); - } -} - -pub fn get_display_arg_name() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_get_display_arg_name()) - } -} - -pub fn get_program_class() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_get_program_class()) - } -} - -pub fn get_show_events() -> bool { - assert_initialized_main_thread!(); - unsafe { - from_glib(ffi::gdk_get_show_events()) - } -} - -//pub fn init_check(argv: /*Unimplemented*/Vec) -> bool { -// unsafe { TODO: call ffi::gdk_init_check() } -//} - -pub fn keyval_convert_case(symbol: u32) -> (u32, u32) { - assert_initialized_main_thread!(); - unsafe { - let mut lower = mem::uninitialized(); - let mut upper = mem::uninitialized(); - ffi::gdk_keyval_convert_case(symbol, &mut lower, &mut upper); - (lower, upper) - } -} - -pub fn keyval_from_name(keyval_name: &str) -> u32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_keyval_from_name(keyval_name.to_glib_none().0) - } -} - -pub fn keyval_is_lower(keyval: u32) -> bool { - assert_initialized_main_thread!(); - unsafe { - from_glib(ffi::gdk_keyval_is_lower(keyval)) - } -} - -pub fn keyval_is_upper(keyval: u32) -> bool { - assert_initialized_main_thread!(); - unsafe { - from_glib(ffi::gdk_keyval_is_upper(keyval)) - } -} - -pub fn keyval_to_lower(keyval: u32) -> u32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_keyval_to_lower(keyval) - } -} - -pub fn keyval_to_upper(keyval: u32) -> u32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_keyval_to_upper(keyval) - } -} - -#[cfg_attr(feature = "v3_22", deprecated)] -pub fn list_visuals() -> Vec { - assert_initialized_main_thread!(); - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_list_visuals()) - } -} - -pub fn notify_startup_complete() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_notify_startup_complete(); - } -} - -pub fn notify_startup_complete_with_id(startup_id: &str) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_notify_startup_complete_with_id(startup_id.to_glib_none().0); - } -} - -pub fn pango_context_get() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_full(ffi::gdk_pango_context_get()) - } -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub fn pango_context_get_for_display(display: &Display) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_pango_context_get_for_display(display.to_glib_none().0)) - } -} - -pub fn pango_context_get_for_screen(screen: &Screen) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_pango_context_get_for_screen(screen.to_glib_none().0)) - } -} - -//pub fn pango_layout_line_get_clip_region(line: &pango::LayoutLine, x_origin: i32, y_origin: i32, index_ranges: &[i32], n_ranges: i32) -> Option { -// unsafe { TODO: call ffi::gdk_pango_layout_line_get_clip_region() } -//} - -//pub fn parse_args(argv: /*Unimplemented*/Vec) { -// unsafe { TODO: call ffi::gdk_parse_args() } -//} - -pub fn pixbuf_get_from_surface(surface: &cairo::Surface, src_x: i32, src_y: i32, width: i32, height: i32) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_full(ffi::gdk_pixbuf_get_from_surface(mut_override(surface.to_glib_none().0), src_x, src_y, width, height)) - } -} - -#[cfg_attr(feature = "v3_16", deprecated)] -pub fn pre_parse_libgtk_only() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_pre_parse_libgtk_only(); - } -} - -pub fn property_delete>(window: &P, property: &Atom) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_property_delete(window.as_ref().to_glib_none().0, property.to_glib_none().0); - } -} - -pub fn property_get>(window: &P, property: &Atom, type_: &Atom, offset: libc::c_ulong, length: libc::c_ulong, pdelete: i32) -> Option<(Atom, i32, Vec)> { - skip_assert_initialized!(); - unsafe { - let mut actual_property_type = Atom::uninitialized(); - let mut actual_format = mem::uninitialized(); - let mut actual_length = mem::uninitialized(); - let mut data = ptr::null_mut(); - let ret = from_glib(ffi::gdk_property_get(window.as_ref().to_glib_none().0, property.to_glib_none().0, type_.to_glib_none().0, offset, length, pdelete, actual_property_type.to_glib_none_mut().0, &mut actual_format, &mut actual_length, &mut data)); - if ret { Some((actual_property_type, actual_format, FromGlibContainer::from_glib_full_num(data, actual_length as usize))) } else { None } - } -} - -#[cfg_attr(feature = "v3_22", deprecated)] -pub fn query_depths() -> Vec { - assert_initialized_main_thread!(); - unsafe { - let mut depths = ptr::null_mut(); - let mut count = mem::uninitialized(); - ffi::gdk_query_depths(&mut depths, &mut count); - FromGlibContainer::from_glib_none_num(depths, count as usize) - } -} - -//#[cfg_attr(feature = "v3_22", deprecated)] -//pub fn query_visual_types(visual_types: /*Unimplemented*/CArray TypeId { ns_id: 1, id: 99 }) -> i32 { -// unsafe { TODO: call ffi::gdk_query_visual_types() } -//} - -pub fn selection_convert>(requestor: &P, selection: &Atom, target: &Atom, time_: u32) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_selection_convert(requestor.as_ref().to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, time_); - } -} - -pub fn selection_owner_get(selection: &Atom) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_selection_owner_get(selection.to_glib_none().0)) - } -} - -pub fn selection_owner_get_for_display(display: &Display, selection: &Atom) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_none(ffi::gdk_selection_owner_get_for_display(display.to_glib_none().0, selection.to_glib_none().0)) - } -} - -pub fn selection_owner_set>(owner: Option<&P>, selection: &Atom, time_: u32, send_event: bool) -> bool { - assert_initialized_main_thread!(); - unsafe { - from_glib(ffi::gdk_selection_owner_set(owner.map(|p| p.as_ref()).to_glib_none().0, selection.to_glib_none().0, time_, send_event.to_glib())) - } -} - -pub fn selection_owner_set_for_display>(display: &Display, owner: Option<&P>, selection: &Atom, time_: u32, send_event: bool) -> bool { - skip_assert_initialized!(); - unsafe { - from_glib(ffi::gdk_selection_owner_set_for_display(display.to_glib_none().0, owner.map(|p| p.as_ref()).to_glib_none().0, selection.to_glib_none().0, time_, send_event.to_glib())) - } -} - -pub fn selection_send_notify>(requestor: &P, selection: &Atom, target: &Atom, property: &Atom, time_: u32) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_selection_send_notify(requestor.as_ref().to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, property.to_glib_none().0, time_); - } -} - -pub fn selection_send_notify_for_display>(display: &Display, requestor: &P, selection: &Atom, target: &Atom, property: &Atom, time_: u32) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_selection_send_notify_for_display(display.to_glib_none().0, requestor.as_ref().to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, property.to_glib_none().0, time_); - } -} - -pub fn set_allowed_backends(backends: &str) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_set_allowed_backends(backends.to_glib_none().0); - } -} - -pub fn set_double_click_time(msec: u32) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_set_double_click_time(msec); - } -} - -pub fn set_program_class(program_class: &str) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_set_program_class(program_class.to_glib_none().0); - } -} - -pub fn set_show_events(show_events: bool) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_set_show_events(show_events.to_glib()); - } -} - -pub fn synthesize_window_state>(window: &P, unset_flags: WindowState, set_flags: WindowState) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_synthesize_window_state(window.as_ref().to_glib_none().0, unset_flags.to_glib(), set_flags.to_glib()); - } -} - -pub fn test_render_sync>(window: &P) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_test_render_sync(window.as_ref().to_glib_none().0); - } -} - -pub fn test_simulate_button>(window: &P, x: i32, y: i32, button: u32, modifiers: ModifierType, button_pressrelease: EventType) -> bool { - skip_assert_initialized!(); - unsafe { - from_glib(ffi::gdk_test_simulate_button(window.as_ref().to_glib_none().0, x, y, button, modifiers.to_glib(), button_pressrelease.to_glib())) - } -} - -pub fn test_simulate_key>(window: &P, x: i32, y: i32, keyval: u32, modifiers: ModifierType, key_pressrelease: EventType) -> bool { - skip_assert_initialized!(); - unsafe { - from_glib(ffi::gdk_test_simulate_key(window.as_ref().to_glib_none().0, x, y, keyval, modifiers.to_glib(), key_pressrelease.to_glib())) - } -} - -pub fn text_property_to_utf8_list_for_display(display: &Display, encoding: &Atom, format: i32, text: &[u8]) -> (i32, Vec) { - skip_assert_initialized!(); - let length = text.len() as i32; - unsafe { - let mut list = ptr::null_mut(); - let ret = ffi::gdk_text_property_to_utf8_list_for_display(display.to_glib_none().0, encoding.to_glib_none().0, format, text.to_glib_none().0, length, &mut list); - (ret, FromGlibPtrContainer::from_glib_full(list)) - } -} - -//pub fn threads_add_idle(function: /*Ignored*/glib::Fn() -> bool + 'static, data: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ffi::gdk_threads_add_idle() } -//} - -//pub fn threads_add_idle_full(priority: i32, function: /*Ignored*/glib::Fn() -> bool + 'static, data: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ffi::gdk_threads_add_idle_full() } -//} - -//pub fn threads_add_timeout(interval: u32, function: /*Ignored*/glib::Fn() -> bool + 'static, data: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ffi::gdk_threads_add_timeout() } -//} - -//pub fn threads_add_timeout_full(priority: i32, interval: u32, function: /*Ignored*/glib::Fn() -> bool + 'static, data: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ffi::gdk_threads_add_timeout_full() } -//} - -//pub fn threads_add_timeout_seconds(interval: u32, function: /*Ignored*/glib::Fn() -> bool + 'static, data: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ffi::gdk_threads_add_timeout_seconds() } -//} - -//pub fn threads_add_timeout_seconds_full(priority: i32, interval: u32, function: /*Ignored*/glib::Fn() -> bool + 'static, data: /*Unimplemented*/Option) -> u32 { -// unsafe { TODO: call ffi::gdk_threads_add_timeout_seconds_full() } -//} - -pub fn unicode_to_keyval(wc: u32) -> u32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_unicode_to_keyval(wc) - } -} - -pub fn utf8_to_string_target(str: &str) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_full(ffi::gdk_utf8_to_string_target(str.to_glib_none().0)) - } -} diff --git a/src/auto/gl_context.rs b/src/auto/gl_context.rs deleted file mode 100644 index 00e863d2edbc..000000000000 --- a/src/auto/gl_context.rs +++ /dev/null @@ -1,162 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -#[cfg(any(feature = "v3_16", feature = "dox"))] -use Display; -#[cfg(any(feature = "v3_16", feature = "dox"))] -use Error; -#[cfg(any(feature = "v3_16", feature = "dox"))] -use Window; -use ffi; -use glib::translate::*; -use std::fmt; -#[cfg(any(feature = "v3_16", feature = "dox"))] -use std::mem; -#[cfg(any(feature = "v3_16", feature = "dox"))] -use std::ptr; - -glib_wrapper! { - pub struct GLContext(Object); - - match fn { - get_type => || ffi::gdk_gl_context_get_type(), - } -} - -impl GLContext { - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_debug_enabled(&self) -> bool { - unsafe { - from_glib(ffi::gdk_gl_context_get_debug_enabled(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_display(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_gl_context_get_display(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_forward_compatible(&self) -> bool { - unsafe { - from_glib(ffi::gdk_gl_context_get_forward_compatible(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_required_version(&self) -> (i32, i32) { - unsafe { - let mut major = mem::uninitialized(); - let mut minor = mem::uninitialized(); - ffi::gdk_gl_context_get_required_version(self.to_glib_none().0, &mut major, &mut minor); - (major, minor) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_shared_context(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_gl_context_get_shared_context(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_use_es(&self) -> bool { - unsafe { - from_glib(ffi::gdk_gl_context_get_use_es(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_version(&self) -> (i32, i32) { - unsafe { - let mut major = mem::uninitialized(); - let mut minor = mem::uninitialized(); - ffi::gdk_gl_context_get_version(self.to_glib_none().0, &mut major, &mut minor); - (major, minor) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_window(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_gl_context_get_window(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn is_legacy(&self) -> bool { - unsafe { - from_glib(ffi::gdk_gl_context_is_legacy(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn make_current(&self) { - unsafe { - ffi::gdk_gl_context_make_current(self.to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn realize(&self) -> Result<(), Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ffi::gdk_gl_context_realize(self.to_glib_none().0, &mut error); - if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn set_debug_enabled(&self, enabled: bool) { - unsafe { - ffi::gdk_gl_context_set_debug_enabled(self.to_glib_none().0, enabled.to_glib()); - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn set_forward_compatible(&self, compatible: bool) { - unsafe { - ffi::gdk_gl_context_set_forward_compatible(self.to_glib_none().0, compatible.to_glib()); - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn set_required_version(&self, major: i32, minor: i32) { - unsafe { - ffi::gdk_gl_context_set_required_version(self.to_glib_none().0, major, minor); - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn set_use_es(&self, use_es: i32) { - unsafe { - ffi::gdk_gl_context_set_use_es(self.to_glib_none().0, use_es); - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn clear_current() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_gl_context_clear_current(); - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - pub fn get_current() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_gl_context_get_current()) - } - } -} - -impl fmt::Display for GLContext { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "GLContext") - } -} diff --git a/src/auto/mod.rs b/src/auto/mod.rs deleted file mode 100644 index 0339da4ae50e..000000000000 --- a/src/auto/mod.rs +++ /dev/null @@ -1,147 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -mod app_launch_context; -pub use self::app_launch_context::{AppLaunchContext, AppLaunchContextClass}; - -mod cursor; -pub use self::cursor::{Cursor, CursorClass}; - -mod device; -pub use self::device::{Device, DeviceClass}; - -mod device_manager; -pub use self::device_manager::{DeviceManager, DeviceManagerClass}; - -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod device_pad; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::device_pad::{DevicePad, NONE_DEVICE_PAD}; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::device_pad::DevicePadExt; - -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod device_tool; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::device_tool::{DeviceTool, DeviceToolClass}; - -mod display; -pub use self::display::{Display, DisplayClass}; - -mod display_manager; -pub use self::display_manager::{DisplayManager, DisplayManagerClass}; - -mod drag_context; -pub use self::drag_context::{DragContext, DragContextClass}; - -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod drawing_context; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::drawing_context::{DrawingContext, DrawingContextClass, NONE_DRAWING_CONTEXT}; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::drawing_context::DrawingContextExt; - -mod frame_clock; -pub use self::frame_clock::{FrameClock, FrameClockClass, NONE_FRAME_CLOCK}; -pub use self::frame_clock::FrameClockExt; - -#[cfg(any(feature = "v3_16", feature = "dox"))] -mod gl_context; -#[cfg(any(feature = "v3_16", feature = "dox"))] -pub use self::gl_context::{GLContext, GLContextClass}; - -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod monitor; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::monitor::{Monitor, MonitorClass, NONE_MONITOR}; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::monitor::MonitorExt; - -mod screen; -pub use self::screen::{Screen, ScreenClass}; - -#[cfg(any(feature = "v3_20", feature = "dox"))] -mod seat; -#[cfg(any(feature = "v3_20", feature = "dox"))] -pub use self::seat::{Seat, SeatClass}; - -mod visual; -pub use self::visual::{Visual, VisualClass}; - -mod window; -pub use self::window::{Window, WindowClass, NONE_WINDOW}; -pub use self::window::WindowExt; - -mod event_sequence; -pub use self::event_sequence::EventSequence; - -mod frame_timings; -pub use self::frame_timings::FrameTimings; - -mod enums; -pub use self::enums::AxisUse; -pub use self::enums::ByteOrder; -pub use self::enums::CrossingMode; -pub use self::enums::CursorType; -pub use self::enums::DevicePadFeature; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::enums::DeviceToolType; -pub use self::enums::DeviceType; -#[cfg(any(feature = "v3_20", feature = "dox"))] -pub use self::enums::DragCancelReason; -pub use self::enums::DragProtocol; -pub use self::enums::EventType; -pub use self::enums::FullscreenMode; -#[cfg(any(feature = "v3_16", feature = "dox"))] -pub use self::enums::GLError; -pub use self::enums::GrabOwnership; -pub use self::enums::GrabStatus; -pub use self::enums::Gravity; -pub use self::enums::InputMode; -pub use self::enums::InputSource; -pub use self::enums::ModifierIntent; -pub use self::enums::NotifyType; -pub use self::enums::OwnerChange; -pub use self::enums::PropMode; -pub use self::enums::PropertyState; -pub use self::enums::ScrollDirection; -pub use self::enums::SettingAction; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::enums::SubpixelLayout; -pub use self::enums::VisibilityState; -pub use self::enums::VisualType; -pub use self::enums::WindowEdge; -pub use self::enums::WindowType; -pub use self::enums::WindowTypeHint; -pub use self::enums::WindowWindowClass; - -mod flags; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::flags::AnchorHints; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use self::flags::AxisFlags; -pub use self::flags::DragAction; -pub use self::flags::EventMask; -pub use self::flags::FrameClockPhase; -pub use self::flags::ModifierType; -#[cfg(any(feature = "v3_20", feature = "dox"))] -pub use self::flags::SeatCapabilities; -pub use self::flags::WMDecoration; -pub use self::flags::WMFunction; -pub use self::flags::WindowHints; -pub use self::flags::WindowState; - -pub mod functions; - -#[doc(hidden)] -pub mod traits { - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub use super::DevicePadExt; - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub use super::DrawingContextExt; - pub use super::FrameClockExt; - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub use super::MonitorExt; - pub use super::WindowExt; -} diff --git a/src/auto/monitor.rs b/src/auto/monitor.rs deleted file mode 100644 index 0b4092b42eec..000000000000 --- a/src/auto/monitor.rs +++ /dev/null @@ -1,396 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Display; -use Rectangle; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use SubpixelLayout; -use ffi; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use glib::GString; -use glib::StaticType; -use glib::Value; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use gobject_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; - -glib_wrapper! { - pub struct Monitor(Object); - - match fn { - get_type => || ffi::gdk_monitor_get_type(), - } -} - -pub const NONE_MONITOR: Option<&Monitor> = None; - -pub trait MonitorExt: 'static { - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_display(&self) -> Option; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_geometry(&self) -> Rectangle; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_height_mm(&self) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_manufacturer(&self) -> Option; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_model(&self) -> Option; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_refresh_rate(&self) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_scale_factor(&self) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_subpixel_layout(&self) -> SubpixelLayout; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_width_mm(&self) -> i32; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_workarea(&self) -> Rectangle; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn is_primary(&self) -> bool; - - fn get_property_display(&self) -> Option; - - fn get_property_geometry(&self) -> Option; - - fn get_property_height_mm(&self) -> i32; - - fn get_property_refresh_rate(&self) -> i32; - - fn get_property_scale_factor(&self) -> i32; - - fn get_property_width_mm(&self) -> i32; - - fn get_property_workarea(&self) -> Option; - - fn connect_invalidate(&self, f: F) -> SignalHandlerId; - - fn connect_property_geometry_notify(&self, f: F) -> SignalHandlerId; - - fn connect_property_height_mm_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn connect_property_manufacturer_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn connect_property_model_notify(&self, f: F) -> SignalHandlerId; - - fn connect_property_refresh_rate_notify(&self, f: F) -> SignalHandlerId; - - fn connect_property_scale_factor_notify(&self, f: F) -> SignalHandlerId; - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn connect_property_subpixel_layout_notify(&self, f: F) -> SignalHandlerId; - - fn connect_property_width_mm_notify(&self, f: F) -> SignalHandlerId; - - fn connect_property_workarea_notify(&self, f: F) -> SignalHandlerId; -} - -impl> MonitorExt for O { - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_display(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_monitor_get_display(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_geometry(&self) -> Rectangle { - unsafe { - let mut geometry = Rectangle::uninitialized(); - ffi::gdk_monitor_get_geometry(self.as_ref().to_glib_none().0, geometry.to_glib_none_mut().0); - geometry - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_height_mm(&self) -> i32 { - unsafe { - ffi::gdk_monitor_get_height_mm(self.as_ref().to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_manufacturer(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_monitor_get_manufacturer(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_model(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_monitor_get_model(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_refresh_rate(&self) -> i32 { - unsafe { - ffi::gdk_monitor_get_refresh_rate(self.as_ref().to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_scale_factor(&self) -> i32 { - unsafe { - ffi::gdk_monitor_get_scale_factor(self.as_ref().to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_subpixel_layout(&self) -> SubpixelLayout { - unsafe { - from_glib(ffi::gdk_monitor_get_subpixel_layout(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_width_mm(&self) -> i32 { - unsafe { - ffi::gdk_monitor_get_width_mm(self.as_ref().to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn get_workarea(&self) -> Rectangle { - unsafe { - let mut workarea = Rectangle::uninitialized(); - ffi::gdk_monitor_get_workarea(self.as_ref().to_glib_none().0, workarea.to_glib_none_mut().0); - workarea - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn is_primary(&self) -> bool { - unsafe { - from_glib(ffi::gdk_monitor_is_primary(self.as_ref().to_glib_none().0)) - } - } - - fn get_property_display(&self) -> Option { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"display\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get() - } - } - - fn get_property_geometry(&self) -> Option { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"geometry\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get() - } - } - - fn get_property_height_mm(&self) -> i32 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"height-mm\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - fn get_property_refresh_rate(&self) -> i32 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"refresh-rate\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - fn get_property_scale_factor(&self) -> i32 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"scale-factor\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - fn get_property_width_mm(&self) -> i32 { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"width-mm\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get().unwrap() - } - } - - fn get_property_workarea(&self) -> Option { - unsafe { - let mut value = Value::from_type(::static_type()); - gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"workarea\0".as_ptr() as *const _, value.to_glib_none_mut().0); - value.get() - } - } - - fn connect_invalidate(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"invalidate\0".as_ptr() as *const _, - Some(transmute(invalidate_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_property_geometry_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::geometry\0".as_ptr() as *const _, - Some(transmute(notify_geometry_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_property_height_mm_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::height-mm\0".as_ptr() as *const _, - Some(transmute(notify_height_mm_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn connect_property_manufacturer_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::manufacturer\0".as_ptr() as *const _, - Some(transmute(notify_manufacturer_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn connect_property_model_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::model\0".as_ptr() as *const _, - Some(transmute(notify_model_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_property_refresh_rate_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::refresh-rate\0".as_ptr() as *const _, - Some(transmute(notify_refresh_rate_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_property_scale_factor_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::scale-factor\0".as_ptr() as *const _, - Some(transmute(notify_scale_factor_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn connect_property_subpixel_layout_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::subpixel-layout\0".as_ptr() as *const _, - Some(transmute(notify_subpixel_layout_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_property_width_mm_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::width-mm\0".as_ptr() as *const _, - Some(transmute(notify_width_mm_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - fn connect_property_workarea_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::workarea\0".as_ptr() as *const _, - Some(transmute(notify_workarea_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn invalidate_trampoline(this: *mut ffi::GdkMonitor, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn notify_geometry_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn notify_height_mm_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn notify_manufacturer_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn notify_model_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn notify_refresh_rate_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn notify_scale_factor_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn notify_subpixel_layout_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn notify_width_mm_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -unsafe extern "C" fn notify_workarea_trampoline(this: *mut ffi::GdkMonitor, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Monitor::from_glib_borrow(this).unsafe_cast()) -} - -impl fmt::Display for Monitor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Monitor") - } -} diff --git a/src/auto/screen.rs b/src/auto/screen.rs deleted file mode 100644 index db0976e3d10c..000000000000 --- a/src/auto/screen.rs +++ /dev/null @@ -1,337 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use Display; -use Rectangle; -use Visual; -use Window; -use cairo; -use ffi; -use glib::GString; -use glib::object::IsA; -use glib::object::ObjectType; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; - -glib_wrapper! { - pub struct Screen(Object); - - match fn { - get_type => || ffi::gdk_screen_get_type(), - } -} - -impl Screen { - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_active_window(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_screen_get_active_window(self.to_glib_none().0)) - } - } - - pub fn get_display(&self) -> Display { - unsafe { - from_glib_none(ffi::gdk_screen_get_display(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_height(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_height(self.to_glib_none().0) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_height_mm(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_height_mm(self.to_glib_none().0) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_at_point(&self, x: i32, y: i32) -> i32 { - unsafe { - ffi::gdk_screen_get_monitor_at_point(self.to_glib_none().0, x, y) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_at_window>(&self, window: &P) -> i32 { - unsafe { - ffi::gdk_screen_get_monitor_at_window(self.to_glib_none().0, window.as_ref().to_glib_none().0) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_geometry(&self, monitor_num: i32) -> Rectangle { - unsafe { - let mut dest = Rectangle::uninitialized(); - ffi::gdk_screen_get_monitor_geometry(self.to_glib_none().0, monitor_num, dest.to_glib_none_mut().0); - dest - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_height_mm(&self, monitor_num: i32) -> i32 { - unsafe { - ffi::gdk_screen_get_monitor_height_mm(self.to_glib_none().0, monitor_num) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_plug_name(&self, monitor_num: i32) -> Option { - unsafe { - from_glib_full(ffi::gdk_screen_get_monitor_plug_name(self.to_glib_none().0, monitor_num)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_scale_factor(&self, monitor_num: i32) -> i32 { - unsafe { - ffi::gdk_screen_get_monitor_scale_factor(self.to_glib_none().0, monitor_num) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_width_mm(&self, monitor_num: i32) -> i32 { - unsafe { - ffi::gdk_screen_get_monitor_width_mm(self.to_glib_none().0, monitor_num) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_monitor_workarea(&self, monitor_num: i32) -> Rectangle { - unsafe { - let mut dest = Rectangle::uninitialized(); - ffi::gdk_screen_get_monitor_workarea(self.to_glib_none().0, monitor_num, dest.to_glib_none_mut().0); - dest - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_n_monitors(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_n_monitors(self.to_glib_none().0) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_number(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_number(self.to_glib_none().0) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_primary_monitor(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_primary_monitor(self.to_glib_none().0) - } - } - - pub fn get_resolution(&self) -> f64 { - unsafe { - ffi::gdk_screen_get_resolution(self.to_glib_none().0) - } - } - - pub fn get_rgba_visual(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_screen_get_rgba_visual(self.to_glib_none().0)) - } - } - - pub fn get_root_window(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_screen_get_root_window(self.to_glib_none().0)) - } - } - - pub fn get_system_visual(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_screen_get_system_visual(self.to_glib_none().0)) - } - } - - pub fn get_toplevel_windows(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_screen_get_toplevel_windows(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_width(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_width(self.to_glib_none().0) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_width_mm(&self) -> i32 { - unsafe { - ffi::gdk_screen_get_width_mm(self.to_glib_none().0) - } - } - - pub fn get_window_stack(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_full(ffi::gdk_screen_get_window_stack(self.to_glib_none().0)) - } - } - - pub fn is_composited(&self) -> bool { - unsafe { - from_glib(ffi::gdk_screen_is_composited(self.to_glib_none().0)) - } - } - - pub fn list_visuals(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_screen_list_visuals(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn make_display_name(&self) -> GString { - unsafe { - from_glib_full(ffi::gdk_screen_make_display_name(self.to_glib_none().0)) - } - } - - pub fn set_font_options(&self, options: Option<&cairo::FontOptions>) { - unsafe { - ffi::gdk_screen_set_font_options(self.to_glib_none().0, options.to_glib_none().0); - } - } - - pub fn set_resolution(&self, dpi: f64) { - unsafe { - ffi::gdk_screen_set_resolution(self.to_glib_none().0, dpi); - } - } - - //pub fn get_property_font_options(&self) -> /*Unimplemented*/Fundamental: Pointer { - // unsafe { - // let mut value = Value::from_type(::static_type()); - // gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"font-options\0".as_ptr() as *const _, value.to_glib_none_mut().0); - // value.get().unwrap() - // } - //} - - pub fn get_default() -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_screen_get_default()) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn height() -> i32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_screen_height() - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn height_mm() -> i32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_screen_height_mm() - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn width() -> i32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_screen_width() - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn width_mm() -> i32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_screen_width_mm() - } - } - - pub fn connect_composited_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"composited-changed\0".as_ptr() as *const _, - Some(transmute(composited_changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_monitors_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"monitors-changed\0".as_ptr() as *const _, - Some(transmute(monitors_changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_size_changed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"size-changed\0".as_ptr() as *const _, - Some(transmute(size_changed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_font_options_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::font-options\0".as_ptr() as *const _, - Some(transmute(notify_font_options_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - pub fn connect_property_resolution_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::resolution\0".as_ptr() as *const _, - Some(transmute(notify_resolution_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn composited_changed_trampoline(this: *mut ffi::GdkScreen, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn monitors_changed_trampoline(this: *mut ffi::GdkScreen, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn size_changed_trampoline(this: *mut ffi::GdkScreen, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn notify_font_options_trampoline(this: *mut ffi::GdkScreen, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -unsafe extern "C" fn notify_resolution_trampoline(this: *mut ffi::GdkScreen, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this)) -} - -impl fmt::Display for Screen { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Screen") - } -} diff --git a/src/auto/seat.rs b/src/auto/seat.rs deleted file mode 100644 index ed28a159b840..000000000000 --- a/src/auto/seat.rs +++ /dev/null @@ -1,173 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Cursor; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Device; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use DeviceTool; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Display; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Event; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use GrabStatus; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use SeatCapabilities; -use Window; -use ffi; -use glib::object::IsA; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib::object::ObjectType; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib::signal::SignalHandlerId; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib::signal::connect_raw; -use glib::translate::*; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use glib_ffi; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use std::boxed::Box as Box_; -use std::fmt; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use std::mem::transmute; - -glib_wrapper! { - pub struct Seat(Object); - - match fn { - get_type => || ffi::gdk_seat_get_type(), - } -} - -impl Seat { - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_capabilities(&self) -> SeatCapabilities { - unsafe { - from_glib(ffi::gdk_seat_get_capabilities(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_display(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_seat_get_display(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_keyboard(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_seat_get_keyboard(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_pointer(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_seat_get_pointer(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_slaves(&self, capabilities: SeatCapabilities) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_seat_get_slaves(self.to_glib_none().0, capabilities.to_glib())) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn grab>(&self, window: &P, capabilities: SeatCapabilities, owner_events: bool, cursor: Option<&Cursor>, event: Option<&Event>, prepare_func: Option<&mut dyn (FnMut(&Seat, &Window))>) -> GrabStatus { - let prepare_func_data: Option<&mut dyn (FnMut(&Seat, &Window))> = prepare_func; - unsafe extern "C" fn prepare_func_func>(seat: *mut ffi::GdkSeat, window: *mut ffi::GdkWindow, user_data: glib_ffi::gpointer) { - let seat = from_glib_borrow(seat); - let window = from_glib_borrow(window); - let callback: *mut Option<&mut dyn (FnMut(&Seat, &Window))> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&Seat, &Window))>; - if let Some(ref mut callback) = *callback { - callback(&seat, &window) - } else { - panic!("cannot get closure...") - }; - } - let prepare_func = Some(prepare_func_func::

as _); - let super_callback0: &Option<&mut dyn (FnMut(&Seat, &Window))> = &prepare_func_data; - unsafe { - from_glib(ffi::gdk_seat_grab(self.to_glib_none().0, window.as_ref().to_glib_none().0, capabilities.to_glib(), owner_events.to_glib(), cursor.to_glib_none().0, event.to_glib_none().0, prepare_func, super_callback0 as *const _ as usize as *mut _)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn ungrab(&self) { - unsafe { - ffi::gdk_seat_ungrab(self.to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_device_added(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"device-added\0".as_ptr() as *const _, - Some(transmute(device_added_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn connect_device_removed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"device-removed\0".as_ptr() as *const _, - Some(transmute(device_removed_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_tool_added(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"tool-added\0".as_ptr() as *const _, - Some(transmute(tool_added_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn connect_tool_removed(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"tool-removed\0".as_ptr() as *const _, - Some(transmute(tool_removed_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn device_added_trampoline(this: *mut ffi::GdkSeat, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(device)) -} - -#[cfg(any(feature = "v3_20", feature = "dox"))] -unsafe extern "C" fn device_removed_trampoline(this: *mut ffi::GdkSeat, device: *mut ffi::GdkDevice, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(device)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn tool_added_trampoline(this: *mut ffi::GdkSeat, tool: *mut ffi::GdkDeviceTool, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(tool)) -} - -#[cfg(any(feature = "v3_22", feature = "dox"))] -unsafe extern "C" fn tool_removed_trampoline(this: *mut ffi::GdkSeat, tool: *mut ffi::GdkDeviceTool, f: glib_ffi::gpointer) { - let f: &F = &*(f as *const F); - f(&from_glib_borrow(this), &from_glib_borrow(tool)) -} - -impl fmt::Display for Seat { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Seat") - } -} diff --git a/src/auto/versions.txt b/src/auto/versions.txt deleted file mode 100644 index e95edd4998cf..000000000000 --- a/src/auto/versions.txt +++ /dev/null @@ -1,2 +0,0 @@ -Generated by gir (https://github.com/gtk-rs/gir @ c6b1950) -from gir-files (https://github.com/gtk-rs/gir-files @ 02dfee2) diff --git a/src/auto/visual.rs b/src/auto/visual.rs deleted file mode 100644 index 4b31fcfd4e9c..000000000000 --- a/src/auto/visual.rs +++ /dev/null @@ -1,152 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -use ByteOrder; -use Screen; -use VisualType; -use ffi; -use glib::translate::*; -use std::fmt; -use std::mem; - -glib_wrapper! { - pub struct Visual(Object); - - match fn { - get_type => || ffi::gdk_visual_get_type(), - } -} - -impl Visual { - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_bits_per_rgb(&self) -> i32 { - unsafe { - ffi::gdk_visual_get_bits_per_rgb(self.to_glib_none().0) - } - } - - pub fn get_blue_pixel_details(&self) -> (u32, i32, i32) { - unsafe { - let mut mask = mem::uninitialized(); - let mut shift = mem::uninitialized(); - let mut precision = mem::uninitialized(); - ffi::gdk_visual_get_blue_pixel_details(self.to_glib_none().0, &mut mask, &mut shift, &mut precision); - (mask, shift, precision) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_byte_order(&self) -> ByteOrder { - unsafe { - from_glib(ffi::gdk_visual_get_byte_order(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_colormap_size(&self) -> i32 { - unsafe { - ffi::gdk_visual_get_colormap_size(self.to_glib_none().0) - } - } - - pub fn get_depth(&self) -> i32 { - unsafe { - ffi::gdk_visual_get_depth(self.to_glib_none().0) - } - } - - pub fn get_green_pixel_details(&self) -> (u32, i32, i32) { - unsafe { - let mut mask = mem::uninitialized(); - let mut shift = mem::uninitialized(); - let mut precision = mem::uninitialized(); - ffi::gdk_visual_get_green_pixel_details(self.to_glib_none().0, &mut mask, &mut shift, &mut precision); - (mask, shift, precision) - } - } - - pub fn get_red_pixel_details(&self) -> (u32, i32, i32) { - unsafe { - let mut mask = mem::uninitialized(); - let mut shift = mem::uninitialized(); - let mut precision = mem::uninitialized(); - ffi::gdk_visual_get_red_pixel_details(self.to_glib_none().0, &mut mask, &mut shift, &mut precision); - (mask, shift, precision) - } - } - - pub fn get_screen(&self) -> Screen { - unsafe { - from_glib_none(ffi::gdk_visual_get_screen(self.to_glib_none().0)) - } - } - - pub fn get_visual_type(&self) -> VisualType { - unsafe { - from_glib(ffi::gdk_visual_get_visual_type(self.to_glib_none().0)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_best() -> Visual { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_visual_get_best()) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_best_depth() -> i32 { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_visual_get_best_depth() - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_best_type() -> VisualType { - assert_initialized_main_thread!(); - unsafe { - from_glib(ffi::gdk_visual_get_best_type()) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_best_with_both(depth: i32, visual_type: VisualType) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_visual_get_best_with_both(depth, visual_type.to_glib())) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_best_with_depth(depth: i32) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_visual_get_best_with_depth(depth)) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_best_with_type(visual_type: VisualType) -> Option { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_visual_get_best_with_type(visual_type.to_glib())) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn get_system() -> Visual { - assert_initialized_main_thread!(); - unsafe { - from_glib_none(ffi::gdk_visual_get_system()) - } - } -} - -impl fmt::Display for Visual { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Visual") - } -} diff --git a/src/auto/window.rs b/src/auto/window.rs deleted file mode 100644 index 48b57088c13c..000000000000 --- a/src/auto/window.rs +++ /dev/null @@ -1,1428 +0,0 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir) -// from gir-files (https://github.com/gtk-rs/gir-files) -// DO NOT EDIT - -#[cfg(any(feature = "v3_24", feature = "dox"))] -use AnchorHints; -use Cursor; -use Device; -use Display; -use DragProtocol; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use DrawingContext; -#[cfg(any(feature = "v3_16", feature = "dox"))] -use Error; -use Event; -use EventMask; -use FrameClock; -use FullscreenMode; -#[cfg(any(feature = "v3_16", feature = "dox"))] -use GLContext; -use Geometry; -#[cfg(any(feature = "v3_24", feature = "dox"))] -use Gravity; -use InputSource; -use ModifierType; -use RGBA; -use Rectangle; -use Screen; -use Visual; -use WMDecoration; -use WMFunction; -use WindowEdge; -use WindowHints; -use WindowState; -use WindowType; -use WindowTypeHint; -use cairo; -use cairo_ffi; -use ffi; -use gdk_pixbuf; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::SignalHandlerId; -use glib::signal::connect_raw; -use glib::translate::*; -use glib_ffi; -use libc; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem; -use std::mem::transmute; -use std::ptr; - -glib_wrapper! { - pub struct Window(Object); - - match fn { - get_type => || ffi::gdk_window_get_type(), - } -} - -impl Window { - pub fn constrain_size(geometry: &mut Geometry, flags: WindowHints, width: i32, height: i32) -> (i32, i32) { - assert_initialized_main_thread!(); - unsafe { - let mut new_width = mem::uninitialized(); - let mut new_height = mem::uninitialized(); - ffi::gdk_window_constrain_size(geometry.to_glib_none_mut().0, flags.to_glib(), width, height, &mut new_width, &mut new_height); - (new_width, new_height) - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn process_all_updates() { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_window_process_all_updates(); - } - } - - #[cfg_attr(feature = "v3_22", deprecated)] - pub fn set_debug_updates(setting: bool) { - assert_initialized_main_thread!(); - unsafe { - ffi::gdk_window_set_debug_updates(setting.to_glib()); - } - } -} - -pub const NONE_WINDOW: Option<&Window> = None; - -pub trait WindowExt: 'static { - //fn add_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option); - - fn beep(&self); - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn begin_draw_frame(&self, region: &cairo::Region) -> Option; - - fn begin_move_drag(&self, button: i32, root_x: i32, root_y: i32, timestamp: u32); - - fn begin_move_drag_for_device(&self, device: &Device, button: i32, root_x: i32, root_y: i32, timestamp: u32); - - #[cfg_attr(feature = "v3_22", deprecated)] - fn begin_paint_rect(&self, rectangle: &Rectangle); - - #[cfg_attr(feature = "v3_22", deprecated)] - fn begin_paint_region(&self, region: &cairo::Region); - - fn begin_resize_drag(&self, edge: WindowEdge, button: i32, root_x: i32, root_y: i32, timestamp: u32); - - fn begin_resize_drag_for_device(&self, edge: WindowEdge, device: &Device, button: i32, root_x: i32, root_y: i32, timestamp: u32); - - fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (f64, f64); - - fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64); - - #[cfg(any(feature = "v3_16", feature = "dox"))] - fn create_gl_context(&self) -> Result; - - fn create_similar_image_surface(&self, format: i32, width: i32, height: i32, scale: i32) -> Option; - - fn deiconify(&self); - - fn destroy(&self); - - fn destroy_notify(&self); - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn end_draw_frame>(&self, context: &P); - - fn end_paint(&self); - - fn ensure_native(&self) -> bool; - - fn focus(&self, timestamp: u32); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn freeze_toplevel_updates_libgtk_only(&self); - - fn freeze_updates(&self); - - fn fullscreen(&self); - - #[cfg(any(feature = "v3_18", feature = "dox"))] - fn fullscreen_on_monitor(&self, monitor: i32); - - fn geometry_changed(&self); - - fn get_accept_focus(&self) -> bool; - - fn get_children(&self) -> Vec; - - //fn get_children_with_user_data(&self, user_data: /*Unimplemented*/Option) -> Vec; - - fn get_clip_region(&self) -> Option; - - #[cfg_attr(feature = "v3_16", deprecated)] - fn get_composited(&self) -> bool; - - fn get_cursor(&self) -> Option; - - fn get_decorations(&self) -> Option; - - fn get_device_cursor(&self, device: &Device) -> Option; - - fn get_device_events(&self, device: &Device) -> EventMask; - - fn get_device_position(&self, device: &Device) -> (Option, i32, i32, ModifierType); - - fn get_device_position_double(&self, device: &Device) -> (Option, f64, f64, ModifierType); - - fn get_display(&self) -> Display; - - fn get_drag_protocol(&self) -> (DragProtocol, Window); - - fn get_effective_parent(&self) -> Option; - - fn get_effective_toplevel(&self) -> Window; - - fn get_event_compression(&self) -> bool; - - fn get_events(&self) -> EventMask; - - fn get_focus_on_map(&self) -> bool; - - fn get_frame_clock(&self) -> Option; - - fn get_frame_extents(&self) -> Rectangle; - - fn get_fullscreen_mode(&self) -> FullscreenMode; - - fn get_geometry(&self) -> (i32, i32, i32, i32); - - fn get_group(&self) -> Option; - - fn get_height(&self) -> i32; - - fn get_modal_hint(&self) -> bool; - - fn get_origin(&self) -> (i32, i32, i32); - - fn get_parent(&self) -> Option; - - #[cfg(any(feature = "v3_18", feature = "dox"))] - fn get_pass_through(&self) -> bool; - - fn get_position(&self) -> (i32, i32); - - fn get_root_coords(&self, x: i32, y: i32) -> (i32, i32); - - fn get_root_origin(&self) -> (i32, i32); - - fn get_scale_factor(&self) -> i32; - - fn get_screen(&self) -> Screen; - - fn get_source_events(&self, source: InputSource) -> EventMask; - - fn get_state(&self) -> WindowState; - - fn get_support_multidevice(&self) -> bool; - - fn get_toplevel(&self) -> Window; - - fn get_type_hint(&self) -> WindowTypeHint; - - fn get_update_area(&self) -> Option; - - //fn get_user_data(&self, data: /*Unimplemented*/&mut Option); - - fn get_visible_region(&self) -> Option; - - fn get_visual(&self) -> Visual; - - fn get_width(&self) -> i32; - - fn get_window_type(&self) -> WindowType; - - fn has_native(&self) -> bool; - - fn hide(&self); - - fn iconify(&self); - - fn input_shape_combine_region(&self, shape_region: &cairo::Region, offset_x: i32, offset_y: i32); - - fn invalidate_maybe_recurse(&self, region: &cairo::Region, child_func: Option<&mut dyn (FnMut(&Window) -> bool)>); - - fn invalidate_rect(&self, rect: Option<&Rectangle>, invalidate_children: bool); - - fn invalidate_region(&self, region: &cairo::Region, invalidate_children: bool); - - fn is_destroyed(&self) -> bool; - - fn is_input_only(&self) -> bool; - - fn is_shaped(&self) -> bool; - - fn is_viewable(&self) -> bool; - - fn is_visible(&self) -> bool; - - fn lower(&self); - - #[cfg(any(feature = "v3_16", feature = "dox"))] - fn mark_paint_from_clip(&self, cr: &cairo::Context); - - fn maximize(&self); - - fn merge_child_input_shapes(&self); - - fn merge_child_shapes(&self); - - fn move_(&self, x: i32, y: i32); - - fn move_region(&self, region: &cairo::Region, dx: i32, dy: i32); - - fn move_resize(&self, x: i32, y: i32, width: i32, height: i32); - - #[cfg(any(feature = "v3_24", feature = "dox"))] - fn move_to_rect(&self, rect: &Rectangle, rect_anchor: Gravity, window_anchor: Gravity, anchor_hints: AnchorHints, rect_anchor_dx: i32, rect_anchor_dy: i32); - - fn peek_children(&self) -> Vec; - - #[cfg_attr(feature = "v3_22", deprecated)] - fn process_updates(&self, update_children: bool); - - fn raise(&self); - - fn register_dnd(&self); - - //fn remove_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option); - - fn reparent>(&self, new_parent: &P, x: i32, y: i32); - - fn resize(&self, width: i32, height: i32); - - fn restack>(&self, sibling: Option<&P>, above: bool); - - fn scroll(&self, dx: i32, dy: i32); - - fn set_accept_focus(&self, accept_focus: bool); - - #[cfg_attr(feature = "v3_22", deprecated)] - fn set_background_rgba(&self, rgba: &RGBA); - - fn set_child_input_shapes(&self); - - fn set_child_shapes(&self); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn set_composited(&self, composited: bool); - - fn set_cursor(&self, cursor: Option<&Cursor>); - - fn set_decorations(&self, decorations: WMDecoration); - - fn set_device_cursor(&self, device: &Device, cursor: &Cursor); - - fn set_device_events(&self, device: &Device, event_mask: EventMask); - - fn set_event_compression(&self, event_compression: bool); - - fn set_events(&self, event_mask: EventMask); - - fn set_focus_on_map(&self, focus_on_map: bool); - - fn set_fullscreen_mode(&self, mode: FullscreenMode); - - fn set_functions(&self, functions: WMFunction); - - fn set_geometry_hints(&self, geometry: &Geometry, geom_mask: WindowHints); - - fn set_group>(&self, leader: Option<&P>); - - fn set_icon_list(&self, pixbufs: &[gdk_pixbuf::Pixbuf]); - - fn set_icon_name(&self, name: Option<&str>); - - //fn set_invalidate_handler(&self, handler: P); - - fn set_keep_above(&self, setting: bool); - - fn set_keep_below(&self, setting: bool); - - fn set_modal_hint(&self, modal: bool); - - fn set_opacity(&self, opacity: f64); - - fn set_opaque_region(&self, region: Option<&cairo::Region>); - - fn set_override_redirect(&self, override_redirect: bool); - - #[cfg(any(feature = "v3_18", feature = "dox"))] - fn set_pass_through(&self, pass_through: bool); - - fn set_role(&self, role: &str); - - fn set_shadow_width(&self, left: i32, right: i32, top: i32, bottom: i32); - - fn set_skip_pager_hint(&self, skips_pager: bool); - - fn set_skip_taskbar_hint(&self, skips_taskbar: bool); - - fn set_source_events(&self, source: InputSource, event_mask: EventMask); - - fn set_startup_id(&self, startup_id: &str); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn set_static_gravities(&self, use_static: bool) -> bool; - - fn set_support_multidevice(&self, support_multidevice: bool); - - fn set_title(&self, title: &str); - - fn set_transient_for>(&self, parent: &P); - - fn set_type_hint(&self, hint: WindowTypeHint); - - fn set_urgency_hint(&self, urgent: bool); - - //fn set_user_data(&self, user_data: /*Ignored*/Option<&glib::Object>); - - fn shape_combine_region(&self, shape_region: Option<&cairo::Region>, offset_x: i32, offset_y: i32); - - fn show(&self); - - fn show_unraised(&self); - - fn show_window_menu(&self, event: &mut Event) -> bool; - - fn stick(&self); - - #[cfg_attr(feature = "v3_16", deprecated)] - fn thaw_toplevel_updates_libgtk_only(&self); - - fn thaw_updates(&self); - - fn unfullscreen(&self); - - fn unmaximize(&self); - - fn unstick(&self); - - fn withdraw(&self); - - fn connect_create_surface cairo::Surface + 'static>(&self, f: F) -> SignalHandlerId; - - //fn connect_from_embedder(&self, f: F) -> SignalHandlerId; - - //#[cfg(any(feature = "v3_22", feature = "dox"))] - //fn connect_moved_to_rect(&self, f: F) -> SignalHandlerId; - - fn connect_pick_embedded_child Option + 'static>(&self, f: F) -> SignalHandlerId; - - //fn connect_to_embedder(&self, f: F) -> SignalHandlerId; - - fn connect_property_cursor_notify(&self, f: F) -> SignalHandlerId; -} - -impl> WindowExt for O { - //fn add_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gdk_window_add_filter() } - //} - - fn beep(&self) { - unsafe { - ffi::gdk_window_beep(self.as_ref().to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn begin_draw_frame(&self, region: &cairo::Region) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_begin_draw_frame(self.as_ref().to_glib_none().0, region.to_glib_none().0)) - } - } - - fn begin_move_drag(&self, button: i32, root_x: i32, root_y: i32, timestamp: u32) { - unsafe { - ffi::gdk_window_begin_move_drag(self.as_ref().to_glib_none().0, button, root_x, root_y, timestamp); - } - } - - fn begin_move_drag_for_device(&self, device: &Device, button: i32, root_x: i32, root_y: i32, timestamp: u32) { - unsafe { - ffi::gdk_window_begin_move_drag_for_device(self.as_ref().to_glib_none().0, device.to_glib_none().0, button, root_x, root_y, timestamp); - } - } - - fn begin_paint_rect(&self, rectangle: &Rectangle) { - unsafe { - ffi::gdk_window_begin_paint_rect(self.as_ref().to_glib_none().0, rectangle.to_glib_none().0); - } - } - - fn begin_paint_region(&self, region: &cairo::Region) { - unsafe { - ffi::gdk_window_begin_paint_region(self.as_ref().to_glib_none().0, region.to_glib_none().0); - } - } - - fn begin_resize_drag(&self, edge: WindowEdge, button: i32, root_x: i32, root_y: i32, timestamp: u32) { - unsafe { - ffi::gdk_window_begin_resize_drag(self.as_ref().to_glib_none().0, edge.to_glib(), button, root_x, root_y, timestamp); - } - } - - fn begin_resize_drag_for_device(&self, edge: WindowEdge, device: &Device, button: i32, root_x: i32, root_y: i32, timestamp: u32) { - unsafe { - ffi::gdk_window_begin_resize_drag_for_device(self.as_ref().to_glib_none().0, edge.to_glib(), device.to_glib_none().0, button, root_x, root_y, timestamp); - } - } - - fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (f64, f64) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - ffi::gdk_window_coords_from_parent(self.as_ref().to_glib_none().0, parent_x, parent_y, &mut x, &mut y); - (x, y) - } - } - - fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64) { - unsafe { - let mut parent_x = mem::uninitialized(); - let mut parent_y = mem::uninitialized(); - ffi::gdk_window_coords_to_parent(self.as_ref().to_glib_none().0, x, y, &mut parent_x, &mut parent_y); - (parent_x, parent_y) - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - fn create_gl_context(&self) -> Result { - unsafe { - let mut error = ptr::null_mut(); - let ret = ffi::gdk_window_create_gl_context(self.as_ref().to_glib_none().0, &mut error); - if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } - } - } - - fn create_similar_image_surface(&self, format: i32, width: i32, height: i32, scale: i32) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_create_similar_image_surface(self.as_ref().to_glib_none().0, format, width, height, scale)) - } - } - - fn deiconify(&self) { - unsafe { - ffi::gdk_window_deiconify(self.as_ref().to_glib_none().0); - } - } - - fn destroy(&self) { - unsafe { - ffi::gdk_window_destroy(self.as_ref().to_glib_none().0); - } - } - - fn destroy_notify(&self) { - unsafe { - ffi::gdk_window_destroy_notify(self.as_ref().to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - fn end_draw_frame>(&self, context: &P) { - unsafe { - ffi::gdk_window_end_draw_frame(self.as_ref().to_glib_none().0, context.as_ref().to_glib_none().0); - } - } - - fn end_paint(&self) { - unsafe { - ffi::gdk_window_end_paint(self.as_ref().to_glib_none().0); - } - } - - fn ensure_native(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_ensure_native(self.as_ref().to_glib_none().0)) - } - } - - fn focus(&self, timestamp: u32) { - unsafe { - ffi::gdk_window_focus(self.as_ref().to_glib_none().0, timestamp); - } - } - - fn freeze_toplevel_updates_libgtk_only(&self) { - unsafe { - ffi::gdk_window_freeze_toplevel_updates_libgtk_only(self.as_ref().to_glib_none().0); - } - } - - fn freeze_updates(&self) { - unsafe { - ffi::gdk_window_freeze_updates(self.as_ref().to_glib_none().0); - } - } - - fn fullscreen(&self) { - unsafe { - ffi::gdk_window_fullscreen(self.as_ref().to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_18", feature = "dox"))] - fn fullscreen_on_monitor(&self, monitor: i32) { - unsafe { - ffi::gdk_window_fullscreen_on_monitor(self.as_ref().to_glib_none().0, monitor); - } - } - - fn geometry_changed(&self) { - unsafe { - ffi::gdk_window_geometry_changed(self.as_ref().to_glib_none().0); - } - } - - fn get_accept_focus(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_accept_focus(self.as_ref().to_glib_none().0)) - } - } - - fn get_children(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_container(ffi::gdk_window_get_children(self.as_ref().to_glib_none().0)) - } - } - - //fn get_children_with_user_data(&self, user_data: /*Unimplemented*/Option) -> Vec { - // unsafe { TODO: call ffi::gdk_window_get_children_with_user_data() } - //} - - fn get_clip_region(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_get_clip_region(self.as_ref().to_glib_none().0)) - } - } - - fn get_composited(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_composited(self.as_ref().to_glib_none().0)) - } - } - - fn get_cursor(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_cursor(self.as_ref().to_glib_none().0)) - } - } - - fn get_decorations(&self) -> Option { - unsafe { - let mut decorations = mem::uninitialized(); - let ret = from_glib(ffi::gdk_window_get_decorations(self.as_ref().to_glib_none().0, &mut decorations)); - if ret { Some(from_glib(decorations)) } else { None } - } - } - - fn get_device_cursor(&self, device: &Device) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_device_cursor(self.as_ref().to_glib_none().0, device.to_glib_none().0)) - } - } - - fn get_device_events(&self, device: &Device) -> EventMask { - unsafe { - from_glib(ffi::gdk_window_get_device_events(self.as_ref().to_glib_none().0, device.to_glib_none().0)) - } - } - - fn get_device_position(&self, device: &Device) -> (Option, i32, i32, ModifierType) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - let mut mask = mem::uninitialized(); - let ret = from_glib_none(ffi::gdk_window_get_device_position(self.as_ref().to_glib_none().0, device.to_glib_none().0, &mut x, &mut y, &mut mask)); - (ret, x, y, from_glib(mask)) - } - } - - fn get_device_position_double(&self, device: &Device) -> (Option, f64, f64, ModifierType) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - let mut mask = mem::uninitialized(); - let ret = from_glib_none(ffi::gdk_window_get_device_position_double(self.as_ref().to_glib_none().0, device.to_glib_none().0, &mut x, &mut y, &mut mask)); - (ret, x, y, from_glib(mask)) - } - } - - fn get_display(&self) -> Display { - unsafe { - from_glib_none(ffi::gdk_window_get_display(self.as_ref().to_glib_none().0)) - } - } - - fn get_drag_protocol(&self) -> (DragProtocol, Window) { - unsafe { - let mut target = ptr::null_mut(); - let ret = from_glib(ffi::gdk_window_get_drag_protocol(self.as_ref().to_glib_none().0, &mut target)); - (ret, from_glib_full(target)) - } - } - - fn get_effective_parent(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_effective_parent(self.as_ref().to_glib_none().0)) - } - } - - fn get_effective_toplevel(&self) -> Window { - unsafe { - from_glib_none(ffi::gdk_window_get_effective_toplevel(self.as_ref().to_glib_none().0)) - } - } - - fn get_event_compression(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_event_compression(self.as_ref().to_glib_none().0)) - } - } - - fn get_events(&self) -> EventMask { - unsafe { - from_glib(ffi::gdk_window_get_events(self.as_ref().to_glib_none().0)) - } - } - - fn get_focus_on_map(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_focus_on_map(self.as_ref().to_glib_none().0)) - } - } - - fn get_frame_clock(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_frame_clock(self.as_ref().to_glib_none().0)) - } - } - - fn get_frame_extents(&self) -> Rectangle { - unsafe { - let mut rect = Rectangle::uninitialized(); - ffi::gdk_window_get_frame_extents(self.as_ref().to_glib_none().0, rect.to_glib_none_mut().0); - rect - } - } - - fn get_fullscreen_mode(&self) -> FullscreenMode { - unsafe { - from_glib(ffi::gdk_window_get_fullscreen_mode(self.as_ref().to_glib_none().0)) - } - } - - fn get_geometry(&self) -> (i32, i32, i32, i32) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - let mut width = mem::uninitialized(); - let mut height = mem::uninitialized(); - ffi::gdk_window_get_geometry(self.as_ref().to_glib_none().0, &mut x, &mut y, &mut width, &mut height); - (x, y, width, height) - } - } - - fn get_group(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_group(self.as_ref().to_glib_none().0)) - } - } - - fn get_height(&self) -> i32 { - unsafe { - ffi::gdk_window_get_height(self.as_ref().to_glib_none().0) - } - } - - fn get_modal_hint(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_modal_hint(self.as_ref().to_glib_none().0)) - } - } - - fn get_origin(&self) -> (i32, i32, i32) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - let ret = ffi::gdk_window_get_origin(self.as_ref().to_glib_none().0, &mut x, &mut y); - (ret, x, y) - } - } - - fn get_parent(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_window_get_parent(self.as_ref().to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_18", feature = "dox"))] - fn get_pass_through(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_pass_through(self.as_ref().to_glib_none().0)) - } - } - - fn get_position(&self) -> (i32, i32) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - ffi::gdk_window_get_position(self.as_ref().to_glib_none().0, &mut x, &mut y); - (x, y) - } - } - - fn get_root_coords(&self, x: i32, y: i32) -> (i32, i32) { - unsafe { - let mut root_x = mem::uninitialized(); - let mut root_y = mem::uninitialized(); - ffi::gdk_window_get_root_coords(self.as_ref().to_glib_none().0, x, y, &mut root_x, &mut root_y); - (root_x, root_y) - } - } - - fn get_root_origin(&self) -> (i32, i32) { - unsafe { - let mut x = mem::uninitialized(); - let mut y = mem::uninitialized(); - ffi::gdk_window_get_root_origin(self.as_ref().to_glib_none().0, &mut x, &mut y); - (x, y) - } - } - - fn get_scale_factor(&self) -> i32 { - unsafe { - ffi::gdk_window_get_scale_factor(self.as_ref().to_glib_none().0) - } - } - - fn get_screen(&self) -> Screen { - unsafe { - from_glib_none(ffi::gdk_window_get_screen(self.as_ref().to_glib_none().0)) - } - } - - fn get_source_events(&self, source: InputSource) -> EventMask { - unsafe { - from_glib(ffi::gdk_window_get_source_events(self.as_ref().to_glib_none().0, source.to_glib())) - } - } - - fn get_state(&self) -> WindowState { - unsafe { - from_glib(ffi::gdk_window_get_state(self.as_ref().to_glib_none().0)) - } - } - - fn get_support_multidevice(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_get_support_multidevice(self.as_ref().to_glib_none().0)) - } - } - - fn get_toplevel(&self) -> Window { - unsafe { - from_glib_none(ffi::gdk_window_get_toplevel(self.as_ref().to_glib_none().0)) - } - } - - fn get_type_hint(&self) -> WindowTypeHint { - unsafe { - from_glib(ffi::gdk_window_get_type_hint(self.as_ref().to_glib_none().0)) - } - } - - fn get_update_area(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_get_update_area(self.as_ref().to_glib_none().0)) - } - } - - //fn get_user_data(&self, data: /*Unimplemented*/&mut Option) { - // unsafe { TODO: call ffi::gdk_window_get_user_data() } - //} - - fn get_visible_region(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_get_visible_region(self.as_ref().to_glib_none().0)) - } - } - - fn get_visual(&self) -> Visual { - unsafe { - from_glib_none(ffi::gdk_window_get_visual(self.as_ref().to_glib_none().0)) - } - } - - fn get_width(&self) -> i32 { - unsafe { - ffi::gdk_window_get_width(self.as_ref().to_glib_none().0) - } - } - - fn get_window_type(&self) -> WindowType { - unsafe { - from_glib(ffi::gdk_window_get_window_type(self.as_ref().to_glib_none().0)) - } - } - - fn has_native(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_has_native(self.as_ref().to_glib_none().0)) - } - } - - fn hide(&self) { - unsafe { - ffi::gdk_window_hide(self.as_ref().to_glib_none().0); - } - } - - fn iconify(&self) { - unsafe { - ffi::gdk_window_iconify(self.as_ref().to_glib_none().0); - } - } - - fn input_shape_combine_region(&self, shape_region: &cairo::Region, offset_x: i32, offset_y: i32) { - unsafe { - ffi::gdk_window_input_shape_combine_region(self.as_ref().to_glib_none().0, shape_region.to_glib_none().0, offset_x, offset_y); - } - } - - fn invalidate_maybe_recurse(&self, region: &cairo::Region, child_func: Option<&mut dyn (FnMut(&Window) -> bool)>) { - let child_func_data: Option<&mut dyn (FnMut(&Window) -> bool)> = child_func; - unsafe extern "C" fn child_func_func(window: *mut ffi::GdkWindow, user_data: glib_ffi::gpointer) -> glib_ffi::gboolean { - let window = from_glib_borrow(window); - let callback: *mut Option<&mut dyn (FnMut(&Window) -> bool)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&Window) -> bool)>; - let res = if let Some(ref mut callback) = *callback { - callback(&window) - } else { - panic!("cannot get closure...") - }; - res.to_glib() - } - let child_func = Some(child_func_func as _); - let super_callback0: &Option<&mut dyn (FnMut(&Window) -> bool)> = &child_func_data; - unsafe { - ffi::gdk_window_invalidate_maybe_recurse(self.as_ref().to_glib_none().0, region.to_glib_none().0, child_func, super_callback0 as *const _ as usize as *mut _); - } - } - - fn invalidate_rect(&self, rect: Option<&Rectangle>, invalidate_children: bool) { - unsafe { - ffi::gdk_window_invalidate_rect(self.as_ref().to_glib_none().0, rect.to_glib_none().0, invalidate_children.to_glib()); - } - } - - fn invalidate_region(&self, region: &cairo::Region, invalidate_children: bool) { - unsafe { - ffi::gdk_window_invalidate_region(self.as_ref().to_glib_none().0, region.to_glib_none().0, invalidate_children.to_glib()); - } - } - - fn is_destroyed(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_is_destroyed(self.as_ref().to_glib_none().0)) - } - } - - fn is_input_only(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_is_input_only(self.as_ref().to_glib_none().0)) - } - } - - fn is_shaped(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_is_shaped(self.as_ref().to_glib_none().0)) - } - } - - fn is_viewable(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_is_viewable(self.as_ref().to_glib_none().0)) - } - } - - fn is_visible(&self) -> bool { - unsafe { - from_glib(ffi::gdk_window_is_visible(self.as_ref().to_glib_none().0)) - } - } - - fn lower(&self) { - unsafe { - ffi::gdk_window_lower(self.as_ref().to_glib_none().0); - } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - fn mark_paint_from_clip(&self, cr: &cairo::Context) { - unsafe { - ffi::gdk_window_mark_paint_from_clip(self.as_ref().to_glib_none().0, mut_override(cr.to_glib_none().0)); - } - } - - fn maximize(&self) { - unsafe { - ffi::gdk_window_maximize(self.as_ref().to_glib_none().0); - } - } - - fn merge_child_input_shapes(&self) { - unsafe { - ffi::gdk_window_merge_child_input_shapes(self.as_ref().to_glib_none().0); - } - } - - fn merge_child_shapes(&self) { - unsafe { - ffi::gdk_window_merge_child_shapes(self.as_ref().to_glib_none().0); - } - } - - fn move_(&self, x: i32, y: i32) { - unsafe { - ffi::gdk_window_move(self.as_ref().to_glib_none().0, x, y); - } - } - - fn move_region(&self, region: &cairo::Region, dx: i32, dy: i32) { - unsafe { - ffi::gdk_window_move_region(self.as_ref().to_glib_none().0, region.to_glib_none().0, dx, dy); - } - } - - fn move_resize(&self, x: i32, y: i32, width: i32, height: i32) { - unsafe { - ffi::gdk_window_move_resize(self.as_ref().to_glib_none().0, x, y, width, height); - } - } - - #[cfg(any(feature = "v3_24", feature = "dox"))] - fn move_to_rect(&self, rect: &Rectangle, rect_anchor: Gravity, window_anchor: Gravity, anchor_hints: AnchorHints, rect_anchor_dx: i32, rect_anchor_dy: i32) { - unsafe { - ffi::gdk_window_move_to_rect(self.as_ref().to_glib_none().0, rect.to_glib_none().0, rect_anchor.to_glib(), window_anchor.to_glib(), anchor_hints.to_glib(), rect_anchor_dx, rect_anchor_dy); - } - } - - fn peek_children(&self) -> Vec { - unsafe { - FromGlibPtrContainer::from_glib_none(ffi::gdk_window_peek_children(self.as_ref().to_glib_none().0)) - } - } - - fn process_updates(&self, update_children: bool) { - unsafe { - ffi::gdk_window_process_updates(self.as_ref().to_glib_none().0, update_children.to_glib()); - } - } - - fn raise(&self) { - unsafe { - ffi::gdk_window_raise(self.as_ref().to_glib_none().0); - } - } - - fn register_dnd(&self) { - unsafe { - ffi::gdk_window_register_dnd(self.as_ref().to_glib_none().0); - } - } - - //fn remove_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { - // unsafe { TODO: call ffi::gdk_window_remove_filter() } - //} - - fn reparent>(&self, new_parent: &P, x: i32, y: i32) { - unsafe { - ffi::gdk_window_reparent(self.as_ref().to_glib_none().0, new_parent.as_ref().to_glib_none().0, x, y); - } - } - - fn resize(&self, width: i32, height: i32) { - unsafe { - ffi::gdk_window_resize(self.as_ref().to_glib_none().0, width, height); - } - } - - fn restack>(&self, sibling: Option<&P>, above: bool) { - unsafe { - ffi::gdk_window_restack(self.as_ref().to_glib_none().0, sibling.map(|p| p.as_ref()).to_glib_none().0, above.to_glib()); - } - } - - fn scroll(&self, dx: i32, dy: i32) { - unsafe { - ffi::gdk_window_scroll(self.as_ref().to_glib_none().0, dx, dy); - } - } - - fn set_accept_focus(&self, accept_focus: bool) { - unsafe { - ffi::gdk_window_set_accept_focus(self.as_ref().to_glib_none().0, accept_focus.to_glib()); - } - } - - fn set_background_rgba(&self, rgba: &RGBA) { - unsafe { - ffi::gdk_window_set_background_rgba(self.as_ref().to_glib_none().0, rgba.to_glib_none().0); - } - } - - fn set_child_input_shapes(&self) { - unsafe { - ffi::gdk_window_set_child_input_shapes(self.as_ref().to_glib_none().0); - } - } - - fn set_child_shapes(&self) { - unsafe { - ffi::gdk_window_set_child_shapes(self.as_ref().to_glib_none().0); - } - } - - fn set_composited(&self, composited: bool) { - unsafe { - ffi::gdk_window_set_composited(self.as_ref().to_glib_none().0, composited.to_glib()); - } - } - - fn set_cursor(&self, cursor: Option<&Cursor>) { - unsafe { - ffi::gdk_window_set_cursor(self.as_ref().to_glib_none().0, cursor.to_glib_none().0); - } - } - - fn set_decorations(&self, decorations: WMDecoration) { - unsafe { - ffi::gdk_window_set_decorations(self.as_ref().to_glib_none().0, decorations.to_glib()); - } - } - - fn set_device_cursor(&self, device: &Device, cursor: &Cursor) { - unsafe { - ffi::gdk_window_set_device_cursor(self.as_ref().to_glib_none().0, device.to_glib_none().0, cursor.to_glib_none().0); - } - } - - fn set_device_events(&self, device: &Device, event_mask: EventMask) { - unsafe { - ffi::gdk_window_set_device_events(self.as_ref().to_glib_none().0, device.to_glib_none().0, event_mask.to_glib()); - } - } - - fn set_event_compression(&self, event_compression: bool) { - unsafe { - ffi::gdk_window_set_event_compression(self.as_ref().to_glib_none().0, event_compression.to_glib()); - } - } - - fn set_events(&self, event_mask: EventMask) { - unsafe { - ffi::gdk_window_set_events(self.as_ref().to_glib_none().0, event_mask.to_glib()); - } - } - - fn set_focus_on_map(&self, focus_on_map: bool) { - unsafe { - ffi::gdk_window_set_focus_on_map(self.as_ref().to_glib_none().0, focus_on_map.to_glib()); - } - } - - fn set_fullscreen_mode(&self, mode: FullscreenMode) { - unsafe { - ffi::gdk_window_set_fullscreen_mode(self.as_ref().to_glib_none().0, mode.to_glib()); - } - } - - fn set_functions(&self, functions: WMFunction) { - unsafe { - ffi::gdk_window_set_functions(self.as_ref().to_glib_none().0, functions.to_glib()); - } - } - - fn set_geometry_hints(&self, geometry: &Geometry, geom_mask: WindowHints) { - unsafe { - ffi::gdk_window_set_geometry_hints(self.as_ref().to_glib_none().0, geometry.to_glib_none().0, geom_mask.to_glib()); - } - } - - fn set_group>(&self, leader: Option<&P>) { - unsafe { - ffi::gdk_window_set_group(self.as_ref().to_glib_none().0, leader.map(|p| p.as_ref()).to_glib_none().0); - } - } - - fn set_icon_list(&self, pixbufs: &[gdk_pixbuf::Pixbuf]) { - unsafe { - ffi::gdk_window_set_icon_list(self.as_ref().to_glib_none().0, pixbufs.to_glib_none().0); - } - } - - fn set_icon_name(&self, name: Option<&str>) { - unsafe { - ffi::gdk_window_set_icon_name(self.as_ref().to_glib_none().0, name.to_glib_none().0); - } - } - - //fn set_invalidate_handler(&self, handler: P) { - // unsafe { TODO: call ffi::gdk_window_set_invalidate_handler() } - //} - - fn set_keep_above(&self, setting: bool) { - unsafe { - ffi::gdk_window_set_keep_above(self.as_ref().to_glib_none().0, setting.to_glib()); - } - } - - fn set_keep_below(&self, setting: bool) { - unsafe { - ffi::gdk_window_set_keep_below(self.as_ref().to_glib_none().0, setting.to_glib()); - } - } - - fn set_modal_hint(&self, modal: bool) { - unsafe { - ffi::gdk_window_set_modal_hint(self.as_ref().to_glib_none().0, modal.to_glib()); - } - } - - fn set_opacity(&self, opacity: f64) { - unsafe { - ffi::gdk_window_set_opacity(self.as_ref().to_glib_none().0, opacity); - } - } - - fn set_opaque_region(&self, region: Option<&cairo::Region>) { - unsafe { - ffi::gdk_window_set_opaque_region(self.as_ref().to_glib_none().0, mut_override(region.to_glib_none().0)); - } - } - - fn set_override_redirect(&self, override_redirect: bool) { - unsafe { - ffi::gdk_window_set_override_redirect(self.as_ref().to_glib_none().0, override_redirect.to_glib()); - } - } - - #[cfg(any(feature = "v3_18", feature = "dox"))] - fn set_pass_through(&self, pass_through: bool) { - unsafe { - ffi::gdk_window_set_pass_through(self.as_ref().to_glib_none().0, pass_through.to_glib()); - } - } - - fn set_role(&self, role: &str) { - unsafe { - ffi::gdk_window_set_role(self.as_ref().to_glib_none().0, role.to_glib_none().0); - } - } - - fn set_shadow_width(&self, left: i32, right: i32, top: i32, bottom: i32) { - unsafe { - ffi::gdk_window_set_shadow_width(self.as_ref().to_glib_none().0, left, right, top, bottom); - } - } - - fn set_skip_pager_hint(&self, skips_pager: bool) { - unsafe { - ffi::gdk_window_set_skip_pager_hint(self.as_ref().to_glib_none().0, skips_pager.to_glib()); - } - } - - fn set_skip_taskbar_hint(&self, skips_taskbar: bool) { - unsafe { - ffi::gdk_window_set_skip_taskbar_hint(self.as_ref().to_glib_none().0, skips_taskbar.to_glib()); - } - } - - fn set_source_events(&self, source: InputSource, event_mask: EventMask) { - unsafe { - ffi::gdk_window_set_source_events(self.as_ref().to_glib_none().0, source.to_glib(), event_mask.to_glib()); - } - } - - fn set_startup_id(&self, startup_id: &str) { - unsafe { - ffi::gdk_window_set_startup_id(self.as_ref().to_glib_none().0, startup_id.to_glib_none().0); - } - } - - fn set_static_gravities(&self, use_static: bool) -> bool { - unsafe { - from_glib(ffi::gdk_window_set_static_gravities(self.as_ref().to_glib_none().0, use_static.to_glib())) - } - } - - fn set_support_multidevice(&self, support_multidevice: bool) { - unsafe { - ffi::gdk_window_set_support_multidevice(self.as_ref().to_glib_none().0, support_multidevice.to_glib()); - } - } - - fn set_title(&self, title: &str) { - unsafe { - ffi::gdk_window_set_title(self.as_ref().to_glib_none().0, title.to_glib_none().0); - } - } - - fn set_transient_for>(&self, parent: &P) { - unsafe { - ffi::gdk_window_set_transient_for(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0); - } - } - - fn set_type_hint(&self, hint: WindowTypeHint) { - unsafe { - ffi::gdk_window_set_type_hint(self.as_ref().to_glib_none().0, hint.to_glib()); - } - } - - fn set_urgency_hint(&self, urgent: bool) { - unsafe { - ffi::gdk_window_set_urgency_hint(self.as_ref().to_glib_none().0, urgent.to_glib()); - } - } - - //fn set_user_data(&self, user_data: /*Ignored*/Option<&glib::Object>) { - // unsafe { TODO: call ffi::gdk_window_set_user_data() } - //} - - fn shape_combine_region(&self, shape_region: Option<&cairo::Region>, offset_x: i32, offset_y: i32) { - unsafe { - ffi::gdk_window_shape_combine_region(self.as_ref().to_glib_none().0, shape_region.to_glib_none().0, offset_x, offset_y); - } - } - - fn show(&self) { - unsafe { - ffi::gdk_window_show(self.as_ref().to_glib_none().0); - } - } - - fn show_unraised(&self) { - unsafe { - ffi::gdk_window_show_unraised(self.as_ref().to_glib_none().0); - } - } - - fn show_window_menu(&self, event: &mut Event) -> bool { - unsafe { - from_glib(ffi::gdk_window_show_window_menu(self.as_ref().to_glib_none().0, event.to_glib_none_mut().0)) - } - } - - fn stick(&self) { - unsafe { - ffi::gdk_window_stick(self.as_ref().to_glib_none().0); - } - } - - fn thaw_toplevel_updates_libgtk_only(&self) { - unsafe { - ffi::gdk_window_thaw_toplevel_updates_libgtk_only(self.as_ref().to_glib_none().0); - } - } - - fn thaw_updates(&self) { - unsafe { - ffi::gdk_window_thaw_updates(self.as_ref().to_glib_none().0); - } - } - - fn unfullscreen(&self) { - unsafe { - ffi::gdk_window_unfullscreen(self.as_ref().to_glib_none().0); - } - } - - fn unmaximize(&self) { - unsafe { - ffi::gdk_window_unmaximize(self.as_ref().to_glib_none().0); - } - } - - fn unstick(&self) { - unsafe { - ffi::gdk_window_unstick(self.as_ref().to_glib_none().0); - } - } - - fn withdraw(&self) { - unsafe { - ffi::gdk_window_withdraw(self.as_ref().to_glib_none().0); - } - } - - fn connect_create_surface cairo::Surface + 'static>(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"create-surface\0".as_ptr() as *const _, - Some(transmute(create_surface_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - //fn connect_from_embedder(&self, f: F) -> SignalHandlerId { - // Out offscreen_x: *.Double - // Out offscreen_y: *.Double - //} - - //#[cfg(any(feature = "v3_22", feature = "dox"))] - //fn connect_moved_to_rect(&self, f: F) -> SignalHandlerId { - // Unimplemented flipped_rect: *.Pointer - // Unimplemented final_rect: *.Pointer - //} - - fn connect_pick_embedded_child Option + 'static>(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"pick-embedded-child\0".as_ptr() as *const _, - Some(transmute(pick_embedded_child_trampoline:: as usize)), Box_::into_raw(f)) - } - } - - //fn connect_to_embedder(&self, f: F) -> SignalHandlerId { - // Out embedder_x: *.Double - // Out embedder_y: *.Double - //} - - fn connect_property_cursor_notify(&self, f: F) -> SignalHandlerId { - unsafe { - let f: Box_ = Box_::new(f); - connect_raw(self.as_ptr() as *mut _, b"notify::cursor\0".as_ptr() as *const _, - Some(transmute(notify_cursor_trampoline:: as usize)), Box_::into_raw(f)) - } - } -} - -unsafe extern "C" fn create_surface_trampoline cairo::Surface + 'static>(this: *mut ffi::GdkWindow, width: libc::c_int, height: libc::c_int, f: glib_ffi::gpointer) -> *mut cairo_ffi::cairo_surface_t -where P: IsA { - let f: &F = &*(f as *const F); - f(&Window::from_glib_borrow(this).unsafe_cast(), width, height).to_glib_full() -} - -unsafe extern "C" fn pick_embedded_child_trampoline Option + 'static>(this: *mut ffi::GdkWindow, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer) -> *mut ffi::GdkWindow -where P: IsA { - let f: &F = &*(f as *const F); - f(&Window::from_glib_borrow(this).unsafe_cast(), x, y)/*Not checked*/.to_glib_none().0 -} - -unsafe extern "C" fn notify_cursor_trampoline(this: *mut ffi::GdkWindow, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) -where P: IsA { - let f: &F = &*(f as *const F); - f(&Window::from_glib_borrow(this).unsafe_cast()) -} - -impl fmt::Display for Window { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Window") - } -} diff --git a/src/cairo_interaction.rs b/src/cairo_interaction.rs deleted file mode 100644 index d360eb00bc48..000000000000 --- a/src/cairo_interaction.rs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::object::IsA; -use glib::translate::*; -use ffi; -use gdk_pixbuf::Pixbuf; -use cairo::{Context, Region}; -use cairo::Surface; -use {RGBA, Rectangle, Window}; - -pub trait SurfaceExt { - fn create_region(&self) -> Option; -} - -impl SurfaceExt for Surface { - fn create_region(&self) -> Option { - unsafe { - from_glib_full(ffi::gdk_cairo_region_create_from_surface(self.to_glib_none().0)) - } - } -} - -pub trait PixbufExt { - fn create_surface(&self, scale: i32, for_window: &Window) -> Option; -} - -impl PixbufExt for Pixbuf { - fn create_surface(&self, scale: i32, for_window: &Window) -> Option { - unsafe { - from_glib_full(ffi::gdk_cairo_surface_create_from_pixbuf(self.to_glib_none().0, scale, for_window.to_glib_none().0)) - } - } -} - -pub trait ContextExt { - fn create_from_window(window: &Window) -> Context; - - #[cfg(any(feature = "v3_16", feature = "dox"))] - fn cairo_draw_from_gl(cr: &Context, window: &Window, source: i32, source_type: i32, buffer_scale: i32, x: i32, y: i32, width: i32, height: i32); - - fn cairo_surface_create_from_pixbuf>(pixbuf: &Pixbuf, scale: i32, for_window: Option<&T>) -> Option; - - fn get_clip_rectangle(&self) -> Option; - - fn set_source_rgba(&self, rgba: &RGBA); - - fn set_source_pixbuf(&self, pixbuf: &Pixbuf, x: f64, y: f64); - - fn set_source_window(&self, window: &Window, x: f64, y: f64); - - fn rectangle(&self, rectangle: &Rectangle); - - fn add_region(&self, region: &Region); -} - -impl ContextExt for Context { - fn create_from_window(window: &Window) -> Context { - skip_assert_initialized!(); - unsafe { from_glib_full(ffi::gdk_cairo_create(window.to_glib_none().0)) } - } - - #[cfg(any(feature = "v3_16", feature = "dox"))] - fn cairo_draw_from_gl(cr: &Context, window: &Window, source: i32, source_type: i32, buffer_scale: i32, x: i32, y: i32, width: i32, height: i32) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_cairo_draw_from_gl(mut_override(cr.to_glib_none().0), window.to_glib_none().0, source, source_type, buffer_scale, x, y, width, height); - } - } - - fn cairo_surface_create_from_pixbuf>(pixbuf: &Pixbuf, scale: i32, for_window: Option<&T>) -> Option { - assert_initialized_main_thread!(); - let for_window = for_window.map(|f| f.as_ref()); - let for_window = for_window.to_glib_none(); - unsafe { - from_glib_full(ffi::gdk_cairo_surface_create_from_pixbuf(pixbuf.to_glib_none().0, scale, for_window.0)) - } - } - - fn get_clip_rectangle(&self) -> Option { - unsafe { - let mut rectangle = Rectangle::uninitialized(); - if from_glib(ffi::gdk_cairo_get_clip_rectangle(self.to_glib_none().0, - rectangle.to_glib_none_mut().0)) { - Some(rectangle) - } else { - None - } - } - } - - fn set_source_rgba(&self, rgba: &RGBA) { - unsafe { ffi::gdk_cairo_set_source_rgba(self.to_glib_none().0, rgba.to_glib_none().0); } - } - - fn set_source_pixbuf(&self, pixbuf: &Pixbuf, x: f64, y: f64) { - unsafe { - ffi::gdk_cairo_set_source_pixbuf(self.to_glib_none().0, pixbuf.to_glib_none().0, x, y); - } - } - - fn set_source_window(&self, window: &Window, x: f64, y: f64) { - unsafe { - ffi::gdk_cairo_set_source_window(self.to_glib_none().0, window.to_glib_none().0, x, y); - } - } - - fn rectangle(&self, rectangle: &Rectangle) { - unsafe { ffi::gdk_cairo_rectangle(self.to_glib_none().0, rectangle.to_glib_none().0); } - } - - fn add_region(&self, region: &Region) { - unsafe { ffi::gdk_cairo_region(self.to_glib_none().0, region.to_glib_none().0); } - } -} - diff --git a/src/change_data.rs b/src/change_data.rs deleted file mode 100644 index e47eccd9a46f..000000000000 --- a/src/change_data.rs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2013-2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use libc; - -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum ChangeData<'a> { - UChars(&'a [u8]), - UShorts(&'a [u16]), - ULongs(&'a [libc::c_ulong]), - UChar(u8), - UShort(u16), - ULong(libc::c_ulong), -} - -#[doc(hidden)] -impl<'a> ChangeData<'a> { - pub fn to_glib(&'a self) -> *const u8 { - match *self { - ChangeData::UChars(d) => d.as_ptr() as *const _, - ChangeData::UShorts(d) => d.as_ptr() as *const _, - ChangeData::ULongs(d) => d.as_ptr() as *const _, - ChangeData::UChar(d) => &d as *const _ as *const _, - ChangeData::UShort(d) => &d as *const _ as *const _, - ChangeData::ULong(d) => &d as *const _ as *const _, - } - } - - pub fn len(&'a self) -> usize { - match *self { - ChangeData::UChars(d) => d.len(), - ChangeData::UShorts(d) => d.len(), - ChangeData::ULongs(d) => d.len(), - ChangeData::UChar(_) | - ChangeData::UShort(_) | - ChangeData::ULong(_) => 1, - } - } -} diff --git a/src/device.rs b/src/device.rs deleted file mode 100644 index 7381b8c041f0..000000000000 --- a/src/device.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; -use AxisUse; -use Device; - -impl Device { - pub fn get_axis(&self, axes: &mut [f64], use_: AxisUse, value: &mut f64) -> bool { - unsafe { from_glib(ffi::gdk_device_get_axis(self.to_glib_none().0, axes.as_mut_ptr(), use_.to_glib(), value)) } - } -} diff --git a/src/device_manager.rs b/src/device_manager.rs deleted file mode 100644 index 4ce8ac1d79a1..000000000000 --- a/src/device_manager.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use ffi; -use DeviceManager; - -impl DeviceManager { - pub fn disable_multidevice() { - assert_not_initialized!(); - unsafe { ffi::gdk_disable_multidevice() } - } -} diff --git a/src/drag_context.rs b/src/drag_context.rs deleted file mode 100644 index cb67d3bf668b..000000000000 --- a/src/drag_context.rs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use std::ptr; -use glib::translate::*; -use glib::object::IsA; -use atom::Atom; -use ffi; -use Device; -use DragAction; -use DragContext; -use DragProtocol; -use Screen; -use Window; - -impl DragContext { - pub fn drag_get_selection(&self) -> Atom { - unsafe { from_glib_none(ffi::gdk_drag_get_selection(self.to_glib_none().0) as *mut _) } - } - - pub fn drag_abort(&self, time_: u32) { - unsafe { ffi::gdk_drag_abort(self.to_glib_none().0, time_) } - } - - pub fn drop_reply(&self, accepted: bool, time_: u32) { - unsafe { ffi::gdk_drop_reply(self.to_glib_none().0, accepted.to_glib(), time_) } - } - - pub fn drop(&self, time_: u32) { - unsafe { ffi::gdk_drag_drop(self.to_glib_none().0, time_) } - } - - pub fn drag_find_window_for_screen(&self, drag_window: &Window, screen: &Screen, - x_root: i32, y_root: i32) -> (Option, DragProtocol) { - unsafe { - let mut dest_window = ptr::null_mut(); - let mut protocol = ffi::GDK_DRAG_PROTO_NONE; - ffi::gdk_drag_find_window_for_screen(self.to_glib_none().0, - drag_window.to_glib_none().0, - screen.to_glib_none().0, - x_root, y_root, - &mut dest_window, &mut protocol); - (from_glib_full(dest_window), from_glib(protocol)) - } - } - - pub fn drag_motion(&self, dest_window: &Window, protocol: DragProtocol, x_root: i32, - y_root: i32, suggested_action: DragAction, possible_actions: DragAction, - time_: u32) -> bool { - unsafe { - from_glib( - ffi::gdk_drag_motion(self.to_glib_none().0, dest_window.to_glib_none().0, protocol.to_glib(), - x_root, y_root, suggested_action.to_glib(), possible_actions.to_glib(), time_)) - } - } - - pub fn drop_finish(&self, success: bool, time_: u32) { - unsafe { ffi::gdk_drop_finish(self.to_glib_none().0, success.to_glib(), time_) } - } - - pub fn drag_status(&self, action: DragAction, time_: u32) { - unsafe { ffi::gdk_drag_status(self.to_glib_none().0, action.to_glib(), time_) } - } - - pub fn drag_drop_succeeded(&self) -> bool { - unsafe { from_glib(ffi::gdk_drag_drop_succeeded(self.to_glib_none().0)) } - } - - pub fn drag_begin(window: &Window, targets: &[&Atom]) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_drag_begin(window.to_glib_none().0, targets.to_glib_none().0)) - } - } - - pub fn drag_begin_for_device>(window: &Window, device: &P, targets: &[&Atom]) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_drag_begin_for_device(window.to_glib_none().0, device.as_ref().to_glib_none().0, targets.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn drag_begin_from_point>(window: &Window, device: &P, targets: &[&Atom], x_root: i32, y_root: i32) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_drag_begin_from_point(window.to_glib_none().0, device.as_ref().to_glib_none().0, targets.to_glib_none().0, x_root, y_root)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn drag_drop_done(&self, success: bool) { - skip_assert_initialized!(); - unsafe { - ffi::gdk_drag_drop_done(self.to_glib_none().0, success.to_glib()); - } - } -} diff --git a/src/enums.rs b/src/enums.rs deleted file mode 100644 index 6253996d9e8a..000000000000 --- a/src/enums.rs +++ /dev/null @@ -1,2281 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -#[allow(non_upper_case_globals)] -pub mod key { - use ffi; - - pub type Key = u32; - - pub const VoidSymbol: Key = ffi::GDK_KEY_VoidSymbol as u32; - pub const BackSpace: Key = ffi::GDK_KEY_BackSpace as u32; - pub const Tab: Key = ffi::GDK_KEY_Tab as u32; - pub const Linefeed: Key = ffi::GDK_KEY_Linefeed as u32; - pub const Clear: Key = ffi::GDK_KEY_Clear as u32; - pub const Return: Key = ffi::GDK_KEY_Return as u32; - pub const Pause: Key = ffi::GDK_KEY_Pause as u32; - pub const Scroll_Lock: Key = ffi::GDK_KEY_Scroll_Lock as u32; - pub const Sys_Req: Key = ffi::GDK_KEY_Sys_Req as u32; - pub const Escape: Key = ffi::GDK_KEY_Escape as u32; - pub const Delete: Key = ffi::GDK_KEY_Delete as u32; - pub const Multi_key: Key = ffi::GDK_KEY_Multi_key as u32; - pub const Codeinput: Key = ffi::GDK_KEY_Codeinput as u32; - pub const SingleCandidate: Key = ffi::GDK_KEY_SingleCandidate as u32; - pub const MultipleCandidate: Key = ffi::GDK_KEY_MultipleCandidate as u32; - pub const PreviousCandidate: Key = ffi::GDK_KEY_PreviousCandidate as u32; - pub const Kanji: Key = ffi::GDK_KEY_Kanji as u32; - pub const Muhenkan: Key = ffi::GDK_KEY_Muhenkan as u32; - pub const Henkan_Mode: Key = ffi::GDK_KEY_Henkan_Mode as u32; - pub const Henkan: Key = ffi::GDK_KEY_Henkan as u32; - pub const Romaji: Key = ffi::GDK_KEY_Romaji as u32; - pub const Hiragana: Key = ffi::GDK_KEY_Hiragana as u32; - pub const Katakana: Key = ffi::GDK_KEY_Katakana as u32; - pub const Hiragana_Katakana: Key = ffi::GDK_KEY_Hiragana_Katakana as u32; - pub const Zenkaku: Key = ffi::GDK_KEY_Zenkaku as u32; - pub const Hankaku: Key = ffi::GDK_KEY_Hankaku as u32; - pub const Zenkaku_Hankaku: Key = ffi::GDK_KEY_Zenkaku_Hankaku as u32; - pub const Touroku: Key = ffi::GDK_KEY_Touroku as u32; - pub const Massyo: Key = ffi::GDK_KEY_Massyo as u32; - pub const Kana_Lock: Key = ffi::GDK_KEY_Kana_Lock as u32; - pub const Kana_Shift: Key = ffi::GDK_KEY_Kana_Shift as u32; - pub const Eisu_Shift: Key = ffi::GDK_KEY_Eisu_Shift as u32; - pub const Eisu_toggle: Key = ffi::GDK_KEY_Eisu_toggle as u32; - pub const Kanji_Bangou: Key = ffi::GDK_KEY_Kanji_Bangou as u32; - pub const Zen_Koho: Key = ffi::GDK_KEY_Zen_Koho as u32; - pub const Mae_Koho: Key = ffi::GDK_KEY_Mae_Koho as u32; - pub const Home: Key = ffi::GDK_KEY_Home as u32; - pub const Left: Key = ffi::GDK_KEY_Left as u32; - pub const Up: Key = ffi::GDK_KEY_Up as u32; - pub const Right: Key = ffi::GDK_KEY_Right as u32; - pub const Down: Key = ffi::GDK_KEY_Down as u32; - pub const Prior: Key = ffi::GDK_KEY_Prior as u32; - pub const Page_Up: Key = ffi::GDK_KEY_Page_Up as u32; - pub const Next: Key = ffi::GDK_KEY_Next as u32; - pub const Page_Down: Key = ffi::GDK_KEY_Page_Down as u32; - pub const End: Key = ffi::GDK_KEY_End as u32; - pub const Begin: Key = ffi::GDK_KEY_Begin as u32; - pub const Select: Key = ffi::GDK_KEY_Select as u32; - pub const Print: Key = ffi::GDK_KEY_Print as u32; - pub const Execute: Key = ffi::GDK_KEY_Execute as u32; - pub const Insert: Key = ffi::GDK_KEY_Insert as u32; - pub const Undo: Key = ffi::GDK_KEY_Undo as u32; - pub const Redo: Key = ffi::GDK_KEY_Redo as u32; - pub const Menu: Key = ffi::GDK_KEY_Menu as u32; - pub const Find: Key = ffi::GDK_KEY_Find as u32; - pub const Cancel: Key = ffi::GDK_KEY_Cancel as u32; - pub const Help: Key = ffi::GDK_KEY_Help as u32; - pub const Break: Key = ffi::GDK_KEY_Break as u32; - pub const Mode_switch: Key = ffi::GDK_KEY_Mode_switch as u32; - pub const script_switch: Key = ffi::GDK_KEY_script_switch as u32; - pub const Num_Lock: Key = ffi::GDK_KEY_Num_Lock as u32; - pub const KP_Space: Key = ffi::GDK_KEY_KP_Space as u32; - pub const KP_Tab: Key = ffi::GDK_KEY_KP_Tab as u32; - pub const KP_Enter: Key = ffi::GDK_KEY_KP_Enter as u32; - pub const KP_F1: Key = ffi::GDK_KEY_KP_F1 as u32; - pub const KP_F2: Key = ffi::GDK_KEY_KP_F2 as u32; - pub const KP_F3: Key = ffi::GDK_KEY_KP_F3 as u32; - pub const KP_F4: Key = ffi::GDK_KEY_KP_F4 as u32; - pub const KP_Home: Key = ffi::GDK_KEY_KP_Home as u32; - pub const KP_Left: Key = ffi::GDK_KEY_KP_Left as u32; - pub const KP_Up: Key = ffi::GDK_KEY_KP_Up as u32; - pub const KP_Right: Key = ffi::GDK_KEY_KP_Right as u32; - pub const KP_Down: Key = ffi::GDK_KEY_KP_Down as u32; - pub const KP_Prior: Key = ffi::GDK_KEY_KP_Prior as u32; - pub const KP_Page_Up: Key = ffi::GDK_KEY_KP_Page_Up as u32; - pub const KP_Next: Key = ffi::GDK_KEY_KP_Next as u32; - pub const KP_Page_Down: Key = ffi::GDK_KEY_KP_Page_Down as u32; - pub const KP_End: Key = ffi::GDK_KEY_KP_End as u32; - pub const KP_Begin: Key = ffi::GDK_KEY_KP_Begin as u32; - pub const KP_Insert: Key = ffi::GDK_KEY_KP_Insert as u32; - pub const KP_Delete: Key = ffi::GDK_KEY_KP_Delete as u32; - pub const KP_Equal: Key = ffi::GDK_KEY_KP_Equal as u32; - pub const KP_Multiply: Key = ffi::GDK_KEY_KP_Multiply as u32; - pub const KP_Add: Key = ffi::GDK_KEY_KP_Add as u32; - pub const KP_Separator: Key = ffi::GDK_KEY_KP_Separator as u32; - pub const KP_Subtract: Key = ffi::GDK_KEY_KP_Subtract as u32; - pub const KP_Decimal: Key = ffi::GDK_KEY_KP_Decimal as u32; - pub const KP_Divide: Key = ffi::GDK_KEY_KP_Divide as u32; - pub const KP_0: Key = ffi::GDK_KEY_KP_0 as u32; - pub const KP_1: Key = ffi::GDK_KEY_KP_1 as u32; - pub const KP_2: Key = ffi::GDK_KEY_KP_2 as u32; - pub const KP_3: Key = ffi::GDK_KEY_KP_3 as u32; - pub const KP_4: Key = ffi::GDK_KEY_KP_4 as u32; - pub const KP_5: Key = ffi::GDK_KEY_KP_5 as u32; - pub const KP_6: Key = ffi::GDK_KEY_KP_6 as u32; - pub const KP_7: Key = ffi::GDK_KEY_KP_7 as u32; - pub const KP_8: Key = ffi::GDK_KEY_KP_8 as u32; - pub const KP_9: Key = ffi::GDK_KEY_KP_9 as u32; - pub const F1: Key = ffi::GDK_KEY_F1 as u32; - pub const F2: Key = ffi::GDK_KEY_F2 as u32; - pub const F3: Key = ffi::GDK_KEY_F3 as u32; - pub const F4: Key = ffi::GDK_KEY_F4 as u32; - pub const F5: Key = ffi::GDK_KEY_F5 as u32; - pub const F6: Key = ffi::GDK_KEY_F6 as u32; - pub const F7: Key = ffi::GDK_KEY_F7 as u32; - pub const F8: Key = ffi::GDK_KEY_F8 as u32; - pub const F9: Key = ffi::GDK_KEY_F9 as u32; - pub const F10: Key = ffi::GDK_KEY_F10 as u32; - pub const F11: Key = ffi::GDK_KEY_F11 as u32; - pub const L1: Key = ffi::GDK_KEY_L1 as u32; - pub const F12: Key = ffi::GDK_KEY_F12 as u32; - pub const L2: Key = ffi::GDK_KEY_L2 as u32; - pub const F13: Key = ffi::GDK_KEY_F13 as u32; - pub const L3: Key = ffi::GDK_KEY_L3 as u32; - pub const F14: Key = ffi::GDK_KEY_F14 as u32; - pub const L4: Key = ffi::GDK_KEY_L4 as u32; - pub const F15: Key = ffi::GDK_KEY_F15 as u32; - pub const L5: Key = ffi::GDK_KEY_L5 as u32; - pub const F16: Key = ffi::GDK_KEY_F16 as u32; - pub const L6: Key = ffi::GDK_KEY_L6 as u32; - pub const F17: Key = ffi::GDK_KEY_F17 as u32; - pub const L7: Key = ffi::GDK_KEY_L7 as u32; - pub const F18: Key = ffi::GDK_KEY_F18 as u32; - pub const L8: Key = ffi::GDK_KEY_L8 as u32; - pub const F19: Key = ffi::GDK_KEY_F19 as u32; - pub const L9: Key = ffi::GDK_KEY_L9 as u32; - pub const F20: Key = ffi::GDK_KEY_F20 as u32; - pub const L10: Key = ffi::GDK_KEY_L10 as u32; - pub const F21: Key = ffi::GDK_KEY_F21 as u32; - pub const R1: Key = ffi::GDK_KEY_R1 as u32; - pub const F22: Key = ffi::GDK_KEY_F22 as u32; - pub const R2: Key = ffi::GDK_KEY_R2 as u32; - pub const F23: Key = ffi::GDK_KEY_F23 as u32; - pub const R3: Key = ffi::GDK_KEY_R3 as u32; - pub const F24: Key = ffi::GDK_KEY_F24 as u32; - pub const R4: Key = ffi::GDK_KEY_R4 as u32; - pub const F25: Key = ffi::GDK_KEY_F25 as u32; - pub const R5: Key = ffi::GDK_KEY_R5 as u32; - pub const F26: Key = ffi::GDK_KEY_F26 as u32; - pub const R6: Key = ffi::GDK_KEY_R6 as u32; - pub const F27: Key = ffi::GDK_KEY_F27 as u32; - pub const R7: Key = ffi::GDK_KEY_R7 as u32; - pub const F28: Key = ffi::GDK_KEY_F28 as u32; - pub const R8: Key = ffi::GDK_KEY_R8 as u32; - pub const F29: Key = ffi::GDK_KEY_F29 as u32; - pub const R9: Key = ffi::GDK_KEY_R9 as u32; - pub const F30: Key = ffi::GDK_KEY_F30 as u32; - pub const R10: Key = ffi::GDK_KEY_R10 as u32; - pub const F31: Key = ffi::GDK_KEY_F31 as u32; - pub const R11: Key = ffi::GDK_KEY_R11 as u32; - pub const F32: Key = ffi::GDK_KEY_F32 as u32; - pub const R12: Key = ffi::GDK_KEY_R12 as u32; - pub const F33: Key = ffi::GDK_KEY_F33 as u32; - pub const R13: Key = ffi::GDK_KEY_R13 as u32; - pub const F34: Key = ffi::GDK_KEY_F34 as u32; - pub const R14: Key = ffi::GDK_KEY_R14 as u32; - pub const F35: Key = ffi::GDK_KEY_F35 as u32; - pub const R15: Key = ffi::GDK_KEY_R15 as u32; - pub const Shift_L: Key = ffi::GDK_KEY_Shift_L as u32; - pub const Shift_R: Key = ffi::GDK_KEY_Shift_R as u32; - pub const Control_L: Key = ffi::GDK_KEY_Control_L as u32; - pub const Control_R: Key = ffi::GDK_KEY_Control_R as u32; - pub const Caps_Lock: Key = ffi::GDK_KEY_Caps_Lock as u32; - pub const Shift_Lock: Key = ffi::GDK_KEY_Shift_Lock as u32; - pub const Meta_L: Key = ffi::GDK_KEY_Meta_L as u32; - pub const Meta_R: Key = ffi::GDK_KEY_Meta_R as u32; - pub const Alt_L: Key = ffi::GDK_KEY_Alt_L as u32; - pub const Alt_R: Key = ffi::GDK_KEY_Alt_R as u32; - pub const Super_L: Key = ffi::GDK_KEY_Super_L as u32; - pub const Super_R: Key = ffi::GDK_KEY_Super_R as u32; - pub const Hyper_L: Key = ffi::GDK_KEY_Hyper_L as u32; - pub const Hyper_R: Key = ffi::GDK_KEY_Hyper_R as u32; - pub const ISO_Lock: Key = ffi::GDK_KEY_ISO_Lock as u32; - pub const ISO_Level2_Latch: Key = ffi::GDK_KEY_ISO_Level2_Latch as u32; - pub const ISO_Level3_Shift: Key = ffi::GDK_KEY_ISO_Level3_Shift as u32; - pub const ISO_Level3_Latch: Key = ffi::GDK_KEY_ISO_Level3_Latch as u32; - pub const ISO_Level3_Lock: Key = ffi::GDK_KEY_ISO_Level3_Lock as u32; - pub const ISO_Level5_Shift: Key = ffi::GDK_KEY_ISO_Level5_Shift as u32; - pub const ISO_Level5_Latch: Key = ffi::GDK_KEY_ISO_Level5_Latch as u32; - pub const ISO_Level5_Lock: Key = ffi::GDK_KEY_ISO_Level5_Lock as u32; - pub const ISO_Group_Shift: Key = ffi::GDK_KEY_ISO_Group_Shift as u32; - pub const ISO_Group_Latch: Key = ffi::GDK_KEY_ISO_Group_Latch as u32; - pub const ISO_Group_Lock: Key = ffi::GDK_KEY_ISO_Group_Lock as u32; - pub const ISO_Next_Group: Key = ffi::GDK_KEY_ISO_Next_Group as u32; - pub const ISO_Next_Group_Lock: Key = ffi::GDK_KEY_ISO_Next_Group_Lock as u32; - pub const ISO_Prev_Group: Key = ffi::GDK_KEY_ISO_Prev_Group as u32; - pub const ISO_Prev_Group_Lock: Key = ffi::GDK_KEY_ISO_Prev_Group_Lock as u32; - pub const ISO_First_Group: Key = ffi::GDK_KEY_ISO_First_Group as u32; - pub const ISO_First_Group_Lock: Key = ffi::GDK_KEY_ISO_First_Group_Lock as u32; - pub const ISO_Last_Group: Key = ffi::GDK_KEY_ISO_Last_Group as u32; - pub const ISO_Last_Group_Lock: Key = ffi::GDK_KEY_ISO_Last_Group_Lock as u32; - pub const ISO_Left_Tab: Key = ffi::GDK_KEY_ISO_Left_Tab as u32; - pub const ISO_Move_Line_Up: Key = ffi::GDK_KEY_ISO_Move_Line_Up as u32; - pub const ISO_Move_Line_Down: Key = ffi::GDK_KEY_ISO_Move_Line_Down as u32; - pub const ISO_Partial_Line_Up: Key = ffi::GDK_KEY_ISO_Partial_Line_Up as u32; - pub const ISO_Partial_Line_Down: Key = ffi::GDK_KEY_ISO_Partial_Line_Down as u32; - pub const ISO_Partial_Space_Left: Key = ffi::GDK_KEY_ISO_Partial_Space_Left as u32; - pub const ISO_Partial_Space_Right: Key = ffi::GDK_KEY_ISO_Partial_Space_Right as u32; - pub const ISO_Set_Margin_Left: Key = ffi::GDK_KEY_ISO_Set_Margin_Left as u32; - pub const ISO_Set_Margin_Right: Key = ffi::GDK_KEY_ISO_Set_Margin_Right as u32; - pub const ISO_Release_Margin_Left: Key = ffi::GDK_KEY_ISO_Release_Margin_Left as u32; - pub const ISO_Release_Margin_Right: Key = ffi::GDK_KEY_ISO_Release_Margin_Right as u32; - pub const ISO_Release_Both_Margins: Key = ffi::GDK_KEY_ISO_Release_Both_Margins as u32; - pub const ISO_Fast_Cursor_Left: Key = ffi::GDK_KEY_ISO_Fast_Cursor_Left as u32; - pub const ISO_Fast_Cursor_Right: Key = ffi::GDK_KEY_ISO_Fast_Cursor_Right as u32; - pub const ISO_Fast_Cursor_Up: Key = ffi::GDK_KEY_ISO_Fast_Cursor_Up as u32; - pub const ISO_Fast_Cursor_Down: Key = ffi::GDK_KEY_ISO_Fast_Cursor_Down as u32; - pub const ISO_Continuous_Underline: Key = ffi::GDK_KEY_ISO_Continuous_Underline as u32; - pub const ISO_Discontinuous_Underline: Key = ffi::GDK_KEY_ISO_Discontinuous_Underline as u32; - pub const ISO_Emphasize: Key = ffi::GDK_KEY_ISO_Emphasize as u32; - pub const ISO_Center_Object: Key = ffi::GDK_KEY_ISO_Center_Object as u32; - pub const ISO_Enter: Key = ffi::GDK_KEY_ISO_Enter as u32; - pub const dead_grave: Key = ffi::GDK_KEY_dead_grave as u32; - pub const dead_acute: Key = ffi::GDK_KEY_dead_acute as u32; - pub const dead_circumflex: Key = ffi::GDK_KEY_dead_circumflex as u32; - pub const dead_tilde: Key = ffi::GDK_KEY_dead_tilde as u32; - pub const dead_perispomeni: Key = ffi::GDK_KEY_dead_perispomeni as u32; - pub const dead_macron: Key = ffi::GDK_KEY_dead_macron as u32; - pub const dead_breve: Key = ffi::GDK_KEY_dead_breve as u32; - pub const dead_abovedot: Key = ffi::GDK_KEY_dead_abovedot as u32; - pub const dead_diaeresis: Key = ffi::GDK_KEY_dead_diaeresis as u32; - pub const dead_abovering: Key = ffi::GDK_KEY_dead_abovering as u32; - pub const dead_doubleacute: Key = ffi::GDK_KEY_dead_doubleacute as u32; - pub const dead_caron: Key = ffi::GDK_KEY_dead_caron as u32; - pub const dead_cedilla: Key = ffi::GDK_KEY_dead_cedilla as u32; - pub const dead_ogonek: Key = ffi::GDK_KEY_dead_ogonek as u32; - pub const dead_iota: Key = ffi::GDK_KEY_dead_iota as u32; - pub const dead_voiced_sound: Key = ffi::GDK_KEY_dead_voiced_sound as u32; - pub const dead_semivoiced_sound: Key = ffi::GDK_KEY_dead_semivoiced_sound as u32; - pub const dead_belowdot: Key = ffi::GDK_KEY_dead_belowdot as u32; - pub const dead_hook: Key = ffi::GDK_KEY_dead_hook as u32; - pub const dead_horn: Key = ffi::GDK_KEY_dead_horn as u32; - pub const dead_stroke: Key = ffi::GDK_KEY_dead_stroke as u32; - pub const dead_abovecomma: Key = ffi::GDK_KEY_dead_abovecomma as u32; - pub const dead_psili: Key = ffi::GDK_KEY_dead_psili as u32; - pub const dead_abovereversedcomma: Key = ffi::GDK_KEY_dead_abovereversedcomma as u32; - pub const dead_dasia: Key = ffi::GDK_KEY_dead_dasia as u32; - pub const dead_doublegrave: Key = ffi::GDK_KEY_dead_doublegrave as u32; - pub const dead_belowring: Key = ffi::GDK_KEY_dead_belowring as u32; - pub const dead_belowmacron: Key = ffi::GDK_KEY_dead_belowmacron as u32; - pub const dead_belowcircumflex: Key = ffi::GDK_KEY_dead_belowcircumflex as u32; - pub const dead_belowtilde: Key = ffi::GDK_KEY_dead_belowtilde as u32; - pub const dead_belowbreve: Key = ffi::GDK_KEY_dead_belowbreve as u32; - pub const dead_belowdiaeresis: Key = ffi::GDK_KEY_dead_belowdiaeresis as u32; - pub const dead_invertedbreve: Key = ffi::GDK_KEY_dead_invertedbreve as u32; - pub const dead_belowcomma: Key = ffi::GDK_KEY_dead_belowcomma as u32; - pub const dead_currency: Key = ffi::GDK_KEY_dead_currency as u32; - pub const dead_a: Key = ffi::GDK_KEY_dead_a as u32; - pub const dead_A: Key = ffi::GDK_KEY_dead_A as u32; - pub const dead_e: Key = ffi::GDK_KEY_dead_e as u32; - pub const dead_E: Key = ffi::GDK_KEY_dead_E as u32; - pub const dead_i: Key = ffi::GDK_KEY_dead_i as u32; - pub const dead_I: Key = ffi::GDK_KEY_dead_I as u32; - pub const dead_o: Key = ffi::GDK_KEY_dead_o as u32; - pub const dead_O: Key = ffi::GDK_KEY_dead_O as u32; - pub const dead_u: Key = ffi::GDK_KEY_dead_u as u32; - pub const dead_U: Key = ffi::GDK_KEY_dead_U as u32; - pub const dead_small_schwa: Key = ffi::GDK_KEY_dead_small_schwa as u32; - pub const dead_capital_schwa: Key = ffi::GDK_KEY_dead_capital_schwa as u32; - pub const dead_greek: Key = ffi::GDK_KEY_dead_greek as u32; - pub const First_Virtual_Screen: Key = ffi::GDK_KEY_First_Virtual_Screen as u32; - pub const Prev_Virtual_Screen: Key = ffi::GDK_KEY_Prev_Virtual_Screen as u32; - pub const Next_Virtual_Screen: Key = ffi::GDK_KEY_Next_Virtual_Screen as u32; - pub const Last_Virtual_Screen: Key = ffi::GDK_KEY_Last_Virtual_Screen as u32; - pub const Terminate_Server: Key = ffi::GDK_KEY_Terminate_Server as u32; - pub const AccessX_Enable: Key = ffi::GDK_KEY_AccessX_Enable as u32; - pub const AccessX_Feedback_Enable: Key = ffi::GDK_KEY_AccessX_Feedback_Enable as u32; - pub const RepeatKeys_Enable: Key = ffi::GDK_KEY_RepeatKeys_Enable as u32; - pub const SlowKeys_Enable: Key = ffi::GDK_KEY_SlowKeys_Enable as u32; - pub const BounceKeys_Enable: Key = ffi::GDK_KEY_BounceKeys_Enable as u32; - pub const StickyKeys_Enable: Key = ffi::GDK_KEY_StickyKeys_Enable as u32; - pub const MouseKeys_Enable: Key = ffi::GDK_KEY_MouseKeys_Enable as u32; - pub const MouseKeys_Accel_Enable: Key = ffi::GDK_KEY_MouseKeys_Accel_Enable as u32; - pub const Overlay1_Enable: Key = ffi::GDK_KEY_Overlay1_Enable as u32; - pub const Overlay2_Enable: Key = ffi::GDK_KEY_Overlay2_Enable as u32; - pub const AudibleBell_Enable: Key = ffi::GDK_KEY_AudibleBell_Enable as u32; - pub const Pointer_Left: Key = ffi::GDK_KEY_Pointer_Left as u32; - pub const Pointer_Right: Key = ffi::GDK_KEY_Pointer_Right as u32; - pub const Pointer_Up: Key = ffi::GDK_KEY_Pointer_Up as u32; - pub const Pointer_Down: Key = ffi::GDK_KEY_Pointer_Down as u32; - pub const Pointer_UpLeft: Key = ffi::GDK_KEY_Pointer_UpLeft as u32; - pub const Pointer_UpRight: Key = ffi::GDK_KEY_Pointer_UpRight as u32; - pub const Pointer_DownLeft: Key = ffi::GDK_KEY_Pointer_DownLeft as u32; - pub const Pointer_DownRight: Key = ffi::GDK_KEY_Pointer_DownRight as u32; - pub const Pointer_Button_Dflt: Key = ffi::GDK_KEY_Pointer_Button_Dflt as u32; - pub const Pointer_Button1: Key = ffi::GDK_KEY_Pointer_Button1 as u32; - pub const Pointer_Button2: Key = ffi::GDK_KEY_Pointer_Button2 as u32; - pub const Pointer_Button3: Key = ffi::GDK_KEY_Pointer_Button3 as u32; - pub const Pointer_Button4: Key = ffi::GDK_KEY_Pointer_Button4 as u32; - pub const Pointer_Button5: Key = ffi::GDK_KEY_Pointer_Button5 as u32; - pub const Pointer_DblClick_Dflt: Key = ffi::GDK_KEY_Pointer_DblClick_Dflt as u32; - pub const Pointer_DblClick1: Key = ffi::GDK_KEY_Pointer_DblClick1 as u32; - pub const Pointer_DblClick2: Key = ffi::GDK_KEY_Pointer_DblClick2 as u32; - pub const Pointer_DblClick3: Key = ffi::GDK_KEY_Pointer_DblClick3 as u32; - pub const Pointer_DblClick4: Key = ffi::GDK_KEY_Pointer_DblClick4 as u32; - pub const Pointer_DblClick5: Key = ffi::GDK_KEY_Pointer_DblClick5 as u32; - pub const Pointer_Drag_Dflt: Key = ffi::GDK_KEY_Pointer_Drag_Dflt as u32; - pub const Pointer_Drag1: Key = ffi::GDK_KEY_Pointer_Drag1 as u32; - pub const Pointer_Drag2: Key = ffi::GDK_KEY_Pointer_Drag2 as u32; - pub const Pointer_Drag3: Key = ffi::GDK_KEY_Pointer_Drag3 as u32; - pub const Pointer_Drag4: Key = ffi::GDK_KEY_Pointer_Drag4 as u32; - pub const Pointer_Drag5: Key = ffi::GDK_KEY_Pointer_Drag5 as u32; - pub const Pointer_EnableKeys: Key = ffi::GDK_KEY_Pointer_EnableKeys as u32; - pub const Pointer_Accelerate: Key = ffi::GDK_KEY_Pointer_Accelerate as u32; - pub const Pointer_DfltBtnNext: Key = ffi::GDK_KEY_Pointer_DfltBtnNext as u32; - pub const Pointer_DfltBtnPrev: Key = ffi::GDK_KEY_Pointer_DfltBtnPrev as u32; - pub const ch: Key = ffi::GDK_KEY_ch as u32; - pub const Ch: Key = ffi::GDK_KEY_Ch as u32; - pub const CH: Key = ffi::GDK_KEY_CH as u32; - pub const c_h: Key = ffi::GDK_KEY_c_h as u32; - pub const C_h: Key = ffi::GDK_KEY_C_h as u32; - pub const C_H: Key = ffi::GDK_KEY_C_H as u32; - pub const _3270_Duplicate: Key = ffi::GDK_KEY_3270_Duplicate as u32; - pub const _3270_FieldMark: Key = ffi::GDK_KEY_3270_FieldMark as u32; - pub const _3270_Right2: Key = ffi::GDK_KEY_3270_Right2 as u32; - pub const _3270_Left2: Key = ffi::GDK_KEY_3270_Left2 as u32; - pub const _3270_BackTab: Key = ffi::GDK_KEY_3270_BackTab as u32; - pub const _3270_EraseEOF: Key = ffi::GDK_KEY_3270_EraseEOF as u32; - pub const _3270_EraseInput: Key = ffi::GDK_KEY_3270_EraseInput as u32; - pub const _3270_Reset: Key = ffi::GDK_KEY_3270_Reset as u32; - pub const _3270_Quit: Key = ffi::GDK_KEY_3270_Quit as u32; - pub const _3270_PA1: Key = ffi::GDK_KEY_3270_PA1 as u32; - pub const _3270_PA2: Key = ffi::GDK_KEY_3270_PA2 as u32; - pub const _3270_PA3: Key = ffi::GDK_KEY_3270_PA3 as u32; - pub const _3270_Test: Key = ffi::GDK_KEY_3270_Test as u32; - pub const _3270_Attn: Key = ffi::GDK_KEY_3270_Attn as u32; - pub const _3270_CursorBlink: Key = ffi::GDK_KEY_3270_CursorBlink as u32; - pub const _3270_AltCursor: Key = ffi::GDK_KEY_3270_AltCursor as u32; - pub const _3270_KeyClick: Key = ffi::GDK_KEY_3270_KeyClick as u32; - pub const _3270_Jump: Key = ffi::GDK_KEY_3270_Jump as u32; - pub const _3270_Ident: Key = ffi::GDK_KEY_3270_Ident as u32; - pub const _3270_Rule: Key = ffi::GDK_KEY_3270_Rule as u32; - pub const _3270_Copy: Key = ffi::GDK_KEY_3270_Copy as u32; - pub const _3270_Play: Key = ffi::GDK_KEY_3270_Play as u32; - pub const _3270_Setup: Key = ffi::GDK_KEY_3270_Setup as u32; - pub const _3270_Record: Key = ffi::GDK_KEY_3270_Record as u32; - pub const _3270_ChangeScreen: Key = ffi::GDK_KEY_3270_ChangeScreen as u32; - pub const _3270_DeleteWord: Key = ffi::GDK_KEY_3270_DeleteWord as u32; - pub const _3270_ExSelect: Key = ffi::GDK_KEY_3270_ExSelect as u32; - pub const _3270_CursorSelect: Key = ffi::GDK_KEY_3270_CursorSelect as u32; - pub const _3270_PrintScreen: Key = ffi::GDK_KEY_3270_PrintScreen as u32; - pub const _3270_Enter: Key = ffi::GDK_KEY_3270_Enter as u32; - pub const space: Key = ffi::GDK_KEY_space as u32; - pub const exclam: Key = ffi::GDK_KEY_exclam as u32; - pub const quotedbl: Key = ffi::GDK_KEY_quotedbl as u32; - pub const numbersign: Key = ffi::GDK_KEY_numbersign as u32; - pub const dollar: Key = ffi::GDK_KEY_dollar as u32; - pub const percent: Key = ffi::GDK_KEY_percent as u32; - pub const ampersand: Key = ffi::GDK_KEY_ampersand as u32; - pub const apostrophe: Key = ffi::GDK_KEY_apostrophe as u32; - pub const quoteright: Key = ffi::GDK_KEY_quoteright as u32; - pub const parenleft: Key = ffi::GDK_KEY_parenleft as u32; - pub const parenright: Key = ffi::GDK_KEY_parenright as u32; - pub const asterisk: Key = ffi::GDK_KEY_asterisk as u32; - pub const plus: Key = ffi::GDK_KEY_plus as u32; - pub const comma: Key = ffi::GDK_KEY_comma as u32; - pub const minus: Key = ffi::GDK_KEY_minus as u32; - pub const period: Key = ffi::GDK_KEY_period as u32; - pub const slash: Key = ffi::GDK_KEY_slash as u32; - pub const _0: Key = ffi::GDK_KEY_0 as u32; // equivalent to keypad '0' - pub const _1: Key = ffi::GDK_KEY_1 as u32; // equivalent to keypad '1' - pub const _2: Key = ffi::GDK_KEY_2 as u32; // equivalent to keypad '2' - pub const _3: Key = ffi::GDK_KEY_3 as u32; // equivalent to keypad '3' - pub const _4: Key = ffi::GDK_KEY_4 as u32; // equivalent to keypad '4' - pub const _5: Key = ffi::GDK_KEY_5 as u32; // equivalent to keypad '5' - pub const _6: Key = ffi::GDK_KEY_6 as u32; // equivalent to keypad '6' - pub const _7: Key = ffi::GDK_KEY_7 as u32; // equivalent to keypad '7' - pub const _8: Key = ffi::GDK_KEY_8 as u32; // equivalent to keypad '8' - pub const _9: Key = ffi::GDK_KEY_9 as u32; // equivalent to keypad '9' - pub const colon: Key = ffi::GDK_KEY_colon as u32; - pub const semicolon: Key = ffi::GDK_KEY_semicolon as u32; - pub const less: Key = ffi::GDK_KEY_less as u32; - pub const equal: Key = ffi::GDK_KEY_equal as u32; - pub const greater: Key = ffi::GDK_KEY_greater as u32; - pub const question: Key = ffi::GDK_KEY_question as u32; - pub const at: Key = ffi::GDK_KEY_at as u32; - pub const A: Key = ffi::GDK_KEY_A as u32; - pub const B: Key = ffi::GDK_KEY_B as u32; - pub const C: Key = ffi::GDK_KEY_C as u32; - pub const D: Key = ffi::GDK_KEY_D as u32; - pub const E: Key = ffi::GDK_KEY_E as u32; - pub const F: Key = ffi::GDK_KEY_F as u32; - pub const G: Key = ffi::GDK_KEY_G as u32; - pub const H: Key = ffi::GDK_KEY_H as u32; - pub const I: Key = ffi::GDK_KEY_I as u32; - pub const J: Key = ffi::GDK_KEY_J as u32; - pub const K: Key = ffi::GDK_KEY_K as u32; - pub const L: Key = ffi::GDK_KEY_L as u32; - pub const M: Key = ffi::GDK_KEY_M as u32; - pub const N: Key = ffi::GDK_KEY_N as u32; - pub const O: Key = ffi::GDK_KEY_O as u32; - pub const P: Key = ffi::GDK_KEY_P as u32; - pub const Q: Key = ffi::GDK_KEY_Q as u32; - pub const R: Key = ffi::GDK_KEY_R as u32; - pub const S: Key = ffi::GDK_KEY_S as u32; - pub const T: Key = ffi::GDK_KEY_T as u32; - pub const U: Key = ffi::GDK_KEY_U as u32; - pub const V: Key = ffi::GDK_KEY_V as u32; - pub const W: Key = ffi::GDK_KEY_W as u32; - pub const X: Key = ffi::GDK_KEY_X as u32; - pub const Y: Key = ffi::GDK_KEY_Y as u32; - pub const Z: Key = ffi::GDK_KEY_Z as u32; - pub const bracketleft: Key = ffi::GDK_KEY_bracketleft as u32; - pub const backslash: Key = ffi::GDK_KEY_backslash as u32; - pub const bracketright: Key = ffi::GDK_KEY_bracketright as u32; - pub const asciicircum: Key = ffi::GDK_KEY_asciicircum as u32; - pub const underscore: Key = ffi::GDK_KEY_underscore as u32; - pub const grave: Key = ffi::GDK_KEY_grave as u32; - pub const quoteleft: Key = ffi::GDK_KEY_quoteleft as u32; - pub const a: Key = ffi::GDK_KEY_a as u32; - pub const b: Key = ffi::GDK_KEY_b as u32; - pub const c: Key = ffi::GDK_KEY_c as u32; - pub const d: Key = ffi::GDK_KEY_d as u32; - pub const e: Key = ffi::GDK_KEY_e as u32; - pub const f: Key = ffi::GDK_KEY_f as u32; - pub const g: Key = ffi::GDK_KEY_g as u32; - pub const h: Key = ffi::GDK_KEY_h as u32; - pub const i: Key = ffi::GDK_KEY_i as u32; - pub const j: Key = ffi::GDK_KEY_j as u32; - pub const k: Key = ffi::GDK_KEY_k as u32; - pub const l: Key = ffi::GDK_KEY_l as u32; - pub const m: Key = ffi::GDK_KEY_m as u32; - pub const n: Key = ffi::GDK_KEY_n as u32; - pub const o: Key = ffi::GDK_KEY_o as u32; - pub const p: Key = ffi::GDK_KEY_p as u32; - pub const q: Key = ffi::GDK_KEY_q as u32; - pub const r: Key = ffi::GDK_KEY_r as u32; - pub const s: Key = ffi::GDK_KEY_s as u32; - pub const t: Key = ffi::GDK_KEY_t as u32; - pub const u: Key = ffi::GDK_KEY_u as u32; - pub const v: Key = ffi::GDK_KEY_v as u32; - pub const w: Key = ffi::GDK_KEY_w as u32; - pub const x: Key = ffi::GDK_KEY_x as u32; - pub const y: Key = ffi::GDK_KEY_y as u32; - pub const z: Key = ffi::GDK_KEY_z as u32; - pub const braceleft: Key = ffi::GDK_KEY_braceleft as u32; - pub const bar: Key = ffi::GDK_KEY_bar as u32; - pub const braceright: Key = ffi::GDK_KEY_braceright as u32; - pub const asciitilde: Key = ffi::GDK_KEY_asciitilde as u32; - pub const nobreakspace: Key = ffi::GDK_KEY_nobreakspace as u32; - pub const exclamdown: Key = ffi::GDK_KEY_exclamdown as u32; - pub const cent: Key = ffi::GDK_KEY_cent as u32; - pub const sterling: Key = ffi::GDK_KEY_sterling as u32; - pub const currency: Key = ffi::GDK_KEY_currency as u32; - pub const yen: Key = ffi::GDK_KEY_yen as u32; - pub const brokenbar: Key = ffi::GDK_KEY_brokenbar as u32; - pub const section: Key = ffi::GDK_KEY_section as u32; - pub const diaeresis: Key = ffi::GDK_KEY_diaeresis as u32; - pub const copyright: Key = ffi::GDK_KEY_copyright as u32; - pub const ordfeminine: Key = ffi::GDK_KEY_ordfeminine as u32; - pub const guillemotleft: Key = ffi::GDK_KEY_guillemotleft as u32; - pub const notsign: Key = ffi::GDK_KEY_notsign as u32; - pub const hyphen: Key = ffi::GDK_KEY_hyphen as u32; - pub const registered: Key = ffi::GDK_KEY_registered as u32; - pub const macron: Key = ffi::GDK_KEY_macron as u32; - pub const degree: Key = ffi::GDK_KEY_degree as u32; - pub const plusminus: Key = ffi::GDK_KEY_plusminus as u32; - pub const twosuperior: Key = ffi::GDK_KEY_twosuperior as u32; - pub const threesuperior: Key = ffi::GDK_KEY_threesuperior as u32; - pub const acute: Key = ffi::GDK_KEY_acute as u32; - pub const mu: Key = ffi::GDK_KEY_mu as u32; - pub const paragraph: Key = ffi::GDK_KEY_paragraph as u32; - pub const periodcentered: Key = ffi::GDK_KEY_periodcentered as u32; - pub const cedilla: Key = ffi::GDK_KEY_cedilla as u32; - pub const onesuperior: Key = ffi::GDK_KEY_onesuperior as u32; - pub const masculine: Key = ffi::GDK_KEY_masculine as u32; - pub const guillemotright: Key = ffi::GDK_KEY_guillemotright as u32; - pub const onequarter: Key = ffi::GDK_KEY_onequarter as u32; - pub const onehalf: Key = ffi::GDK_KEY_onehalf as u32; - pub const threequarters: Key = ffi::GDK_KEY_threequarters as u32; - pub const questiondown: Key = ffi::GDK_KEY_questiondown as u32; - pub const Agrave: Key = ffi::GDK_KEY_Agrave as u32; - pub const Aacute: Key = ffi::GDK_KEY_Aacute as u32; - pub const Acircumflex: Key = ffi::GDK_KEY_Acircumflex as u32; - pub const Atilde: Key = ffi::GDK_KEY_Atilde as u32; - pub const Adiaeresis: Key = ffi::GDK_KEY_Adiaeresis as u32; - pub const Aring: Key = ffi::GDK_KEY_Aring as u32; - pub const AE: Key = ffi::GDK_KEY_AE as u32; - pub const Ccedilla: Key = ffi::GDK_KEY_Ccedilla as u32; - pub const Egrave: Key = ffi::GDK_KEY_Egrave as u32; - pub const Eacute: Key = ffi::GDK_KEY_Eacute as u32; - pub const Ecircumflex: Key = ffi::GDK_KEY_Ecircumflex as u32; - pub const Ediaeresis: Key = ffi::GDK_KEY_Ediaeresis as u32; - pub const Igrave: Key = ffi::GDK_KEY_Igrave as u32; - pub const Iacute: Key = ffi::GDK_KEY_Iacute as u32; - pub const Icircumflex: Key = ffi::GDK_KEY_Icircumflex as u32; - pub const Idiaeresis: Key = ffi::GDK_KEY_Idiaeresis as u32; - pub const ETH: Key = ffi::GDK_KEY_ETH as u32; - pub const Eth: Key = ffi::GDK_KEY_Eth as u32; - pub const Ntilde: Key = ffi::GDK_KEY_Ntilde as u32; - pub const Ograve: Key = ffi::GDK_KEY_Ograve as u32; - pub const Oacute: Key = ffi::GDK_KEY_Oacute as u32; - pub const Ocircumflex: Key = ffi::GDK_KEY_Ocircumflex as u32; - pub const Otilde: Key = ffi::GDK_KEY_Otilde as u32; - pub const Odiaeresis: Key = ffi::GDK_KEY_Odiaeresis as u32; - pub const multiply: Key = ffi::GDK_KEY_multiply as u32; - pub const Oslash: Key = ffi::GDK_KEY_Oslash as u32; - pub const Ooblique: Key = ffi::GDK_KEY_Ooblique as u32; - pub const Ugrave: Key = ffi::GDK_KEY_Ugrave as u32; - pub const Uacute: Key = ffi::GDK_KEY_Uacute as u32; - pub const Ucircumflex: Key = ffi::GDK_KEY_Ucircumflex as u32; - pub const Udiaeresis: Key = ffi::GDK_KEY_Udiaeresis as u32; - pub const Yacute: Key = ffi::GDK_KEY_Yacute as u32; - pub const THORN: Key = ffi::GDK_KEY_THORN as u32; - pub const Thorn: Key = ffi::GDK_KEY_Thorn as u32; - pub const ssharp: Key = ffi::GDK_KEY_ssharp as u32; - pub const agrave: Key = ffi::GDK_KEY_agrave as u32; - pub const aacute: Key = ffi::GDK_KEY_aacute as u32; - pub const acircumflex: Key = ffi::GDK_KEY_acircumflex as u32; - pub const atilde: Key = ffi::GDK_KEY_atilde as u32; - pub const adiaeresis: Key = ffi::GDK_KEY_adiaeresis as u32; - pub const aring: Key = ffi::GDK_KEY_aring as u32; - pub const ae: Key = ffi::GDK_KEY_ae as u32; - pub const ccedilla: Key = ffi::GDK_KEY_ccedilla as u32; - pub const egrave: Key = ffi::GDK_KEY_egrave as u32; - pub const eacute: Key = ffi::GDK_KEY_eacute as u32; - pub const ecircumflex: Key = ffi::GDK_KEY_ecircumflex as u32; - pub const ediaeresis: Key = ffi::GDK_KEY_ediaeresis as u32; - pub const igrave: Key = ffi::GDK_KEY_igrave as u32; - pub const iacute: Key = ffi::GDK_KEY_iacute as u32; - pub const icircumflex: Key = ffi::GDK_KEY_icircumflex as u32; - pub const idiaeresis: Key = ffi::GDK_KEY_idiaeresis as u32; - pub const eth: Key = ffi::GDK_KEY_eth as u32; - pub const ntilde: Key = ffi::GDK_KEY_ntilde as u32; - pub const ograve: Key = ffi::GDK_KEY_ograve as u32; - pub const oacute: Key = ffi::GDK_KEY_oacute as u32; - pub const ocircumflex: Key = ffi::GDK_KEY_ocircumflex as u32; - pub const otilde: Key = ffi::GDK_KEY_otilde as u32; - pub const odiaeresis: Key = ffi::GDK_KEY_odiaeresis as u32; - pub const division: Key = ffi::GDK_KEY_division as u32; - pub const oslash: Key = ffi::GDK_KEY_oslash as u32; - pub const ooblique: Key = ffi::GDK_KEY_ooblique as u32; - pub const ugrave: Key = ffi::GDK_KEY_ugrave as u32; - pub const uacute: Key = ffi::GDK_KEY_uacute as u32; - pub const ucircumflex: Key = ffi::GDK_KEY_ucircumflex as u32; - pub const udiaeresis: Key = ffi::GDK_KEY_udiaeresis as u32; - pub const yacute: Key = ffi::GDK_KEY_yacute as u32; - pub const thorn: Key = ffi::GDK_KEY_thorn as u32; - pub const ydiaeresis: Key = ffi::GDK_KEY_ydiaeresis as u32; - pub const Aogonek: Key = ffi::GDK_KEY_Aogonek as u32; - pub const breve: Key = ffi::GDK_KEY_breve as u32; - pub const Lstroke: Key = ffi::GDK_KEY_Lstroke as u32; - pub const Lcaron: Key = ffi::GDK_KEY_Lcaron as u32; - pub const Sacute: Key = ffi::GDK_KEY_Sacute as u32; - pub const Scaron: Key = ffi::GDK_KEY_Scaron as u32; - pub const Scedilla: Key = ffi::GDK_KEY_Scedilla as u32; - pub const Tcaron: Key = ffi::GDK_KEY_Tcaron as u32; - pub const Zacute: Key = ffi::GDK_KEY_Zacute as u32; - pub const Zcaron: Key = ffi::GDK_KEY_Zcaron as u32; - pub const Zabovedot: Key = ffi::GDK_KEY_Zabovedot as u32; - pub const aogonek: Key = ffi::GDK_KEY_aogonek as u32; - pub const ogonek: Key = ffi::GDK_KEY_ogonek as u32; - pub const lstroke: Key = ffi::GDK_KEY_lstroke as u32; - pub const lcaron: Key = ffi::GDK_KEY_lcaron as u32; - pub const sacute: Key = ffi::GDK_KEY_sacute as u32; - pub const caron: Key = ffi::GDK_KEY_caron as u32; - pub const scaron: Key = ffi::GDK_KEY_scaron as u32; - pub const scedilla: Key = ffi::GDK_KEY_scedilla as u32; - pub const tcaron: Key = ffi::GDK_KEY_tcaron as u32; - pub const zacute: Key = ffi::GDK_KEY_zacute as u32; - pub const doubleacute: Key = ffi::GDK_KEY_doubleacute as u32; - pub const zcaron: Key = ffi::GDK_KEY_zcaron as u32; - pub const zabovedot: Key = ffi::GDK_KEY_zabovedot as u32; - pub const Racute: Key = ffi::GDK_KEY_Racute as u32; - pub const Abreve: Key = ffi::GDK_KEY_Abreve as u32; - pub const Lacute: Key = ffi::GDK_KEY_Lacute as u32; - pub const Cacute: Key = ffi::GDK_KEY_Cacute as u32; - pub const Ccaron: Key = ffi::GDK_KEY_Ccaron as u32; - pub const Eogonek: Key = ffi::GDK_KEY_Eogonek as u32; - pub const Ecaron: Key = ffi::GDK_KEY_Ecaron as u32; - pub const Dcaron: Key = ffi::GDK_KEY_Dcaron as u32; - pub const Dstroke: Key = ffi::GDK_KEY_Dstroke as u32; - pub const Nacute: Key = ffi::GDK_KEY_Nacute as u32; - pub const Ncaron: Key = ffi::GDK_KEY_Ncaron as u32; - pub const Odoubleacute: Key = ffi::GDK_KEY_Odoubleacute as u32; - pub const Rcaron: Key = ffi::GDK_KEY_Rcaron as u32; - pub const Uring: Key = ffi::GDK_KEY_Uring as u32; - pub const Udoubleacute: Key = ffi::GDK_KEY_Udoubleacute as u32; - pub const Tcedilla: Key = ffi::GDK_KEY_Tcedilla as u32; - pub const racute: Key = ffi::GDK_KEY_racute as u32; - pub const abreve: Key = ffi::GDK_KEY_abreve as u32; - pub const lacute: Key = ffi::GDK_KEY_lacute as u32; - pub const cacute: Key = ffi::GDK_KEY_cacute as u32; - pub const ccaron: Key = ffi::GDK_KEY_ccaron as u32; - pub const eogonek: Key = ffi::GDK_KEY_eogonek as u32; - pub const ecaron: Key = ffi::GDK_KEY_ecaron as u32; - pub const dcaron: Key = ffi::GDK_KEY_dcaron as u32; - pub const dstroke: Key = ffi::GDK_KEY_dstroke as u32; - pub const nacute: Key = ffi::GDK_KEY_nacute as u32; - pub const ncaron: Key = ffi::GDK_KEY_ncaron as u32; - pub const odoubleacute: Key = ffi::GDK_KEY_odoubleacute as u32; - pub const rcaron: Key = ffi::GDK_KEY_rcaron as u32; - pub const uring: Key = ffi::GDK_KEY_uring as u32; - pub const udoubleacute: Key = ffi::GDK_KEY_udoubleacute as u32; - pub const tcedilla: Key = ffi::GDK_KEY_tcedilla as u32; - pub const abovedot: Key = ffi::GDK_KEY_abovedot as u32; - pub const Hstroke: Key = ffi::GDK_KEY_Hstroke as u32; - pub const Hcircumflex: Key = ffi::GDK_KEY_Hcircumflex as u32; - pub const Iabovedot: Key = ffi::GDK_KEY_Iabovedot as u32; - pub const Gbreve: Key = ffi::GDK_KEY_Gbreve as u32; - pub const Jcircumflex: Key = ffi::GDK_KEY_Jcircumflex as u32; - pub const hstroke: Key = ffi::GDK_KEY_hstroke as u32; - pub const hcircumflex: Key = ffi::GDK_KEY_hcircumflex as u32; - pub const idotless: Key = ffi::GDK_KEY_idotless as u32; - pub const gbreve: Key = ffi::GDK_KEY_gbreve as u32; - pub const jcircumflex: Key = ffi::GDK_KEY_jcircumflex as u32; - pub const Cabovedot: Key = ffi::GDK_KEY_Cabovedot as u32; - pub const Ccircumflex: Key = ffi::GDK_KEY_Ccircumflex as u32; - pub const Gabovedot: Key = ffi::GDK_KEY_Gabovedot as u32; - pub const Gcircumflex: Key = ffi::GDK_KEY_Gcircumflex as u32; - pub const Ubreve: Key = ffi::GDK_KEY_Ubreve as u32; - pub const Scircumflex: Key = ffi::GDK_KEY_Scircumflex as u32; - pub const cabovedot: Key = ffi::GDK_KEY_cabovedot as u32; - pub const ccircumflex: Key = ffi::GDK_KEY_ccircumflex as u32; - pub const gabovedot: Key = ffi::GDK_KEY_gabovedot as u32; - pub const gcircumflex: Key = ffi::GDK_KEY_gcircumflex as u32; - pub const ubreve: Key = ffi::GDK_KEY_ubreve as u32; - pub const scircumflex: Key = ffi::GDK_KEY_scircumflex as u32; - pub const kra: Key = ffi::GDK_KEY_kra as u32; - pub const kappa: Key = ffi::GDK_KEY_kappa as u32; - pub const Rcedilla: Key = ffi::GDK_KEY_Rcedilla as u32; - pub const Itilde: Key = ffi::GDK_KEY_Itilde as u32; - pub const Lcedilla: Key = ffi::GDK_KEY_Lcedilla as u32; - pub const Emacron: Key = ffi::GDK_KEY_Emacron as u32; - pub const Gcedilla: Key = ffi::GDK_KEY_Gcedilla as u32; - pub const Tslash: Key = ffi::GDK_KEY_Tslash as u32; - pub const rcedilla: Key = ffi::GDK_KEY_rcedilla as u32; - pub const itilde: Key = ffi::GDK_KEY_itilde as u32; - pub const lcedilla: Key = ffi::GDK_KEY_lcedilla as u32; - pub const emacron: Key = ffi::GDK_KEY_emacron as u32; - pub const gcedilla: Key = ffi::GDK_KEY_gcedilla as u32; - pub const tslash: Key = ffi::GDK_KEY_tslash as u32; - pub const ENG: Key = ffi::GDK_KEY_ENG as u32; - pub const eng: Key = ffi::GDK_KEY_eng as u32; - pub const Amacron: Key = ffi::GDK_KEY_Amacron as u32; - pub const Iogonek: Key = ffi::GDK_KEY_Iogonek as u32; - pub const Eabovedot: Key = ffi::GDK_KEY_Eabovedot as u32; - pub const Imacron: Key = ffi::GDK_KEY_Imacron as u32; - pub const Ncedilla: Key = ffi::GDK_KEY_Ncedilla as u32; - pub const Omacron: Key = ffi::GDK_KEY_Omacron as u32; - pub const Kcedilla: Key = ffi::GDK_KEY_Kcedilla as u32; - pub const Uogonek: Key = ffi::GDK_KEY_Uogonek as u32; - pub const Utilde: Key = ffi::GDK_KEY_Utilde as u32; - pub const Umacron: Key = ffi::GDK_KEY_Umacron as u32; - pub const amacron: Key = ffi::GDK_KEY_amacron as u32; - pub const iogonek: Key = ffi::GDK_KEY_iogonek as u32; - pub const eabovedot: Key = ffi::GDK_KEY_eabovedot as u32; - pub const imacron: Key = ffi::GDK_KEY_imacron as u32; - pub const ncedilla: Key = ffi::GDK_KEY_ncedilla as u32; - pub const omacron: Key = ffi::GDK_KEY_omacron as u32; - pub const kcedilla: Key = ffi::GDK_KEY_kcedilla as u32; - pub const uogonek: Key = ffi::GDK_KEY_uogonek as u32; - pub const utilde: Key = ffi::GDK_KEY_utilde as u32; - pub const umacron: Key = ffi::GDK_KEY_umacron as u32; - pub const Wcircumflex: Key = ffi::GDK_KEY_Wcircumflex as u32; - pub const wcircumflex: Key = ffi::GDK_KEY_wcircumflex as u32; - pub const Ycircumflex: Key = ffi::GDK_KEY_Ycircumflex as u32; - pub const ycircumflex: Key = ffi::GDK_KEY_ycircumflex as u32; - pub const Babovedot: Key = ffi::GDK_KEY_Babovedot as u32; - pub const babovedot: Key = ffi::GDK_KEY_babovedot as u32; - pub const Dabovedot: Key = ffi::GDK_KEY_Dabovedot as u32; - pub const dabovedot: Key = ffi::GDK_KEY_dabovedot as u32; - pub const Fabovedot: Key = ffi::GDK_KEY_Fabovedot as u32; - pub const fabovedot: Key = ffi::GDK_KEY_fabovedot as u32; - pub const Mabovedot: Key = ffi::GDK_KEY_Mabovedot as u32; - pub const mabovedot: Key = ffi::GDK_KEY_mabovedot as u32; - pub const Pabovedot: Key = ffi::GDK_KEY_Pabovedot as u32; - pub const pabovedot: Key = ffi::GDK_KEY_pabovedot as u32; - pub const Sabovedot: Key = ffi::GDK_KEY_Sabovedot as u32; - pub const sabovedot: Key = ffi::GDK_KEY_sabovedot as u32; - pub const Tabovedot: Key = ffi::GDK_KEY_Tabovedot as u32; - pub const tabovedot: Key = ffi::GDK_KEY_tabovedot as u32; - pub const Wgrave: Key = ffi::GDK_KEY_Wgrave as u32; - pub const wgrave: Key = ffi::GDK_KEY_wgrave as u32; - pub const Wacute: Key = ffi::GDK_KEY_Wacute as u32; - pub const wacute: Key = ffi::GDK_KEY_wacute as u32; - pub const Wdiaeresis: Key = ffi::GDK_KEY_Wdiaeresis as u32; - pub const wdiaeresis: Key = ffi::GDK_KEY_wdiaeresis as u32; - pub const Ygrave: Key = ffi::GDK_KEY_Ygrave as u32; - pub const ygrave: Key = ffi::GDK_KEY_ygrave as u32; - pub const OE: Key = ffi::GDK_KEY_OE as u32; - pub const oe: Key = ffi::GDK_KEY_oe as u32; - pub const Ydiaeresis: Key = ffi::GDK_KEY_Ydiaeresis as u32; - pub const overline: Key = ffi::GDK_KEY_overline as u32; - pub const kana_fullstop: Key = ffi::GDK_KEY_kana_fullstop as u32; - pub const kana_openingbracket: Key = ffi::GDK_KEY_kana_openingbracket as u32; - pub const kana_closingbracket: Key = ffi::GDK_KEY_kana_closingbracket as u32; - pub const kana_comma: Key = ffi::GDK_KEY_kana_comma as u32; - pub const kana_conjunctive: Key = ffi::GDK_KEY_kana_conjunctive as u32; - pub const kana_middledot: Key = ffi::GDK_KEY_kana_middledot as u32; - pub const kana_WO: Key = ffi::GDK_KEY_kana_WO as u32; - pub const kana_a: Key = ffi::GDK_KEY_kana_a as u32; - pub const kana_i: Key = ffi::GDK_KEY_kana_i as u32; - pub const kana_u: Key = ffi::GDK_KEY_kana_u as u32; - pub const kana_e: Key = ffi::GDK_KEY_kana_e as u32; - pub const kana_o: Key = ffi::GDK_KEY_kana_o as u32; - pub const kana_ya: Key = ffi::GDK_KEY_kana_ya as u32; - pub const kana_yu: Key = ffi::GDK_KEY_kana_yu as u32; - pub const kana_yo: Key = ffi::GDK_KEY_kana_yo as u32; - pub const kana_tsu: Key = ffi::GDK_KEY_kana_tsu as u32; - pub const kana_tu: Key = ffi::GDK_KEY_kana_tu as u32; - pub const prolongedsound: Key = ffi::GDK_KEY_prolongedsound as u32; - pub const kana_A: Key = ffi::GDK_KEY_kana_A as u32; - pub const kana_I: Key = ffi::GDK_KEY_kana_I as u32; - pub const kana_U: Key = ffi::GDK_KEY_kana_U as u32; - pub const kana_E: Key = ffi::GDK_KEY_kana_E as u32; - pub const kana_O: Key = ffi::GDK_KEY_kana_O as u32; - pub const kana_KA: Key = ffi::GDK_KEY_kana_KA as u32; - pub const kana_KI: Key = ffi::GDK_KEY_kana_KI as u32; - pub const kana_KU: Key = ffi::GDK_KEY_kana_KU as u32; - pub const kana_KE: Key = ffi::GDK_KEY_kana_KE as u32; - pub const kana_KO: Key = ffi::GDK_KEY_kana_KO as u32; - pub const kana_SA: Key = ffi::GDK_KEY_kana_SA as u32; - pub const kana_SHI: Key = ffi::GDK_KEY_kana_SHI as u32; - pub const kana_SU: Key = ffi::GDK_KEY_kana_SU as u32; - pub const kana_SE: Key = ffi::GDK_KEY_kana_SE as u32; - pub const kana_SO: Key = ffi::GDK_KEY_kana_SO as u32; - pub const kana_TA: Key = ffi::GDK_KEY_kana_TA as u32; - pub const kana_CHI: Key = ffi::GDK_KEY_kana_CHI as u32; - pub const kana_TI: Key = ffi::GDK_KEY_kana_TI as u32; - pub const kana_TSU: Key = ffi::GDK_KEY_kana_TSU as u32; - pub const kana_TU: Key = ffi::GDK_KEY_kana_TU as u32; - pub const kana_TE: Key = ffi::GDK_KEY_kana_TE as u32; - pub const kana_TO: Key = ffi::GDK_KEY_kana_TO as u32; - pub const kana_NA: Key = ffi::GDK_KEY_kana_NA as u32; - pub const kana_NI: Key = ffi::GDK_KEY_kana_NI as u32; - pub const kana_NU: Key = ffi::GDK_KEY_kana_NU as u32; - pub const kana_NE: Key = ffi::GDK_KEY_kana_NE as u32; - pub const kana_NO: Key = ffi::GDK_KEY_kana_NO as u32; - pub const kana_HA: Key = ffi::GDK_KEY_kana_HA as u32; - pub const kana_HI: Key = ffi::GDK_KEY_kana_HI as u32; - pub const kana_FU: Key = ffi::GDK_KEY_kana_FU as u32; - pub const kana_HU: Key = ffi::GDK_KEY_kana_HU as u32; - pub const kana_HE: Key = ffi::GDK_KEY_kana_HE as u32; - pub const kana_HO: Key = ffi::GDK_KEY_kana_HO as u32; - pub const kana_MA: Key = ffi::GDK_KEY_kana_MA as u32; - pub const kana_MI: Key = ffi::GDK_KEY_kana_MI as u32; - pub const kana_MU: Key = ffi::GDK_KEY_kana_MU as u32; - pub const kana_ME: Key = ffi::GDK_KEY_kana_ME as u32; - pub const kana_MO: Key = ffi::GDK_KEY_kana_MO as u32; - pub const kana_YA: Key = ffi::GDK_KEY_kana_YA as u32; - pub const kana_YU: Key = ffi::GDK_KEY_kana_YU as u32; - pub const kana_YO: Key = ffi::GDK_KEY_kana_YO as u32; - pub const kana_RA: Key = ffi::GDK_KEY_kana_RA as u32; - pub const kana_RI: Key = ffi::GDK_KEY_kana_RI as u32; - pub const kana_RU: Key = ffi::GDK_KEY_kana_RU as u32; - pub const kana_RE: Key = ffi::GDK_KEY_kana_RE as u32; - pub const kana_RO: Key = ffi::GDK_KEY_kana_RO as u32; - pub const kana_WA: Key = ffi::GDK_KEY_kana_WA as u32; - pub const kana_N: Key = ffi::GDK_KEY_kana_N as u32; - pub const voicedsound: Key = ffi::GDK_KEY_voicedsound as u32; - pub const semivoicedsound: Key = ffi::GDK_KEY_semivoicedsound as u32; - pub const kana_switch: Key = ffi::GDK_KEY_kana_switch as u32; - pub const Farsi_0: Key = ffi::GDK_KEY_Farsi_0 as u32; - pub const Farsi_1: Key = ffi::GDK_KEY_Farsi_1 as u32; - pub const Farsi_2: Key = ffi::GDK_KEY_Farsi_2 as u32; - pub const Farsi_3: Key = ffi::GDK_KEY_Farsi_3 as u32; - pub const Farsi_4: Key = ffi::GDK_KEY_Farsi_4 as u32; - pub const Farsi_5: Key = ffi::GDK_KEY_Farsi_5 as u32; - pub const Farsi_6: Key = ffi::GDK_KEY_Farsi_6 as u32; - pub const Farsi_7: Key = ffi::GDK_KEY_Farsi_7 as u32; - pub const Farsi_8: Key = ffi::GDK_KEY_Farsi_8 as u32; - pub const Farsi_9: Key = ffi::GDK_KEY_Farsi_9 as u32; - pub const Arabic_percent: Key = ffi::GDK_KEY_Arabic_percent as u32; - pub const Arabic_superscript_alef: Key = ffi::GDK_KEY_Arabic_superscript_alef as u32; - pub const Arabic_tteh: Key = ffi::GDK_KEY_Arabic_tteh as u32; - pub const Arabic_peh: Key = ffi::GDK_KEY_Arabic_peh as u32; - pub const Arabic_tcheh: Key = ffi::GDK_KEY_Arabic_tcheh as u32; - pub const Arabic_ddal: Key = ffi::GDK_KEY_Arabic_ddal as u32; - pub const Arabic_rreh: Key = ffi::GDK_KEY_Arabic_rreh as u32; - pub const Arabic_comma: Key = ffi::GDK_KEY_Arabic_comma as u32; - pub const Arabic_fullstop: Key = ffi::GDK_KEY_Arabic_fullstop as u32; - pub const Arabic_0: Key = ffi::GDK_KEY_Arabic_0 as u32; - pub const Arabic_1: Key = ffi::GDK_KEY_Arabic_1 as u32; - pub const Arabic_2: Key = ffi::GDK_KEY_Arabic_2 as u32; - pub const Arabic_3: Key = ffi::GDK_KEY_Arabic_3 as u32; - pub const Arabic_4: Key = ffi::GDK_KEY_Arabic_4 as u32; - pub const Arabic_5: Key = ffi::GDK_KEY_Arabic_5 as u32; - pub const Arabic_6: Key = ffi::GDK_KEY_Arabic_6 as u32; - pub const Arabic_7: Key = ffi::GDK_KEY_Arabic_7 as u32; - pub const Arabic_8: Key = ffi::GDK_KEY_Arabic_8 as u32; - pub const Arabic_9: Key = ffi::GDK_KEY_Arabic_9 as u32; - pub const Arabic_semicolon: Key = ffi::GDK_KEY_Arabic_semicolon as u32; - pub const Arabic_question_mark: Key = ffi::GDK_KEY_Arabic_question_mark as u32; - pub const Arabic_hamza: Key = ffi::GDK_KEY_Arabic_hamza as u32; - pub const Arabic_maddaonalef: Key = ffi::GDK_KEY_Arabic_maddaonalef as u32; - pub const Arabic_hamzaonalef: Key = ffi::GDK_KEY_Arabic_hamzaonalef as u32; - pub const Arabic_hamzaonwaw: Key = ffi::GDK_KEY_Arabic_hamzaonwaw as u32; - pub const Arabic_hamzaunderalef: Key = ffi::GDK_KEY_Arabic_hamzaunderalef as u32; - pub const Arabic_hamzaonyeh: Key = ffi::GDK_KEY_Arabic_hamzaonyeh as u32; - pub const Arabic_alef: Key = ffi::GDK_KEY_Arabic_alef as u32; - pub const Arabic_beh: Key = ffi::GDK_KEY_Arabic_beh as u32; - pub const Arabic_tehmarbuta: Key = ffi::GDK_KEY_Arabic_tehmarbuta as u32; - pub const Arabic_teh: Key = ffi::GDK_KEY_Arabic_teh as u32; - pub const Arabic_theh: Key = ffi::GDK_KEY_Arabic_theh as u32; - pub const Arabic_jeem: Key = ffi::GDK_KEY_Arabic_jeem as u32; - pub const Arabic_hah: Key = ffi::GDK_KEY_Arabic_hah as u32; - pub const Arabic_khah: Key = ffi::GDK_KEY_Arabic_khah as u32; - pub const Arabic_dal: Key = ffi::GDK_KEY_Arabic_dal as u32; - pub const Arabic_thal: Key = ffi::GDK_KEY_Arabic_thal as u32; - pub const Arabic_ra: Key = ffi::GDK_KEY_Arabic_ra as u32; - pub const Arabic_zain: Key = ffi::GDK_KEY_Arabic_zain as u32; - pub const Arabic_seen: Key = ffi::GDK_KEY_Arabic_seen as u32; - pub const Arabic_sheen: Key = ffi::GDK_KEY_Arabic_sheen as u32; - pub const Arabic_sad: Key = ffi::GDK_KEY_Arabic_sad as u32; - pub const Arabic_dad: Key = ffi::GDK_KEY_Arabic_dad as u32; - pub const Arabic_tah: Key = ffi::GDK_KEY_Arabic_tah as u32; - pub const Arabic_zah: Key = ffi::GDK_KEY_Arabic_zah as u32; - pub const Arabic_ain: Key = ffi::GDK_KEY_Arabic_ain as u32; - pub const Arabic_ghain: Key = ffi::GDK_KEY_Arabic_ghain as u32; - pub const Arabic_tatweel: Key = ffi::GDK_KEY_Arabic_tatweel as u32; - pub const Arabic_feh: Key = ffi::GDK_KEY_Arabic_feh as u32; - pub const Arabic_qaf: Key = ffi::GDK_KEY_Arabic_qaf as u32; - pub const Arabic_kaf: Key = ffi::GDK_KEY_Arabic_kaf as u32; - pub const Arabic_lam: Key = ffi::GDK_KEY_Arabic_lam as u32; - pub const Arabic_meem: Key = ffi::GDK_KEY_Arabic_meem as u32; - pub const Arabic_noon: Key = ffi::GDK_KEY_Arabic_noon as u32; - pub const Arabic_ha: Key = ffi::GDK_KEY_Arabic_ha as u32; - pub const Arabic_heh: Key = ffi::GDK_KEY_Arabic_heh as u32; - pub const Arabic_waw: Key = ffi::GDK_KEY_Arabic_waw as u32; - pub const Arabic_alefmaksura: Key = ffi::GDK_KEY_Arabic_alefmaksura as u32; - pub const Arabic_yeh: Key = ffi::GDK_KEY_Arabic_yeh as u32; - pub const Arabic_fathatan: Key = ffi::GDK_KEY_Arabic_fathatan as u32; - pub const Arabic_dammatan: Key = ffi::GDK_KEY_Arabic_dammatan as u32; - pub const Arabic_kasratan: Key = ffi::GDK_KEY_Arabic_kasratan as u32; - pub const Arabic_fatha: Key = ffi::GDK_KEY_Arabic_fatha as u32; - pub const Arabic_damma: Key = ffi::GDK_KEY_Arabic_damma as u32; - pub const Arabic_kasra: Key = ffi::GDK_KEY_Arabic_kasra as u32; - pub const Arabic_shadda: Key = ffi::GDK_KEY_Arabic_shadda as u32; - pub const Arabic_sukun: Key = ffi::GDK_KEY_Arabic_sukun as u32; - pub const Arabic_madda_above: Key = ffi::GDK_KEY_Arabic_madda_above as u32; - pub const Arabic_hamza_above: Key = ffi::GDK_KEY_Arabic_hamza_above as u32; - pub const Arabic_hamza_below: Key = ffi::GDK_KEY_Arabic_hamza_below as u32; - pub const Arabic_jeh: Key = ffi::GDK_KEY_Arabic_jeh as u32; - pub const Arabic_veh: Key = ffi::GDK_KEY_Arabic_veh as u32; - pub const Arabic_keheh: Key = ffi::GDK_KEY_Arabic_keheh as u32; - pub const Arabic_gaf: Key = ffi::GDK_KEY_Arabic_gaf as u32; - pub const Arabic_noon_ghunna: Key = ffi::GDK_KEY_Arabic_noon_ghunna as u32; - pub const Arabic_heh_doachashmee: Key = ffi::GDK_KEY_Arabic_heh_doachashmee as u32; - pub const Farsi_yeh: Key = ffi::GDK_KEY_Farsi_yeh as u32; - pub const Arabic_farsi_yeh: Key = ffi::GDK_KEY_Arabic_farsi_yeh as u32; - pub const Arabic_yeh_baree: Key = ffi::GDK_KEY_Arabic_yeh_baree as u32; - pub const Arabic_heh_goal: Key = ffi::GDK_KEY_Arabic_heh_goal as u32; - pub const Arabic_switch: Key = ffi::GDK_KEY_Arabic_switch as u32; - pub const Cyrillic_GHE_bar: Key = ffi::GDK_KEY_Cyrillic_GHE_bar as u32; - pub const Cyrillic_ghe_bar: Key = ffi::GDK_KEY_Cyrillic_ghe_bar as u32; - pub const Cyrillic_ZHE_descender: Key = ffi::GDK_KEY_Cyrillic_ZHE_descender as u32; - pub const Cyrillic_zhe_descender: Key = ffi::GDK_KEY_Cyrillic_zhe_descender as u32; - pub const Cyrillic_KA_descender: Key = ffi::GDK_KEY_Cyrillic_KA_descender as u32; - pub const Cyrillic_ka_descender: Key = ffi::GDK_KEY_Cyrillic_ka_descender as u32; - pub const Cyrillic_KA_vertstroke: Key = ffi::GDK_KEY_Cyrillic_KA_vertstroke as u32; - pub const Cyrillic_ka_vertstroke: Key = ffi::GDK_KEY_Cyrillic_ka_vertstroke as u32; - pub const Cyrillic_EN_descender: Key = ffi::GDK_KEY_Cyrillic_EN_descender as u32; - pub const Cyrillic_en_descender: Key = ffi::GDK_KEY_Cyrillic_en_descender as u32; - pub const Cyrillic_U_straight: Key = ffi::GDK_KEY_Cyrillic_U_straight as u32; - pub const Cyrillic_u_straight: Key = ffi::GDK_KEY_Cyrillic_u_straight as u32; - pub const Cyrillic_U_straight_bar: Key = ffi::GDK_KEY_Cyrillic_U_straight_bar as u32; - pub const Cyrillic_u_straight_bar: Key = ffi::GDK_KEY_Cyrillic_u_straight_bar as u32; - pub const Cyrillic_HA_descender: Key = ffi::GDK_KEY_Cyrillic_HA_descender as u32; - pub const Cyrillic_ha_descender: Key = ffi::GDK_KEY_Cyrillic_ha_descender as u32; - pub const Cyrillic_CHE_descender: Key = ffi::GDK_KEY_Cyrillic_CHE_descender as u32; - pub const Cyrillic_che_descender: Key = ffi::GDK_KEY_Cyrillic_che_descender as u32; - pub const Cyrillic_CHE_vertstroke: Key = ffi::GDK_KEY_Cyrillic_CHE_vertstroke as u32; - pub const Cyrillic_che_vertstroke: Key = ffi::GDK_KEY_Cyrillic_che_vertstroke as u32; - pub const Cyrillic_SHHA: Key = ffi::GDK_KEY_Cyrillic_SHHA as u32; - pub const Cyrillic_shha: Key = ffi::GDK_KEY_Cyrillic_shha as u32; - pub const Cyrillic_SCHWA: Key = ffi::GDK_KEY_Cyrillic_SCHWA as u32; - pub const Cyrillic_schwa: Key = ffi::GDK_KEY_Cyrillic_schwa as u32; - pub const Cyrillic_I_macron: Key = ffi::GDK_KEY_Cyrillic_I_macron as u32; - pub const Cyrillic_i_macron: Key = ffi::GDK_KEY_Cyrillic_i_macron as u32; - pub const Cyrillic_O_bar: Key = ffi::GDK_KEY_Cyrillic_O_bar as u32; - pub const Cyrillic_o_bar: Key = ffi::GDK_KEY_Cyrillic_o_bar as u32; - pub const Cyrillic_U_macron: Key = ffi::GDK_KEY_Cyrillic_U_macron as u32; - pub const Cyrillic_u_macron: Key = ffi::GDK_KEY_Cyrillic_u_macron as u32; - pub const Serbian_dje: Key = ffi::GDK_KEY_Serbian_dje as u32; - pub const Macedonia_gje: Key = ffi::GDK_KEY_Macedonia_gje as u32; - pub const Cyrillic_io: Key = ffi::GDK_KEY_Cyrillic_io as u32; - pub const Ukrainian_ie: Key = ffi::GDK_KEY_Ukrainian_ie as u32; - pub const Ukranian_je: Key = ffi::GDK_KEY_Ukranian_je as u32; - pub const Macedonia_dse: Key = ffi::GDK_KEY_Macedonia_dse as u32; - pub const Ukrainian_i: Key = ffi::GDK_KEY_Ukrainian_i as u32; - pub const Ukranian_i: Key = ffi::GDK_KEY_Ukranian_i as u32; - pub const Ukrainian_yi: Key = ffi::GDK_KEY_Ukrainian_yi as u32; - pub const Ukranian_yi: Key = ffi::GDK_KEY_Ukranian_yi as u32; - pub const Cyrillic_je: Key = ffi::GDK_KEY_Cyrillic_je as u32; - pub const Serbian_je: Key = ffi::GDK_KEY_Serbian_je as u32; - pub const Cyrillic_lje: Key = ffi::GDK_KEY_Cyrillic_lje as u32; - pub const Serbian_lje: Key = ffi::GDK_KEY_Serbian_lje as u32; - pub const Cyrillic_nje: Key = ffi::GDK_KEY_Cyrillic_nje as u32; - pub const Serbian_nje: Key = ffi::GDK_KEY_Serbian_nje as u32; - pub const Serbian_tshe: Key = ffi::GDK_KEY_Serbian_tshe as u32; - pub const Macedonia_kje: Key = ffi::GDK_KEY_Macedonia_kje as u32; - pub const Ukrainian_ghe_with_upturn: Key = ffi::GDK_KEY_Ukrainian_ghe_with_upturn as u32; - pub const Byelorussian_shortu: Key = ffi::GDK_KEY_Byelorussian_shortu as u32; - pub const Cyrillic_dzhe: Key = ffi::GDK_KEY_Cyrillic_dzhe as u32; - pub const Serbian_dze: Key = ffi::GDK_KEY_Serbian_dze as u32; - pub const numerosign: Key = ffi::GDK_KEY_numerosign as u32; - pub const Serbian_DJE: Key = ffi::GDK_KEY_Serbian_DJE as u32; - pub const Macedonia_GJE: Key = ffi::GDK_KEY_Macedonia_GJE as u32; - pub const Cyrillic_IO: Key = ffi::GDK_KEY_Cyrillic_IO as u32; - pub const Ukrainian_IE: Key = ffi::GDK_KEY_Ukrainian_IE as u32; - pub const Ukranian_JE: Key = ffi::GDK_KEY_Ukranian_JE as u32; - pub const Macedonia_DSE: Key = ffi::GDK_KEY_Macedonia_DSE as u32; - pub const Ukrainian_I: Key = ffi::GDK_KEY_Ukrainian_I as u32; - pub const Ukranian_I: Key = ffi::GDK_KEY_Ukranian_I as u32; - pub const Ukrainian_YI: Key = ffi::GDK_KEY_Ukrainian_YI as u32; - pub const Ukranian_YI: Key = ffi::GDK_KEY_Ukranian_YI as u32; - pub const Cyrillic_JE: Key = ffi::GDK_KEY_Cyrillic_JE as u32; - pub const Serbian_JE: Key = ffi::GDK_KEY_Serbian_JE as u32; - pub const Cyrillic_LJE: Key = ffi::GDK_KEY_Cyrillic_LJE as u32; - pub const Serbian_LJE: Key = ffi::GDK_KEY_Serbian_LJE as u32; - pub const Cyrillic_NJE: Key = ffi::GDK_KEY_Cyrillic_NJE as u32; - pub const Serbian_NJE: Key = ffi::GDK_KEY_Serbian_NJE as u32; - pub const Serbian_TSHE: Key = ffi::GDK_KEY_Serbian_TSHE as u32; - pub const Macedonia_KJE: Key = ffi::GDK_KEY_Macedonia_KJE as u32; - pub const Ukrainian_GHE_WITH_UPTURN: Key = ffi::GDK_KEY_Ukrainian_GHE_WITH_UPTURN as u32; - pub const Byelorussian_SHORTU: Key = ffi::GDK_KEY_Byelorussian_SHORTU as u32; - pub const Cyrillic_DZHE: Key = ffi::GDK_KEY_Cyrillic_DZHE as u32; - pub const Serbian_DZE: Key = ffi::GDK_KEY_Serbian_DZE as u32; - pub const Cyrillic_yu: Key = ffi::GDK_KEY_Cyrillic_yu as u32; - pub const Cyrillic_a: Key = ffi::GDK_KEY_Cyrillic_a as u32; - pub const Cyrillic_be: Key = ffi::GDK_KEY_Cyrillic_be as u32; - pub const Cyrillic_tse: Key = ffi::GDK_KEY_Cyrillic_tse as u32; - pub const Cyrillic_de: Key = ffi::GDK_KEY_Cyrillic_de as u32; - pub const Cyrillic_ie: Key = ffi::GDK_KEY_Cyrillic_ie as u32; - pub const Cyrillic_ef: Key = ffi::GDK_KEY_Cyrillic_ef as u32; - pub const Cyrillic_ghe: Key = ffi::GDK_KEY_Cyrillic_ghe as u32; - pub const Cyrillic_ha: Key = ffi::GDK_KEY_Cyrillic_ha as u32; - pub const Cyrillic_i: Key = ffi::GDK_KEY_Cyrillic_i as u32; - pub const Cyrillic_shorti: Key = ffi::GDK_KEY_Cyrillic_shorti as u32; - pub const Cyrillic_ka: Key = ffi::GDK_KEY_Cyrillic_ka as u32; - pub const Cyrillic_el: Key = ffi::GDK_KEY_Cyrillic_el as u32; - pub const Cyrillic_em: Key = ffi::GDK_KEY_Cyrillic_em as u32; - pub const Cyrillic_en: Key = ffi::GDK_KEY_Cyrillic_en as u32; - pub const Cyrillic_o: Key = ffi::GDK_KEY_Cyrillic_o as u32; - pub const Cyrillic_pe: Key = ffi::GDK_KEY_Cyrillic_pe as u32; - pub const Cyrillic_ya: Key = ffi::GDK_KEY_Cyrillic_ya as u32; - pub const Cyrillic_er: Key = ffi::GDK_KEY_Cyrillic_er as u32; - pub const Cyrillic_es: Key = ffi::GDK_KEY_Cyrillic_es as u32; - pub const Cyrillic_te: Key = ffi::GDK_KEY_Cyrillic_te as u32; - pub const Cyrillic_u: Key = ffi::GDK_KEY_Cyrillic_u as u32; - pub const Cyrillic_zhe: Key = ffi::GDK_KEY_Cyrillic_zhe as u32; - pub const Cyrillic_ve: Key = ffi::GDK_KEY_Cyrillic_ve as u32; - pub const Cyrillic_softsign: Key = ffi::GDK_KEY_Cyrillic_softsign as u32; - pub const Cyrillic_yeru: Key = ffi::GDK_KEY_Cyrillic_yeru as u32; - pub const Cyrillic_ze: Key = ffi::GDK_KEY_Cyrillic_ze as u32; - pub const Cyrillic_sha: Key = ffi::GDK_KEY_Cyrillic_sha as u32; - pub const Cyrillic_e: Key = ffi::GDK_KEY_Cyrillic_e as u32; - pub const Cyrillic_shcha: Key = ffi::GDK_KEY_Cyrillic_shcha as u32; - pub const Cyrillic_che: Key = ffi::GDK_KEY_Cyrillic_che as u32; - pub const Cyrillic_hardsign: Key = ffi::GDK_KEY_Cyrillic_hardsign as u32; - pub const Cyrillic_YU: Key = ffi::GDK_KEY_Cyrillic_YU as u32; - pub const Cyrillic_A: Key = ffi::GDK_KEY_Cyrillic_A as u32; - pub const Cyrillic_BE: Key = ffi::GDK_KEY_Cyrillic_BE as u32; - pub const Cyrillic_TSE: Key = ffi::GDK_KEY_Cyrillic_TSE as u32; - pub const Cyrillic_DE: Key = ffi::GDK_KEY_Cyrillic_DE as u32; - pub const Cyrillic_IE: Key = ffi::GDK_KEY_Cyrillic_IE as u32; - pub const Cyrillic_EF: Key = ffi::GDK_KEY_Cyrillic_EF as u32; - pub const Cyrillic_GHE: Key = ffi::GDK_KEY_Cyrillic_GHE as u32; - pub const Cyrillic_HA: Key = ffi::GDK_KEY_Cyrillic_HA as u32; - pub const Cyrillic_I: Key = ffi::GDK_KEY_Cyrillic_I as u32; - pub const Cyrillic_SHORTI: Key = ffi::GDK_KEY_Cyrillic_SHORTI as u32; - pub const Cyrillic_KA: Key = ffi::GDK_KEY_Cyrillic_KA as u32; - pub const Cyrillic_EL: Key = ffi::GDK_KEY_Cyrillic_EL as u32; - pub const Cyrillic_EM: Key = ffi::GDK_KEY_Cyrillic_EM as u32; - pub const Cyrillic_EN: Key = ffi::GDK_KEY_Cyrillic_EN as u32; - pub const Cyrillic_O: Key = ffi::GDK_KEY_Cyrillic_O as u32; - pub const Cyrillic_PE: Key = ffi::GDK_KEY_Cyrillic_PE as u32; - pub const Cyrillic_YA: Key = ffi::GDK_KEY_Cyrillic_YA as u32; - pub const Cyrillic_ER: Key = ffi::GDK_KEY_Cyrillic_ER as u32; - pub const Cyrillic_ES: Key = ffi::GDK_KEY_Cyrillic_ES as u32; - pub const Cyrillic_TE: Key = ffi::GDK_KEY_Cyrillic_TE as u32; - pub const Cyrillic_U: Key = ffi::GDK_KEY_Cyrillic_U as u32; - pub const Cyrillic_ZHE: Key = ffi::GDK_KEY_Cyrillic_ZHE as u32; - pub const Cyrillic_VE: Key = ffi::GDK_KEY_Cyrillic_VE as u32; - pub const Cyrillic_SOFTSIGN: Key = ffi::GDK_KEY_Cyrillic_SOFTSIGN as u32; - pub const Cyrillic_YERU: Key = ffi::GDK_KEY_Cyrillic_YERU as u32; - pub const Cyrillic_ZE: Key = ffi::GDK_KEY_Cyrillic_ZE as u32; - pub const Cyrillic_SHA: Key = ffi::GDK_KEY_Cyrillic_SHA as u32; - pub const Cyrillic_E: Key = ffi::GDK_KEY_Cyrillic_E as u32; - pub const Cyrillic_SHCHA: Key = ffi::GDK_KEY_Cyrillic_SHCHA as u32; - pub const Cyrillic_CHE: Key = ffi::GDK_KEY_Cyrillic_CHE as u32; - pub const Cyrillic_HARDSIGN: Key = ffi::GDK_KEY_Cyrillic_HARDSIGN as u32; - pub const Greek_ALPHAaccent: Key = ffi::GDK_KEY_Greek_ALPHAaccent as u32; - pub const Greek_EPSILONaccent: Key = ffi::GDK_KEY_Greek_EPSILONaccent as u32; - pub const Greek_ETAaccent: Key = ffi::GDK_KEY_Greek_ETAaccent as u32; - pub const Greek_IOTAaccent: Key = ffi::GDK_KEY_Greek_IOTAaccent as u32; - pub const Greek_IOTAdieresis: Key = ffi::GDK_KEY_Greek_IOTAdieresis as u32; - pub const Greek_IOTAdiaeresis: Key = ffi::GDK_KEY_Greek_IOTAdiaeresis as u32; - pub const Greek_OMICRONaccent: Key = ffi::GDK_KEY_Greek_OMICRONaccent as u32; - pub const Greek_UPSILONaccent: Key = ffi::GDK_KEY_Greek_UPSILONaccent as u32; - pub const Greek_UPSILONdieresis: Key = ffi::GDK_KEY_Greek_UPSILONdieresis as u32; - pub const Greek_OMEGAaccent: Key = ffi::GDK_KEY_Greek_OMEGAaccent as u32; - pub const Greek_accentdieresis: Key = ffi::GDK_KEY_Greek_accentdieresis as u32; - pub const Greek_horizbar: Key = ffi::GDK_KEY_Greek_horizbar as u32; - pub const Greek_alphaaccent: Key = ffi::GDK_KEY_Greek_alphaaccent as u32; - pub const Greek_epsilonaccent: Key = ffi::GDK_KEY_Greek_epsilonaccent as u32; - pub const Greek_etaaccent: Key = ffi::GDK_KEY_Greek_etaaccent as u32; - pub const Greek_iotaaccent: Key = ffi::GDK_KEY_Greek_iotaaccent as u32; - pub const Greek_iotadieresis: Key = ffi::GDK_KEY_Greek_iotadieresis as u32; - pub const Greek_iotaaccentdieresis: Key = ffi::GDK_KEY_Greek_iotaaccentdieresis as u32; - pub const Greek_omicronaccent: Key = ffi::GDK_KEY_Greek_omicronaccent as u32; - pub const Greek_upsilonaccent: Key = ffi::GDK_KEY_Greek_upsilonaccent as u32; - pub const Greek_upsilondieresis: Key = ffi::GDK_KEY_Greek_upsilondieresis as u32; - pub const Greek_upsilonaccentdieresis: Key = ffi::GDK_KEY_Greek_upsilonaccentdieresis as u32; - pub const Greek_omegaaccent: Key = ffi::GDK_KEY_Greek_omegaaccent as u32; - pub const Greek_ALPHA: Key = ffi::GDK_KEY_Greek_ALPHA as u32; - pub const Greek_BETA: Key = ffi::GDK_KEY_Greek_BETA as u32; - pub const Greek_GAMMA: Key = ffi::GDK_KEY_Greek_GAMMA as u32; - pub const Greek_DELTA: Key = ffi::GDK_KEY_Greek_DELTA as u32; - pub const Greek_EPSILON: Key = ffi::GDK_KEY_Greek_EPSILON as u32; - pub const Greek_ZETA: Key = ffi::GDK_KEY_Greek_ZETA as u32; - pub const Greek_ETA: Key = ffi::GDK_KEY_Greek_ETA as u32; - pub const Greek_THETA: Key = ffi::GDK_KEY_Greek_THETA as u32; - pub const Greek_IOTA: Key = ffi::GDK_KEY_Greek_IOTA as u32; - pub const Greek_KAPPA: Key = ffi::GDK_KEY_Greek_KAPPA as u32; - pub const Greek_LAMDA: Key = ffi::GDK_KEY_Greek_LAMDA as u32; - pub const Greek_LAMBDA: Key = ffi::GDK_KEY_Greek_LAMBDA as u32; - pub const Greek_MU: Key = ffi::GDK_KEY_Greek_MU as u32; - pub const Greek_NU: Key = ffi::GDK_KEY_Greek_NU as u32; - pub const Greek_XI: Key = ffi::GDK_KEY_Greek_XI as u32; - pub const Greek_OMICRON: Key = ffi::GDK_KEY_Greek_OMICRON as u32; - pub const Greek_PI: Key = ffi::GDK_KEY_Greek_PI as u32; - pub const Greek_RHO: Key = ffi::GDK_KEY_Greek_RHO as u32; - pub const Greek_SIGMA: Key = ffi::GDK_KEY_Greek_SIGMA as u32; - pub const Greek_TAU: Key = ffi::GDK_KEY_Greek_TAU as u32; - pub const Greek_UPSILON: Key = ffi::GDK_KEY_Greek_UPSILON as u32; - pub const Greek_PHI: Key = ffi::GDK_KEY_Greek_PHI as u32; - pub const Greek_CHI: Key = ffi::GDK_KEY_Greek_CHI as u32; - pub const Greek_PSI: Key = ffi::GDK_KEY_Greek_PSI as u32; - pub const Greek_OMEGA: Key = ffi::GDK_KEY_Greek_OMEGA as u32; - pub const Greek_alpha: Key = ffi::GDK_KEY_Greek_alpha as u32; - pub const Greek_beta: Key = ffi::GDK_KEY_Greek_beta as u32; - pub const Greek_gamma: Key = ffi::GDK_KEY_Greek_gamma as u32; - pub const Greek_delta: Key = ffi::GDK_KEY_Greek_delta as u32; - pub const Greek_epsilon: Key = ffi::GDK_KEY_Greek_epsilon as u32; - pub const Greek_zeta: Key = ffi::GDK_KEY_Greek_zeta as u32; - pub const Greek_eta: Key = ffi::GDK_KEY_Greek_eta as u32; - pub const Greek_theta: Key = ffi::GDK_KEY_Greek_theta as u32; - pub const Greek_iota: Key = ffi::GDK_KEY_Greek_iota as u32; - pub const Greek_kappa: Key = ffi::GDK_KEY_Greek_kappa as u32; - pub const Greek_lamda: Key = ffi::GDK_KEY_Greek_lamda as u32; - pub const Greek_lambda: Key = ffi::GDK_KEY_Greek_lambda as u32; - pub const Greek_mu: Key = ffi::GDK_KEY_Greek_mu as u32; - pub const Greek_nu: Key = ffi::GDK_KEY_Greek_nu as u32; - pub const Greek_xi: Key = ffi::GDK_KEY_Greek_xi as u32; - pub const Greek_omicron: Key = ffi::GDK_KEY_Greek_omicron as u32; - pub const Greek_pi: Key = ffi::GDK_KEY_Greek_pi as u32; - pub const Greek_rho: Key = ffi::GDK_KEY_Greek_rho as u32; - pub const Greek_sigma: Key = ffi::GDK_KEY_Greek_sigma as u32; - pub const Greek_finalsmallsigma: Key = ffi::GDK_KEY_Greek_finalsmallsigma as u32; - pub const Greek_tau: Key = ffi::GDK_KEY_Greek_tau as u32; - pub const Greek_upsilon: Key = ffi::GDK_KEY_Greek_upsilon as u32; - pub const Greek_phi: Key = ffi::GDK_KEY_Greek_phi as u32; - pub const Greek_chi: Key = ffi::GDK_KEY_Greek_chi as u32; - pub const Greek_psi: Key = ffi::GDK_KEY_Greek_psi as u32; - pub const Greek_omega: Key = ffi::GDK_KEY_Greek_omega as u32; - pub const Greek_switch: Key = ffi::GDK_KEY_Greek_switch as u32; - pub const leftradical: Key = ffi::GDK_KEY_leftradical as u32; - pub const topleftradical: Key = ffi::GDK_KEY_topleftradical as u32; - pub const horizconnector: Key = ffi::GDK_KEY_horizconnector as u32; - pub const topintegral: Key = ffi::GDK_KEY_topintegral as u32; - pub const botintegral: Key = ffi::GDK_KEY_botintegral as u32; - pub const vertconnector: Key = ffi::GDK_KEY_vertconnector as u32; - pub const topleftsqbracket: Key = ffi::GDK_KEY_topleftsqbracket as u32; - pub const botleftsqbracket: Key = ffi::GDK_KEY_botleftsqbracket as u32; - pub const toprightsqbracket: Key = ffi::GDK_KEY_toprightsqbracket as u32; - pub const botrightsqbracket: Key = ffi::GDK_KEY_botrightsqbracket as u32; - pub const topleftparens: Key = ffi::GDK_KEY_topleftparens as u32; - pub const botleftparens: Key = ffi::GDK_KEY_botleftparens as u32; - pub const toprightparens: Key = ffi::GDK_KEY_toprightparens as u32; - pub const botrightparens: Key = ffi::GDK_KEY_botrightparens as u32; - pub const leftmiddlecurlybrace: Key = ffi::GDK_KEY_leftmiddlecurlybrace as u32; - pub const rightmiddlecurlybrace: Key = ffi::GDK_KEY_rightmiddlecurlybrace as u32; - pub const topleftsummation: Key = ffi::GDK_KEY_topleftsummation as u32; - pub const botleftsummation: Key = ffi::GDK_KEY_botleftsummation as u32; - pub const topvertsummationconnector: Key = ffi::GDK_KEY_topvertsummationconnector as u32; - pub const botvertsummationconnector: Key = ffi::GDK_KEY_botvertsummationconnector as u32; - pub const toprightsummation: Key = ffi::GDK_KEY_toprightsummation as u32; - pub const botrightsummation: Key = ffi::GDK_KEY_botrightsummation as u32; - pub const rightmiddlesummation: Key = ffi::GDK_KEY_rightmiddlesummation as u32; - pub const lessthanequal: Key = ffi::GDK_KEY_lessthanequal as u32; - pub const notequal: Key = ffi::GDK_KEY_notequal as u32; - pub const greaterthanequal: Key = ffi::GDK_KEY_greaterthanequal as u32; - pub const integral: Key = ffi::GDK_KEY_integral as u32; - pub const therefore: Key = ffi::GDK_KEY_therefore as u32; - pub const variation: Key = ffi::GDK_KEY_variation as u32; - pub const infinity: Key = ffi::GDK_KEY_infinity as u32; - pub const nabla: Key = ffi::GDK_KEY_nabla as u32; - pub const approximate: Key = ffi::GDK_KEY_approximate as u32; - pub const similarequal: Key = ffi::GDK_KEY_similarequal as u32; - pub const ifonlyif: Key = ffi::GDK_KEY_ifonlyif as u32; - pub const implies: Key = ffi::GDK_KEY_implies as u32; - pub const identical: Key = ffi::GDK_KEY_identical as u32; - pub const radical: Key = ffi::GDK_KEY_radical as u32; - pub const includedin: Key = ffi::GDK_KEY_includedin as u32; - pub const includes: Key = ffi::GDK_KEY_includes as u32; - pub const intersection: Key = ffi::GDK_KEY_intersection as u32; - pub const union: Key = ffi::GDK_KEY_union as u32; - pub const logicaland: Key = ffi::GDK_KEY_logicaland as u32; - pub const logicalor: Key = ffi::GDK_KEY_logicalor as u32; - pub const partialderivative: Key = ffi::GDK_KEY_partialderivative as u32; - pub const function: Key = ffi::GDK_KEY_function as u32; - pub const leftarrow: Key = ffi::GDK_KEY_leftarrow as u32; - pub const uparrow: Key = ffi::GDK_KEY_uparrow as u32; - pub const rightarrow: Key = ffi::GDK_KEY_rightarrow as u32; - pub const downarrow: Key = ffi::GDK_KEY_downarrow as u32; - pub const blank: Key = ffi::GDK_KEY_blank as u32; - pub const soliddiamond: Key = ffi::GDK_KEY_soliddiamond as u32; - pub const checkerboard: Key = ffi::GDK_KEY_checkerboard as u32; - pub const ht: Key = ffi::GDK_KEY_ht as u32; - pub const ff: Key = ffi::GDK_KEY_ff as u32; - pub const cr: Key = ffi::GDK_KEY_cr as u32; - pub const lf: Key = ffi::GDK_KEY_lf as u32; - pub const nl: Key = ffi::GDK_KEY_nl as u32; - pub const vt: Key = ffi::GDK_KEY_vt as u32; - pub const lowrightcorner: Key = ffi::GDK_KEY_lowrightcorner as u32; - pub const uprightcorner: Key = ffi::GDK_KEY_uprightcorner as u32; - pub const upleftcorner: Key = ffi::GDK_KEY_upleftcorner as u32; - pub const lowleftcorner: Key = ffi::GDK_KEY_lowleftcorner as u32; - pub const crossinglines: Key = ffi::GDK_KEY_crossinglines as u32; - pub const horizlinescan1: Key = ffi::GDK_KEY_horizlinescan1 as u32; - pub const horizlinescan3: Key = ffi::GDK_KEY_horizlinescan3 as u32; - pub const horizlinescan5: Key = ffi::GDK_KEY_horizlinescan5 as u32; - pub const horizlinescan7: Key = ffi::GDK_KEY_horizlinescan7 as u32; - pub const horizlinescan9: Key = ffi::GDK_KEY_horizlinescan9 as u32; - pub const leftt: Key = ffi::GDK_KEY_leftt as u32; - pub const rightt: Key = ffi::GDK_KEY_rightt as u32; - pub const bott: Key = ffi::GDK_KEY_bott as u32; - pub const topt: Key = ffi::GDK_KEY_topt as u32; - pub const vertbar: Key = ffi::GDK_KEY_vertbar as u32; - pub const emspace: Key = ffi::GDK_KEY_emspace as u32; - pub const enspace: Key = ffi::GDK_KEY_enspace as u32; - pub const em3space: Key = ffi::GDK_KEY_em3space as u32; - pub const em4space: Key = ffi::GDK_KEY_em4space as u32; - pub const digitspace: Key = ffi::GDK_KEY_digitspace as u32; - pub const punctspace: Key = ffi::GDK_KEY_punctspace as u32; - pub const thinspace: Key = ffi::GDK_KEY_thinspace as u32; - pub const hairspace: Key = ffi::GDK_KEY_hairspace as u32; - pub const emdash: Key = ffi::GDK_KEY_emdash as u32; - pub const endash: Key = ffi::GDK_KEY_endash as u32; - pub const signifblank: Key = ffi::GDK_KEY_signifblank as u32; - pub const ellipsis: Key = ffi::GDK_KEY_ellipsis as u32; - pub const doubbaselinedot: Key = ffi::GDK_KEY_doubbaselinedot as u32; - pub const onethird: Key = ffi::GDK_KEY_onethird as u32; - pub const twothirds: Key = ffi::GDK_KEY_twothirds as u32; - pub const onefifth: Key = ffi::GDK_KEY_onefifth as u32; - pub const twofifths: Key = ffi::GDK_KEY_twofifths as u32; - pub const threefifths: Key = ffi::GDK_KEY_threefifths as u32; - pub const fourfifths: Key = ffi::GDK_KEY_fourfifths as u32; - pub const onesixth: Key = ffi::GDK_KEY_onesixth as u32; - pub const fivesixths: Key = ffi::GDK_KEY_fivesixths as u32; - pub const careof: Key = ffi::GDK_KEY_careof as u32; - pub const figdash: Key = ffi::GDK_KEY_figdash as u32; - pub const leftanglebracket: Key = ffi::GDK_KEY_leftanglebracket as u32; - pub const decimalpoint: Key = ffi::GDK_KEY_decimalpoint as u32; - pub const rightanglebracket: Key = ffi::GDK_KEY_rightanglebracket as u32; - pub const marker: Key = ffi::GDK_KEY_marker as u32; - pub const oneeighth: Key = ffi::GDK_KEY_oneeighth as u32; - pub const threeeighths: Key = ffi::GDK_KEY_threeeighths as u32; - pub const fiveeighths: Key = ffi::GDK_KEY_fiveeighths as u32; - pub const seveneighths: Key = ffi::GDK_KEY_seveneighths as u32; - pub const trademark: Key = ffi::GDK_KEY_trademark as u32; - pub const signaturemark: Key = ffi::GDK_KEY_signaturemark as u32; - pub const trademarkincircle: Key = ffi::GDK_KEY_trademarkincircle as u32; - pub const leftopentriangle: Key = ffi::GDK_KEY_leftopentriangle as u32; - pub const rightopentriangle: Key = ffi::GDK_KEY_rightopentriangle as u32; - pub const emopencircle: Key = ffi::GDK_KEY_emopencircle as u32; - pub const emopenrectangle: Key = ffi::GDK_KEY_emopenrectangle as u32; - pub const leftsinglequotemark: Key = ffi::GDK_KEY_leftsinglequotemark as u32; - pub const rightsinglequotemark: Key = ffi::GDK_KEY_rightsinglequotemark as u32; - pub const leftdoublequotemark: Key = ffi::GDK_KEY_leftdoublequotemark as u32; - pub const rightdoublequotemark: Key = ffi::GDK_KEY_rightdoublequotemark as u32; - pub const prescription: Key = ffi::GDK_KEY_prescription as u32; - pub const permille: Key = ffi::GDK_KEY_permille as u32; - pub const minutes: Key = ffi::GDK_KEY_minutes as u32; - pub const seconds: Key = ffi::GDK_KEY_seconds as u32; - pub const latincross: Key = ffi::GDK_KEY_latincross as u32; - pub const hexagram: Key = ffi::GDK_KEY_hexagram as u32; - pub const filledrectbullet: Key = ffi::GDK_KEY_filledrectbullet as u32; - pub const filledlefttribullet: Key = ffi::GDK_KEY_filledlefttribullet as u32; - pub const filledrighttribullet: Key = ffi::GDK_KEY_filledrighttribullet as u32; - pub const emfilledcircle: Key = ffi::GDK_KEY_emfilledcircle as u32; - pub const emfilledrect: Key = ffi::GDK_KEY_emfilledrect as u32; - pub const enopencircbullet: Key = ffi::GDK_KEY_enopencircbullet as u32; - pub const enopensquarebullet: Key = ffi::GDK_KEY_enopensquarebullet as u32; - pub const openrectbullet: Key = ffi::GDK_KEY_openrectbullet as u32; - pub const opentribulletup: Key = ffi::GDK_KEY_opentribulletup as u32; - pub const opentribulletdown: Key = ffi::GDK_KEY_opentribulletdown as u32; - pub const openstar: Key = ffi::GDK_KEY_openstar as u32; - pub const enfilledcircbullet: Key = ffi::GDK_KEY_enfilledcircbullet as u32; - pub const enfilledsqbullet: Key = ffi::GDK_KEY_enfilledsqbullet as u32; - pub const filledtribulletup: Key = ffi::GDK_KEY_filledtribulletup as u32; - pub const filledtribulletdown: Key = ffi::GDK_KEY_filledtribulletdown as u32; - pub const leftpointer: Key = ffi::GDK_KEY_leftpointer as u32; - pub const rightpointer: Key = ffi::GDK_KEY_rightpointer as u32; - pub const club: Key = ffi::GDK_KEY_club as u32; - pub const diamond: Key = ffi::GDK_KEY_diamond as u32; - pub const heart: Key = ffi::GDK_KEY_heart as u32; - pub const maltesecross: Key = ffi::GDK_KEY_maltesecross as u32; - pub const dagger: Key = ffi::GDK_KEY_dagger as u32; - pub const doubledagger: Key = ffi::GDK_KEY_doubledagger as u32; - pub const checkmark: Key = ffi::GDK_KEY_checkmark as u32; - pub const ballotcross: Key = ffi::GDK_KEY_ballotcross as u32; - pub const musicalsharp: Key = ffi::GDK_KEY_musicalsharp as u32; - pub const musicalflat: Key = ffi::GDK_KEY_musicalflat as u32; - pub const malesymbol: Key = ffi::GDK_KEY_malesymbol as u32; - pub const femalesymbol: Key = ffi::GDK_KEY_femalesymbol as u32; - pub const telephone: Key = ffi::GDK_KEY_telephone as u32; - pub const telephonerecorder: Key = ffi::GDK_KEY_telephonerecorder as u32; - pub const phonographcopyright: Key = ffi::GDK_KEY_phonographcopyright as u32; - pub const caret: Key = ffi::GDK_KEY_caret as u32; - pub const singlelowquotemark: Key = ffi::GDK_KEY_singlelowquotemark as u32; - pub const doublelowquotemark: Key = ffi::GDK_KEY_doublelowquotemark as u32; - pub const cursor: Key = ffi::GDK_KEY_cursor as u32; - pub const leftcaret: Key = ffi::GDK_KEY_leftcaret as u32; - pub const rightcaret: Key = ffi::GDK_KEY_rightcaret as u32; - pub const downcaret: Key = ffi::GDK_KEY_downcaret as u32; - pub const upcaret: Key = ffi::GDK_KEY_upcaret as u32; - pub const overbar: Key = ffi::GDK_KEY_overbar as u32; - pub const downtack: Key = ffi::GDK_KEY_downtack as u32; - pub const upshoe: Key = ffi::GDK_KEY_upshoe as u32; - pub const downstile: Key = ffi::GDK_KEY_downstile as u32; - pub const underbar: Key = ffi::GDK_KEY_underbar as u32; - pub const jot: Key = ffi::GDK_KEY_jot as u32; - pub const quad: Key = ffi::GDK_KEY_quad as u32; - pub const uptack: Key = ffi::GDK_KEY_uptack as u32; - pub const circle: Key = ffi::GDK_KEY_circle as u32; - pub const upstile: Key = ffi::GDK_KEY_upstile as u32; - pub const downshoe: Key = ffi::GDK_KEY_downshoe as u32; - pub const rightshoe: Key = ffi::GDK_KEY_rightshoe as u32; - pub const leftshoe: Key = ffi::GDK_KEY_leftshoe as u32; - pub const lefttack: Key = ffi::GDK_KEY_lefttack as u32; - pub const righttack: Key = ffi::GDK_KEY_righttack as u32; - pub const hebrew_doublelowline: Key = ffi::GDK_KEY_hebrew_doublelowline as u32; - pub const hebrew_aleph: Key = ffi::GDK_KEY_hebrew_aleph as u32; - pub const hebrew_bet: Key = ffi::GDK_KEY_hebrew_bet as u32; - pub const hebrew_beth: Key = ffi::GDK_KEY_hebrew_beth as u32; - pub const hebrew_gimel: Key = ffi::GDK_KEY_hebrew_gimel as u32; - pub const hebrew_gimmel: Key = ffi::GDK_KEY_hebrew_gimmel as u32; - pub const hebrew_dalet: Key = ffi::GDK_KEY_hebrew_dalet as u32; - pub const hebrew_daleth: Key = ffi::GDK_KEY_hebrew_daleth as u32; - pub const hebrew_he: Key = ffi::GDK_KEY_hebrew_he as u32; - pub const hebrew_waw: Key = ffi::GDK_KEY_hebrew_waw as u32; - pub const hebrew_zain: Key = ffi::GDK_KEY_hebrew_zain as u32; - pub const hebrew_zayin: Key = ffi::GDK_KEY_hebrew_zayin as u32; - pub const hebrew_chet: Key = ffi::GDK_KEY_hebrew_chet as u32; - pub const hebrew_het: Key = ffi::GDK_KEY_hebrew_het as u32; - pub const hebrew_tet: Key = ffi::GDK_KEY_hebrew_tet as u32; - pub const hebrew_teth: Key = ffi::GDK_KEY_hebrew_teth as u32; - pub const hebrew_yod: Key = ffi::GDK_KEY_hebrew_yod as u32; - pub const hebrew_finalkaph: Key = ffi::GDK_KEY_hebrew_finalkaph as u32; - pub const hebrew_kaph: Key = ffi::GDK_KEY_hebrew_kaph as u32; - pub const hebrew_lamed: Key = ffi::GDK_KEY_hebrew_lamed as u32; - pub const hebrew_finalmem: Key = ffi::GDK_KEY_hebrew_finalmem as u32; - pub const hebrew_mem: Key = ffi::GDK_KEY_hebrew_mem as u32; - pub const hebrew_finalnun: Key = ffi::GDK_KEY_hebrew_finalnun as u32; - pub const hebrew_nun: Key = ffi::GDK_KEY_hebrew_nun as u32; - pub const hebrew_samech: Key = ffi::GDK_KEY_hebrew_samech as u32; - pub const hebrew_samekh: Key = ffi::GDK_KEY_hebrew_samekh as u32; - pub const hebrew_ayin: Key = ffi::GDK_KEY_hebrew_ayin as u32; - pub const hebrew_finalpe: Key = ffi::GDK_KEY_hebrew_finalpe as u32; - pub const hebrew_pe: Key = ffi::GDK_KEY_hebrew_pe as u32; - pub const hebrew_finalzade: Key = ffi::GDK_KEY_hebrew_finalzade as u32; - pub const hebrew_finalzadi: Key = ffi::GDK_KEY_hebrew_finalzadi as u32; - pub const hebrew_zade: Key = ffi::GDK_KEY_hebrew_zade as u32; - pub const hebrew_zadi: Key = ffi::GDK_KEY_hebrew_zadi as u32; - pub const hebrew_qoph: Key = ffi::GDK_KEY_hebrew_qoph as u32; - pub const hebrew_kuf: Key = ffi::GDK_KEY_hebrew_kuf as u32; - pub const hebrew_resh: Key = ffi::GDK_KEY_hebrew_resh as u32; - pub const hebrew_shin: Key = ffi::GDK_KEY_hebrew_shin as u32; - pub const hebrew_taw: Key = ffi::GDK_KEY_hebrew_taw as u32; - pub const hebrew_taf: Key = ffi::GDK_KEY_hebrew_taf as u32; - pub const Hebrew_switch: Key = ffi::GDK_KEY_Hebrew_switch as u32; - pub const Thai_kokai: Key = ffi::GDK_KEY_Thai_kokai as u32; - pub const Thai_khokhai: Key = ffi::GDK_KEY_Thai_khokhai as u32; - pub const Thai_khokhuat: Key = ffi::GDK_KEY_Thai_khokhuat as u32; - pub const Thai_khokhwai: Key = ffi::GDK_KEY_Thai_khokhwai as u32; - pub const Thai_khokhon: Key = ffi::GDK_KEY_Thai_khokhon as u32; - pub const Thai_khorakhang: Key = ffi::GDK_KEY_Thai_khorakhang as u32; - pub const Thai_ngongu: Key = ffi::GDK_KEY_Thai_ngongu as u32; - pub const Thai_chochan: Key = ffi::GDK_KEY_Thai_chochan as u32; - pub const Thai_choching: Key = ffi::GDK_KEY_Thai_choching as u32; - pub const Thai_chochang: Key = ffi::GDK_KEY_Thai_chochang as u32; - pub const Thai_soso: Key = ffi::GDK_KEY_Thai_soso as u32; - pub const Thai_chochoe: Key = ffi::GDK_KEY_Thai_chochoe as u32; - pub const Thai_yoying: Key = ffi::GDK_KEY_Thai_yoying as u32; - pub const Thai_dochada: Key = ffi::GDK_KEY_Thai_dochada as u32; - pub const Thai_topatak: Key = ffi::GDK_KEY_Thai_topatak as u32; - pub const Thai_thothan: Key = ffi::GDK_KEY_Thai_thothan as u32; - pub const Thai_thonangmontho: Key = ffi::GDK_KEY_Thai_thonangmontho as u32; - pub const Thai_thophuthao: Key = ffi::GDK_KEY_Thai_thophuthao as u32; - pub const Thai_nonen: Key = ffi::GDK_KEY_Thai_nonen as u32; - pub const Thai_dodek: Key = ffi::GDK_KEY_Thai_dodek as u32; - pub const Thai_totao: Key = ffi::GDK_KEY_Thai_totao as u32; - pub const Thai_thothung: Key = ffi::GDK_KEY_Thai_thothung as u32; - pub const Thai_thothahan: Key = ffi::GDK_KEY_Thai_thothahan as u32; - pub const Thai_thothong: Key = ffi::GDK_KEY_Thai_thothong as u32; - pub const Thai_nonu: Key = ffi::GDK_KEY_Thai_nonu as u32; - pub const Thai_bobaimai: Key = ffi::GDK_KEY_Thai_bobaimai as u32; - pub const Thai_popla: Key = ffi::GDK_KEY_Thai_popla as u32; - pub const Thai_phophung: Key = ffi::GDK_KEY_Thai_phophung as u32; - pub const Thai_fofa: Key = ffi::GDK_KEY_Thai_fofa as u32; - pub const Thai_phophan: Key = ffi::GDK_KEY_Thai_phophan as u32; - pub const Thai_fofan: Key = ffi::GDK_KEY_Thai_fofan as u32; - pub const Thai_phosamphao: Key = ffi::GDK_KEY_Thai_phosamphao as u32; - pub const Thai_moma: Key = ffi::GDK_KEY_Thai_moma as u32; - pub const Thai_yoyak: Key = ffi::GDK_KEY_Thai_yoyak as u32; - pub const Thai_rorua: Key = ffi::GDK_KEY_Thai_rorua as u32; - pub const Thai_ru: Key = ffi::GDK_KEY_Thai_ru as u32; - pub const Thai_loling: Key = ffi::GDK_KEY_Thai_loling as u32; - pub const Thai_lu: Key = ffi::GDK_KEY_Thai_lu as u32; - pub const Thai_wowaen: Key = ffi::GDK_KEY_Thai_wowaen as u32; - pub const Thai_sosala: Key = ffi::GDK_KEY_Thai_sosala as u32; - pub const Thai_sorusi: Key = ffi::GDK_KEY_Thai_sorusi as u32; - pub const Thai_sosua: Key = ffi::GDK_KEY_Thai_sosua as u32; - pub const Thai_hohip: Key = ffi::GDK_KEY_Thai_hohip as u32; - pub const Thai_lochula: Key = ffi::GDK_KEY_Thai_lochula as u32; - pub const Thai_oang: Key = ffi::GDK_KEY_Thai_oang as u32; - pub const Thai_honokhuk: Key = ffi::GDK_KEY_Thai_honokhuk as u32; - pub const Thai_paiyannoi: Key = ffi::GDK_KEY_Thai_paiyannoi as u32; - pub const Thai_saraa: Key = ffi::GDK_KEY_Thai_saraa as u32; - pub const Thai_maihanakat: Key = ffi::GDK_KEY_Thai_maihanakat as u32; - pub const Thai_saraaa: Key = ffi::GDK_KEY_Thai_saraaa as u32; - pub const Thai_saraam: Key = ffi::GDK_KEY_Thai_saraam as u32; - pub const Thai_sarai: Key = ffi::GDK_KEY_Thai_sarai as u32; - pub const Thai_saraii: Key = ffi::GDK_KEY_Thai_saraii as u32; - pub const Thai_saraue: Key = ffi::GDK_KEY_Thai_saraue as u32; - pub const Thai_sarauee: Key = ffi::GDK_KEY_Thai_sarauee as u32; - pub const Thai_sarau: Key = ffi::GDK_KEY_Thai_sarau as u32; - pub const Thai_sarauu: Key = ffi::GDK_KEY_Thai_sarauu as u32; - pub const Thai_phinthu: Key = ffi::GDK_KEY_Thai_phinthu as u32; - pub const Thai_maihanakat_maitho: Key = ffi::GDK_KEY_Thai_maihanakat_maitho as u32; - pub const Thai_baht: Key = ffi::GDK_KEY_Thai_baht as u32; - pub const Thai_sarae: Key = ffi::GDK_KEY_Thai_sarae as u32; - pub const Thai_saraae: Key = ffi::GDK_KEY_Thai_saraae as u32; - pub const Thai_sarao: Key = ffi::GDK_KEY_Thai_sarao as u32; - pub const Thai_saraaimaimuan: Key = ffi::GDK_KEY_Thai_saraaimaimuan as u32; - pub const Thai_saraaimaimalai: Key = ffi::GDK_KEY_Thai_saraaimaimalai as u32; - pub const Thai_lakkhangyao: Key = ffi::GDK_KEY_Thai_lakkhangyao as u32; - pub const Thai_maiyamok: Key = ffi::GDK_KEY_Thai_maiyamok as u32; - pub const Thai_maitaikhu: Key = ffi::GDK_KEY_Thai_maitaikhu as u32; - pub const Thai_maiek: Key = ffi::GDK_KEY_Thai_maiek as u32; - pub const Thai_maitho: Key = ffi::GDK_KEY_Thai_maitho as u32; - pub const Thai_maitri: Key = ffi::GDK_KEY_Thai_maitri as u32; - pub const Thai_maichattawa: Key = ffi::GDK_KEY_Thai_maichattawa as u32; - pub const Thai_thanthakhat: Key = ffi::GDK_KEY_Thai_thanthakhat as u32; - pub const Thai_nikhahit: Key = ffi::GDK_KEY_Thai_nikhahit as u32; - pub const Thai_leksun: Key = ffi::GDK_KEY_Thai_leksun as u32; - pub const Thai_leknung: Key = ffi::GDK_KEY_Thai_leknung as u32; - pub const Thai_leksong: Key = ffi::GDK_KEY_Thai_leksong as u32; - pub const Thai_leksam: Key = ffi::GDK_KEY_Thai_leksam as u32; - pub const Thai_leksi: Key = ffi::GDK_KEY_Thai_leksi as u32; - pub const Thai_lekha: Key = ffi::GDK_KEY_Thai_lekha as u32; - pub const Thai_lekhok: Key = ffi::GDK_KEY_Thai_lekhok as u32; - pub const Thai_lekchet: Key = ffi::GDK_KEY_Thai_lekchet as u32; - pub const Thai_lekpaet: Key = ffi::GDK_KEY_Thai_lekpaet as u32; - pub const Thai_lekkao: Key = ffi::GDK_KEY_Thai_lekkao as u32; - pub const Hangul: Key = ffi::GDK_KEY_Hangul as u32; - pub const Hangul_Start: Key = ffi::GDK_KEY_Hangul_Start as u32; - pub const Hangul_End: Key = ffi::GDK_KEY_Hangul_End as u32; - pub const Hangul_Hanja: Key = ffi::GDK_KEY_Hangul_Hanja as u32; - pub const Hangul_Jamo: Key = ffi::GDK_KEY_Hangul_Jamo as u32; - pub const Hangul_Romaja: Key = ffi::GDK_KEY_Hangul_Romaja as u32; - pub const Hangul_Codeinput: Key = ffi::GDK_KEY_Hangul_Codeinput as u32; - pub const Hangul_Jeonja: Key = ffi::GDK_KEY_Hangul_Jeonja as u32; - pub const Hangul_Banja: Key = ffi::GDK_KEY_Hangul_Banja as u32; - pub const Hangul_PreHanja: Key = ffi::GDK_KEY_Hangul_PreHanja as u32; - pub const Hangul_PostHanja: Key = ffi::GDK_KEY_Hangul_PostHanja as u32; - pub const Hangul_SingleCandidate: Key = ffi::GDK_KEY_Hangul_SingleCandidate as u32; - pub const Hangul_MultipleCandidate: Key = ffi::GDK_KEY_Hangul_MultipleCandidate as u32; - pub const Hangul_PreviousCandidate: Key = ffi::GDK_KEY_Hangul_PreviousCandidate as u32; - pub const Hangul_Special: Key = ffi::GDK_KEY_Hangul_Special as u32; - pub const Hangul_switch: Key = ffi::GDK_KEY_Hangul_switch as u32; - pub const Hangul_Kiyeog: Key = ffi::GDK_KEY_Hangul_Kiyeog as u32; - pub const Hangul_SsangKiyeog: Key = ffi::GDK_KEY_Hangul_SsangKiyeog as u32; - pub const Hangul_KiyeogSios: Key = ffi::GDK_KEY_Hangul_KiyeogSios as u32; - pub const Hangul_Nieun: Key = ffi::GDK_KEY_Hangul_Nieun as u32; - pub const Hangul_NieunJieuj: Key = ffi::GDK_KEY_Hangul_NieunJieuj as u32; - pub const Hangul_NieunHieuh: Key = ffi::GDK_KEY_Hangul_NieunHieuh as u32; - pub const Hangul_Dikeud: Key = ffi::GDK_KEY_Hangul_Dikeud as u32; - pub const Hangul_SsangDikeud: Key = ffi::GDK_KEY_Hangul_SsangDikeud as u32; - pub const Hangul_Rieul: Key = ffi::GDK_KEY_Hangul_Rieul as u32; - pub const Hangul_RieulKiyeog: Key = ffi::GDK_KEY_Hangul_RieulKiyeog as u32; - pub const Hangul_RieulMieum: Key = ffi::GDK_KEY_Hangul_RieulMieum as u32; - pub const Hangul_RieulPieub: Key = ffi::GDK_KEY_Hangul_RieulPieub as u32; - pub const Hangul_RieulSios: Key = ffi::GDK_KEY_Hangul_RieulSios as u32; - pub const Hangul_RieulTieut: Key = ffi::GDK_KEY_Hangul_RieulTieut as u32; - pub const Hangul_RieulPhieuf: Key = ffi::GDK_KEY_Hangul_RieulPhieuf as u32; - pub const Hangul_RieulHieuh: Key = ffi::GDK_KEY_Hangul_RieulHieuh as u32; - pub const Hangul_Mieum: Key = ffi::GDK_KEY_Hangul_Mieum as u32; - pub const Hangul_Pieub: Key = ffi::GDK_KEY_Hangul_Pieub as u32; - pub const Hangul_SsangPieub: Key = ffi::GDK_KEY_Hangul_SsangPieub as u32; - pub const Hangul_PieubSios: Key = ffi::GDK_KEY_Hangul_PieubSios as u32; - pub const Hangul_Sios: Key = ffi::GDK_KEY_Hangul_Sios as u32; - pub const Hangul_SsangSios: Key = ffi::GDK_KEY_Hangul_SsangSios as u32; - pub const Hangul_Ieung: Key = ffi::GDK_KEY_Hangul_Ieung as u32; - pub const Hangul_Jieuj: Key = ffi::GDK_KEY_Hangul_Jieuj as u32; - pub const Hangul_SsangJieuj: Key = ffi::GDK_KEY_Hangul_SsangJieuj as u32; - pub const Hangul_Cieuc: Key = ffi::GDK_KEY_Hangul_Cieuc as u32; - pub const Hangul_Khieuq: Key = ffi::GDK_KEY_Hangul_Khieuq as u32; - pub const Hangul_Tieut: Key = ffi::GDK_KEY_Hangul_Tieut as u32; - pub const Hangul_Phieuf: Key = ffi::GDK_KEY_Hangul_Phieuf as u32; - pub const Hangul_Hieuh: Key = ffi::GDK_KEY_Hangul_Hieuh as u32; - pub const Hangul_A: Key = ffi::GDK_KEY_Hangul_A as u32; - pub const Hangul_AE: Key = ffi::GDK_KEY_Hangul_AE as u32; - pub const Hangul_YA: Key = ffi::GDK_KEY_Hangul_YA as u32; - pub const Hangul_YAE: Key = ffi::GDK_KEY_Hangul_YAE as u32; - pub const Hangul_EO: Key = ffi::GDK_KEY_Hangul_EO as u32; - pub const Hangul_E: Key = ffi::GDK_KEY_Hangul_E as u32; - pub const Hangul_YEO: Key = ffi::GDK_KEY_Hangul_YEO as u32; - pub const Hangul_YE: Key = ffi::GDK_KEY_Hangul_YE as u32; - pub const Hangul_O: Key = ffi::GDK_KEY_Hangul_O as u32; - pub const Hangul_WA: Key = ffi::GDK_KEY_Hangul_WA as u32; - pub const Hangul_WAE: Key = ffi::GDK_KEY_Hangul_WAE as u32; - pub const Hangul_OE: Key = ffi::GDK_KEY_Hangul_OE as u32; - pub const Hangul_YO: Key = ffi::GDK_KEY_Hangul_YO as u32; - pub const Hangul_U: Key = ffi::GDK_KEY_Hangul_U as u32; - pub const Hangul_WEO: Key = ffi::GDK_KEY_Hangul_WEO as u32; - pub const Hangul_WE: Key = ffi::GDK_KEY_Hangul_WE as u32; - pub const Hangul_WI: Key = ffi::GDK_KEY_Hangul_WI as u32; - pub const Hangul_YU: Key = ffi::GDK_KEY_Hangul_YU as u32; - pub const Hangul_EU: Key = ffi::GDK_KEY_Hangul_EU as u32; - pub const Hangul_YI: Key = ffi::GDK_KEY_Hangul_YI as u32; - pub const Hangul_I: Key = ffi::GDK_KEY_Hangul_I as u32; - pub const Hangul_J_Kiyeog: Key = ffi::GDK_KEY_Hangul_J_Kiyeog as u32; - pub const Hangul_J_SsangKiyeog: Key = ffi::GDK_KEY_Hangul_J_SsangKiyeog as u32; - pub const Hangul_J_KiyeogSios: Key = ffi::GDK_KEY_Hangul_J_KiyeogSios as u32; - pub const Hangul_J_Nieun: Key = ffi::GDK_KEY_Hangul_J_Nieun as u32; - pub const Hangul_J_NieunJieuj: Key = ffi::GDK_KEY_Hangul_J_NieunJieuj as u32; - pub const Hangul_J_NieunHieuh: Key = ffi::GDK_KEY_Hangul_J_NieunHieuh as u32; - pub const Hangul_J_Dikeud: Key = ffi::GDK_KEY_Hangul_J_Dikeud as u32; - pub const Hangul_J_Rieul: Key = ffi::GDK_KEY_Hangul_J_Rieul as u32; - pub const Hangul_J_RieulKiyeog: Key = ffi::GDK_KEY_Hangul_J_RieulKiyeog as u32; - pub const Hangul_J_RieulMieum: Key = ffi::GDK_KEY_Hangul_J_RieulMieum as u32; - pub const Hangul_J_RieulPieub: Key = ffi::GDK_KEY_Hangul_J_RieulPieub as u32; - pub const Hangul_J_RieulSios: Key = ffi::GDK_KEY_Hangul_J_RieulSios as u32; - pub const Hangul_J_RieulTieut: Key = ffi::GDK_KEY_Hangul_J_RieulTieut as u32; - pub const Hangul_J_RieulPhieuf: Key = ffi::GDK_KEY_Hangul_J_RieulPhieuf as u32; - pub const Hangul_J_RieulHieuh: Key = ffi::GDK_KEY_Hangul_J_RieulHieuh as u32; - pub const Hangul_J_Mieum: Key = ffi::GDK_KEY_Hangul_J_Mieum as u32; - pub const Hangul_J_Pieub: Key = ffi::GDK_KEY_Hangul_J_Pieub as u32; - pub const Hangul_J_PieubSios: Key = ffi::GDK_KEY_Hangul_J_PieubSios as u32; - pub const Hangul_J_Sios: Key = ffi::GDK_KEY_Hangul_J_Sios as u32; - pub const Hangul_J_SsangSios: Key = ffi::GDK_KEY_Hangul_J_SsangSios as u32; - pub const Hangul_J_Ieung: Key = ffi::GDK_KEY_Hangul_J_Ieung as u32; - pub const Hangul_J_Jieuj: Key = ffi::GDK_KEY_Hangul_J_Jieuj as u32; - pub const Hangul_J_Cieuc: Key = ffi::GDK_KEY_Hangul_J_Cieuc as u32; - pub const Hangul_J_Khieuq: Key = ffi::GDK_KEY_Hangul_J_Khieuq as u32; - pub const Hangul_J_Tieut: Key = ffi::GDK_KEY_Hangul_J_Tieut as u32; - pub const Hangul_J_Phieuf: Key = ffi::GDK_KEY_Hangul_J_Phieuf as u32; - pub const Hangul_J_Hieuh: Key = ffi::GDK_KEY_Hangul_J_Hieuh as u32; - pub const Hangul_RieulYeorinHieuh: Key = ffi::GDK_KEY_Hangul_RieulYeorinHieuh as u32; - pub const Hangul_SunkyeongeumMieum: Key = ffi::GDK_KEY_Hangul_SunkyeongeumMieum as u32; - pub const Hangul_SunkyeongeumPieub: Key = ffi::GDK_KEY_Hangul_SunkyeongeumPieub as u32; - pub const Hangul_PanSios: Key = ffi::GDK_KEY_Hangul_PanSios as u32; - pub const Hangul_KkogjiDalrinIeung: Key = ffi::GDK_KEY_Hangul_KkogjiDalrinIeung as u32; - pub const Hangul_SunkyeongeumPhieuf: Key = ffi::GDK_KEY_Hangul_SunkyeongeumPhieuf as u32; - pub const Hangul_YeorinHieuh: Key = ffi::GDK_KEY_Hangul_YeorinHieuh as u32; - pub const Hangul_AraeA: Key = ffi::GDK_KEY_Hangul_AraeA as u32; - pub const Hangul_AraeAE: Key = ffi::GDK_KEY_Hangul_AraeAE as u32; - pub const Hangul_J_PanSios: Key = ffi::GDK_KEY_Hangul_J_PanSios as u32; - pub const Hangul_J_KkogjiDalrinIeung: Key = ffi::GDK_KEY_Hangul_J_KkogjiDalrinIeung as u32; - pub const Hangul_J_YeorinHieuh: Key = ffi::GDK_KEY_Hangul_J_YeorinHieuh as u32; - pub const Korean_Won: Key = ffi::GDK_KEY_Korean_Won as u32; - pub const Armenian_ligature_ew: Key = ffi::GDK_KEY_Armenian_ligature_ew as u32; - pub const Armenian_full_stop: Key = ffi::GDK_KEY_Armenian_full_stop as u32; - pub const Armenian_verjaket: Key = ffi::GDK_KEY_Armenian_verjaket as u32; - pub const Armenian_separation_mark: Key = ffi::GDK_KEY_Armenian_separation_mark as u32; - pub const Armenian_but: Key = ffi::GDK_KEY_Armenian_but as u32; - pub const Armenian_hyphen: Key = ffi::GDK_KEY_Armenian_hyphen as u32; - pub const Armenian_yentamna: Key = ffi::GDK_KEY_Armenian_yentamna as u32; - pub const Armenian_exclam: Key = ffi::GDK_KEY_Armenian_exclam as u32; - pub const Armenian_amanak: Key = ffi::GDK_KEY_Armenian_amanak as u32; - pub const Armenian_accent: Key = ffi::GDK_KEY_Armenian_accent as u32; - pub const Armenian_shesht: Key = ffi::GDK_KEY_Armenian_shesht as u32; - pub const Armenian_question: Key = ffi::GDK_KEY_Armenian_question as u32; - pub const Armenian_paruyk: Key = ffi::GDK_KEY_Armenian_paruyk as u32; - pub const Armenian_AYB: Key = ffi::GDK_KEY_Armenian_AYB as u32; - pub const Armenian_ayb: Key = ffi::GDK_KEY_Armenian_ayb as u32; - pub const Armenian_BEN: Key = ffi::GDK_KEY_Armenian_BEN as u32; - pub const Armenian_ben: Key = ffi::GDK_KEY_Armenian_ben as u32; - pub const Armenian_GIM: Key = ffi::GDK_KEY_Armenian_GIM as u32; - pub const Armenian_gim: Key = ffi::GDK_KEY_Armenian_gim as u32; - pub const Armenian_DA: Key = ffi::GDK_KEY_Armenian_DA as u32; - pub const Armenian_da: Key = ffi::GDK_KEY_Armenian_da as u32; - pub const Armenian_YECH: Key = ffi::GDK_KEY_Armenian_YECH as u32; - pub const Armenian_yech: Key = ffi::GDK_KEY_Armenian_yech as u32; - pub const Armenian_ZA: Key = ffi::GDK_KEY_Armenian_ZA as u32; - pub const Armenian_za: Key = ffi::GDK_KEY_Armenian_za as u32; - pub const Armenian_E: Key = ffi::GDK_KEY_Armenian_E as u32; - pub const Armenian_e: Key = ffi::GDK_KEY_Armenian_e as u32; - pub const Armenian_AT: Key = ffi::GDK_KEY_Armenian_AT as u32; - pub const Armenian_at: Key = ffi::GDK_KEY_Armenian_at as u32; - pub const Armenian_TO: Key = ffi::GDK_KEY_Armenian_TO as u32; - pub const Armenian_to: Key = ffi::GDK_KEY_Armenian_to as u32; - pub const Armenian_ZHE: Key = ffi::GDK_KEY_Armenian_ZHE as u32; - pub const Armenian_zhe: Key = ffi::GDK_KEY_Armenian_zhe as u32; - pub const Armenian_INI: Key = ffi::GDK_KEY_Armenian_INI as u32; - pub const Armenian_ini: Key = ffi::GDK_KEY_Armenian_ini as u32; - pub const Armenian_LYUN: Key = ffi::GDK_KEY_Armenian_LYUN as u32; - pub const Armenian_lyun: Key = ffi::GDK_KEY_Armenian_lyun as u32; - pub const Armenian_KHE: Key = ffi::GDK_KEY_Armenian_KHE as u32; - pub const Armenian_khe: Key = ffi::GDK_KEY_Armenian_khe as u32; - pub const Armenian_TSA: Key = ffi::GDK_KEY_Armenian_TSA as u32; - pub const Armenian_tsa: Key = ffi::GDK_KEY_Armenian_tsa as u32; - pub const Armenian_KEN: Key = ffi::GDK_KEY_Armenian_KEN as u32; - pub const Armenian_ken: Key = ffi::GDK_KEY_Armenian_ken as u32; - pub const Armenian_HO: Key = ffi::GDK_KEY_Armenian_HO as u32; - pub const Armenian_ho: Key = ffi::GDK_KEY_Armenian_ho as u32; - pub const Armenian_DZA: Key = ffi::GDK_KEY_Armenian_DZA as u32; - pub const Armenian_dza: Key = ffi::GDK_KEY_Armenian_dza as u32; - pub const Armenian_GHAT: Key = ffi::GDK_KEY_Armenian_GHAT as u32; - pub const Armenian_ghat: Key = ffi::GDK_KEY_Armenian_ghat as u32; - pub const Armenian_TCHE: Key = ffi::GDK_KEY_Armenian_TCHE as u32; - pub const Armenian_tche: Key = ffi::GDK_KEY_Armenian_tche as u32; - pub const Armenian_MEN: Key = ffi::GDK_KEY_Armenian_MEN as u32; - pub const Armenian_men: Key = ffi::GDK_KEY_Armenian_men as u32; - pub const Armenian_HI: Key = ffi::GDK_KEY_Armenian_HI as u32; - pub const Armenian_hi: Key = ffi::GDK_KEY_Armenian_hi as u32; - pub const Armenian_NU: Key = ffi::GDK_KEY_Armenian_NU as u32; - pub const Armenian_nu: Key = ffi::GDK_KEY_Armenian_nu as u32; - pub const Armenian_SHA: Key = ffi::GDK_KEY_Armenian_SHA as u32; - pub const Armenian_sha: Key = ffi::GDK_KEY_Armenian_sha as u32; - pub const Armenian_VO: Key = ffi::GDK_KEY_Armenian_VO as u32; - pub const Armenian_vo: Key = ffi::GDK_KEY_Armenian_vo as u32; - pub const Armenian_CHA: Key = ffi::GDK_KEY_Armenian_CHA as u32; - pub const Armenian_cha: Key = ffi::GDK_KEY_Armenian_cha as u32; - pub const Armenian_PE: Key = ffi::GDK_KEY_Armenian_PE as u32; - pub const Armenian_pe: Key = ffi::GDK_KEY_Armenian_pe as u32; - pub const Armenian_JE: Key = ffi::GDK_KEY_Armenian_JE as u32; - pub const Armenian_je: Key = ffi::GDK_KEY_Armenian_je as u32; - pub const Armenian_RA: Key = ffi::GDK_KEY_Armenian_RA as u32; - pub const Armenian_ra: Key = ffi::GDK_KEY_Armenian_ra as u32; - pub const Armenian_SE: Key = ffi::GDK_KEY_Armenian_SE as u32; - pub const Armenian_se: Key = ffi::GDK_KEY_Armenian_se as u32; - pub const Armenian_VEV: Key = ffi::GDK_KEY_Armenian_VEV as u32; - pub const Armenian_vev: Key = ffi::GDK_KEY_Armenian_vev as u32; - pub const Armenian_TYUN: Key = ffi::GDK_KEY_Armenian_TYUN as u32; - pub const Armenian_tyun: Key = ffi::GDK_KEY_Armenian_tyun as u32; - pub const Armenian_RE: Key = ffi::GDK_KEY_Armenian_RE as u32; - pub const Armenian_re: Key = ffi::GDK_KEY_Armenian_re as u32; - pub const Armenian_TSO: Key = ffi::GDK_KEY_Armenian_TSO as u32; - pub const Armenian_tso: Key = ffi::GDK_KEY_Armenian_tso as u32; - pub const Armenian_VYUN: Key = ffi::GDK_KEY_Armenian_VYUN as u32; - pub const Armenian_vyun: Key = ffi::GDK_KEY_Armenian_vyun as u32; - pub const Armenian_PYUR: Key = ffi::GDK_KEY_Armenian_PYUR as u32; - pub const Armenian_pyur: Key = ffi::GDK_KEY_Armenian_pyur as u32; - pub const Armenian_KE: Key = ffi::GDK_KEY_Armenian_KE as u32; - pub const Armenian_ke: Key = ffi::GDK_KEY_Armenian_ke as u32; - pub const Armenian_O: Key = ffi::GDK_KEY_Armenian_O as u32; - pub const Armenian_o: Key = ffi::GDK_KEY_Armenian_o as u32; - pub const Armenian_FE: Key = ffi::GDK_KEY_Armenian_FE as u32; - pub const Armenian_fe: Key = ffi::GDK_KEY_Armenian_fe as u32; - pub const Armenian_apostrophe: Key = ffi::GDK_KEY_Armenian_apostrophe as u32; - pub const Georgian_an: Key = ffi::GDK_KEY_Georgian_an as u32; - pub const Georgian_ban: Key = ffi::GDK_KEY_Georgian_ban as u32; - pub const Georgian_gan: Key = ffi::GDK_KEY_Georgian_gan as u32; - pub const Georgian_don: Key = ffi::GDK_KEY_Georgian_don as u32; - pub const Georgian_en: Key = ffi::GDK_KEY_Georgian_en as u32; - pub const Georgian_vin: Key = ffi::GDK_KEY_Georgian_vin as u32; - pub const Georgian_zen: Key = ffi::GDK_KEY_Georgian_zen as u32; - pub const Georgian_tan: Key = ffi::GDK_KEY_Georgian_tan as u32; - pub const Georgian_in: Key = ffi::GDK_KEY_Georgian_in as u32; - pub const Georgian_kan: Key = ffi::GDK_KEY_Georgian_kan as u32; - pub const Georgian_las: Key = ffi::GDK_KEY_Georgian_las as u32; - pub const Georgian_man: Key = ffi::GDK_KEY_Georgian_man as u32; - pub const Georgian_nar: Key = ffi::GDK_KEY_Georgian_nar as u32; - pub const Georgian_on: Key = ffi::GDK_KEY_Georgian_on as u32; - pub const Georgian_par: Key = ffi::GDK_KEY_Georgian_par as u32; - pub const Georgian_zhar: Key = ffi::GDK_KEY_Georgian_zhar as u32; - pub const Georgian_rae: Key = ffi::GDK_KEY_Georgian_rae as u32; - pub const Georgian_san: Key = ffi::GDK_KEY_Georgian_san as u32; - pub const Georgian_tar: Key = ffi::GDK_KEY_Georgian_tar as u32; - pub const Georgian_un: Key = ffi::GDK_KEY_Georgian_un as u32; - pub const Georgian_phar: Key = ffi::GDK_KEY_Georgian_phar as u32; - pub const Georgian_khar: Key = ffi::GDK_KEY_Georgian_khar as u32; - pub const Georgian_ghan: Key = ffi::GDK_KEY_Georgian_ghan as u32; - pub const Georgian_qar: Key = ffi::GDK_KEY_Georgian_qar as u32; - pub const Georgian_shin: Key = ffi::GDK_KEY_Georgian_shin as u32; - pub const Georgian_chin: Key = ffi::GDK_KEY_Georgian_chin as u32; - pub const Georgian_can: Key = ffi::GDK_KEY_Georgian_can as u32; - pub const Georgian_jil: Key = ffi::GDK_KEY_Georgian_jil as u32; - pub const Georgian_cil: Key = ffi::GDK_KEY_Georgian_cil as u32; - pub const Georgian_char: Key = ffi::GDK_KEY_Georgian_char as u32; - pub const Georgian_xan: Key = ffi::GDK_KEY_Georgian_xan as u32; - pub const Georgian_jhan: Key = ffi::GDK_KEY_Georgian_jhan as u32; - pub const Georgian_hae: Key = ffi::GDK_KEY_Georgian_hae as u32; - pub const Georgian_he: Key = ffi::GDK_KEY_Georgian_he as u32; - pub const Georgian_hie: Key = ffi::GDK_KEY_Georgian_hie as u32; - pub const Georgian_we: Key = ffi::GDK_KEY_Georgian_we as u32; - pub const Georgian_har: Key = ffi::GDK_KEY_Georgian_har as u32; - pub const Georgian_hoe: Key = ffi::GDK_KEY_Georgian_hoe as u32; - pub const Georgian_fi: Key = ffi::GDK_KEY_Georgian_fi as u32; - pub const Xabovedot: Key = ffi::GDK_KEY_Xabovedot as u32; - pub const Ibreve: Key = ffi::GDK_KEY_Ibreve as u32; - pub const Zstroke: Key = ffi::GDK_KEY_Zstroke as u32; - pub const Gcaron: Key = ffi::GDK_KEY_Gcaron as u32; - pub const Ocaron: Key = ffi::GDK_KEY_Ocaron as u32; - pub const Obarred: Key = ffi::GDK_KEY_Obarred as u32; - pub const xabovedot: Key = ffi::GDK_KEY_xabovedot as u32; - pub const ibreve: Key = ffi::GDK_KEY_ibreve as u32; - pub const zstroke: Key = ffi::GDK_KEY_zstroke as u32; - pub const gcaron: Key = ffi::GDK_KEY_gcaron as u32; - pub const ocaron: Key = ffi::GDK_KEY_ocaron as u32; - pub const obarred: Key = ffi::GDK_KEY_obarred as u32; - pub const SCHWA: Key = ffi::GDK_KEY_SCHWA as u32; - pub const schwa: Key = ffi::GDK_KEY_schwa as u32; - pub const EZH: Key = ffi::GDK_KEY_EZH as u32; - pub const ezh: Key = ffi::GDK_KEY_ezh as u32; - pub const Lbelowdot: Key = ffi::GDK_KEY_Lbelowdot as u32; - pub const lbelowdot: Key = ffi::GDK_KEY_lbelowdot as u32; - pub const Abelowdot: Key = ffi::GDK_KEY_Abelowdot as u32; - pub const abelowdot: Key = ffi::GDK_KEY_abelowdot as u32; - pub const Ahook: Key = ffi::GDK_KEY_Ahook as u32; - pub const ahook: Key = ffi::GDK_KEY_ahook as u32; - pub const Acircumflexacute: Key = ffi::GDK_KEY_Acircumflexacute as u32; - pub const acircumflexacute: Key = ffi::GDK_KEY_acircumflexacute as u32; - pub const Acircumflexgrave: Key = ffi::GDK_KEY_Acircumflexgrave as u32; - pub const acircumflexgrave: Key = ffi::GDK_KEY_acircumflexgrave as u32; - pub const Acircumflexhook: Key = ffi::GDK_KEY_Acircumflexhook as u32; - pub const acircumflexhook: Key = ffi::GDK_KEY_acircumflexhook as u32; - pub const Acircumflextilde: Key = ffi::GDK_KEY_Acircumflextilde as u32; - pub const acircumflextilde: Key = ffi::GDK_KEY_acircumflextilde as u32; - pub const Acircumflexbelowdot: Key = ffi::GDK_KEY_Acircumflexbelowdot as u32; - pub const acircumflexbelowdot: Key = ffi::GDK_KEY_acircumflexbelowdot as u32; - pub const Abreveacute: Key = ffi::GDK_KEY_Abreveacute as u32; - pub const abreveacute: Key = ffi::GDK_KEY_abreveacute as u32; - pub const Abrevegrave: Key = ffi::GDK_KEY_Abrevegrave as u32; - pub const abrevegrave: Key = ffi::GDK_KEY_abrevegrave as u32; - pub const Abrevehook: Key = ffi::GDK_KEY_Abrevehook as u32; - pub const abrevehook: Key = ffi::GDK_KEY_abrevehook as u32; - pub const Abrevetilde: Key = ffi::GDK_KEY_Abrevetilde as u32; - pub const abrevetilde: Key = ffi::GDK_KEY_abrevetilde as u32; - pub const Abrevebelowdot: Key = ffi::GDK_KEY_Abrevebelowdot as u32; - pub const abrevebelowdot: Key = ffi::GDK_KEY_abrevebelowdot as u32; - pub const Ebelowdot: Key = ffi::GDK_KEY_Ebelowdot as u32; - pub const ebelowdot: Key = ffi::GDK_KEY_ebelowdot as u32; - pub const Ehook: Key = ffi::GDK_KEY_Ehook as u32; - pub const ehook: Key = ffi::GDK_KEY_ehook as u32; - pub const Etilde: Key = ffi::GDK_KEY_Etilde as u32; - pub const etilde: Key = ffi::GDK_KEY_etilde as u32; - pub const Ecircumflexacute: Key = ffi::GDK_KEY_Ecircumflexacute as u32; - pub const ecircumflexacute: Key = ffi::GDK_KEY_ecircumflexacute as u32; - pub const Ecircumflexgrave: Key = ffi::GDK_KEY_Ecircumflexgrave as u32; - pub const ecircumflexgrave: Key = ffi::GDK_KEY_ecircumflexgrave as u32; - pub const Ecircumflexhook: Key = ffi::GDK_KEY_Ecircumflexhook as u32; - pub const ecircumflexhook: Key = ffi::GDK_KEY_ecircumflexhook as u32; - pub const Ecircumflextilde: Key = ffi::GDK_KEY_Ecircumflextilde as u32; - pub const ecircumflextilde: Key = ffi::GDK_KEY_ecircumflextilde as u32; - pub const Ecircumflexbelowdot: Key = ffi::GDK_KEY_Ecircumflexbelowdot as u32; - pub const ecircumflexbelowdot: Key = ffi::GDK_KEY_ecircumflexbelowdot as u32; - pub const Ihook: Key = ffi::GDK_KEY_Ihook as u32; - pub const ihook: Key = ffi::GDK_KEY_ihook as u32; - pub const Ibelowdot: Key = ffi::GDK_KEY_Ibelowdot as u32; - pub const ibelowdot: Key = ffi::GDK_KEY_ibelowdot as u32; - pub const Obelowdot: Key = ffi::GDK_KEY_Obelowdot as u32; - pub const obelowdot: Key = ffi::GDK_KEY_obelowdot as u32; - pub const Ohook: Key = ffi::GDK_KEY_Ohook as u32; - pub const ohook: Key = ffi::GDK_KEY_ohook as u32; - pub const Ocircumflexacute: Key = ffi::GDK_KEY_Ocircumflexacute as u32; - pub const ocircumflexacute: Key = ffi::GDK_KEY_ocircumflexacute as u32; - pub const Ocircumflexgrave: Key = ffi::GDK_KEY_Ocircumflexgrave as u32; - pub const ocircumflexgrave: Key = ffi::GDK_KEY_ocircumflexgrave as u32; - pub const Ocircumflexhook: Key = ffi::GDK_KEY_Ocircumflexhook as u32; - pub const ocircumflexhook: Key = ffi::GDK_KEY_ocircumflexhook as u32; - pub const Ocircumflextilde: Key = ffi::GDK_KEY_Ocircumflextilde as u32; - pub const ocircumflextilde: Key = ffi::GDK_KEY_ocircumflextilde as u32; - pub const Ocircumflexbelowdot: Key = ffi::GDK_KEY_Ocircumflexbelowdot as u32; - pub const ocircumflexbelowdot: Key = ffi::GDK_KEY_ocircumflexbelowdot as u32; - pub const Ohornacute: Key = ffi::GDK_KEY_Ohornacute as u32; - pub const ohornacute: Key = ffi::GDK_KEY_ohornacute as u32; - pub const Ohorngrave: Key = ffi::GDK_KEY_Ohorngrave as u32; - pub const ohorngrave: Key = ffi::GDK_KEY_ohorngrave as u32; - pub const Ohornhook: Key = ffi::GDK_KEY_Ohornhook as u32; - pub const ohornhook: Key = ffi::GDK_KEY_ohornhook as u32; - pub const Ohorntilde: Key = ffi::GDK_KEY_Ohorntilde as u32; - pub const ohorntilde: Key = ffi::GDK_KEY_ohorntilde as u32; - pub const Ohornbelowdot: Key = ffi::GDK_KEY_Ohornbelowdot as u32; - pub const ohornbelowdot: Key = ffi::GDK_KEY_ohornbelowdot as u32; - pub const Ubelowdot: Key = ffi::GDK_KEY_Ubelowdot as u32; - pub const ubelowdot: Key = ffi::GDK_KEY_ubelowdot as u32; - pub const Uhook: Key = ffi::GDK_KEY_Uhook as u32; - pub const uhook: Key = ffi::GDK_KEY_uhook as u32; - pub const Uhornacute: Key = ffi::GDK_KEY_Uhornacute as u32; - pub const uhornacute: Key = ffi::GDK_KEY_uhornacute as u32; - pub const Uhorngrave: Key = ffi::GDK_KEY_Uhorngrave as u32; - pub const uhorngrave: Key = ffi::GDK_KEY_uhorngrave as u32; - pub const Uhornhook: Key = ffi::GDK_KEY_Uhornhook as u32; - pub const uhornhook: Key = ffi::GDK_KEY_uhornhook as u32; - pub const Uhorntilde: Key = ffi::GDK_KEY_Uhorntilde as u32; - pub const uhorntilde: Key = ffi::GDK_KEY_uhorntilde as u32; - pub const Uhornbelowdot: Key = ffi::GDK_KEY_Uhornbelowdot as u32; - pub const uhornbelowdot: Key = ffi::GDK_KEY_uhornbelowdot as u32; - pub const Ybelowdot: Key = ffi::GDK_KEY_Ybelowdot as u32; - pub const ybelowdot: Key = ffi::GDK_KEY_ybelowdot as u32; - pub const Yhook: Key = ffi::GDK_KEY_Yhook as u32; - pub const yhook: Key = ffi::GDK_KEY_yhook as u32; - pub const Ytilde: Key = ffi::GDK_KEY_Ytilde as u32; - pub const ytilde: Key = ffi::GDK_KEY_ytilde as u32; - pub const Ohorn: Key = ffi::GDK_KEY_Ohorn as u32; - pub const ohorn: Key = ffi::GDK_KEY_ohorn as u32; - pub const Uhorn: Key = ffi::GDK_KEY_Uhorn as u32; - pub const uhorn: Key = ffi::GDK_KEY_uhorn as u32; - pub const EcuSign: Key = ffi::GDK_KEY_EcuSign as u32; - pub const ColonSign: Key = ffi::GDK_KEY_ColonSign as u32; - pub const CruzeiroSign: Key = ffi::GDK_KEY_CruzeiroSign as u32; - pub const FFrancSign: Key = ffi::GDK_KEY_FFrancSign as u32; - pub const LiraSign: Key = ffi::GDK_KEY_LiraSign as u32; - pub const MillSign: Key = ffi::GDK_KEY_MillSign as u32; - pub const NairaSign: Key = ffi::GDK_KEY_NairaSign as u32; - pub const PesetaSign: Key = ffi::GDK_KEY_PesetaSign as u32; - pub const RupeeSign: Key = ffi::GDK_KEY_RupeeSign as u32; - pub const WonSign: Key = ffi::GDK_KEY_WonSign as u32; - pub const NewSheqelSign: Key = ffi::GDK_KEY_NewSheqelSign as u32; - pub const DongSign: Key = ffi::GDK_KEY_DongSign as u32; - pub const EuroSign: Key = ffi::GDK_KEY_EuroSign as u32; - pub const zerosuperior: Key = ffi::GDK_KEY_zerosuperior as u32; - pub const foursuperior: Key = ffi::GDK_KEY_foursuperior as u32; - pub const fivesuperior: Key = ffi::GDK_KEY_fivesuperior as u32; - pub const sixsuperior: Key = ffi::GDK_KEY_sixsuperior as u32; - pub const sevensuperior: Key = ffi::GDK_KEY_sevensuperior as u32; - pub const eightsuperior: Key = ffi::GDK_KEY_eightsuperior as u32; - pub const ninesuperior: Key = ffi::GDK_KEY_ninesuperior as u32; - pub const zerosubscript: Key = ffi::GDK_KEY_zerosubscript as u32; - pub const onesubscript: Key = ffi::GDK_KEY_onesubscript as u32; - pub const twosubscript: Key = ffi::GDK_KEY_twosubscript as u32; - pub const threesubscript: Key = ffi::GDK_KEY_threesubscript as u32; - pub const foursubscript: Key = ffi::GDK_KEY_foursubscript as u32; - pub const fivesubscript: Key = ffi::GDK_KEY_fivesubscript as u32; - pub const sixsubscript: Key = ffi::GDK_KEY_sixsubscript as u32; - pub const sevensubscript: Key = ffi::GDK_KEY_sevensubscript as u32; - pub const eightsubscript: Key = ffi::GDK_KEY_eightsubscript as u32; - pub const ninesubscript: Key = ffi::GDK_KEY_ninesubscript as u32; - pub const partdifferential: Key = ffi::GDK_KEY_partdifferential as u32; - pub const emptyset: Key = ffi::GDK_KEY_emptyset as u32; - pub const elementof: Key = ffi::GDK_KEY_elementof as u32; - pub const notelementof: Key = ffi::GDK_KEY_notelementof as u32; - pub const containsas: Key = ffi::GDK_KEY_containsas as u32; - pub const squareroot: Key = ffi::GDK_KEY_squareroot as u32; - pub const cuberoot: Key = ffi::GDK_KEY_cuberoot as u32; - pub const fourthroot: Key = ffi::GDK_KEY_fourthroot as u32; - pub const dintegral: Key = ffi::GDK_KEY_dintegral as u32; - pub const tintegral: Key = ffi::GDK_KEY_tintegral as u32; - pub const because: Key = ffi::GDK_KEY_because as u32; - pub const approxeq: Key = ffi::GDK_KEY_approxeq as u32; - pub const notapproxeq: Key = ffi::GDK_KEY_notapproxeq as u32; - pub const notidentical: Key = ffi::GDK_KEY_notidentical as u32; - pub const stricteq: Key = ffi::GDK_KEY_stricteq as u32; - pub const braille_dot_1: Key = ffi::GDK_KEY_braille_dot_1 as u32; - pub const braille_dot_2: Key = ffi::GDK_KEY_braille_dot_2 as u32; - pub const braille_dot_3: Key = ffi::GDK_KEY_braille_dot_3 as u32; - pub const braille_dot_4: Key = ffi::GDK_KEY_braille_dot_4 as u32; - pub const braille_dot_5: Key = ffi::GDK_KEY_braille_dot_5 as u32; - pub const braille_dot_6: Key = ffi::GDK_KEY_braille_dot_6 as u32; - pub const braille_dot_7: Key = ffi::GDK_KEY_braille_dot_7 as u32; - pub const braille_dot_8: Key = ffi::GDK_KEY_braille_dot_8 as u32; - pub const braille_dot_9: Key = ffi::GDK_KEY_braille_dot_9 as u32; - pub const braille_dot_10: Key = ffi::GDK_KEY_braille_dot_10 as u32; - pub const braille_blank: Key = ffi::GDK_KEY_braille_blank as u32; - pub const braille_dots_1: Key = ffi::GDK_KEY_braille_dots_1 as u32; - pub const braille_dots_2: Key = ffi::GDK_KEY_braille_dots_2 as u32; - pub const braille_dots_12: Key = ffi::GDK_KEY_braille_dots_12 as u32; - pub const braille_dots_3: Key = ffi::GDK_KEY_braille_dots_3 as u32; - pub const braille_dots_13: Key = ffi::GDK_KEY_braille_dots_13 as u32; - pub const braille_dots_23: Key = ffi::GDK_KEY_braille_dots_23 as u32; - pub const braille_dots_123: Key = ffi::GDK_KEY_braille_dots_123 as u32; - pub const braille_dots_4: Key = ffi::GDK_KEY_braille_dots_4 as u32; - pub const braille_dots_14: Key = ffi::GDK_KEY_braille_dots_14 as u32; - pub const braille_dots_24: Key = ffi::GDK_KEY_braille_dots_24 as u32; - pub const braille_dots_124: Key = ffi::GDK_KEY_braille_dots_124 as u32; - pub const braille_dots_34: Key = ffi::GDK_KEY_braille_dots_34 as u32; - pub const braille_dots_134: Key = ffi::GDK_KEY_braille_dots_134 as u32; - pub const braille_dots_234: Key = ffi::GDK_KEY_braille_dots_234 as u32; - pub const braille_dots_1234: Key = ffi::GDK_KEY_braille_dots_1234 as u32; - pub const braille_dots_5: Key = ffi::GDK_KEY_braille_dots_5 as u32; - pub const braille_dots_15: Key = ffi::GDK_KEY_braille_dots_15 as u32; - pub const braille_dots_25: Key = ffi::GDK_KEY_braille_dots_25 as u32; - pub const braille_dots_125: Key = ffi::GDK_KEY_braille_dots_125 as u32; - pub const braille_dots_35: Key = ffi::GDK_KEY_braille_dots_35 as u32; - pub const braille_dots_135: Key = ffi::GDK_KEY_braille_dots_135 as u32; - pub const braille_dots_235: Key = ffi::GDK_KEY_braille_dots_235 as u32; - pub const braille_dots_1235: Key = ffi::GDK_KEY_braille_dots_1235 as u32; - pub const braille_dots_45: Key = ffi::GDK_KEY_braille_dots_45 as u32; - pub const braille_dots_145: Key = ffi::GDK_KEY_braille_dots_145 as u32; - pub const braille_dots_245: Key = ffi::GDK_KEY_braille_dots_245 as u32; - pub const braille_dots_1245: Key = ffi::GDK_KEY_braille_dots_1245 as u32; - pub const braille_dots_345: Key = ffi::GDK_KEY_braille_dots_345 as u32; - pub const braille_dots_1345: Key = ffi::GDK_KEY_braille_dots_1345 as u32; - pub const braille_dots_2345: Key = ffi::GDK_KEY_braille_dots_2345 as u32; - pub const braille_dots_12345: Key = ffi::GDK_KEY_braille_dots_12345 as u32; - pub const braille_dots_6: Key = ffi::GDK_KEY_braille_dots_6 as u32; - pub const braille_dots_16: Key = ffi::GDK_KEY_braille_dots_16 as u32; - pub const braille_dots_26: Key = ffi::GDK_KEY_braille_dots_26 as u32; - pub const braille_dots_126: Key = ffi::GDK_KEY_braille_dots_126 as u32; - pub const braille_dots_36: Key = ffi::GDK_KEY_braille_dots_36 as u32; - pub const braille_dots_136: Key = ffi::GDK_KEY_braille_dots_136 as u32; - pub const braille_dots_236: Key = ffi::GDK_KEY_braille_dots_236 as u32; - pub const braille_dots_1236: Key = ffi::GDK_KEY_braille_dots_1236 as u32; - pub const braille_dots_46: Key = ffi::GDK_KEY_braille_dots_46 as u32; - pub const braille_dots_146: Key = ffi::GDK_KEY_braille_dots_146 as u32; - pub const braille_dots_246: Key = ffi::GDK_KEY_braille_dots_246 as u32; - pub const braille_dots_1246: Key = ffi::GDK_KEY_braille_dots_1246 as u32; - pub const braille_dots_346: Key = ffi::GDK_KEY_braille_dots_346 as u32; - pub const braille_dots_1346: Key = ffi::GDK_KEY_braille_dots_1346 as u32; - pub const braille_dots_2346: Key = ffi::GDK_KEY_braille_dots_2346 as u32; - pub const braille_dots_12346: Key = ffi::GDK_KEY_braille_dots_12346 as u32; - pub const braille_dots_56: Key = ffi::GDK_KEY_braille_dots_56 as u32; - pub const braille_dots_156: Key = ffi::GDK_KEY_braille_dots_156 as u32; - pub const braille_dots_256: Key = ffi::GDK_KEY_braille_dots_256 as u32; - pub const braille_dots_1256: Key = ffi::GDK_KEY_braille_dots_1256 as u32; - pub const braille_dots_356: Key = ffi::GDK_KEY_braille_dots_356 as u32; - pub const braille_dots_1356: Key = ffi::GDK_KEY_braille_dots_1356 as u32; - pub const braille_dots_2356: Key = ffi::GDK_KEY_braille_dots_2356 as u32; - pub const braille_dots_12356: Key = ffi::GDK_KEY_braille_dots_12356 as u32; - pub const braille_dots_456: Key = ffi::GDK_KEY_braille_dots_456 as u32; - pub const braille_dots_1456: Key = ffi::GDK_KEY_braille_dots_1456 as u32; - pub const braille_dots_2456: Key = ffi::GDK_KEY_braille_dots_2456 as u32; - pub const braille_dots_12456: Key = ffi::GDK_KEY_braille_dots_12456 as u32; - pub const braille_dots_3456: Key = ffi::GDK_KEY_braille_dots_3456 as u32; - pub const braille_dots_13456: Key = ffi::GDK_KEY_braille_dots_13456 as u32; - pub const braille_dots_23456: Key = ffi::GDK_KEY_braille_dots_23456 as u32; - pub const braille_dots_123456: Key = ffi::GDK_KEY_braille_dots_123456 as u32; - pub const braille_dots_7: Key = ffi::GDK_KEY_braille_dots_7 as u32; - pub const braille_dots_17: Key = ffi::GDK_KEY_braille_dots_17 as u32; - pub const braille_dots_27: Key = ffi::GDK_KEY_braille_dots_27 as u32; - pub const braille_dots_127: Key = ffi::GDK_KEY_braille_dots_127 as u32; - pub const braille_dots_37: Key = ffi::GDK_KEY_braille_dots_37 as u32; - pub const braille_dots_137: Key = ffi::GDK_KEY_braille_dots_137 as u32; - pub const braille_dots_237: Key = ffi::GDK_KEY_braille_dots_237 as u32; - pub const braille_dots_1237: Key = ffi::GDK_KEY_braille_dots_1237 as u32; - pub const braille_dots_47: Key = ffi::GDK_KEY_braille_dots_47 as u32; - pub const braille_dots_147: Key = ffi::GDK_KEY_braille_dots_147 as u32; - pub const braille_dots_247: Key = ffi::GDK_KEY_braille_dots_247 as u32; - pub const braille_dots_1247: Key = ffi::GDK_KEY_braille_dots_1247 as u32; - pub const braille_dots_347: Key = ffi::GDK_KEY_braille_dots_347 as u32; - pub const braille_dots_1347: Key = ffi::GDK_KEY_braille_dots_1347 as u32; - pub const braille_dots_2347: Key = ffi::GDK_KEY_braille_dots_2347 as u32; - pub const braille_dots_12347: Key = ffi::GDK_KEY_braille_dots_12347 as u32; - pub const braille_dots_57: Key = ffi::GDK_KEY_braille_dots_57 as u32; - pub const braille_dots_157: Key = ffi::GDK_KEY_braille_dots_157 as u32; - pub const braille_dots_257: Key = ffi::GDK_KEY_braille_dots_257 as u32; - pub const braille_dots_1257: Key = ffi::GDK_KEY_braille_dots_1257 as u32; - pub const braille_dots_357: Key = ffi::GDK_KEY_braille_dots_357 as u32; - pub const braille_dots_1357: Key = ffi::GDK_KEY_braille_dots_1357 as u32; - pub const braille_dots_2357: Key = ffi::GDK_KEY_braille_dots_2357 as u32; - pub const braille_dots_12357: Key = ffi::GDK_KEY_braille_dots_12357 as u32; - pub const braille_dots_457: Key = ffi::GDK_KEY_braille_dots_457 as u32; - pub const braille_dots_1457: Key = ffi::GDK_KEY_braille_dots_1457 as u32; - pub const braille_dots_2457: Key = ffi::GDK_KEY_braille_dots_2457 as u32; - pub const braille_dots_12457: Key = ffi::GDK_KEY_braille_dots_12457 as u32; - pub const braille_dots_3457: Key = ffi::GDK_KEY_braille_dots_3457 as u32; - pub const braille_dots_13457: Key = ffi::GDK_KEY_braille_dots_13457 as u32; - pub const braille_dots_23457: Key = ffi::GDK_KEY_braille_dots_23457 as u32; - pub const braille_dots_123457: Key = ffi::GDK_KEY_braille_dots_123457 as u32; - pub const braille_dots_67: Key = ffi::GDK_KEY_braille_dots_67 as u32; - pub const braille_dots_167: Key = ffi::GDK_KEY_braille_dots_167 as u32; - pub const braille_dots_267: Key = ffi::GDK_KEY_braille_dots_267 as u32; - pub const braille_dots_1267: Key = ffi::GDK_KEY_braille_dots_1267 as u32; - pub const braille_dots_367: Key = ffi::GDK_KEY_braille_dots_367 as u32; - pub const braille_dots_1367: Key = ffi::GDK_KEY_braille_dots_1367 as u32; - pub const braille_dots_2367: Key = ffi::GDK_KEY_braille_dots_2367 as u32; - pub const braille_dots_12367: Key = ffi::GDK_KEY_braille_dots_12367 as u32; - pub const braille_dots_467: Key = ffi::GDK_KEY_braille_dots_467 as u32; - pub const braille_dots_1467: Key = ffi::GDK_KEY_braille_dots_1467 as u32; - pub const braille_dots_2467: Key = ffi::GDK_KEY_braille_dots_2467 as u32; - pub const braille_dots_12467: Key = ffi::GDK_KEY_braille_dots_12467 as u32; - pub const braille_dots_3467: Key = ffi::GDK_KEY_braille_dots_3467 as u32; - pub const braille_dots_13467: Key = ffi::GDK_KEY_braille_dots_13467 as u32; - pub const braille_dots_23467: Key = ffi::GDK_KEY_braille_dots_23467 as u32; - pub const braille_dots_123467: Key = ffi::GDK_KEY_braille_dots_123467 as u32; - pub const braille_dots_567: Key = ffi::GDK_KEY_braille_dots_567 as u32; - pub const braille_dots_1567: Key = ffi::GDK_KEY_braille_dots_1567 as u32; - pub const braille_dots_2567: Key = ffi::GDK_KEY_braille_dots_2567 as u32; - pub const braille_dots_12567: Key = ffi::GDK_KEY_braille_dots_12567 as u32; - pub const braille_dots_3567: Key = ffi::GDK_KEY_braille_dots_3567 as u32; - pub const braille_dots_13567: Key = ffi::GDK_KEY_braille_dots_13567 as u32; - pub const braille_dots_23567: Key = ffi::GDK_KEY_braille_dots_23567 as u32; - pub const braille_dots_123567: Key = ffi::GDK_KEY_braille_dots_123567 as u32; - pub const braille_dots_4567: Key = ffi::GDK_KEY_braille_dots_4567 as u32; - pub const braille_dots_14567: Key = ffi::GDK_KEY_braille_dots_14567 as u32; - pub const braille_dots_24567: Key = ffi::GDK_KEY_braille_dots_24567 as u32; - pub const braille_dots_124567: Key = ffi::GDK_KEY_braille_dots_124567 as u32; - pub const braille_dots_34567: Key = ffi::GDK_KEY_braille_dots_34567 as u32; - pub const braille_dots_134567: Key = ffi::GDK_KEY_braille_dots_134567 as u32; - pub const braille_dots_234567: Key = ffi::GDK_KEY_braille_dots_234567 as u32; - pub const braille_dots_1234567: Key = ffi::GDK_KEY_braille_dots_1234567 as u32; - pub const braille_dots_8: Key = ffi::GDK_KEY_braille_dots_8 as u32; - pub const braille_dots_18: Key = ffi::GDK_KEY_braille_dots_18 as u32; - pub const braille_dots_28: Key = ffi::GDK_KEY_braille_dots_28 as u32; - pub const braille_dots_128: Key = ffi::GDK_KEY_braille_dots_128 as u32; - pub const braille_dots_38: Key = ffi::GDK_KEY_braille_dots_38 as u32; - pub const braille_dots_138: Key = ffi::GDK_KEY_braille_dots_138 as u32; - pub const braille_dots_238: Key = ffi::GDK_KEY_braille_dots_238 as u32; - pub const braille_dots_1238: Key = ffi::GDK_KEY_braille_dots_1238 as u32; - pub const braille_dots_48: Key = ffi::GDK_KEY_braille_dots_48 as u32; - pub const braille_dots_148: Key = ffi::GDK_KEY_braille_dots_148 as u32; - pub const braille_dots_248: Key = ffi::GDK_KEY_braille_dots_248 as u32; - pub const braille_dots_1248: Key = ffi::GDK_KEY_braille_dots_1248 as u32; - pub const braille_dots_348: Key = ffi::GDK_KEY_braille_dots_348 as u32; - pub const braille_dots_1348: Key = ffi::GDK_KEY_braille_dots_1348 as u32; - pub const braille_dots_2348: Key = ffi::GDK_KEY_braille_dots_2348 as u32; - pub const braille_dots_12348: Key = ffi::GDK_KEY_braille_dots_12348 as u32; - pub const braille_dots_58: Key = ffi::GDK_KEY_braille_dots_58 as u32; - pub const braille_dots_158: Key = ffi::GDK_KEY_braille_dots_158 as u32; - pub const braille_dots_258: Key = ffi::GDK_KEY_braille_dots_258 as u32; - pub const braille_dots_1258: Key = ffi::GDK_KEY_braille_dots_1258 as u32; - pub const braille_dots_358: Key = ffi::GDK_KEY_braille_dots_358 as u32; - pub const braille_dots_1358: Key = ffi::GDK_KEY_braille_dots_1358 as u32; - pub const braille_dots_2358: Key = ffi::GDK_KEY_braille_dots_2358 as u32; - pub const braille_dots_12358: Key = ffi::GDK_KEY_braille_dots_12358 as u32; - pub const braille_dots_458: Key = ffi::GDK_KEY_braille_dots_458 as u32; - pub const braille_dots_1458: Key = ffi::GDK_KEY_braille_dots_1458 as u32; - pub const braille_dots_2458: Key = ffi::GDK_KEY_braille_dots_2458 as u32; - pub const braille_dots_12458: Key = ffi::GDK_KEY_braille_dots_12458 as u32; - pub const braille_dots_3458: Key = ffi::GDK_KEY_braille_dots_3458 as u32; - pub const braille_dots_13458: Key = ffi::GDK_KEY_braille_dots_13458 as u32; - pub const braille_dots_23458: Key = ffi::GDK_KEY_braille_dots_23458 as u32; - pub const braille_dots_123458: Key = ffi::GDK_KEY_braille_dots_123458 as u32; - pub const braille_dots_68: Key = ffi::GDK_KEY_braille_dots_68 as u32; - pub const braille_dots_168: Key = ffi::GDK_KEY_braille_dots_168 as u32; - pub const braille_dots_268: Key = ffi::GDK_KEY_braille_dots_268 as u32; - pub const braille_dots_1268: Key = ffi::GDK_KEY_braille_dots_1268 as u32; - pub const braille_dots_368: Key = ffi::GDK_KEY_braille_dots_368 as u32; - pub const braille_dots_1368: Key = ffi::GDK_KEY_braille_dots_1368 as u32; - pub const braille_dots_2368: Key = ffi::GDK_KEY_braille_dots_2368 as u32; - pub const braille_dots_12368: Key = ffi::GDK_KEY_braille_dots_12368 as u32; - pub const braille_dots_468: Key = ffi::GDK_KEY_braille_dots_468 as u32; - pub const braille_dots_1468: Key = ffi::GDK_KEY_braille_dots_1468 as u32; - pub const braille_dots_2468: Key = ffi::GDK_KEY_braille_dots_2468 as u32; - pub const braille_dots_12468: Key = ffi::GDK_KEY_braille_dots_12468 as u32; - pub const braille_dots_3468: Key = ffi::GDK_KEY_braille_dots_3468 as u32; - pub const braille_dots_13468: Key = ffi::GDK_KEY_braille_dots_13468 as u32; - pub const braille_dots_23468: Key = ffi::GDK_KEY_braille_dots_23468 as u32; - pub const braille_dots_123468: Key = ffi::GDK_KEY_braille_dots_123468 as u32; - pub const braille_dots_568: Key = ffi::GDK_KEY_braille_dots_568 as u32; - pub const braille_dots_1568: Key = ffi::GDK_KEY_braille_dots_1568 as u32; - pub const braille_dots_2568: Key = ffi::GDK_KEY_braille_dots_2568 as u32; - pub const braille_dots_12568: Key = ffi::GDK_KEY_braille_dots_12568 as u32; - pub const braille_dots_3568: Key = ffi::GDK_KEY_braille_dots_3568 as u32; - pub const braille_dots_13568: Key = ffi::GDK_KEY_braille_dots_13568 as u32; - pub const braille_dots_23568: Key = ffi::GDK_KEY_braille_dots_23568 as u32; - pub const braille_dots_123568: Key = ffi::GDK_KEY_braille_dots_123568 as u32; - pub const braille_dots_4568: Key = ffi::GDK_KEY_braille_dots_4568 as u32; - pub const braille_dots_14568: Key = ffi::GDK_KEY_braille_dots_14568 as u32; - pub const braille_dots_24568: Key = ffi::GDK_KEY_braille_dots_24568 as u32; - pub const braille_dots_124568: Key = ffi::GDK_KEY_braille_dots_124568 as u32; - pub const braille_dots_34568: Key = ffi::GDK_KEY_braille_dots_34568 as u32; - pub const braille_dots_134568: Key = ffi::GDK_KEY_braille_dots_134568 as u32; - pub const braille_dots_234568: Key = ffi::GDK_KEY_braille_dots_234568 as u32; - pub const braille_dots_1234568: Key = ffi::GDK_KEY_braille_dots_1234568 as u32; - pub const braille_dots_78: Key = ffi::GDK_KEY_braille_dots_78 as u32; - pub const braille_dots_178: Key = ffi::GDK_KEY_braille_dots_178 as u32; - pub const braille_dots_278: Key = ffi::GDK_KEY_braille_dots_278 as u32; - pub const braille_dots_1278: Key = ffi::GDK_KEY_braille_dots_1278 as u32; - pub const braille_dots_378: Key = ffi::GDK_KEY_braille_dots_378 as u32; - pub const braille_dots_1378: Key = ffi::GDK_KEY_braille_dots_1378 as u32; - pub const braille_dots_2378: Key = ffi::GDK_KEY_braille_dots_2378 as u32; - pub const braille_dots_12378: Key = ffi::GDK_KEY_braille_dots_12378 as u32; - pub const braille_dots_478: Key = ffi::GDK_KEY_braille_dots_478 as u32; - pub const braille_dots_1478: Key = ffi::GDK_KEY_braille_dots_1478 as u32; - pub const braille_dots_2478: Key = ffi::GDK_KEY_braille_dots_2478 as u32; - pub const braille_dots_12478: Key = ffi::GDK_KEY_braille_dots_12478 as u32; - pub const braille_dots_3478: Key = ffi::GDK_KEY_braille_dots_3478 as u32; - pub const braille_dots_13478: Key = ffi::GDK_KEY_braille_dots_13478 as u32; - pub const braille_dots_23478: Key = ffi::GDK_KEY_braille_dots_23478 as u32; - pub const braille_dots_123478: Key = ffi::GDK_KEY_braille_dots_123478 as u32; - pub const braille_dots_578: Key = ffi::GDK_KEY_braille_dots_578 as u32; - pub const braille_dots_1578: Key = ffi::GDK_KEY_braille_dots_1578 as u32; - pub const braille_dots_2578: Key = ffi::GDK_KEY_braille_dots_2578 as u32; - pub const braille_dots_12578: Key = ffi::GDK_KEY_braille_dots_12578 as u32; - pub const braille_dots_3578: Key = ffi::GDK_KEY_braille_dots_3578 as u32; - pub const braille_dots_13578: Key = ffi::GDK_KEY_braille_dots_13578 as u32; - pub const braille_dots_23578: Key = ffi::GDK_KEY_braille_dots_23578 as u32; - pub const braille_dots_123578: Key = ffi::GDK_KEY_braille_dots_123578 as u32; - pub const braille_dots_4578: Key = ffi::GDK_KEY_braille_dots_4578 as u32; - pub const braille_dots_14578: Key = ffi::GDK_KEY_braille_dots_14578 as u32; - pub const braille_dots_24578: Key = ffi::GDK_KEY_braille_dots_24578 as u32; - pub const braille_dots_124578: Key = ffi::GDK_KEY_braille_dots_124578 as u32; - pub const braille_dots_34578: Key = ffi::GDK_KEY_braille_dots_34578 as u32; - pub const braille_dots_134578: Key = ffi::GDK_KEY_braille_dots_134578 as u32; - pub const braille_dots_234578: Key = ffi::GDK_KEY_braille_dots_234578 as u32; - pub const braille_dots_1234578: Key = ffi::GDK_KEY_braille_dots_1234578 as u32; - pub const braille_dots_678: Key = ffi::GDK_KEY_braille_dots_678 as u32; - pub const braille_dots_1678: Key = ffi::GDK_KEY_braille_dots_1678 as u32; - pub const braille_dots_2678: Key = ffi::GDK_KEY_braille_dots_2678 as u32; - pub const braille_dots_12678: Key = ffi::GDK_KEY_braille_dots_12678 as u32; - pub const braille_dots_3678: Key = ffi::GDK_KEY_braille_dots_3678 as u32; - pub const braille_dots_13678: Key = ffi::GDK_KEY_braille_dots_13678 as u32; - pub const braille_dots_23678: Key = ffi::GDK_KEY_braille_dots_23678 as u32; - pub const braille_dots_123678: Key = ffi::GDK_KEY_braille_dots_123678 as u32; - pub const braille_dots_4678: Key = ffi::GDK_KEY_braille_dots_4678 as u32; - pub const braille_dots_14678: Key = ffi::GDK_KEY_braille_dots_14678 as u32; - pub const braille_dots_24678: Key = ffi::GDK_KEY_braille_dots_24678 as u32; - pub const braille_dots_124678: Key = ffi::GDK_KEY_braille_dots_124678 as u32; - pub const braille_dots_34678: Key = ffi::GDK_KEY_braille_dots_34678 as u32; - pub const braille_dots_134678: Key = ffi::GDK_KEY_braille_dots_134678 as u32; - pub const braille_dots_234678: Key = ffi::GDK_KEY_braille_dots_234678 as u32; - pub const braille_dots_1234678: Key = ffi::GDK_KEY_braille_dots_1234678 as u32; - pub const braille_dots_5678: Key = ffi::GDK_KEY_braille_dots_5678 as u32; - pub const braille_dots_15678: Key = ffi::GDK_KEY_braille_dots_15678 as u32; - pub const braille_dots_25678: Key = ffi::GDK_KEY_braille_dots_25678 as u32; - pub const braille_dots_125678: Key = ffi::GDK_KEY_braille_dots_125678 as u32; - pub const braille_dots_35678: Key = ffi::GDK_KEY_braille_dots_35678 as u32; - pub const braille_dots_135678: Key = ffi::GDK_KEY_braille_dots_135678 as u32; - pub const braille_dots_235678: Key = ffi::GDK_KEY_braille_dots_235678 as u32; - pub const braille_dots_1235678: Key = ffi::GDK_KEY_braille_dots_1235678 as u32; - pub const braille_dots_45678: Key = ffi::GDK_KEY_braille_dots_45678 as u32; - pub const braille_dots_145678: Key = ffi::GDK_KEY_braille_dots_145678 as u32; - pub const braille_dots_245678: Key = ffi::GDK_KEY_braille_dots_245678 as u32; - pub const braille_dots_1245678: Key = ffi::GDK_KEY_braille_dots_1245678 as u32; - pub const braille_dots_345678: Key = ffi::GDK_KEY_braille_dots_345678 as u32; - pub const braille_dots_1345678: Key = ffi::GDK_KEY_braille_dots_1345678 as u32; - pub const braille_dots_2345678: Key = ffi::GDK_KEY_braille_dots_2345678 as u32; - pub const braille_dots_12345678: Key = ffi::GDK_KEY_braille_dots_12345678 as u32; - pub const Sinh_ng: Key = ffi::GDK_KEY_Sinh_ng as u32; - pub const Sinh_h2: Key = ffi::GDK_KEY_Sinh_h2 as u32; - pub const Sinh_a: Key = ffi::GDK_KEY_Sinh_a as u32; - pub const Sinh_aa: Key = ffi::GDK_KEY_Sinh_aa as u32; - pub const Sinh_ae: Key = ffi::GDK_KEY_Sinh_ae as u32; - pub const Sinh_aee: Key = ffi::GDK_KEY_Sinh_aee as u32; - pub const Sinh_i: Key = ffi::GDK_KEY_Sinh_i as u32; - pub const Sinh_ii: Key = ffi::GDK_KEY_Sinh_ii as u32; - pub const Sinh_u: Key = ffi::GDK_KEY_Sinh_u as u32; - pub const Sinh_uu: Key = ffi::GDK_KEY_Sinh_uu as u32; - pub const Sinh_ri: Key = ffi::GDK_KEY_Sinh_ri as u32; - pub const Sinh_rii: Key = ffi::GDK_KEY_Sinh_rii as u32; - pub const Sinh_lu: Key = ffi::GDK_KEY_Sinh_lu as u32; - pub const Sinh_luu: Key = ffi::GDK_KEY_Sinh_luu as u32; - pub const Sinh_e: Key = ffi::GDK_KEY_Sinh_e as u32; - pub const Sinh_ee: Key = ffi::GDK_KEY_Sinh_ee as u32; - pub const Sinh_ai: Key = ffi::GDK_KEY_Sinh_ai as u32; - pub const Sinh_o: Key = ffi::GDK_KEY_Sinh_o as u32; - pub const Sinh_oo: Key = ffi::GDK_KEY_Sinh_oo as u32; - pub const Sinh_au: Key = ffi::GDK_KEY_Sinh_au as u32; - pub const Sinh_ka: Key = ffi::GDK_KEY_Sinh_ka as u32; - pub const Sinh_kha: Key = ffi::GDK_KEY_Sinh_kha as u32; - pub const Sinh_ga: Key = ffi::GDK_KEY_Sinh_ga as u32; - pub const Sinh_gha: Key = ffi::GDK_KEY_Sinh_gha as u32; - pub const Sinh_ng2: Key = ffi::GDK_KEY_Sinh_ng2 as u32; - pub const Sinh_nga: Key = ffi::GDK_KEY_Sinh_nga as u32; - pub const Sinh_ca: Key = ffi::GDK_KEY_Sinh_ca as u32; - pub const Sinh_cha: Key = ffi::GDK_KEY_Sinh_cha as u32; - pub const Sinh_ja: Key = ffi::GDK_KEY_Sinh_ja as u32; - pub const Sinh_jha: Key = ffi::GDK_KEY_Sinh_jha as u32; - pub const Sinh_nya: Key = ffi::GDK_KEY_Sinh_nya as u32; - pub const Sinh_jnya: Key = ffi::GDK_KEY_Sinh_jnya as u32; - pub const Sinh_nja: Key = ffi::GDK_KEY_Sinh_nja as u32; - pub const Sinh_tta: Key = ffi::GDK_KEY_Sinh_tta as u32; - pub const Sinh_ttha: Key = ffi::GDK_KEY_Sinh_ttha as u32; - pub const Sinh_dda: Key = ffi::GDK_KEY_Sinh_dda as u32; - pub const Sinh_ddha: Key = ffi::GDK_KEY_Sinh_ddha as u32; - pub const Sinh_nna: Key = ffi::GDK_KEY_Sinh_nna as u32; - pub const Sinh_ndda: Key = ffi::GDK_KEY_Sinh_ndda as u32; - pub const Sinh_tha: Key = ffi::GDK_KEY_Sinh_tha as u32; - pub const Sinh_thha: Key = ffi::GDK_KEY_Sinh_thha as u32; - pub const Sinh_dha: Key = ffi::GDK_KEY_Sinh_dha as u32; - pub const Sinh_dhha: Key = ffi::GDK_KEY_Sinh_dhha as u32; - pub const Sinh_na: Key = ffi::GDK_KEY_Sinh_na as u32; - pub const Sinh_ndha: Key = ffi::GDK_KEY_Sinh_ndha as u32; - pub const Sinh_pa: Key = ffi::GDK_KEY_Sinh_pa as u32; - pub const Sinh_pha: Key = ffi::GDK_KEY_Sinh_pha as u32; - pub const Sinh_ba: Key = ffi::GDK_KEY_Sinh_ba as u32; - pub const Sinh_bha: Key = ffi::GDK_KEY_Sinh_bha as u32; - pub const Sinh_ma: Key = ffi::GDK_KEY_Sinh_ma as u32; - pub const Sinh_mba: Key = ffi::GDK_KEY_Sinh_mba as u32; - pub const Sinh_ya: Key = ffi::GDK_KEY_Sinh_ya as u32; - pub const Sinh_ra: Key = ffi::GDK_KEY_Sinh_ra as u32; - pub const Sinh_la: Key = ffi::GDK_KEY_Sinh_la as u32; - pub const Sinh_va: Key = ffi::GDK_KEY_Sinh_va as u32; - pub const Sinh_sha: Key = ffi::GDK_KEY_Sinh_sha as u32; - pub const Sinh_ssha: Key = ffi::GDK_KEY_Sinh_ssha as u32; - pub const Sinh_sa: Key = ffi::GDK_KEY_Sinh_sa as u32; - pub const Sinh_ha: Key = ffi::GDK_KEY_Sinh_ha as u32; - pub const Sinh_lla: Key = ffi::GDK_KEY_Sinh_lla as u32; - pub const Sinh_fa: Key = ffi::GDK_KEY_Sinh_fa as u32; - pub const Sinh_al: Key = ffi::GDK_KEY_Sinh_al as u32; - pub const Sinh_aa2: Key = ffi::GDK_KEY_Sinh_aa2 as u32; - pub const Sinh_ae2: Key = ffi::GDK_KEY_Sinh_ae2 as u32; - pub const Sinh_aee2: Key = ffi::GDK_KEY_Sinh_aee2 as u32; - pub const Sinh_i2: Key = ffi::GDK_KEY_Sinh_i2 as u32; - pub const Sinh_ii2: Key = ffi::GDK_KEY_Sinh_ii2 as u32; - pub const Sinh_u2: Key = ffi::GDK_KEY_Sinh_u2 as u32; - pub const Sinh_uu2: Key = ffi::GDK_KEY_Sinh_uu2 as u32; - pub const Sinh_ru2: Key = ffi::GDK_KEY_Sinh_ru2 as u32; - pub const Sinh_e2: Key = ffi::GDK_KEY_Sinh_e2 as u32; - pub const Sinh_ee2: Key = ffi::GDK_KEY_Sinh_ee2 as u32; - pub const Sinh_ai2: Key = ffi::GDK_KEY_Sinh_ai2 as u32; - pub const Sinh_o2: Key = ffi::GDK_KEY_Sinh_o2 as u32; - pub const Sinh_oo2: Key = ffi::GDK_KEY_Sinh_oo2 as u32; - pub const Sinh_au2: Key = ffi::GDK_KEY_Sinh_au2 as u32; - pub const Sinh_lu2: Key = ffi::GDK_KEY_Sinh_lu2 as u32; - pub const Sinh_ruu2: Key = ffi::GDK_KEY_Sinh_ruu2 as u32; - pub const Sinh_luu2: Key = ffi::GDK_KEY_Sinh_luu2 as u32; - pub const Sinh_kunddaliya: Key = ffi::GDK_KEY_Sinh_kunddaliya as u32; - pub const ModeLock: Key = ffi::GDK_KEY_ModeLock as u32; - pub const MonBrightnessUp: Key = ffi::GDK_KEY_MonBrightnessUp as u32; - pub const MonBrightnessDown: Key = ffi::GDK_KEY_MonBrightnessDown as u32; - pub const KbdLightOnOff: Key = ffi::GDK_KEY_KbdLightOnOff as u32; - pub const KbdBrightnessUp: Key = ffi::GDK_KEY_KbdBrightnessUp as u32; - pub const KbdBrightnessDown: Key = ffi::GDK_KEY_KbdBrightnessDown as u32; - pub const Standby: Key = ffi::GDK_KEY_Standby as u32; - pub const AudioLowerVolume: Key = ffi::GDK_KEY_AudioLowerVolume as u32; - pub const AudioMute: Key = ffi::GDK_KEY_AudioMute as u32; - pub const AudioRaiseVolume: Key = ffi::GDK_KEY_AudioRaiseVolume as u32; - pub const AudioPlay: Key = ffi::GDK_KEY_AudioPlay as u32; - pub const AudioStop: Key = ffi::GDK_KEY_AudioStop as u32; - pub const AudioPrev: Key = ffi::GDK_KEY_AudioPrev as u32; - pub const AudioNext: Key = ffi::GDK_KEY_AudioNext as u32; - pub const HomePage: Key = ffi::GDK_KEY_HomePage as u32; - pub const Mail: Key = ffi::GDK_KEY_Mail as u32; - pub const Start: Key = ffi::GDK_KEY_Start as u32; - pub const Search: Key = ffi::GDK_KEY_Search as u32; - pub const AudioRecord: Key = ffi::GDK_KEY_AudioRecord as u32; - pub const Calculator: Key = ffi::GDK_KEY_Calculator as u32; - pub const Memo: Key = ffi::GDK_KEY_Memo as u32; - pub const ToDoList: Key = ffi::GDK_KEY_ToDoList as u32; - pub const Calendar: Key = ffi::GDK_KEY_Calendar as u32; - pub const PowerDown: Key = ffi::GDK_KEY_PowerDown as u32; - pub const ContrastAdjust: Key = ffi::GDK_KEY_ContrastAdjust as u32; - pub const RockerUp: Key = ffi::GDK_KEY_RockerUp as u32; - pub const RockerDown: Key = ffi::GDK_KEY_RockerDown as u32; - pub const RockerEnter: Key = ffi::GDK_KEY_RockerEnter as u32; - pub const Back: Key = ffi::GDK_KEY_Back as u32; - pub const Forward: Key = ffi::GDK_KEY_Forward as u32; - pub const Stop: Key = ffi::GDK_KEY_Stop as u32; - pub const Refresh: Key = ffi::GDK_KEY_Refresh as u32; - pub const PowerOff: Key = ffi::GDK_KEY_PowerOff as u32; - pub const WakeUp: Key = ffi::GDK_KEY_WakeUp as u32; - pub const Eject: Key = ffi::GDK_KEY_Eject as u32; - pub const ScreenSaver: Key = ffi::GDK_KEY_ScreenSaver as u32; - pub const WWW: Key = ffi::GDK_KEY_WWW as u32; - pub const Sleep: Key = ffi::GDK_KEY_Sleep as u32; - pub const Favorites: Key = ffi::GDK_KEY_Favorites as u32; - pub const AudioPause: Key = ffi::GDK_KEY_AudioPause as u32; - pub const AudioMedia: Key = ffi::GDK_KEY_AudioMedia as u32; - pub const MyComputer: Key = ffi::GDK_KEY_MyComputer as u32; - pub const VendorHome: Key = ffi::GDK_KEY_VendorHome as u32; - pub const LightBulb: Key = ffi::GDK_KEY_LightBulb as u32; - pub const Shop: Key = ffi::GDK_KEY_Shop as u32; - pub const History: Key = ffi::GDK_KEY_History as u32; - pub const OpenURL: Key = ffi::GDK_KEY_OpenURL as u32; - pub const AddFavorite: Key = ffi::GDK_KEY_AddFavorite as u32; - pub const HotLinks: Key = ffi::GDK_KEY_HotLinks as u32; - pub const BrightnessAdjust: Key = ffi::GDK_KEY_BrightnessAdjust as u32; - pub const Finance: Key = ffi::GDK_KEY_Finance as u32; - pub const Community: Key = ffi::GDK_KEY_Community as u32; - pub const AudioRewind: Key = ffi::GDK_KEY_AudioRewind as u32; - pub const BackForward: Key = ffi::GDK_KEY_BackForward as u32; - pub const Launch0: Key = ffi::GDK_KEY_Launch0 as u32; - pub const Launch1: Key = ffi::GDK_KEY_Launch1 as u32; - pub const Launch2: Key = ffi::GDK_KEY_Launch2 as u32; - pub const Launch3: Key = ffi::GDK_KEY_Launch3 as u32; - pub const Launch4: Key = ffi::GDK_KEY_Launch4 as u32; - pub const Launch5: Key = ffi::GDK_KEY_Launch5 as u32; - pub const Launch6: Key = ffi::GDK_KEY_Launch6 as u32; - pub const Launch7: Key = ffi::GDK_KEY_Launch7 as u32; - pub const Launch8: Key = ffi::GDK_KEY_Launch8 as u32; - pub const Launch9: Key = ffi::GDK_KEY_Launch9 as u32; - pub const LaunchA: Key = ffi::GDK_KEY_LaunchA as u32; - pub const LaunchB: Key = ffi::GDK_KEY_LaunchB as u32; - pub const LaunchC: Key = ffi::GDK_KEY_LaunchC as u32; - pub const LaunchD: Key = ffi::GDK_KEY_LaunchD as u32; - pub const LaunchE: Key = ffi::GDK_KEY_LaunchE as u32; - pub const LaunchF: Key = ffi::GDK_KEY_LaunchF as u32; - pub const ApplicationLeft: Key = ffi::GDK_KEY_ApplicationLeft as u32; - pub const ApplicationRight: Key = ffi::GDK_KEY_ApplicationRight as u32; - pub const Book: Key = ffi::GDK_KEY_Book as u32; - pub const CD: Key = ffi::GDK_KEY_CD as u32; - pub const WindowClear: Key = ffi::GDK_KEY_WindowClear as u32; - pub const Close: Key = ffi::GDK_KEY_Close as u32; - pub const Copy: Key = ffi::GDK_KEY_Copy as u32; - pub const Cut: Key = ffi::GDK_KEY_Cut as u32; - pub const Display: Key = ffi::GDK_KEY_Display as u32; - pub const DOS: Key = ffi::GDK_KEY_DOS as u32; - pub const Documents: Key = ffi::GDK_KEY_Documents as u32; - pub const Excel: Key = ffi::GDK_KEY_Excel as u32; - pub const Explorer: Key = ffi::GDK_KEY_Explorer as u32; - pub const Game: Key = ffi::GDK_KEY_Game as u32; - pub const Go: Key = ffi::GDK_KEY_Go as u32; - pub const iTouch: Key = ffi::GDK_KEY_iTouch as u32; - pub const LogOff: Key = ffi::GDK_KEY_LogOff as u32; - pub const Market: Key = ffi::GDK_KEY_Market as u32; - pub const Meeting: Key = ffi::GDK_KEY_Meeting as u32; - pub const MenuKB: Key = ffi::GDK_KEY_MenuKB as u32; - pub const MenuPB: Key = ffi::GDK_KEY_MenuPB as u32; - pub const MySites: Key = ffi::GDK_KEY_MySites as u32; - pub const New: Key = ffi::GDK_KEY_New as u32; - pub const News: Key = ffi::GDK_KEY_News as u32; - pub const OfficeHome: Key = ffi::GDK_KEY_OfficeHome as u32; - pub const Open: Key = ffi::GDK_KEY_Open as u32; - pub const Option: Key = ffi::GDK_KEY_Option as u32; - pub const Paste: Key = ffi::GDK_KEY_Paste as u32; - pub const Phone: Key = ffi::GDK_KEY_Phone as u32; - pub const Reply: Key = ffi::GDK_KEY_Reply as u32; - pub const Reload: Key = ffi::GDK_KEY_Reload as u32; - pub const RotateWindows: Key = ffi::GDK_KEY_RotateWindows as u32; - pub const RotationPB: Key = ffi::GDK_KEY_RotationPB as u32; - pub const RotationKB: Key = ffi::GDK_KEY_RotationKB as u32; - pub const Save: Key = ffi::GDK_KEY_Save as u32; - pub const ScrollUp: Key = ffi::GDK_KEY_ScrollUp as u32; - pub const ScrollDown: Key = ffi::GDK_KEY_ScrollDown as u32; - pub const ScrollClick: Key = ffi::GDK_KEY_ScrollClick as u32; - pub const Send: Key = ffi::GDK_KEY_Send as u32; - pub const Spell: Key = ffi::GDK_KEY_Spell as u32; - pub const SplitScreen: Key = ffi::GDK_KEY_SplitScreen as u32; - pub const Support: Key = ffi::GDK_KEY_Support as u32; - pub const TaskPane: Key = ffi::GDK_KEY_TaskPane as u32; - pub const Terminal: Key = ffi::GDK_KEY_Terminal as u32; - pub const Tools: Key = ffi::GDK_KEY_Tools as u32; - pub const Travel: Key = ffi::GDK_KEY_Travel as u32; - pub const UserPB: Key = ffi::GDK_KEY_UserPB as u32; - pub const User1KB: Key = ffi::GDK_KEY_User1KB as u32; - pub const User2KB: Key = ffi::GDK_KEY_User2KB as u32; - pub const Video: Key = ffi::GDK_KEY_Video as u32; - pub const WheelButton: Key = ffi::GDK_KEY_WheelButton as u32; - pub const Word: Key = ffi::GDK_KEY_Word as u32; - pub const Xfer: Key = ffi::GDK_KEY_Xfer as u32; - pub const ZoomIn: Key = ffi::GDK_KEY_ZoomIn as u32; - pub const ZoomOut: Key = ffi::GDK_KEY_ZoomOut as u32; - pub const Away: Key = ffi::GDK_KEY_Away as u32; - pub const Messenger: Key = ffi::GDK_KEY_Messenger as u32; - pub const WebCam: Key = ffi::GDK_KEY_WebCam as u32; - pub const MailForward: Key = ffi::GDK_KEY_MailForward as u32; - pub const Pictures: Key = ffi::GDK_KEY_Pictures as u32; - pub const Music: Key = ffi::GDK_KEY_Music as u32; - pub const Battery: Key = ffi::GDK_KEY_Battery as u32; - pub const Bluetooth: Key = ffi::GDK_KEY_Bluetooth as u32; - pub const WLAN: Key = ffi::GDK_KEY_WLAN as u32; - pub const UWB: Key = ffi::GDK_KEY_UWB as u32; - pub const AudioForward: Key = ffi::GDK_KEY_AudioForward as u32; - pub const AudioRepeat: Key = ffi::GDK_KEY_AudioRepeat as u32; - pub const AudioRandomPlay: Key = ffi::GDK_KEY_AudioRandomPlay as u32; - pub const Subtitle: Key = ffi::GDK_KEY_Subtitle as u32; - pub const AudioCycleTrack: Key = ffi::GDK_KEY_AudioCycleTrack as u32; - pub const CycleAngle: Key = ffi::GDK_KEY_CycleAngle as u32; - pub const FrameBack: Key = ffi::GDK_KEY_FrameBack as u32; - pub const FrameForward: Key = ffi::GDK_KEY_FrameForward as u32; - pub const Time: Key = ffi::GDK_KEY_Time as u32; - pub const SelectButton: Key = ffi::GDK_KEY_SelectButton as u32; - pub const View: Key = ffi::GDK_KEY_View as u32; - pub const TopMenu: Key = ffi::GDK_KEY_TopMenu as u32; - pub const Red: Key = ffi::GDK_KEY_Red as u32; - pub const Green: Key = ffi::GDK_KEY_Green as u32; - pub const Yellow: Key = ffi::GDK_KEY_Yellow as u32; - pub const Blue: Key = ffi::GDK_KEY_Blue as u32; - pub const Suspend: Key = ffi::GDK_KEY_Suspend as u32; - pub const Hibernate: Key = ffi::GDK_KEY_Hibernate as u32; - pub const TouchpadToggle: Key = ffi::GDK_KEY_TouchpadToggle as u32; - pub const TouchpadOn: Key = ffi::GDK_KEY_TouchpadOn as u32; - pub const TouchpadOff: Key = ffi::GDK_KEY_TouchpadOff as u32; - pub const AudioMicMute: Key = ffi::GDK_KEY_AudioMicMute as u32; - pub const Switch_VT_1: Key = ffi::GDK_KEY_Switch_VT_1 as u32; - pub const Switch_VT_2: Key = ffi::GDK_KEY_Switch_VT_2 as u32; - pub const Switch_VT_3: Key = ffi::GDK_KEY_Switch_VT_3 as u32; - pub const Switch_VT_4: Key = ffi::GDK_KEY_Switch_VT_4 as u32; - pub const Switch_VT_5: Key = ffi::GDK_KEY_Switch_VT_5 as u32; - pub const Switch_VT_6: Key = ffi::GDK_KEY_Switch_VT_6 as u32; - pub const Switch_VT_7: Key = ffi::GDK_KEY_Switch_VT_7 as u32; - pub const Switch_VT_8: Key = ffi::GDK_KEY_Switch_VT_8 as u32; - pub const Switch_VT_9: Key = ffi::GDK_KEY_Switch_VT_9 as u32; - pub const Switch_VT_10: Key = ffi::GDK_KEY_Switch_VT_10 as u32; - pub const Switch_VT_11: Key = ffi::GDK_KEY_Switch_VT_11 as u32; - pub const Switch_VT_12: Key = ffi::GDK_KEY_Switch_VT_12 as u32; - pub const Ungrab: Key = ffi::GDK_KEY_Ungrab as u32; - pub const ClearGrab: Key = ffi::GDK_KEY_ClearGrab as u32; - pub const Next_VMode: Key = ffi::GDK_KEY_Next_VMode as u32; - pub const Prev_VMode: Key = ffi::GDK_KEY_Prev_VMode as u32; - pub const LogWindowTree: Key = ffi::GDK_KEY_LogWindowTree as u32; - pub const LogGrabInfo: Key = ffi::GDK_KEY_LogGrabInfo as u32; -} diff --git a/src/event.rs b/src/event.rs deleted file mode 100644 index 31fc62c2e108..000000000000 --- a/src/event.rs +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright 2015-2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use libc::c_void; -use glib::translate::*; -use ffi; - -use glib_ffi; -use std::ptr; -use std::mem; -use std::fmt; - -use AxisUse; -use Device; -#[cfg(any(feature = "v3_22", feature = "dox"))] -use DeviceTool; -use EventType; -use EventSequence; -use ModifierType; -use ScrollDirection; -#[cfg(any(feature = "v3_20", feature = "dox"))] -use Seat; -use Screen; -use Window; - -glib_wrapper! { - /// A generic GDK event. - #[derive(PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct Event(Boxed); - - match fn { - copy => |ptr| ffi::gdk_event_copy(ptr), - free => |ptr| ffi::gdk_event_free(ptr), - get_type => || ffi::gdk_event_get_type(), - } -} - -impl Event { - /// Creates a new event. - pub fn new(type_: EventType) -> Event { - assert_initialized_main_thread!(); - unsafe { from_glib_none(ffi::gdk_event_new(type_.to_glib())) } - } - - pub fn get() -> Option { - assert_initialized_main_thread!(); - unsafe { from_glib_none(ffi::gdk_event_get()) } - } - - pub fn put(&self) { - unsafe { ffi::gdk_event_put(self.to_glib_none().0) } - } - - /// Set the event handler. - /// - /// The callback `handler` is called for each event. If `None`, event - /// handling is disabled. - pub fn set_handler(handler: Option) { - assert_initialized_main_thread!(); - if let Some(handler) = handler { - // allocate and convert to target type - // double box to reduce a fat pointer to a simple pointer - let boxed: Box = Box::new(handler); - let ptr: *mut c_void = Box::into_raw(boxed) as *mut _; - unsafe { - ffi::gdk_event_handler_set( - Some(event_handler_trampoline::), - ptr, - Some(event_handler_destroy::)) - } - } else { - unsafe { ffi::gdk_event_handler_set(None, ptr::null_mut(), None) } - } - } - - pub fn get_axis(&self, axis_use: AxisUse) -> Option { - let mut value = 0f64; - if unsafe { - from_glib(ffi::gdk_event_get_axis(self.to_glib_none().0, - axis_use.to_glib(), - &mut value)) - } { - Some(value) - } else { - None - } - } - - pub fn get_button(&self) -> Option { - let mut button = 0u32; - if unsafe { - from_glib(ffi::gdk_event_get_button(self.to_glib_none().0, &mut button)) - } { - Some(button) - } else { - None - } - } - - pub fn get_click_count(&self) -> Option { - let mut click_count = 0u32; - if unsafe { - from_glib(ffi::gdk_event_get_click_count(self.to_glib_none().0, &mut click_count)) - } { - Some(click_count) - } else { - None - } - } - - pub fn get_coords(&self) -> Option<(f64, f64)> { - let mut x_win = 0f64; - let mut y_win = 0f64; - if unsafe { - from_glib(ffi::gdk_event_get_coords(self.to_glib_none().0, &mut x_win, &mut y_win)) - } { - Some((x_win, y_win)) - } else { - None - } - } - - pub fn get_keycode(&self) -> Option { - let mut keycode = 0u16; - if unsafe { - from_glib(ffi::gdk_event_get_keycode(self.to_glib_none().0, &mut keycode)) - } { - Some(keycode) - } else { - None - } - } - - pub fn get_keyval(&self) -> Option { - let mut keyval = 0u32; - if unsafe { - from_glib(ffi::gdk_event_get_keyval(self.to_glib_none().0, &mut keyval)) - } { - Some(keyval) - } else { - None - } - } - - pub fn get_root_coords(&self) -> Option<(f64, f64)> { - let mut x_root = 0f64; - let mut y_root = 0f64; - if unsafe { - from_glib(ffi::gdk_event_get_root_coords(self.to_glib_none().0, - &mut x_root, - &mut y_root)) - } { - Some((x_root, y_root)) - } else { - None - } - } - - pub fn get_scroll_direction(&self) -> Option { - unsafe { - let mut direction = mem::uninitialized(); - if from_glib(ffi::gdk_event_get_scroll_direction(self.to_glib_none().0, - &mut direction)) { - Some(from_glib(direction)) - } else { - None - } - } - } - - pub fn get_scroll_deltas(&self) -> Option<(f64, f64)> { - let mut delta_x = 0f64; - let mut delta_y = 0f64; - if unsafe { - from_glib(ffi::gdk_event_get_scroll_deltas(self.to_glib_none().0, - &mut delta_x, - &mut delta_y)) - } { - Some((delta_x, delta_y)) - } else { - None - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn is_scroll_stop_event(&self) -> bool { - unsafe { - from_glib(ffi::gdk_event_is_scroll_stop_event(self.to_glib_none().0)) - } - } - - pub fn get_state(&self) -> Option { - unsafe { - let mut state = mem::uninitialized(); - if from_glib(ffi::gdk_event_get_scroll_direction(self.to_glib_none().0, - &mut state)) { - Some(from_glib(state as u32)) - } else { - None - } - } - } - - pub fn get_time(&self) -> u32 { - unsafe { - ffi::gdk_event_get_time(self.to_glib_none().0) - } - } - - /// Returns the associated `Window` if applicable. - pub fn get_window(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_window(self.to_glib_none().0)) - } - } - - pub fn get_event_sequence(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_event_sequence(self.to_glib_none().0)) - } - } - - pub fn triggers_context_menu(&self) -> bool { - unsafe { - from_glib(ffi::gdk_event_triggers_context_menu(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_20", feature = "dox"))] - pub fn get_seat(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_seat(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_scancode(&mut self) -> i32 { - unsafe { - ffi::gdk_event_get_scancode(self.to_glib_none_mut().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_pointer_emulated(&mut self) -> bool { - unsafe { - from_glib(ffi::gdk_event_get_pointer_emulated(self.to_glib_none_mut().0)) - } - } - - pub fn set_screen(&mut self, screen: Option<&Screen>) { - unsafe { - ffi::gdk_event_set_screen(self.to_glib_none_mut().0, screen.to_glib_none().0) - } - } - - pub fn get_screen(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_screen(self.to_glib_none().0)) - } - } - - pub fn set_device(&mut self, device: Option<&Device>) { - unsafe { - ffi::gdk_event_set_device(self.to_glib_none_mut().0, device.to_glib_none().0) - } - } - - pub fn get_device(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_device(self.to_glib_none().0)) - } - } - - pub fn set_source_device(&mut self, device: Option<&Device>) { - unsafe { - ffi::gdk_event_set_source_device(self.to_glib_none_mut().0, device.to_glib_none().0) - } - } - - pub fn get_source_device(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_source_device(self.to_glib_none().0)) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn set_device_tool(&mut self, device: Option<&DeviceTool>) { - unsafe { - ffi::gdk_event_set_device_tool(self.to_glib_none_mut().0, device.to_glib_none().0) - } - } - - #[cfg(any(feature = "v3_22", feature = "dox"))] - pub fn get_device_tool(&self) -> Option { - unsafe { - from_glib_none(ffi::gdk_event_get_device_tool(self.to_glib_none().0)) - } - } - - /// Returns the event type. - pub fn get_event_type(&self) -> EventType { - from_glib(self.as_ref().type_) - } - - /// Returns whether the event was sent explicitly. - #[cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] - pub fn get_send_event(&self) -> bool { - from_glib(self.as_ref().send_event as i32) - } - - /// Returns `true` if the event type matches `T`. - pub fn is(&self) -> bool { - T::is(self) - } - - /// Tries to downcast to a specific event type. - pub fn downcast(self) -> Result { - T::from(self) - } - - /// Tries to downcast to a specific event type. - pub fn downcast_ref(&self) -> Option<&T> { - if T::is(self) { - unsafe { - Some(mem::transmute::<&Event, &T>(self)) - } - } else { - None - } - } - - /// Tries to downcast to a specific event type. - pub fn downcast_mut(&mut self) -> Option<&mut T> { - if T::is(self) { - unsafe { - Some(mem::transmute::<&mut Event, &mut T>(self)) - } - } else { - None - } - } -} - -impl fmt::Debug for Event { - fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { - fmt.debug_struct("Event") - .field("inner", &self.0) - .field("type", &self.get_event_type()) - .finish() - } -} - -/// A helper trait implemented by all event subtypes. -pub trait FromEvent: Sized { - fn is(ev: &Event) -> bool; - fn from(ev: Event) -> Result; -} - -macro_rules! event_wrapper { - ($name:ident, $ffi_name:ident) => { - impl<'a> ToGlibPtr<'a, *const ::ffi::$ffi_name> for $name { - type Storage = &'a Self; - - #[inline] - fn to_glib_none(&'a self) -> Stash<'a, *const ::ffi::$ffi_name, Self> { - let ptr = ToGlibPtr::<*const ::ffi::GdkEvent>::to_glib_none(&self.0).0; - Stash(ptr as *const ::ffi::$ffi_name, self) - } - } - - impl<'a> ToGlibPtrMut<'a, *mut ::ffi::$ffi_name> for $name { - type Storage = &'a mut Self; - - #[inline] - fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ::ffi::$ffi_name, Self> { - let ptr = ToGlibPtrMut::<*mut ::ffi::GdkEvent>::to_glib_none_mut(&mut self.0).0; - StashMut(ptr as *mut ::ffi::$ffi_name, self) - } - } - - impl FromGlibPtrNone<*mut ::ffi::$ffi_name> for $name { - #[inline] - unsafe fn from_glib_none(ptr: *mut ::ffi::$ffi_name) -> Self { - $name(from_glib_none(ptr as *mut ::ffi::GdkEvent)) - } - } - - impl FromGlibPtrBorrow<*mut ::ffi::$ffi_name> for $name { - #[inline] - unsafe fn from_glib_borrow(ptr: *mut ::ffi::$ffi_name) -> Self { - $name(from_glib_borrow(ptr as *mut ::ffi::GdkEvent)) - } - } - - impl FromGlibPtrFull<*mut ::ffi::$ffi_name> for $name { - #[inline] - unsafe fn from_glib_full(ptr: *mut ::ffi::$ffi_name) -> Self { - $name(from_glib_full(ptr as *mut ::ffi::GdkEvent)) - } - } - - impl AsRef<::ffi::$ffi_name> for $name { - #[inline] - fn as_ref(&self) -> &::ffi::$ffi_name { - unsafe { - let ptr: *const ::ffi::$ffi_name = self.to_glib_none().0; - &*ptr - } - } - } - - impl AsMut<::ffi::$ffi_name> for $name { - #[inline] - fn as_mut(&mut self) -> &mut ::ffi::$ffi_name { - unsafe { - let ptr: *mut ::ffi::$ffi_name = self.to_glib_none_mut().0; - &mut *ptr - } - } - } - } -} - -event_wrapper!(Event, GdkEventAny); - -macro_rules! event_subtype { - ($name:ident, $($ty:path)|+) => { - impl ::event::FromEvent for $name { - #[inline] - fn is(ev: &::event::Event) -> bool { - skip_assert_initialized!(); - match ev.as_ref().type_ { - $($ty)|+ => true, - _ => false, - } - } - - #[inline] - fn from(ev: ::event::Event) -> Result { - skip_assert_initialized!(); - if Self::is(&ev) { - Ok($name(ev)) - } - else { - Err(ev) - } - } - } - - impl ::std::ops::Deref for $name { - type Target = ::event::Event; - - fn deref(&self) -> &::event::Event { - &self.0 - } - } - - impl ::std::ops::DerefMut for $name { - fn deref_mut(&mut self) -> &mut ::event::Event { - &mut self.0 - } - } - } -} - -unsafe extern "C" fn event_handler_trampoline(event: *mut ffi::GdkEvent, ptr: glib_ffi::gpointer) { - if ptr != ptr::null_mut() { - let f: &F = &*(ptr as *mut _); - let mut event = from_glib_none(event); - f(&mut event) - } -} - -unsafe extern "C" fn event_handler_destroy(ptr: glib_ffi::gpointer) { - if ptr != ptr::null_mut() { - // convert back to Box and free - let _boxed: Box = Box::from_raw(ptr as *mut _); - } -} diff --git a/src/event_button.rs b/src/event_button.rs deleted file mode 100644 index ed80042542f5..000000000000 --- a/src/event_button.rs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventButton(::Event); - -event_wrapper!(EventButton, GdkEventButton); -event_subtype!(EventButton, ffi::GDK_BUTTON_PRESS | ffi::GDK_DOUBLE_BUTTON_PRESS | ffi::GDK_TRIPLE_BUTTON_PRESS | ffi::GDK_BUTTON_RELEASE); - -impl EventButton { - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_button(&self) -> u32 { - self.as_ref().button - } - - pub fn get_device(&self) -> Option<::Device> { - unsafe { from_glib_none(self.as_ref().device) } - } - - pub fn get_axes(&self) -> Option<(f64, f64)> { - let axes = self.as_ref().axes; - - if axes.is_null() { - None - } else { - unsafe { Some((*axes, *axes.offset(1))) } - } - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } -} diff --git a/src/event_configure.rs b/src/event_configure.rs deleted file mode 100644 index 40bbbfec3025..000000000000 --- a/src/event_configure.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventConfigure(::Event); - -event_wrapper!(EventConfigure, GdkEventConfigure); -event_subtype!(EventConfigure, ffi::GDK_CONFIGURE); - -impl EventConfigure { - pub fn get_position(&self) -> (i32, i32) { - (self.as_ref().x, self.as_ref().y) - } - - pub fn get_size(&self) -> (u32, u32) { - let width = self.as_ref().width; - let height = self.as_ref().height; - assert!(width >= 0 && height >= 0, "Unexpected negative value"); - (width as u32, height as u32) - } -} diff --git a/src/event_crossing.rs b/src/event_crossing.rs deleted file mode 100644 index 20f26c1f001f..000000000000 --- a/src/event_crossing.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventCrossing(::Event); - -event_wrapper!(EventCrossing, GdkEventCrossing); -event_subtype!(EventCrossing, ffi::GDK_ENTER_NOTIFY | ffi::GDK_LEAVE_NOTIFY); - -impl EventCrossing { - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_subwindow(&self) -> Option<::Window> { - unsafe { from_glib_none(self.as_ref().subwindow) } - } - - pub fn get_mode(&self) -> ::CrossingMode { - from_glib(self.as_ref().mode) - } - - pub fn get_detail(&self) -> ::NotifyType { - from_glib(self.as_ref().detail) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } - - pub fn get_focus(&self) -> bool { - from_glib(self.as_ref().focus) - } -} diff --git a/src/event_dnd.rs b/src/event_dnd.rs deleted file mode 100644 index 7866cad510b2..000000000000 --- a/src/event_dnd.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventDND(::Event); - -event_wrapper!(EventDND, GdkEventDND); -event_subtype!(EventDND, ffi::GDK_DRAG_ENTER | ffi::GDK_DRAG_LEAVE | ffi::GDK_DRAG_MOTION | ffi::GDK_DRAG_STATUS | ffi::GDK_DROP_START | ffi::GDK_DROP_FINISHED); - -impl EventDND { - pub fn get_context(&self) -> Option<::DragContext> { - unsafe { from_glib_none(self.as_ref().context) } - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_root(&self) -> (i16, i16) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } -} diff --git a/src/event_expose.rs b/src/event_expose.rs deleted file mode 100644 index a1531ae44523..000000000000 --- a/src/event_expose.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use cairo; -use glib::translate::*; -use ffi; -use Rectangle; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventExpose(::Event); - -event_wrapper!(EventExpose, GdkEventExpose); -event_subtype!(EventExpose, ffi::GDK_EXPOSE | ffi::GDK_DAMAGE); - -impl EventExpose { - pub fn get_region(&self) -> Option { - unsafe { from_glib_none(self.as_ref().region) } - } - - pub fn get_count(&self) -> u32 { - self.as_ref().count as u32 - } - - pub fn get_area(&self) -> Rectangle { - unsafe { from_glib_none(&self.as_ref().area as *const _) } - } -} diff --git a/src/event_focus.rs b/src/event_focus.rs deleted file mode 100644 index 20e59d59d561..000000000000 --- a/src/event_focus.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventFocus(::Event); - -event_wrapper!(EventFocus, GdkEventFocus); -event_subtype!(EventFocus, ffi::GDK_FOCUS_CHANGE); - -impl EventFocus { - pub fn get_in(&self) -> bool { - from_glib(self.as_ref().in_ as _) - } -} diff --git a/src/event_grab_broken.rs b/src/event_grab_broken.rs deleted file mode 100644 index c738f1083107..000000000000 --- a/src/event_grab_broken.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventGrabBroken(::Event); - -event_wrapper!(EventGrabBroken, GdkEventGrabBroken); -event_subtype!(EventGrabBroken, ffi::GDK_GRAB_BROKEN); - -impl EventGrabBroken { - pub fn is_keyboard(&self) -> bool { - from_glib(self.as_ref().keyboard) - } - - pub fn is_implicit(&self) -> bool { - from_glib(self.as_ref().implicit) - } - - pub fn get_grab_window(&self) -> Option<::Window> { - unsafe { from_glib_none(self.as_ref().grab_window) } - } -} diff --git a/src/event_key.rs b/src/event_key.rs deleted file mode 100644 index 875dbd536101..000000000000 --- a/src/event_key.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventKey(::Event); - -event_wrapper!(EventKey, GdkEventKey); -event_subtype!(EventKey, ffi::GDK_KEY_PRESS | ffi::GDK_KEY_RELEASE); - -impl EventKey { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } - - pub fn get_keyval(&self) -> ::enums::key::Key { - self.as_ref().keyval as ::enums::key::Key - } - - pub fn get_length(&self) -> u32 { - let length = self.as_ref().length; - assert!(length >= 0, "Unexpected negative value"); - length as u32 - } - - pub fn get_hardware_keycode(&self) -> u16 { - self.as_ref().hardware_keycode - } - - pub fn get_group(&self) -> u8 { - self.as_ref().group - } - - // TODO: to be uncommented when the field will be generated - // pub fn get_is_modifier(&self) -> bool { - // from_glib(self.as_ref().is_modifier) - // } -} diff --git a/src/event_motion.rs b/src/event_motion.rs deleted file mode 100644 index 048bf6380826..000000000000 --- a/src/event_motion.rs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventMotion(::Event); - -event_wrapper!(EventMotion, GdkEventMotion); -event_subtype!(EventMotion, ffi::GDK_MOTION_NOTIFY); - -impl EventMotion { - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn request_motions(&self) { - unsafe { ffi::gdk_event_request_motions(self.as_ref()) } - } - - pub fn get_device(&self) -> Option<::Device> { - unsafe { from_glib_none(self.as_ref().device) } - } - - pub fn get_axes(&self) -> Option<(f64, f64)> { - let axes = self.as_ref().axes; - - if axes.is_null() { - None - } else { - unsafe { Some((*axes, *axes.offset(1))) } - } - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } - - pub fn get_is_hint(&self) -> bool { - from_glib(self.as_ref().is_hint as _) - } -} diff --git a/src/event_owner_change.rs b/src/event_owner_change.rs deleted file mode 100644 index 4a10b4a8b946..000000000000 --- a/src/event_owner_change.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventOwnerChange(::Event); - -event_wrapper!(EventOwnerChange, GdkEventOwnerChange); -event_subtype!(EventOwnerChange, ffi::GDK_OWNER_CHANGE); - -impl EventOwnerChange { - pub fn get_owner(&self) -> Option<::Window> { - unsafe { from_glib_none(self.as_ref().owner) } - } - - pub fn get_reason(&self) -> ::OwnerChange { - from_glib(self.as_ref().reason) - } - - pub fn get_selection(&self) -> ::Atom { - unsafe { from_glib_none(self.as_ref().selection as *mut _) } - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_selection_time(&self) -> u32 { - self.as_ref().selection_time - } -} diff --git a/src/event_pad_axis.rs b/src/event_pad_axis.rs deleted file mode 100644 index cc715527dcd8..000000000000 --- a/src/event_pad_axis.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventPadAxis(::Event); - -event_wrapper!(EventPadAxis, GdkEventPadAxis); -event_subtype!(EventPadAxis, ffi::GDK_PAD_RING | ffi::GDK_PAD_STRIP); - -impl EventPadAxis { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_group(&self) -> u32 { - self.as_ref().group - } - - pub fn get_index(&self) -> u32 { - self.as_ref().index - } - - pub fn get_mode(&self) -> u32 { - self.as_ref().mode - } - - pub fn get_value(&self) -> f64 { - self.as_ref().value - } -} diff --git a/src/event_pad_button.rs b/src/event_pad_button.rs deleted file mode 100644 index d9786b0ac114..000000000000 --- a/src/event_pad_button.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventPadButton(::Event); - -event_wrapper!(EventPadButton, GdkEventPadButton); -event_subtype!(EventPadButton, ffi::GDK_PAD_BUTTON_PRESS | ffi::GDK_PAD_BUTTON_RELEASE); - -impl EventPadButton { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_group(&self) -> u32 { - self.as_ref().group - } - - pub fn get_button(&self) -> u32 { - self.as_ref().button - } - - pub fn get_mode(&self) -> u32 { - self.as_ref().mode - } -} diff --git a/src/event_pad_group_mode.rs b/src/event_pad_group_mode.rs deleted file mode 100644 index c760f1cda041..000000000000 --- a/src/event_pad_group_mode.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventPadGroupMode(::Event); - -event_wrapper!(EventPadGroupMode, GdkEventPadGroupMode); -event_subtype!(EventPadGroupMode, ffi::GDK_PAD_GROUP_MODE); - -impl EventPadGroupMode { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_group(&self) -> u32 { - self.as_ref().group - } - - pub fn get_mode(&self) -> u32 { - self.as_ref().mode - } -} diff --git a/src/event_property.rs b/src/event_property.rs deleted file mode 100644 index 0ee3e89dfb94..000000000000 --- a/src/event_property.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventProperty(::Event); - -event_wrapper!(EventProperty, GdkEventProperty); -event_subtype!(EventProperty, ffi::GDK_PROPERTY_NOTIFY); - -impl EventProperty { - pub fn get_atom(&self) -> ::Atom { - unsafe { from_glib_none(self.as_ref().atom) } - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_state(&self) -> ::PropertyState { - from_glib(self.as_ref().state) - } -} diff --git a/src/event_proximity.rs b/src/event_proximity.rs deleted file mode 100644 index d7728a875ebd..000000000000 --- a/src/event_proximity.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventProximity(::Event); - -event_wrapper!(EventProximity, GdkEventProximity); -event_subtype!(EventProximity, ffi::GDK_PROXIMITY_IN | ffi::GDK_PROXIMITY_OUT); - -impl EventProximity { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_device(&self) -> Option<::Device> { - unsafe { from_glib_none(self.as_ref().device) } - } -} diff --git a/src/event_scroll.rs b/src/event_scroll.rs deleted file mode 100644 index 8db405d98b2a..000000000000 --- a/src/event_scroll.rs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventScroll(::Event); - -event_wrapper!(EventScroll, GdkEventScroll); -event_subtype!(EventScroll, ffi::GDK_SCROLL); - -impl EventScroll { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } - - pub fn get_device(&self) -> Option<::Device> { - unsafe { from_glib_none(self.as_ref().device) } - } - - pub fn get_direction(&self) -> ::ScrollDirection { - from_glib(self.as_ref().direction) - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } - - pub fn get_delta(&self) -> (f64, f64) { - let dx = self.as_ref().delta_x; - let dy = self.as_ref().delta_y; - (dx, dy) - } - - // TODO: to be uncommented when the field will be generated - // pub fn get_is_stop(&self) -> bool { - // from_glib(self.as_ref().is_stop) - // } -} diff --git a/src/event_selection.rs b/src/event_selection.rs deleted file mode 100644 index 5db773671ec2..000000000000 --- a/src/event_selection.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventSelection(::Event); - -event_wrapper!(EventSelection, GdkEventSelection); -event_subtype!(EventSelection, ffi::GDK_SELECTION_CLEAR | ffi::GDK_SELECTION_NOTIFY | ffi::GDK_SELECTION_REQUEST); - -impl EventSelection { - pub fn get_selection(&self) -> ::Atom { - unsafe { from_glib_none(self.as_ref().selection as *mut _) } - } - - pub fn get_target(&self) -> ::Atom { - unsafe { from_glib_none(self.as_ref().target as *mut _) } - } - - pub fn get_property(&self) -> ::Atom { - unsafe { from_glib_none(self.as_ref().property as *mut _) } - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_requestor(&self) -> Option<::Window> { - unsafe { from_glib_none(self.as_ref().requestor) } - } -} diff --git a/src/event_setting.rs b/src/event_setting.rs deleted file mode 100644 index b71e5b7dbf62..000000000000 --- a/src/event_setting.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::GString; -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventSetting(::Event); - -event_wrapper!(EventSetting, GdkEventSetting); -event_subtype!(EventSetting, ffi::GDK_SETTING); - -impl EventSetting { - pub fn get_name(&self) -> Option { - unsafe { from_glib_none(self.as_ref().name) } - } - - pub fn get_action(&self) -> ::SettingAction { - from_glib(self.as_ref().action) - } -} diff --git a/src/event_touch.rs b/src/event_touch.rs deleted file mode 100644 index 37d66395dd82..000000000000 --- a/src/event_touch.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventTouch(::Event); - -event_wrapper!(EventTouch, GdkEventTouch); -event_subtype!(EventTouch, ffi::GDK_TOUCH_BEGIN | ffi::GDK_TOUCH_UPDATE | ffi::GDK_TOUCH_END | ffi::GDK_TOUCH_CANCEL); - -impl EventTouch { - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } - - pub fn is_emulating_pointer(&self) -> bool { - from_glib(self.as_ref().emulating_pointer) - } - - pub fn get_device(&self) -> Option<::Device> { - unsafe { from_glib_none(self.as_ref().device) } - } - - pub fn get_axes(&self) -> Option<(f64, f64)> { - let axes = self.as_ref().axes; - - if axes.is_null() { - None - } else { - unsafe { Some((*axes, *axes.offset(1))) } - } - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } - - pub fn get_event_sequence(&self) -> Option<::EventSequence> { - unsafe { - from_glib_none(self.as_ref().sequence) - } - } -} diff --git a/src/event_touchpad_pinch.rs b/src/event_touchpad_pinch.rs deleted file mode 100644 index d2e067bfd32f..000000000000 --- a/src/event_touchpad_pinch.rs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventTouchpadPinch(::Event); - -event_wrapper!(EventTouchpadPinch, GdkEventTouchpadPinch); -event_subtype!(EventTouchpadPinch, ffi::GDK_TOUCHPAD_PINCH); - -impl EventTouchpadPinch { - pub fn is_phase(&self) -> bool { - from_glib(self.as_ref().phase as _) - } - - pub fn get_n_fingers(&self) -> i8 { - self.as_ref().n_fingers - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_delta(&self) -> (f64, f64) { - let dx = self.as_ref().dx; - let dy = self.as_ref().dy; - (dx, dy) - } - - pub fn get_angle_delta(&self) -> f64 { - self.as_ref().angle_delta - } - - pub fn get_scale(&self) -> f64 { - self.as_ref().scale - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } -} diff --git a/src/event_touchpad_swipe.rs b/src/event_touchpad_swipe.rs deleted file mode 100644 index e80322e27391..000000000000 --- a/src/event_touchpad_swipe.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventTouchpadSwipe(::Event); - -event_wrapper!(EventTouchpadSwipe, GdkEventTouchpadSwipe); -event_subtype!(EventTouchpadSwipe, ffi::GDK_TOUCHPAD_SWIPE); - -impl EventTouchpadSwipe { - pub fn is_phase(&self) -> bool { - from_glib(self.as_ref().phase as _) - } - - pub fn get_n_fingers(&self) -> i8 { - self.as_ref().n_fingers - } - - pub fn get_time(&self) -> u32 { - self.as_ref().time - } - - pub fn get_position(&self) -> (f64, f64) { - let x = self.as_ref().x; - let y = self.as_ref().y; - (x, y) - } - - pub fn get_delta(&self) -> (f64, f64) { - let dx = self.as_ref().dx; - let dy = self.as_ref().dy; - (dx, dy) - } - - pub fn get_root(&self) -> (f64, f64) { - let x_root = self.as_ref().x_root; - let y_root = self.as_ref().y_root; - (x_root, y_root) - } - - pub fn get_state(&self) -> ::ModifierType { - from_glib(self.as_ref().state) - } -} diff --git a/src/event_visibility.rs b/src/event_visibility.rs deleted file mode 100644 index 6ac3cae295da..000000000000 --- a/src/event_visibility.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventVisibility(::Event); - -event_wrapper!(EventVisibility, GdkEventVisibility); -event_subtype!(EventVisibility, ffi::GDK_VISIBILITY_NOTIFY); - -impl EventVisibility { - pub fn get_state(&self) -> ::VisibilityState { - from_glib(self.as_ref().state) - } -} diff --git a/src/event_window_state.rs b/src/event_window_state.rs deleted file mode 100644 index 91c55be5d933..000000000000 --- a/src/event_window_state.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2016, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct EventWindowState(::Event); - -event_wrapper!(EventWindowState, GdkEventWindowState); -event_subtype!(EventWindowState, ffi::GDK_WINDOW_STATE); - -impl EventWindowState { - pub fn get_changed_mask(&self) -> ::WindowState { - from_glib(self.as_ref().changed_mask) - } - - pub fn get_new_window_state(&self) -> ::WindowState { - from_glib(self.as_ref().new_window_state) - } -} diff --git a/src/frame_clock.rs b/src/frame_clock.rs deleted file mode 100644 index 40a27e9a2fac..000000000000 --- a/src/frame_clock.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; -use FrameClock; - -impl FrameClock { - pub fn get_refresh_info(&self, base_time: i64) -> (i64, i64) { - unsafe { - let mut refresh_interval = 0; - let mut presentation_time = 0; - ffi::gdk_frame_clock_get_refresh_info(self.to_glib_none().0, base_time, - &mut refresh_interval, &mut presentation_time); - (refresh_interval, presentation_time) - } - } -} diff --git a/src/frame_timings.rs b/src/frame_timings.rs deleted file mode 100644 index 551e0f061627..000000000000 --- a/src/frame_timings.rs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::translate::*; -use ffi; -use std::num::NonZeroU64; -use FrameTimings; - -impl FrameTimings { - pub fn get_predicted_presentation_time(&self) -> Option { - let predicted_presentation_time = unsafe { - ffi::gdk_frame_timings_get_predicted_presentation_time(self.to_glib_none().0) - }; - // assuming presentation time is always positive - assert!(predicted_presentation_time >= 0); - // `0` means the value is not available - NonZeroU64::new(predicted_presentation_time as u64) - } - - pub fn get_presentation_time(&self) -> Option { - let presentation_time = unsafe { - ffi::gdk_frame_timings_get_presentation_time(self.to_glib_none().0) - }; - // assuming presentation time is always positive - assert!(presentation_time >= 0); - // `0` means the value is not available - NonZeroU64::new(presentation_time as u64) - } - - pub fn get_refresh_interval(&self) -> Option { - let refresh_interval = unsafe { - ffi::gdk_frame_timings_get_refresh_interval(self.to_glib_none().0) - }; - // assuming refresh interval is always positive - assert!(refresh_interval >= 0); - // `0` means the value is not available - NonZeroU64::new(refresh_interval as u64) - } -} diff --git a/src/functions.rs b/src/functions.rs deleted file mode 100644 index 42ebf77c641f..000000000000 --- a/src/functions.rs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013-2018, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use cairo; -use ffi; -use glib; -use pango; - -use glib::translate::*; - -#[repr(packed)] -pub struct GRange(pub i32, pub i32); - -pub fn pango_layout_line_get_clip_region(line: &pango::LayoutLine, - x_origin: i32, - y_origin: i32, - index_ranges: &[GRange]) -> Option { - assert_initialized_main_thread!(); - - let ptr: *const i32 = index_ranges.as_ptr() as _; - unsafe { from_glib_full( - ffi::gdk_pango_layout_line_get_clip_region(line.to_glib_none().0, - x_origin, - y_origin, - mut_override(ptr), - index_ranges.len() as i32)) } -} - -pub fn pango_layout_get_clip_region(layout: &pango::Layout, - x_origin: i32, - y_origin: i32, - index_ranges: &[GRange]) -> Option { - assert_initialized_main_thread!(); - - let ptr: *const i32 = index_ranges.as_ptr() as _; - unsafe { - from_glib_full(ffi::gdk_pango_layout_get_clip_region(layout.to_glib_none().0, - x_origin, - y_origin, - ptr, - index_ranges.len() as i32)) - } -} - -pub fn setting_get(name: &str) -> Option { - assert_initialized_main_thread!(); - unsafe { - let mut value = glib::Value::uninitialized(); - let done: bool = from_glib(ffi::gdk_setting_get(name.to_glib_none().0, - value.to_glib_none_mut().0)); - if done == true { - Some(value) - } else { - None - } - } -} - -pub fn property_change(window: &super::Window, property: &super::Atom, type_: &super::Atom, - format: i32, mode: super::PropMode, data: super::ChangeData) { - skip_assert_initialized!(); - let nelements = data.len(); - unsafe { - ffi::gdk_property_change(window.to_glib_none().0, property.to_glib_none().0, type_.to_glib_none().0, format, mode.to_glib(), data.to_glib(), nelements as i32); - } -} diff --git a/src/geometry.rs b/src/geometry.rs deleted file mode 100644 index 823774c50cc6..000000000000 --- a/src/geometry.rs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use ffi; -use glib::translate::*; -use glib_ffi; -use Gravity; - -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(C)] -pub struct Geometry { - pub min_width: i32, - pub min_height: i32, - pub max_width: i32, - pub max_height: i32, - pub base_width: i32, - pub base_height: i32, - pub width_inc: i32, - pub height_inc: i32, - pub min_aspect: f64, - pub max_aspect: f64, - pub win_gravity: Gravity, -} - -#[doc(hidden)] -impl<'a> ToGlibPtr<'a, *const ffi::GdkGeometry> for Geometry { - type Storage = &'a Self; - - #[inline] - fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GdkGeometry, Self> { - let ptr: *const Geometry = &*self; - Stash(ptr as *const ffi::GdkGeometry, self) - } -} - -#[doc(hidden)] -impl<'a> ToGlibPtrMut<'a, *mut ffi::GdkGeometry> for Geometry { - type Storage = &'a mut Self; - - #[inline] - fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GdkGeometry, Self> { - let ptr: *mut Geometry = &mut *self; - StashMut(ptr as *mut ffi::GdkGeometry, self) - } -} - -#[doc(hidden)] -impl FromGlibPtrNone<*const ffi::GdkGeometry> for Geometry { - unsafe fn from_glib_none(ptr: *const ffi::GdkGeometry) -> Self { - *(ptr as *const Geometry) - } -} - -#[doc(hidden)] -impl FromGlibPtrNone<*mut ffi::GdkGeometry> for Geometry { - unsafe fn from_glib_none(ptr: *mut ffi::GdkGeometry) -> Self { - *(ptr as *mut Geometry) - } -} - -#[doc(hidden)] -impl FromGlibPtrFull<*mut ffi::GdkGeometry> for Geometry { - #[inline] - unsafe fn from_glib_full(ptr: *mut ffi::GdkGeometry) -> Self { - let geom = *(ptr as *mut Geometry); - glib_ffi::g_free(ptr as *mut _); - geom - } -} diff --git a/src/keys.rs b/src/keys.rs deleted file mode 100644 index 7385a7050b9c..000000000000 --- a/src/keys.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use glib::GString; -use glib::translate::*; -use ffi; -use libc::c_uint; -use std::mem::transmute; - -pub fn keyval_name(keyval: u32) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_none(ffi::gdk_keyval_name(keyval as c_uint)) - } -} - -pub fn keyval_to_unicode(keyval: u32) -> Option { - skip_assert_initialized!(); - unsafe { - let c: char = transmute(ffi::gdk_keyval_to_unicode(keyval)); - if c != '\0' { - Some(c) - } else { - None - } - } -} diff --git a/src/lib.rs b/src/lib.rs index 357f43274fa7..35577431be98 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,25 +9,13 @@ #![cfg_attr(feature = "cargo-clippy", allow(trivially_copy_pass_by_ref))] extern crate glib_sys as glib_ffi; -extern crate gio_sys as gio_ffi; -extern crate gdk_sys as ffi; -extern crate gdk_pixbuf; -extern crate gio; #[macro_use] extern crate glib; extern crate gobject_sys as gobject_ffi; -extern crate cairo; -extern crate cairo_sys as cairo_ffi; -extern crate pango; extern crate libc; #[macro_use] extern crate bitflags; -#[macro_use] -mod rt; -#[macro_use] -mod event; - #[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))] #[cfg_attr(feature = "cargo-clippy", allow(type_complexity))] #[cfg_attr(feature = "cargo-clippy", allow(unreadable_literal))] @@ -39,119 +27,4 @@ pub use prelude::*; pub use auto::*; pub use self::auto::functions::*; -pub mod enums; - -mod atom; -mod cairo_interaction; -mod change_data; -mod device; -mod device_manager; -mod drag_context; -mod event_button; -mod event_configure; -mod event_crossing; -mod event_dnd; -mod event_expose; -mod event_focus; -mod event_grab_broken; -mod event_key; -mod event_motion; -mod event_owner_change; -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod event_pad_axis; -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod event_pad_button; -#[cfg(any(feature = "v3_22", feature = "dox"))] -mod event_pad_group_mode; -mod event_property; -mod event_proximity; -mod event_scroll; -mod event_selection; -mod event_setting; -mod event_touch; -#[cfg(any(feature = "v3_18", feature = "dox"))] -mod event_touchpad_pinch; -#[cfg(any(feature = "v3_18", feature = "dox"))] -mod event_touchpad_swipe; -mod event_visibility; -mod event_window_state; -mod frame_clock; -mod frame_timings; -mod functions; -mod geometry; -mod keys; -mod screen; -mod rectangle; -mod rgba; -mod visual; -mod window; - -pub use ffi::GdkColor as Color; pub use glib::Error; - -pub use self::rt::{ - init, - set_initialized, -}; - -pub use atom::Atom; -pub use atom::NONE as ATOM_NONE; -pub use atom::SELECTION_PRIMARY; -pub use atom::SELECTION_SECONDARY; -pub use atom::SELECTION_CLIPBOARD; -pub use atom::TARGET_BITMAP; -pub use atom::TARGET_COLORMAP; -pub use atom::TARGET_DRAWABLE; -pub use atom::TARGET_PIXMAP; -pub use atom::TARGET_STRING; -pub use atom::SELECTION_TYPE_ATOM; -pub use atom::SELECTION_TYPE_BITMAP; -pub use atom::SELECTION_TYPE_COLORMAP; -pub use atom::SELECTION_TYPE_DRAWABLE; -pub use atom::SELECTION_TYPE_INTEGER; -pub use atom::SELECTION_TYPE_PIXMAP; -pub use atom::SELECTION_TYPE_WINDOW; -pub use atom::SELECTION_TYPE_STRING; -pub use change_data::ChangeData; -pub use event::Event; -pub use event_button::EventButton; -pub use event_configure::EventConfigure; -pub use event_crossing::EventCrossing; -pub use event_dnd::EventDND; -pub use event_expose::EventExpose; -pub use event_focus::EventFocus; -pub use event_grab_broken::EventGrabBroken; -pub use event_key::EventKey; -pub use event_motion::EventMotion; -pub use event_owner_change::EventOwnerChange; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use event_pad_axis::EventPadAxis; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use event_pad_button::EventPadButton; -#[cfg(any(feature = "v3_22", feature = "dox"))] -pub use event_pad_group_mode::EventPadGroupMode; -pub use event_property::EventProperty; -pub use event_proximity::EventProximity; -pub use event_scroll::EventScroll; -pub use event_selection::EventSelection; -pub use event_setting::EventSetting; -pub use event_touch::EventTouch; -#[cfg(any(feature = "v3_18", feature = "dox"))] -pub use event_touchpad_pinch::EventTouchpadPinch; -#[cfg(any(feature = "v3_18", feature = "dox"))] -pub use event_touchpad_swipe::EventTouchpadSwipe; -pub use event_visibility::EventVisibility; -pub use event_window_state::EventWindowState; -pub use functions::*; -pub use geometry::Geometry; -pub use rectangle::Rectangle; -pub use rgba::{RGBA, RgbaParseError}; -pub use window::WindowAttr; - -#[allow(non_camel_case_types)] -pub type key = i32; - -pub use self::keys::{ - keyval_name, - keyval_to_unicode -}; diff --git a/src/prelude.rs b/src/prelude.rs index 5a4b9b86d764..c2952b28b4cd 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -4,6 +4,4 @@ //! Traits intended for blanket imports. -pub use cairo_interaction::ContextExt; pub use auto::traits::*; -pub use window::WindowExtManual; diff --git a/src/rectangle.rs b/src/rectangle.rs deleted file mode 100644 index f8403b09b7a8..000000000000 --- a/src/rectangle.rs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use std::convert::{AsRef, From}; -use std::mem; - -use glib; -use glib::translate::*; -use glib_ffi; -use glib_ffi::gconstpointer; -use gobject_ffi; -use cairo::RectangleInt; -use ffi; - -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] -#[repr(C)] -pub struct Rectangle { - pub x: i32, - pub y: i32, - pub width: i32, - pub height: i32, -} - -impl Rectangle { - pub fn intersect(&self, other: &Rectangle) -> Option { - unsafe { - let mut ret = Rectangle::uninitialized(); - if from_glib(ffi::gdk_rectangle_intersect(self.to_glib_none().0, other.to_glib_none().0, - ret.to_glib_none_mut().0)) { - Some(ret) - } - else { - None - } - } - } - - pub fn union(&self, other: &Rectangle) -> Rectangle { - unsafe { - let mut ret = Rectangle::uninitialized(); - ffi::gdk_rectangle_union(self.to_glib_none().0, other.to_glib_none().0, - ret.to_glib_none_mut().0); - ret - } - } -} - -#[doc(hidden)] -impl Uninitialized for Rectangle { - #[inline] - unsafe fn uninitialized() -> Self { - mem::uninitialized() - } -} - -#[doc(hidden)] -impl<'a> ToGlibPtr<'a, *const ffi::GdkRectangle> for Rectangle { - type Storage = &'a Self; - - #[inline] - fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GdkRectangle, Self> { - let ptr: *const Rectangle = &*self; - Stash(ptr as *const ffi::GdkRectangle, self) - } -} - -#[doc(hidden)] -impl<'a> ToGlibPtrMut<'a, *mut ffi::GdkRectangle> for Rectangle { - type Storage = &'a mut Self; - - #[inline] - fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GdkRectangle, Self> { - let ptr: *mut Rectangle = &mut *self; - StashMut(ptr as *mut ffi::GdkRectangle, self) - } -} - -#[doc(hidden)] -impl FromGlibPtrNone<*const ffi::GdkRectangle> for Rectangle { - unsafe fn from_glib_none(ptr: *const ffi::GdkRectangle) -> Self { - *(ptr as *const Rectangle) - } -} - -#[doc(hidden)] -impl FromGlibPtrNone<*mut ffi::GdkRectangle> for Rectangle { - unsafe fn from_glib_none(ptr: *mut ffi::GdkRectangle) -> Self { - *(ptr as *mut Rectangle) - } -} - -#[doc(hidden)] -impl FromGlibPtrBorrow<*const ffi::GdkRectangle> for Rectangle { - unsafe fn from_glib_borrow(ptr: *const ffi::GdkRectangle) -> Self { - *(ptr as *const Rectangle) - } -} - -#[doc(hidden)] -impl FromGlibPtrBorrow<*mut ffi::GdkRectangle> for Rectangle { - unsafe fn from_glib_borrow(ptr: *mut ffi::GdkRectangle) -> Self { - *(ptr as *mut Rectangle) - } -} - -#[doc(hidden)] -impl FromGlibPtrFull<*mut ffi::GdkRectangle> for Rectangle { - unsafe fn from_glib_full(ptr: *mut ffi::GdkRectangle) -> Self { - let rect = *(ptr as *mut Rectangle); - glib_ffi::g_free(ptr as *mut _); - rect - } -} - -#[doc(hidden)] -impl FromGlibPtrFull<*const ffi::GdkRectangle> for Rectangle { - unsafe fn from_glib_full(ptr: *const ffi::GdkRectangle) -> Self { - let rect = *(ptr as *const Rectangle); - glib_ffi::g_free(ptr as *mut _); - rect - } -} - -impl AsRef for Rectangle { - fn as_ref(&self) -> &RectangleInt { - unsafe { mem::transmute(self) } - } -} - -impl From for Rectangle { - fn from(r: RectangleInt) -> Rectangle { - skip_assert_initialized!(); - unsafe { mem::transmute(r) } - } -} - -impl glib::StaticType for Rectangle { - fn static_type() -> glib::types::Type { - skip_assert_initialized!(); - unsafe { from_glib(ffi::gdk_rectangle_get_type()) } - } -} - -impl<'a> glib::value::FromValueOptional<'a> for Rectangle { - unsafe fn from_value_optional(value: &'a glib::Value) -> Option { - from_glib_full(gobject_ffi::g_value_dup_boxed(value.to_glib_none().0) as *mut ffi::GdkRectangle) - } -} - -impl glib::value::SetValue for Rectangle { - unsafe fn set_value(value: &mut glib::Value, this: &Self) { - gobject_ffi::g_value_set_boxed(value.to_glib_none_mut().0, - this.to_glib_none().0 as gconstpointer) - } -} - -impl glib::value::SetValueOptional for Rectangle { - unsafe fn set_value_optional(value: &mut glib::Value, this: Option<&Self>) { - gobject_ffi::g_value_set_boxed(value.to_glib_none_mut().0, - this.to_glib_none().0 as gconstpointer) - } -} diff --git a/src/rgba.rs b/src/rgba.rs deleted file mode 100644 index 776bdbb182f3..000000000000 --- a/src/rgba.rs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use ffi; -use glib; -use glib::translate::*; -use glib_ffi::gconstpointer; -use gobject_ffi; -use std::hash::{Hash, Hasher}; -use std::fmt; -use std::mem; -use std::str::FromStr; - -#[derive(Debug)] -pub struct RgbaParseError; - -#[derive(Clone, Copy, Debug)] -#[repr(C)] -pub struct RGBA { - pub red: f64, - pub green: f64, - pub blue: f64, - pub alpha: f64, -} - -impl RGBA { - pub fn black() -> RGBA { - skip_assert_initialized!(); - RGBA { - red: 0f64, - green: 0f64, - blue: 0f64, - alpha: 1f64 - } - } - - pub fn blue() -> RGBA { - skip_assert_initialized!(); - RGBA { - red: 0f64, - green: 0f64, - blue: 1f64, - alpha: 1f64 - } - } - - pub fn green() -> RGBA { - skip_assert_initialized!(); - RGBA { - red: 0f64, - green: 1f64, - blue: 0f64, - alpha: 1f64 - } - } - - pub fn red() -> RGBA { - skip_assert_initialized!(); - RGBA { - red: 1f64, - green: 0f64, - blue: 0f64, - alpha: 1f64 - } - } - - pub fn white() -> RGBA { - skip_assert_initialized!(); - RGBA { - red: 1f64, - green: 1f64, - blue: 1f64, - alpha: 1f64 - } - } -} - -impl fmt::Display for RGBA { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let string: glib::GString = unsafe { - from_glib_full(ffi::gdk_rgba_to_string(self.to_glib_none().0)) - }; - f.write_str(&string) - } -} - -impl FromStr for RGBA { - type Err = RgbaParseError; - fn from_str(s: &str) -> Result { - skip_assert_initialized!(); - unsafe { - let mut rgba = RGBA::uninitialized(); - if from_glib(ffi::gdk_rgba_parse(rgba.to_glib_none_mut().0, s.to_glib_none().0)) { - Ok(rgba) - } else { - Err(RgbaParseError) - } - } - } -} - -impl Hash for RGBA { - fn hash(&self, state: &mut H) { - let hash = unsafe { ffi::gdk_rgba_hash(self.to_glib_none().0 as gconstpointer) }; - state.write_u32(hash); - } -} - -impl PartialEq for RGBA { - fn eq(&self, other: &RGBA) -> bool { - unsafe { - from_glib(ffi::gdk_rgba_equal(self.to_glib_none().0 as gconstpointer, - other.to_glib_none().0 as gconstpointer)) - } - } -} - -impl Eq for RGBA {} - -#[doc(hidden)] -impl Uninitialized for RGBA { - #[inline] - unsafe fn uninitialized() -> Self { - mem::uninitialized() - } -} - -#[doc(hidden)] -impl<'a> ToGlibPtr<'a, *const ffi::GdkRGBA> for RGBA { - type Storage = &'a Self; - - #[inline] - fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GdkRGBA, Self> { - let ptr: *const RGBA = &*self; - Stash(ptr as *const ffi::GdkRGBA, self) - } -} - -#[doc(hidden)] -impl<'a> ToGlibPtrMut<'a, *mut ffi::GdkRGBA> for RGBA { - type Storage = &'a mut Self; - - #[inline] - fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GdkRGBA, Self> { - let ptr: *mut RGBA = &mut *self; - StashMut(ptr as *mut ffi::GdkRGBA, self) - } -} - -#[doc(hidden)] -impl FromGlibPtrNone<*const ffi::GdkRGBA> for RGBA { - unsafe fn from_glib_none(ptr: *const ffi::GdkRGBA) -> Self { - *(ptr as *const RGBA) - } -} - -#[doc(hidden)] -impl FromGlibPtrNone<*mut ffi::GdkRGBA> for RGBA { - unsafe fn from_glib_none(ptr: *mut ffi::GdkRGBA) -> Self { - *(ptr as *mut RGBA) - } -} - -#[doc(hidden)] -impl FromGlibPtrBorrow<*const ffi::GdkRGBA> for RGBA { - unsafe fn from_glib_borrow(ptr: *const ffi::GdkRGBA) -> Self { - *(ptr as *const RGBA) - } -} - -#[doc(hidden)] -impl FromGlibPtrBorrow<*mut ffi::GdkRGBA> for RGBA { - unsafe fn from_glib_borrow(ptr: *mut ffi::GdkRGBA) -> Self { - *(ptr as *mut RGBA) - } -} - -#[doc(hidden)] -impl FromGlibPtrFull<*mut ffi::GdkRGBA> for RGBA { - #[inline] - unsafe fn from_glib_full(ptr: *mut ffi::GdkRGBA) -> Self { - let rgba = *(ptr as *mut RGBA); - ffi::gdk_rgba_free(ptr); - rgba - } -} - -impl glib::StaticType for RGBA { - fn static_type() -> glib::types::Type { - skip_assert_initialized!(); - unsafe { from_glib(ffi::gdk_rgba_get_type()) } - } -} - -impl<'a> glib::value::FromValueOptional<'a> for RGBA { - unsafe fn from_value_optional(value: &'a glib::Value) -> Option { - from_glib_full(gobject_ffi::g_value_dup_boxed(value.to_glib_none().0) as *mut ffi::GdkRGBA) - } -} - -impl glib::value::SetValue for RGBA { - unsafe fn set_value(value: &mut glib::Value, this: &Self) { - gobject_ffi::g_value_set_boxed(value.to_glib_none_mut().0, - this.to_glib_none().0 as gconstpointer) - } -} - -impl glib::value::SetValueOptional for RGBA { - unsafe fn set_value_optional(value: &mut glib::Value, this: Option<&Self>) { - gobject_ffi::g_value_set_boxed(value.to_glib_none_mut().0, - this.to_glib_none().0 as gconstpointer) - } -} diff --git a/src/rt.rs b/src/rt.rs deleted file mode 100644 index 0e6f48a9b788..000000000000 --- a/src/rt.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -//! General — Library initialization and miscellaneous functions - -use std::cell::Cell; -use std::ptr; -use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering}; - -use ffi; - -thread_local! { - static IS_MAIN_THREAD: Cell = Cell::new(false) -} - -static INITIALIZED: AtomicBool = ATOMIC_BOOL_INIT; - -/// Asserts that this is the main thread and either `gdk::init` or `gtk::init` has been called. -macro_rules! assert_initialized_main_thread { - () => ( - if !::rt::is_initialized_main_thread() { - if ::rt::is_initialized() { - panic!("GDK may only be used from the main thread."); - } - else { - panic!("GDK has not been initialized. Call `gdk::init` or `gtk::init` first."); - } - } - ) -} - -/// No-op. -macro_rules! skip_assert_initialized { - () => () -} - -/// Asserts that neither `gdk::init` nor `gtk::init` has been called. -macro_rules! assert_not_initialized { - () => ( - if ::rt::is_initialized() { - panic!("This function has to be called before `gdk::init` or `gtk::init`."); - } - ) -} - -/// Returns `true` if GDK has been initialized. -#[inline] -pub fn is_initialized() -> bool { - skip_assert_initialized!(); - INITIALIZED.load(Ordering::Acquire) -} - -/// Returns `true` if GDK has been initialized and this is the main thread. -#[inline] -pub fn is_initialized_main_thread() -> bool { - skip_assert_initialized!(); - IS_MAIN_THREAD.with(|c| c.get()) -} - -/// Informs this crate that GDK has been initialized and the current thread is the main one. -pub unsafe fn set_initialized() { - skip_assert_initialized!(); - if is_initialized_main_thread() { - return; - } - else if is_initialized() { - panic!("Attempted to initialize GDK from two different threads."); - } - INITIALIZED.store(true, Ordering::Release); - IS_MAIN_THREAD.with(|c| c.set(true)); -} - -pub fn init() { - assert_not_initialized!(); - unsafe { - ffi::gdk_init(ptr::null_mut(), ptr::null_mut()); - set_initialized(); - } -} diff --git a/src/screen.rs b/src/screen.rs deleted file mode 100644 index 4044a86ead73..000000000000 --- a/src/screen.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2013-2017, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use Screen; -use ffi; -use cairo; - -use glib; -use glib::translate::*; - -impl Screen { - pub fn get_font_options(&self) -> Option { - unsafe { - from_glib_none(mut_override(ffi::gdk_screen_get_font_options(self.to_glib_none().0))) - } - } - - pub fn get_setting(&self, name: &str) -> Option { - unsafe { - let mut value = glib::Value::uninitialized(); - let done: bool = from_glib(ffi::gdk_screen_get_setting(self.to_glib_none().0, - name.to_glib_none().0, - value.to_glib_none_mut().0)); - - if done == true { - Some(value) - } else { - None - } - } - } -} diff --git a/src/visual.rs b/src/visual.rs deleted file mode 100644 index a10ffe10510f..000000000000 --- a/src/visual.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use std::ptr; -use std::slice; -use ffi; -use Visual; - -impl Visual { - pub fn query_depths() -> Vec { - assert_initialized_main_thread!(); - let mut ptr = ptr::null_mut(); - let mut count = 0; - - unsafe { - ffi::gdk_query_depths(&mut ptr, &mut count); - Vec::from( - slice::from_raw_parts(ptr as *const i32, count as usize)) - } - } -} diff --git a/src/window.rs b/src/window.rs deleted file mode 100644 index 932f200ac6b2..000000000000 --- a/src/window.rs +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright 2013-2015, The Gtk-rs Project Developers. -// See the COPYRIGHT file at the top-level directory of this distribution. -// Licensed under the MIT license, see the LICENSE file or - -use std::ptr; -use libc::{c_char, c_int}; -use cairo::{self, PatternTrait, Surface}; -use gdk_pixbuf; -use glib::object::IsA; -use glib::translate::*; -use ffi; -use Cursor; -use Visual; -use Window; - -use { - WindowHints, - WindowType, - WindowTypeHint, - WindowWindowClass, -}; - -pub struct WindowAttr { - pub title: Option, - pub event_mask: i32, - pub x: Option, - pub y: Option, - pub width: i32, - pub height: i32, - pub wclass: WindowWindowClass, - pub visual: Option, - pub window_type: WindowType, - pub cursor: Option, - pub override_redirect: bool, - pub type_hint: Option, -} - -impl Default for WindowAttr { - fn default() -> WindowAttr { - skip_assert_initialized!(); - WindowAttr { - title: None, - event_mask: 0, - x: None, - y: None, - width: 400, - height: 300, - wclass: WindowWindowClass::InputOutput, - visual: None, - window_type: WindowType::Toplevel, - cursor: None, - override_redirect: false, - type_hint: None, - } - } -} - -impl WindowAttr { - fn get_mask(&self) -> u32 { - let mut mask : ffi::GdkWindowAttributesType = 0; - if self.title.is_some() { mask |= ffi::GDK_WA_TITLE; } - if self.x.is_some() { mask |= ffi::GDK_WA_X; } - if self.y.is_some() { mask |= ffi::GDK_WA_Y; } - if self.cursor.is_some() { mask |= ffi::GDK_WA_CURSOR; } - if self.visual.is_some() { mask |= ffi::GDK_WA_VISUAL; } - if self.override_redirect { mask |= ffi::GDK_WA_NOREDIR; } - if self.type_hint.is_some() { mask |= ffi::GDK_WA_TYPE_HINT; } - mask - } -} - -#[cfg_attr(feature = "cargo-clippy", allow(type_complexity))] -impl<'a> ToGlibPtr<'a, *mut ffi::GdkWindowAttr> for WindowAttr { - type Storage = ( - Box, - Stash<'a, *mut ffi::GdkVisual, Option>, - Stash<'a, *mut ffi::GdkCursor, Option>, - Stash<'a, *const c_char, Option>, - ); - - fn to_glib_none(&'a self) -> Stash<'a, *mut ffi::GdkWindowAttr, Self> { - let title = self.title.to_glib_none(); - let visual = self.visual.to_glib_none(); - let cursor = self.cursor.to_glib_none(); - - let mut attrs = Box::new(ffi::GdkWindowAttr { - title: title.0 as *mut c_char, - event_mask: self.event_mask, - x: self.x.unwrap_or(0), - y: self.y.unwrap_or(0), - width: self.width, - height: self.height, - wclass: self.wclass.to_glib(), - visual: visual.0, - window_type: self.window_type.to_glib(), - cursor: cursor.0, - wmclass_name: ptr::null_mut(), - wmclass_class: ptr::null_mut(), - override_redirect: self.override_redirect.to_glib(), - type_hint: self.type_hint.unwrap_or(WindowTypeHint::Normal).to_glib(), - }); - - Stash(&mut *attrs, (attrs, visual, cursor, title)) - } -} - -impl Window { - pub fn new(parent: Option<&Window>, attributes: &WindowAttr) -> Window { - assert_initialized_main_thread!(); - unsafe { - from_glib_full(ffi::gdk_window_new( - parent.to_glib_none().0, - attributes.to_glib_none().0, - attributes.get_mask() as c_int)) - } - } - - pub fn create_similar_surface(&self, content: cairo::Content, width: i32, height: i32) -> Option { - unsafe { - from_glib_full(ffi::gdk_window_create_similar_surface(self.to_glib_none().0, content.into(), width, height)) - } - } -} - -pub trait WindowExtManual: 'static { - unsafe fn set_user_data(&self, user_data: &mut T); - - #[cfg_attr(feature = "cargo-clippy", allow(mut_from_ref))] - unsafe fn get_user_data(&self) -> &mut T; - - fn set_geometry_hints(&self, geometry: &ffi::GdkGeometry, geom_mask: WindowHints); - - fn get_default_root_window() -> Window; - - fn offscreen_window_set_embedder(&self, embedder: &Window); - - fn offscreen_window_get_embedder(&self) -> Option; - - fn offscreen_window_get_surface(&self) -> Option; - - fn get_pixbuf(&self, src_x: i32, src_y: i32, width: i32, height: i32) -> Option; - - fn get_background_pattern(&self) -> Option; - - fn set_background_pattern(&self, pattern: Option<&cairo::Pattern>); -} - -impl> WindowExtManual for O { - unsafe fn set_user_data(&self, user_data: &mut T) { - ffi::gdk_window_set_user_data(self.as_ref().to_glib_none().0, user_data as *mut T as *mut _) - } - - unsafe fn get_user_data(&self) -> &mut T { - let mut pointer = ::std::ptr::null_mut(); - ffi::gdk_window_get_user_data(self.as_ref().to_glib_none().0, &mut pointer); - &mut *(pointer as *mut T) - } - - fn set_geometry_hints(&self, geometry: &ffi::GdkGeometry, geom_mask: WindowHints) { - unsafe { ffi::gdk_window_set_geometry_hints(self.as_ref().to_glib_none().0, geometry, geom_mask.to_glib()) } - } - - fn get_default_root_window() -> Window { - assert_initialized_main_thread!(); - unsafe { from_glib_none(ffi::gdk_get_default_root_window()) } - } - - fn offscreen_window_set_embedder(&self, embedder: &Window) { - unsafe { - ffi::gdk_offscreen_window_set_embedder(self.as_ref().to_glib_none().0, embedder.to_glib_none().0) - } - } - - fn offscreen_window_get_embedder(&self) -> Option { - unsafe { from_glib_none(ffi::gdk_offscreen_window_get_embedder(self.as_ref().to_glib_none().0)) } - } - - fn offscreen_window_get_surface(&self) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_none(ffi::gdk_offscreen_window_get_surface(self.as_ref().to_glib_none().0)) - } - } - - fn get_pixbuf(&self, src_x: i32, src_y: i32, width: i32, height: i32) -> Option { - skip_assert_initialized!(); - unsafe { - from_glib_full(ffi::gdk_pixbuf_get_from_window(self.as_ref().to_glib_none().0, src_x, src_y, width, height)) - } - } - - fn get_background_pattern(&self) -> Option { - unsafe { - let ret = ffi::gdk_window_get_background_pattern(self.as_ref().to_glib_none().0); - if ret.is_null() { - None - } else { - Some(cairo::Pattern::from_raw_none(ret)) - } - } - } - - fn set_background_pattern(&self, pattern: Option<&cairo::Pattern>) { - unsafe { - let ptr = if let Some(pattern) = pattern { - pattern.as_ptr() - } else { - ::std::ptr::null_mut() - }; - ffi::gdk_window_set_background_pattern(self.as_ref().to_glib_none().0, ptr); - } - } -}