gdk-0.14.3/.cargo_vcs_info.json0000644000000001120000000000100116600ustar { "git": { "sha1": "fb38b379bfdf9634f7fc1600da4b7fb546ee9eb7" } } gdk-0.14.3/COPYRIGHT000064400000000000000000000012130072674642500117760ustar 00000000000000The gtk-rs Project is licensed under the MIT license, see the LICENSE file or . Copyrights in the gtk-rs Project project are retained by their contributors. No copyright assignment is required to contribute to the gtk-rs Project project. For full authorship information, see the version control history. This project provides interoperability with various GNOME libraries but doesn't distribute any parts of them. Distributing compiled libraries and executables that link to those libraries may be subject to terms of the GNU LGPL or other licenses. For more information check the license of each GNOME library. gdk-0.14.3/Cargo.toml0000644000000030010000000000100076560ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "gdk" version = "0.14.3" authors = ["The gtk-rs Project Developers"] exclude = ["gir-files/*"] description = "Rust bindings for the GDK 3 library" homepage = "https://gtk-rs.org/" documentation = "https://gtk-rs.org/gtk3-rs/stable/latest/docs/gdk/" readme = "README.md" keywords = ["gdk", "gtk", "gtk-rs", "gnome", "GUI"] license = "MIT" repository = "https://github.com/gtk-rs/gtk3-rs" [package.metadata.docs.rs] features = ["dox"] [lib] name = "gdk" [dependencies.bitflags] version = "1.0" [dependencies.cairo-rs] version = "0.14.0" [dependencies.ffi] version = "0.14.0" package = "gdk-sys" [dependencies.gdk-pixbuf] version = "0.14.0" [dependencies.gio] version = "0.14.0" [dependencies.glib] version = "0.14.0" [dependencies.libc] version = "0.2" [dependencies.pango] version = "0.14.0" [dev-dependencies.gir-format-check] version = "^0.1" [features] dox = ["ffi/dox", "glib/dox", "gio/dox", "gdk-pixbuf/dox", "cairo-rs/dox", "pango/dox"] v3_20 = ["ffi/v3_20"] v3_22 = ["v3_20", "ffi/v3_22"] v3_24 = ["v3_22", "ffi/v3_24"] gdk-0.14.3/Cargo.toml.orig000064400000000000000000000016350072674642500134020ustar 00000000000000[package] name = "gdk" license = "MIT" homepage = "https://gtk-rs.org/" authors = ["The gtk-rs Project Developers"] keywords = ["gdk", "gtk", "gtk-rs", "gnome", "GUI"] readme = "README.md" documentation = "https://gtk-rs.org/gtk3-rs/stable/latest/docs/gdk/" version = "0.14.3" description = "Rust bindings for the GDK 3 library" repository = "https://github.com/gtk-rs/gtk3-rs" exclude = [ "gir-files/*", ] edition = "2018" [lib] name = "gdk" [features] v3_20 = ["ffi/v3_20"] v3_22 = ["v3_20", "ffi/v3_22"] v3_24 = ["v3_22", "ffi/v3_24"] dox = ["ffi/dox", "glib/dox", "gio/dox", "gdk-pixbuf/dox", "cairo-rs/dox", "pango/dox"] [package.metadata.docs.rs] features = ["dox"] [dependencies] libc = "0.2" bitflags = "1.0" ffi = {package = "gdk-sys", path = "./sys", version = "0.14.0"} cairo-rs = "0.14.0" gdk-pixbuf = "0.14.0" gio = "0.14.0" glib = "0.14.0" pango = "0.14.0" [dev-dependencies] gir-format-check = "^0.1" gdk-0.14.3/Gir.toml000064400000000000000000000273720072674642500121370ustar 00000000000000[options] girs_directories = ["../gir-files"] library = "Gdk" version = "3.0" min_cfg_version = "3.18" target_path = "." work_mode = "normal" generate_safety_asserts = true single_version_file = true deprecate_by_min_version = true generate = [ "Gdk.AnchorHints", "Gdk.AppLaunchContext", "Gdk.AxisFlags", "Gdk.AxisUse", "Gdk.ByteOrder", "Gdk.CrossingMode", "Gdk.CursorType", "Gdk.DeviceManager", "Gdk.DevicePad", "Gdk.DeviceTool", "Gdk.DeviceToolType", "Gdk.DeviceType", "Gdk.DragAction", "Gdk.DragCancelReason", "Gdk.DragProtocol", "Gdk.DrawingContext", "Gdk.EventMask", "Gdk.EventSequence", "Gdk.FrameClockPhase", "Gdk.FullscreenMode", "Gdk.GLContext", "Gdk.GLError", "Gdk.GrabOwnership", "Gdk.GrabStatus", "Gdk.Gravity", "Gdk.InputMode", "Gdk.InputSource", "Gdk.ModifierIntent", "Gdk.ModifierType", "Gdk.NotifyType", "Gdk.OwnerChange", "Gdk.PropertyState", "Gdk.PropMode", "Gdk.ScrollDirection", "Gdk.SeatCapabilities", "Gdk.SettingAction", "Gdk.SubpixelLayout", "Gdk.VisibilityState", "Gdk.VisualType", "Gdk.WindowEdge", "Gdk.WindowHints", "Gdk.WindowState", "Gdk.WindowType", "Gdk.WindowTypeHint", "Gdk.WindowWindowClass", "Gdk.WMDecoration", "Gdk.WMFunction", ] manual = [ "cairo.Content", "cairo.Context", "cairo.FontOptions", "cairo.Pattern", "cairo.Region", "cairo.Surface", "Gdk.Atom", "Gdk.Event", "Gdk.EventAny", "Gdk.EventButton", "Gdk.EventConfigure", "Gdk.EventCrossing", "Gdk.EventDND", "Gdk.EventExpose", "Gdk.EventFocus", "Gdk.EventGrabBroken", "Gdk.EventKey", "Gdk.EventMotion", "Gdk.EventOwnerChange", "Gdk.EventPadAxis", "Gdk.EventPadButton", "Gdk.EventPadGroupMode", "Gdk.EventProperty", "Gdk.EventProximity", "Gdk.EventScroll", "Gdk.EventSelection", "Gdk.EventSetting", "Gdk.EventTouch", "Gdk.EventTouchpadPinch", "Gdk.EventTouchpadSwipe", "Gdk.EventVisibility", "Gdk.EventWindowState", "Gdk.Geometry", "Gdk.KeymapKey", "Gdk.Rectangle", "Gdk.RGBA", "Gdk.TimeCoord", "GdkPixbuf.Pixbuf", "Gio.AppLaunchContext", "Gio.Icon", "GLib.Error", "GObject.Value", "Pango.Context", "Pango.Direction", "Pango.Layout", "Pango.LayoutLine", ] [[object]] name = "Gdk.*" status = "generate" [[object.function]] pattern = ".+" [[object.function.parameter]] name = "cr" const = true [[object.function.parameter]] name = "surface" const = true [[object.function]] name = "setting_get" # GValue initialized inside the function instead of passed as argument ignore = true [[object.function]] name = "property_change" # data parameter needed to be more ignore = true [[object.function]] name = "pango_layout_get_clip_region" ignore = true [[object.function]] name = "selection_property_get" #data ignore = true [[object.function]] name = "cairo_create" #manual trait ignore = true [[object.function]] pattern = "cairo_.+" #manual trait ignore = true [[object.function]] name = "disable_multidevice" #manual trait ignore = true [[object.function]] pattern = "drag_.+" #manual trait ignore = true [[object.function]] name = "drop_reply" #manual trait ignore = true [[object.function]] name = "drop_finish" #manual trait ignore = true [[object.function]] name = "get_default_root_window" #manual trait ignore = true [[object.function]] pattern = "offscreen_window_[gs]et_embedder" #manual trait ignore = true [[object.function]] name = "offscreen_window_get_surface" #manual trait ignore = true [[object.function]] name = "pixbuf_get_from_window" #manual trait ignore = true [[object.function]] name = "keyval_name" manual = true [[object.function]] name = "keyval_to_unicode" manual = true [[object.function]] name = "unicode_to_keyval" manual = true [[object.function]] name = "keyval_from_name" manual = true [[object.function]] name = "keyval_convert_case" manual = true [[object.function]] name = "keyval_is_lower" manual = true [[object.function]] name = "keyval_is_upper" manual = true [[object.function]] name = "keyval_to_lower" manual = true [[object.function]] name = "keyval_to_upper" manual = true [[object.function]] name = "init" #manual ignore = true [[object.function]] pattern = "threads_add_idle.*" #use glib::source::idle_add() instead ignore = true [[object.function]] pattern = "threads_add_timeout.*" #use glib::source::timeout_add() instead ignore = true [[object]] name = "Gdk.Cursor" status = "generate" [[object.function]] name = "get_display" [object.function.return] nullable = false [[object.function]] name = "new_from_surface" [[object.function.parameter]] name = "surface" const = true [[object]] name = "Gdk.Device" status = "generate" [[object.function]] name = "get_display" [object.function.return] nullable = false [[object.function]] name = "free_history" ignore = true # cannot be used as is [[object.function]] name = "get_history" manual = true # need to call "free_history" function by hand [[object.property]] name = "tool" version = "3.22" [[object.property]] name = "type" generate = ["get", "notify"] [[object]] name = "Gdk.DevicePadFeature" status = "generate" version = "3.22" [[object]] name = "Gdk.Display" status = "generate" [[object.function]] name = "get_default_group" [object.function.return] nullable = false [[object.function]] name = "get_default_screen" [object.function.return] nullable = false [[object.function]] name = "get_name" [object.function.return] nullable = false [[object.function]] name = "get_screen" [object.function.return] nullable = false [[object]] name = "Gdk.DisplayManager" status = "generate" [[object.function]] name = "get" [object.function.return] nullable = false [[object]] name = "Gdk.DragContext" status = "generate" [[object.function]] name = "get_device" [object.function.return] nullable = false [[object.function]] name = "get_dest_window" [object.function.return] nullable = false [[object.function]] name = "get_source_window" [object.function.return] nullable = false [[object]] name = "Gdk.EventType" status = "generate" [[object.member]] name = "2button_press" alias = true [[object.member]] name = "3button_press" alias = true [[object.member]] name = "event_last" alias = true [[object]] name = "Gdk.FrameClock" status = "generate" [[object.function]] name = "get_refresh_info" #wrong gir: no out parameters manual = true [[object]] name = "Gdk.FrameTimings" status = "generate" [[object.function]] name = "get_predicted_presentation_time" # Use an `Option` for the return value manual = true [[object.function]] name = "get_presentation_time" # Use an `Option` for the return value manual = true [[object.function]] name = "get_refresh_interval" # Use an `Option` for the return value manual = true [[object]] name = "Gdk.Keymap" status = "generate" [[object.function]] name = "get_caps_lock_state" rename = "is_caps_locked" [[object.function]] name = "get_num_lock_state" rename = "is_num_locked" [[object.function]] name = "get_scroll_lock_state" rename = "is_scroll_locked" [[object.function]] name = "get_entries_for_keycode" # Invalid generation of Vec manual = true [[object.function]] name = "get_entries_for_keyval" # Invalid generation of Vec manual = true [[object.function]] name = "add_virtual_modifiers" # Invalid usage of "&mut ModifierType" manual = true [[object.function]] name = "map_virtual_modifiers" # Invalid usage of "&mut ModifierType" manual = true [[object.function]] name = "lookup_key" manual = true [[object]] name = "Gdk.Monitor" status = "generate" version = "3.22" [[object.property]] name = "subpixel-layout" version = "3.22" [[object.property]] name = "manufacturer" version = "3.22" [[object.property]] name = "model" version = "3.22" [[object]] name = "Gdk.Screen" status = "generate" [[object.function]] name = "get_display" [object.function.return] nullable = false [[object.function]] name = "make_display_name" [object.function.return] nullable = false [[object.function]] name = "get_font_options" manual = true [[object.function]] name = "get_setting" # bool return value signals success manual = true [[object.function]] name = "height" # This is an associated function which clashes with # the actual method getter after auto-renaming. rename = "screen_height" [[object.function]] name = "height_mm" # This is an associated function which clashes with # the actual method getter after auto-renaming. rename = "screen_height_mm" [[object.function]] name = "width" # This is an associated function which clashes with # the actual method getter after auto-renaming. rename = "screen_width" [[object.function]] name = "width_mm" # This is an associated function which clashes with # the actual method getter after auto-renaming. rename = "screen_width_mm" [[object]] name = "Gdk.Seat" status = "generate" version = "3.20" [[object]] name = "Gdk.Visual" status = "generate" [[object.function]] name = "get_system" [object.function.return] nullable = false [[object.function]] name = "get_best" [object.function.return] nullable = false [[object.function]] name = "get_screen" [object.function.return] nullable = false [[object]] name = "Gdk.Window" status = "generate" manual_traits = ["WindowExtManual"] [[object.function]] name = "new" manual = true [[object.function]] pattern = "[gs]et_background_pattern" manual = true doc_trait_name = "WindowExtManual" [[object.function]] pattern = "[gs]et_user_data" manual = true doc_trait_name = "WindowExtManual" [[object.function]] name = "get_effective_toplevel" [object.function.return] nullable = false [[object.function]] name = "get_event_compression" rename = "does_event_compression" [[object.function]] name = "get_display" [object.function.return] nullable = false [[object.function]] name = "get_screen" [object.function.return] nullable = false [[object.function]] name = "get_toplevel" [object.function.return] nullable = false [[object.function]] name = "get_visual" [object.function.return] nullable = false [[object.function]] name = "mark_paint_from_clip" [[object.function.parameter]] name = "cr" const = true [[object.function]] name = "create_similar_surface" manual = true # See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3228 [[object.function]] name = "create_similar_image_surface" manual = true [[object.function]] name = "set_opaque_region" [[object.function.parameter]] name = "region" const = true gdk-0.14.3/LICENSE000064400000000000000000000020000072674642500115030ustar 00000000000000Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gdk-0.14.3/README.md000064400000000000000000000024410072674642500117660ustar 00000000000000# gdk __Rust__ bindings and wrappers for __GDK__, part of [gtk3-rs](https://github.com/gtk-rs/gtk3-rs). ## Minimum supported Rust version Currently, the minimum supported Rust version is `1.51.0`. ## Documentation * [Rust API - Stable](https://gtk-rs.org/gtk3-rs/stable/latest/docs/gdk/) * [Rust API - Development](https://gtk-rs.org/gtk3-rs/git/docs/gdk) * [C API](https://developer.gnome.org/gdk3/stable/) * [GTK Installation instructions](https://www.gtk.org/docs/installations/) ## Using We recommend using [crates from crates.io](https://crates.io/keywords/gtk-rs), as [demonstrated here](https://gtk-rs.org/#using). If you want to track the bleeding edge, use the git dependency instead: ```toml [dependencies] gdk = { git = "https://github.com/gtk-rs/gtk3-rs.git", package = "gdk" } ``` Avoid mixing versioned and git crates like this: ```toml # This will not compile [dependencies] gdk = "0.13" gdk = { git = "https://github.com/gtk-rs/gtk3-rs.git", package = "gdk" } ``` ### See Also * [glib](https://crates.io/crates/glib) * [cairo-rs](https://crates.io/crates/cairo-rs) * [gdk-pixbuf](https://crates.io/crates/gdk-pixbuf) * [gio](https://crates.io/crates/gio) * [pango](https://crates.io/crates/pango) ## License __gdk__ is available under the MIT License, please refer to it. gdk-0.14.3/src/atom.rs000064400000000000000000000156470072674642500126200ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; use glib::GString; use std::mem; use std::ptr; #[derive(Copy, Clone, PartialEq, Eq)] #[doc(alias = "GdkAtom")] 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 { #[doc(alias = "gdk_atom_intern")] pub fn intern(atom_name: &str) -> Atom { assert_initialized_main_thread!(); unsafe { Atom(ffi::gdk_atom_intern( atom_name.to_glib_none().0, false.into_glib(), )) } } #[doc(alias = "gdk_atom_name")] 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::zeroed() } } 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.add(i), 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.add(i), 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) -> glib::translate::Borrowed { glib::translate::Borrowed::new(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.add(i)))); } 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.add(i)))); } 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) } } gdk-0.14.3/src/auto/app_launch_context.rs000064400000000000000000000047660072674642500165060ustar 00000000000000// 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 crate::Display; use crate::Screen; use glib::object::IsA; use glib::object::ObjectType as ObjectType_; use glib::translate::*; use glib::StaticType; use std::fmt; glib::wrapper! { #[doc(alias = "GdkAppLaunchContext")] pub struct AppLaunchContext(Object) @extends gio::AppLaunchContext; match fn { type_ => || ffi::gdk_app_launch_context_get_type(), } } impl AppLaunchContext { #[doc(alias = "gdk_app_launch_context_set_desktop")] pub fn set_desktop(&self, desktop: i32) { unsafe { ffi::gdk_app_launch_context_set_desktop(self.to_glib_none().0, desktop); } } #[doc(alias = "gdk_app_launch_context_set_icon")] 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, ); } } #[doc(alias = "gdk_app_launch_context_set_icon_name")] 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, ); } } #[doc(alias = "gdk_app_launch_context_set_screen")] 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); } } #[doc(alias = "gdk_app_launch_context_set_timestamp")] pub fn set_timestamp(&self, timestamp: u32) { unsafe { ffi::gdk_app_launch_context_set_timestamp(self.to_glib_none().0, timestamp); } } pub fn display(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"display\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `display` getter") } } } impl fmt::Display for AppLaunchContext { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("AppLaunchContext") } } gdk-0.14.3/src/auto/cursor.rs000064400000000000000000000066600072674642500141400ustar 00000000000000// 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 crate::CursorType; use crate::Display; use glib::translate::*; use std::fmt; use std::mem; glib::wrapper! { #[doc(alias = "GdkCursor")] pub struct Cursor(Object); match fn { type_ => || ffi::gdk_cursor_get_type(), } } impl Cursor { #[doc(alias = "gdk_cursor_new_for_display")] #[doc(alias = "new_for_display")] pub fn 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.into_glib(), )) } } #[doc(alias = "gdk_cursor_new_from_name")] #[doc(alias = "new_from_name")] pub fn 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, )) } } #[doc(alias = "gdk_cursor_new_from_pixbuf")] #[doc(alias = "new_from_pixbuf")] pub fn 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, )) } } #[doc(alias = "gdk_cursor_new_from_surface")] #[doc(alias = "new_from_surface")] pub fn 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, )) } } #[doc(alias = "gdk_cursor_get_cursor_type")] #[doc(alias = "get_cursor_type")] pub fn cursor_type(&self) -> CursorType { unsafe { from_glib(ffi::gdk_cursor_get_cursor_type(self.to_glib_none().0)) } } #[doc(alias = "gdk_cursor_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_cursor_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_cursor_get_image")] #[doc(alias = "get_image")] pub fn image(&self) -> Option { unsafe { from_glib_full(ffi::gdk_cursor_get_image(self.to_glib_none().0)) } } #[doc(alias = "gdk_cursor_get_surface")] #[doc(alias = "get_surface")] pub fn surface(&self) -> (Option, f64, f64) { unsafe { let mut x_hot = mem::MaybeUninit::uninit(); let mut y_hot = mem::MaybeUninit::uninit(); let ret = from_glib_full(ffi::gdk_cursor_get_surface( self.to_glib_none().0, x_hot.as_mut_ptr(), y_hot.as_mut_ptr(), )); let x_hot = x_hot.assume_init(); let y_hot = y_hot.assume_init(); (ret, x_hot, y_hot) } } } impl fmt::Display for Cursor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Cursor") } } gdk-0.14.3/src/auto/device.rs000064400000000000000000000560010072674642500140540ustar 00000000000000// 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 crate::Atom; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] use crate::AxisFlags; use crate::AxisUse; use crate::Cursor; use crate::DeviceManager; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] use crate::DeviceTool; use crate::DeviceType; use crate::Display; use crate::EventMask; use crate::GrabOwnership; use crate::GrabStatus; use crate::InputMode; use crate::InputSource; use crate::ModifierType; use crate::Screen; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use crate::Seat; use crate::Window; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::ToValue; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; use std::ptr; glib::wrapper! { #[doc(alias = "GdkDevice")] pub struct Device(Object); match fn { type_ => || ffi::gdk_device_get_type(), } } impl Device { #[doc(alias = "gdk_device_get_associated_device")] #[doc(alias = "get_associated_device")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_device_get_axes")] #[doc(alias = "get_axes")] pub fn axes(&self) -> AxisFlags { unsafe { from_glib(ffi::gdk_device_get_axes(self.to_glib_none().0)) } } //#[doc(alias = "gdk_device_get_axis")] //#[doc(alias = "get_axis")] //pub fn axis(&self, axes: &[f64], use_: AxisUse) -> Option { // unsafe { TODO: call ffi:gdk_device_get_axis() } //} #[doc(alias = "gdk_device_get_axis_use")] #[doc(alias = "get_axis_use")] pub fn axis_use(&self, index_: u32) -> AxisUse { unsafe { from_glib(ffi::gdk_device_get_axis_use(self.to_glib_none().0, index_)) } } //#[doc(alias = "gdk_device_get_axis_value")] //#[doc(alias = "get_axis_value")] //pub fn axis_value(&self, axes: &[f64], axis_label: &Atom) -> Option { // unsafe { TODO: call ffi:gdk_device_get_axis_value() } //} #[doc(alias = "gdk_device_get_device_type")] #[doc(alias = "get_device_type")] pub fn device_type(&self) -> DeviceType { unsafe { from_glib(ffi::gdk_device_get_device_type(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_device_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_has_cursor")] #[doc(alias = "get_has_cursor")] pub fn has_cursor(&self) -> bool { unsafe { from_glib(ffi::gdk_device_get_has_cursor(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_key")] #[doc(alias = "get_key")] pub fn key(&self, index_: u32) -> Option<(u32, ModifierType)> { unsafe { let mut keyval = mem::MaybeUninit::uninit(); let mut modifiers = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_device_get_key( self.to_glib_none().0, index_, keyval.as_mut_ptr(), modifiers.as_mut_ptr(), )); let keyval = keyval.assume_init(); let modifiers = modifiers.assume_init(); if ret { Some((keyval, from_glib(modifiers))) } else { None } } } #[doc(alias = "gdk_device_get_last_event_window")] #[doc(alias = "get_last_event_window")] pub fn last_event_window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_last_event_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_mode")] #[doc(alias = "get_mode")] pub fn mode(&self) -> InputMode { unsafe { from_glib(ffi::gdk_device_get_mode(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_n_axes")] #[doc(alias = "get_n_axes")] pub fn n_axes(&self) -> i32 { unsafe { ffi::gdk_device_get_n_axes(self.to_glib_none().0) } } #[doc(alias = "gdk_device_get_n_keys")] #[doc(alias = "get_n_keys")] pub fn n_keys(&self) -> i32 { unsafe { ffi::gdk_device_get_n_keys(self.to_glib_none().0) } } #[doc(alias = "gdk_device_get_name")] #[doc(alias = "get_name")] pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_name(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_position")] #[doc(alias = "get_position")] pub fn position(&self) -> (Screen, i32, i32) { unsafe { let mut screen = ptr::null_mut(); let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); ffi::gdk_device_get_position( self.to_glib_none().0, &mut screen, x.as_mut_ptr(), y.as_mut_ptr(), ); let x = x.assume_init(); let y = y.assume_init(); (from_glib_none(screen), x, y) } } #[doc(alias = "gdk_device_get_position_double")] #[doc(alias = "get_position_double")] pub fn position_double(&self) -> (Screen, f64, f64) { unsafe { let mut screen = ptr::null_mut(); let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); ffi::gdk_device_get_position_double( self.to_glib_none().0, &mut screen, x.as_mut_ptr(), y.as_mut_ptr(), ); let x = x.assume_init(); let y = y.assume_init(); (from_glib_none(screen), x, y) } } #[doc(alias = "gdk_device_get_product_id")] #[doc(alias = "get_product_id")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_device_get_seat")] #[doc(alias = "get_seat")] pub fn seat(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_seat(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_source")] #[doc(alias = "get_source")] pub fn source(&self) -> InputSource { unsafe { from_glib(ffi::gdk_device_get_source(self.to_glib_none().0)) } } //#[doc(alias = "gdk_device_get_state")] //#[doc(alias = "get_state")] //pub fn state(&self, window: &Window, axes: &[f64]) -> ModifierType { // unsafe { TODO: call ffi:gdk_device_get_state() } //} #[doc(alias = "gdk_device_get_vendor_id")] #[doc(alias = "get_vendor_id")] pub fn vendor_id(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_vendor_id(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_window_at_position")] #[doc(alias = "get_window_at_position")] pub fn window_at_position(&self) -> (Option, i32, i32) { unsafe { let mut win_x = mem::MaybeUninit::uninit(); let mut win_y = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_device_get_window_at_position( self.to_glib_none().0, win_x.as_mut_ptr(), win_y.as_mut_ptr(), )); let win_x = win_x.assume_init(); let win_y = win_y.assume_init(); (ret, win_x, win_y) } } #[doc(alias = "gdk_device_get_window_at_position_double")] #[doc(alias = "get_window_at_position_double")] pub fn window_at_position_double(&self) -> (Option, f64, f64) { unsafe { let mut win_x = mem::MaybeUninit::uninit(); let mut win_y = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_device_get_window_at_position_double( self.to_glib_none().0, win_x.as_mut_ptr(), win_y.as_mut_ptr(), )); let win_x = win_x.assume_init(); let win_y = win_y.assume_init(); (ret, win_x, win_y) } } #[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")] #[doc(alias = "gdk_device_grab")] pub fn grab( &self, window: &Window, 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.to_glib_none().0, grab_ownership.into_glib(), owner_events.into_glib(), event_mask.into_glib(), cursor.to_glib_none().0, time_, )) } } #[doc(alias = "gdk_device_list_axes")] pub fn list_axes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_device_list_axes( self.to_glib_none().0, )) } } #[doc(alias = "gdk_device_list_slave_devices")] pub fn list_slave_devices(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_device_list_slave_devices( self.to_glib_none().0, )) } } #[doc(alias = "gdk_device_set_axis_use")] pub fn set_axis_use(&self, index_: u32, use_: AxisUse) { unsafe { ffi::gdk_device_set_axis_use(self.to_glib_none().0, index_, use_.into_glib()); } } #[doc(alias = "gdk_device_set_key")] 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.into_glib()); } } #[doc(alias = "gdk_device_set_mode")] pub fn set_mode(&self, mode: InputMode) -> bool { unsafe { from_glib(ffi::gdk_device_set_mode( self.to_glib_none().0, mode.into_glib(), )) } } #[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")] #[doc(alias = "gdk_device_ungrab")] pub fn ungrab(&self, time_: u32) { unsafe { ffi::gdk_device_ungrab(self.to_glib_none().0, time_); } } #[doc(alias = "gdk_device_warp")] 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); } } #[doc(alias = "device-manager")] pub fn device_manager(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"device-manager\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `device-manager` getter") } } #[doc(alias = "input-mode")] pub fn input_mode(&self) -> InputMode { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"input-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `input-mode` getter") } } #[doc(alias = "input-mode")] pub fn set_input_mode(&self, input_mode: InputMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"input-mode\0".as_ptr() as *const _, input_mode.to_value().to_glib_none().0, ); } } #[doc(alias = "input-source")] pub fn input_source(&self) -> InputSource { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"input-source\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `input-source` getter") } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "num-touches")] pub fn num_touches(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"num-touches\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `num-touches` getter") } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] pub fn set_seat(&self, seat: Option<&Seat>) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"seat\0".as_ptr() as *const _, seat.to_value().to_glib_none().0, ); } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub fn tool(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"tool\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `tool` getter") } } #[doc(alias = "type")] pub fn type_(&self) -> DeviceType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"type\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `type` getter") } } #[doc(alias = "changed")] pub fn connect_changed(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "tool-changed")] pub fn connect_tool_changed( &self, f: F, ) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"tool-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( tool_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "associated-device")] pub fn connect_associated_device_notify( &self, f: F, ) -> SignalHandlerId { 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)) } 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::<_, unsafe extern "C" fn()>( notify_associated_device_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "axes")] pub fn connect_axes_notify(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::axes\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_axes_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "input-mode")] pub fn connect_input_mode_notify(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::input-mode\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_input_mode_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "n-axes")] pub fn connect_n_axes_notify(&self, f: F) -> SignalHandlerId { 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)) } 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::<_, unsafe extern "C" fn()>( notify_n_axes_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "seat")] pub fn connect_seat_notify(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::seat\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_seat_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "tool")] pub fn connect_tool_notify(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::tool\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_tool_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "type")] pub fn connect_type_notify(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::type\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_type_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Device { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Device") } } gdk-0.14.3/src/auto/device_manager.rs000064400000000000000000000105070072674642500155470ustar 00000000000000// 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 crate::Device; use crate::DeviceType; use crate::Display; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkDeviceManager")] pub struct DeviceManager(Object); match fn { type_ => || ffi::gdk_device_manager_get_type(), } } impl DeviceManager { #[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")] #[doc(alias = "gdk_device_manager_get_client_pointer")] #[doc(alias = "get_client_pointer")] pub fn client_pointer(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_manager_get_client_pointer( self.to_glib_none().0, )) } } #[doc(alias = "gdk_device_manager_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_manager_get_display(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")] #[doc(alias = "gdk_device_manager_list_devices")] 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_.into_glib(), )) } } #[doc(alias = "device-added")] pub fn connect_device_added(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"device-added\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( device_added_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "device-changed")] pub fn connect_device_changed(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"device-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( device_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "device-removed")] pub fn connect_device_removed(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"device-removed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( device_removed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for DeviceManager { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DeviceManager") } } gdk-0.14.3/src/auto/device_pad.rs000064400000000000000000000041030072674642500146740ustar 00000000000000// 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 crate::Device; use crate::DevicePadFeature; use glib::object::IsA; use glib::translate::*; use std::fmt; glib::wrapper! { #[doc(alias = "GdkDevicePad")] pub struct DevicePad(Interface) @requires Device; match fn { type_ => || ffi::gdk_device_pad_get_type(), } } pub const NONE_DEVICE_PAD: Option<&DevicePad> = None; pub trait DevicePadExt: 'static { #[doc(alias = "gdk_device_pad_get_feature_group")] #[doc(alias = "get_feature_group")] fn feature_group(&self, feature: DevicePadFeature, feature_idx: i32) -> i32; #[doc(alias = "gdk_device_pad_get_group_n_modes")] #[doc(alias = "get_group_n_modes")] fn group_n_modes(&self, group_idx: i32) -> i32; #[doc(alias = "gdk_device_pad_get_n_features")] #[doc(alias = "get_n_features")] fn n_features(&self, feature: DevicePadFeature) -> i32; #[doc(alias = "gdk_device_pad_get_n_groups")] #[doc(alias = "get_n_groups")] fn n_groups(&self) -> i32; } impl> DevicePadExt for O { fn 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.into_glib(), feature_idx, ) } } fn 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) } } fn n_features(&self, feature: DevicePadFeature) -> i32 { unsafe { ffi::gdk_device_pad_get_n_features(self.as_ref().to_glib_none().0, feature.into_glib()) } } fn 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 { f.write_str("DevicePad") } } gdk-0.14.3/src/auto/device_tool.rs000064400000000000000000000065310072674642500151140ustar 00000000000000// 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 crate::AxisFlags; use crate::DeviceToolType; use glib::object::ObjectType as ObjectType_; use glib::translate::*; use glib::StaticType; use std::fmt; glib::wrapper! { #[doc(alias = "GdkDeviceTool")] pub struct DeviceTool(Object); match fn { type_ => || ffi::gdk_device_tool_get_type(), } } impl DeviceTool { #[doc(alias = "gdk_device_tool_get_hardware_id")] #[doc(alias = "get_hardware_id")] pub fn hardware_id(&self) -> u64 { unsafe { ffi::gdk_device_tool_get_hardware_id(self.to_glib_none().0) } } #[doc(alias = "gdk_device_tool_get_serial")] #[doc(alias = "get_serial")] pub fn serial(&self) -> u64 { unsafe { ffi::gdk_device_tool_get_serial(self.to_glib_none().0) } } #[doc(alias = "gdk_device_tool_get_tool_type")] #[doc(alias = "get_tool_type")] pub fn tool_type(&self) -> DeviceToolType { unsafe { from_glib(ffi::gdk_device_tool_get_tool_type(self.to_glib_none().0)) } } pub fn axes(&self) -> AxisFlags { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"axes\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `axes` getter") } } #[doc(alias = "hardware-id")] pub fn get_property_hardware_id(&self) -> u64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"hardware-id\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `hardware-id` getter") } } pub fn get_property_serial(&self) -> u64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"serial\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `serial` getter") } } #[doc(alias = "tool-type")] pub fn get_property_tool_type(&self) -> DeviceToolType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"tool-type\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `tool-type` getter") } } } impl fmt::Display for DeviceTool { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DeviceTool") } } gdk-0.14.3/src/auto/display.rs000064400000000000000000000417750072674642500142760ustar 00000000000000// 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 crate::AppLaunchContext; use crate::Atom; use crate::Device; use crate::DeviceManager; use crate::Event; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] use crate::Monitor; use crate::Screen; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use crate::Seat; use crate::Window; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkDisplay")] pub struct Display(Object); match fn { type_ => || ffi::gdk_display_get_type(), } } impl Display { #[doc(alias = "gdk_display_beep")] pub fn beep(&self) { unsafe { ffi::gdk_display_beep(self.to_glib_none().0); } } #[doc(alias = "gdk_display_close")] pub fn close(&self) { unsafe { ffi::gdk_display_close(self.to_glib_none().0); } } #[doc(alias = "gdk_display_device_is_grabbed")] 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, )) } } #[doc(alias = "gdk_display_flush")] pub fn flush(&self) { unsafe { ffi::gdk_display_flush(self.to_glib_none().0); } } #[doc(alias = "gdk_display_get_app_launch_context")] #[doc(alias = "get_app_launch_context")] pub fn app_launch_context(&self) -> Option { unsafe { from_glib_full(ffi::gdk_display_get_app_launch_context( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_get_default_cursor_size")] #[doc(alias = "get_default_cursor_size")] pub fn default_cursor_size(&self) -> u32 { unsafe { ffi::gdk_display_get_default_cursor_size(self.to_glib_none().0) } } #[doc(alias = "gdk_display_get_default_group")] #[doc(alias = "get_default_group")] pub fn default_group(&self) -> Window { unsafe { from_glib_none(ffi::gdk_display_get_default_group(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_get_default_screen")] #[doc(alias = "get_default_screen")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_display_get_default_seat")] #[doc(alias = "get_default_seat")] pub fn 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 = "Since 3.20")] #[doc(alias = "gdk_display_get_device_manager")] #[doc(alias = "get_device_manager")] pub fn device_manager(&self) -> Option { unsafe { from_glib_none(ffi::gdk_display_get_device_manager(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_get_event")] #[doc(alias = "get_event")] pub fn event(&self) -> Option { unsafe { from_glib_full(ffi::gdk_display_get_event(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_get_maximal_cursor_size")] #[doc(alias = "get_maximal_cursor_size")] pub fn maximal_cursor_size(&self) -> (u32, u32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); ffi::gdk_display_get_maximal_cursor_size( self.to_glib_none().0, width.as_mut_ptr(), height.as_mut_ptr(), ); let width = width.assume_init(); let height = height.assume_init(); (width, height) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_monitor")] #[doc(alias = "get_monitor")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_monitor_at_point")] #[doc(alias = "get_monitor_at_point")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_monitor_at_window")] #[doc(alias = "get_monitor_at_window")] pub fn monitor_at_window(&self, window: &Window) -> Option { unsafe { from_glib_none(ffi::gdk_display_get_monitor_at_window( self.to_glib_none().0, window.to_glib_none().0, )) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_n_monitors")] #[doc(alias = "get_n_monitors")] pub fn n_monitors(&self) -> i32 { unsafe { ffi::gdk_display_get_n_monitors(self.to_glib_none().0) } } #[doc(alias = "gdk_display_get_name")] #[doc(alias = "get_name")] pub fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::gdk_display_get_name(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_primary_monitor")] #[doc(alias = "get_primary_monitor")] pub fn 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 = "Since 3.20")] #[doc(alias = "gdk_display_get_screen")] #[doc(alias = "get_screen")] pub fn screen(&self, screen_num: i32) -> Screen { unsafe { from_glib_none(ffi::gdk_display_get_screen( self.to_glib_none().0, screen_num, )) } } #[doc(alias = "gdk_display_has_pending")] pub fn has_pending(&self) -> bool { unsafe { from_glib(ffi::gdk_display_has_pending(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_is_closed")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_display_list_seats")] pub fn list_seats(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_display_list_seats( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_notify_startup_complete")] 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, ); } } #[doc(alias = "gdk_display_peek_event")] pub fn peek_event(&self) -> Option { unsafe { from_glib_full(ffi::gdk_display_peek_event(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_put_event")] pub fn put_event(&self, event: &Event) { unsafe { ffi::gdk_display_put_event(self.to_glib_none().0, event.to_glib_none().0); } } #[doc(alias = "gdk_display_request_selection_notification")] 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, )) } } #[doc(alias = "gdk_display_set_double_click_distance")] pub fn set_double_click_distance(&self, distance: u32) { unsafe { ffi::gdk_display_set_double_click_distance(self.to_glib_none().0, distance); } } #[doc(alias = "gdk_display_set_double_click_time")] pub fn set_double_click_time(&self, msec: u32) { unsafe { ffi::gdk_display_set_double_click_time(self.to_glib_none().0, msec); } } #[doc(alias = "gdk_display_store_clipboard")] pub fn store_clipboard(&self, clipboard_window: &Window, time_: u32, targets: &[&Atom]) { let n_targets = targets.len() as i32; unsafe { ffi::gdk_display_store_clipboard( self.to_glib_none().0, clipboard_window.to_glib_none().0, time_, targets.to_glib_none().0, n_targets, ); } } #[doc(alias = "gdk_display_supports_clipboard_persistence")] pub fn supports_clipboard_persistence(&self) -> bool { unsafe { from_glib(ffi::gdk_display_supports_clipboard_persistence( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_supports_cursor_alpha")] pub fn supports_cursor_alpha(&self) -> bool { unsafe { from_glib(ffi::gdk_display_supports_cursor_alpha( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_supports_cursor_color")] pub fn supports_cursor_color(&self) -> bool { unsafe { from_glib(ffi::gdk_display_supports_cursor_color( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_supports_input_shapes")] pub fn supports_input_shapes(&self) -> bool { unsafe { from_glib(ffi::gdk_display_supports_input_shapes( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_supports_selection_notification")] pub fn supports_selection_notification(&self) -> bool { unsafe { from_glib(ffi::gdk_display_supports_selection_notification( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_supports_shapes")] pub fn supports_shapes(&self) -> bool { unsafe { from_glib(ffi::gdk_display_supports_shapes(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_sync")] pub fn sync(&self) { unsafe { ffi::gdk_display_sync(self.to_glib_none().0); } } #[doc(alias = "gdk_display_get_default")] #[doc(alias = "get_default")] pub fn default() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_display_get_default()) } } #[doc(alias = "gdk_display_open")] 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)) } } #[doc(alias = "closed")] pub fn connect_closed(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"closed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( closed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "monitor-added")] pub fn connect_monitor_added(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"monitor-added\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( monitor_added_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "monitor-removed")] pub fn connect_monitor_removed( &self, f: F, ) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"monitor-removed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( monitor_removed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "opened")] pub fn connect_opened(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"opened\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( opened_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "seat-added")] pub fn connect_seat_added(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"seat-added\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( seat_added_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "seat-removed")] pub fn connect_seat_removed(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"seat-removed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( seat_removed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Display { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str(&self.name()) } } gdk-0.14.3/src/auto/display_manager.rs000064400000000000000000000076150072674642500157630ustar 00000000000000// 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 crate::Display; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkDisplayManager")] pub struct DisplayManager(Object); match fn { type_ => || ffi::gdk_display_manager_get_type(), } } impl DisplayManager { #[doc(alias = "gdk_display_manager_get_default_display")] #[doc(alias = "get_default_display")] pub fn default_display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_display_manager_get_default_display( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_manager_list_displays")] pub fn list_displays(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_display_manager_list_displays( self.to_glib_none().0, )) } } #[doc(alias = "gdk_display_manager_open_display")] 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, )) } } #[doc(alias = "gdk_display_manager_set_default_display")] 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, ); } } #[doc(alias = "gdk_display_manager_get")] pub fn get() -> DisplayManager { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_display_manager_get()) } } #[doc(alias = "display-opened")] pub fn connect_display_opened( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn display_opened_trampoline< F: Fn(&DisplayManager, &Display) + 'static, >( 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"display-opened\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( display_opened_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "default-display")] pub fn connect_default_display_notify(&self, f: F) -> SignalHandlerId { 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)) } 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::<_, unsafe extern "C" fn()>( notify_default_display_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for DisplayManager { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DisplayManager") } } gdk-0.14.3/src/auto/drag_context.rs000064400000000000000000000211750072674642500153020ustar 00000000000000// 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 crate::Atom; use crate::Device; use crate::DragAction; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use crate::DragCancelReason; use crate::DragProtocol; use crate::Window; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use glib::object::ObjectType as ObjectType_; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use glib::signal::connect_raw; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use glib::signal::SignalHandlerId; use glib::translate::*; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use std::boxed::Box as Box_; use std::fmt; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkDragContext")] pub struct DragContext(Object); match fn { type_ => || ffi::gdk_drag_context_get_type(), } } impl DragContext { #[doc(alias = "gdk_drag_context_get_actions")] #[doc(alias = "get_actions")] pub fn actions(&self) -> DragAction { unsafe { from_glib(ffi::gdk_drag_context_get_actions(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_dest_window")] #[doc(alias = "get_dest_window")] pub fn dest_window(&self) -> Window { unsafe { from_glib_none(ffi::gdk_drag_context_get_dest_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_device")] #[doc(alias = "get_device")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_drag_context_get_drag_window")] #[doc(alias = "get_drag_window")] pub fn drag_window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_drag_context_get_drag_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_protocol")] #[doc(alias = "get_protocol")] pub fn protocol(&self) -> DragProtocol { unsafe { from_glib(ffi::gdk_drag_context_get_protocol(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_selected_action")] #[doc(alias = "get_selected_action")] pub fn selected_action(&self) -> DragAction { unsafe { from_glib(ffi::gdk_drag_context_get_selected_action( self.to_glib_none().0, )) } } #[doc(alias = "gdk_drag_context_get_source_window")] #[doc(alias = "get_source_window")] pub fn source_window(&self) -> Window { unsafe { from_glib_none(ffi::gdk_drag_context_get_source_window( self.to_glib_none().0, )) } } #[doc(alias = "gdk_drag_context_get_suggested_action")] #[doc(alias = "get_suggested_action")] pub fn suggested_action(&self) -> DragAction { unsafe { from_glib(ffi::gdk_drag_context_get_suggested_action( self.to_glib_none().0, )) } } #[doc(alias = "gdk_drag_context_list_targets")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_drag_context_manage_dnd")] pub fn manage_dnd(&self, ipc_window: &Window, actions: DragAction) -> bool { unsafe { from_glib(ffi::gdk_drag_context_manage_dnd( self.to_glib_none().0, ipc_window.to_glib_none().0, actions.into_glib(), )) } } #[doc(alias = "gdk_drag_context_set_device")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_drag_context_set_hotspot")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "action-changed")] pub fn connect_action_changed( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn action_changed_trampoline< F: Fn(&DragContext, DragAction) + 'static, >( 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"action-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( action_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "cancel")] pub fn connect_cancel( &self, f: F, ) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"cancel\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( cancel_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "dnd-finished")] pub fn connect_dnd_finished(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"dnd-finished\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( dnd_finished_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "drop-performed")] pub fn connect_drop_performed(&self, f: F) -> SignalHandlerId { 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) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"drop-performed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( drop_performed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for DragContext { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DragContext") } } gdk-0.14.3/src/auto/drawing_context.rs000064400000000000000000000030270072674642500160140ustar 00000000000000// 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 crate::Window; use glib::translate::*; use std::fmt; glib::wrapper! { #[doc(alias = "GdkDrawingContext")] pub struct DrawingContext(Object); match fn { type_ => || ffi::gdk_drawing_context_get_type(), } } impl DrawingContext { #[doc(alias = "gdk_drawing_context_get_cairo_context")] #[doc(alias = "get_cairo_context")] pub fn cairo_context(&self) -> Option { unsafe { from_glib_none(ffi::gdk_drawing_context_get_cairo_context( self.to_glib_none().0, )) } } #[doc(alias = "gdk_drawing_context_get_clip")] #[doc(alias = "get_clip")] pub fn clip(&self) -> Option { unsafe { from_glib_full(ffi::gdk_drawing_context_get_clip(self.to_glib_none().0)) } } #[doc(alias = "gdk_drawing_context_get_window")] #[doc(alias = "get_window")] pub fn window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_drawing_context_get_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_drawing_context_is_valid")] pub fn is_valid(&self) -> bool { unsafe { from_glib(ffi::gdk_drawing_context_is_valid(self.to_glib_none().0)) } } } impl fmt::Display for DrawingContext { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("DrawingContext") } } gdk-0.14.3/src/auto/enums.rs000064400000000000000000003535030072674642500137530ustar 00000000000000// 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 glib::error::ErrorDomain; use glib::translate::*; use glib::value::FromValue; use glib::value::ToValue; use glib::Quark; use glib::StaticType; use glib::Type; use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkAxisUse")] pub enum AxisUse { #[doc(alias = "GDK_AXIS_IGNORE")] Ignore, #[doc(alias = "GDK_AXIS_X")] X, #[doc(alias = "GDK_AXIS_Y")] Y, #[doc(alias = "GDK_AXIS_PRESSURE")] Pressure, #[doc(alias = "GDK_AXIS_XTILT")] Xtilt, #[doc(alias = "GDK_AXIS_YTILT")] Ytilt, #[doc(alias = "GDK_AXIS_WHEEL")] Wheel, #[doc(alias = "GDK_AXIS_DISTANCE")] Distance, #[doc(alias = "GDK_AXIS_ROTATION")] Rotation, #[doc(alias = "GDK_AXIS_SLIDER")] Slider, #[doc(alias = "GDK_AXIS_LAST")] Last, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for AxisUse { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "AxisUse::{}", match *self { Self::Ignore => "Ignore", Self::X => "X", Self::Y => "Y", Self::Pressure => "Pressure", Self::Xtilt => "Xtilt", Self::Ytilt => "Ytilt", Self::Wheel => "Wheel", Self::Distance => "Distance", Self::Rotation => "Rotation", Self::Slider => "Slider", Self::Last => "Last", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for AxisUse { type GlibType = ffi::GdkAxisUse; fn into_glib(self) -> ffi::GdkAxisUse { match self { Self::Ignore => ffi::GDK_AXIS_IGNORE, Self::X => ffi::GDK_AXIS_X, Self::Y => ffi::GDK_AXIS_Y, Self::Pressure => ffi::GDK_AXIS_PRESSURE, Self::Xtilt => ffi::GDK_AXIS_XTILT, Self::Ytilt => ffi::GDK_AXIS_YTILT, Self::Wheel => ffi::GDK_AXIS_WHEEL, Self::Distance => ffi::GDK_AXIS_DISTANCE, Self::Rotation => ffi::GDK_AXIS_ROTATION, Self::Slider => ffi::GDK_AXIS_SLIDER, Self::Last => ffi::GDK_AXIS_LAST, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for AxisUse { unsafe fn from_glib(value: ffi::GdkAxisUse) -> Self { skip_assert_initialized!(); match value { ffi::GDK_AXIS_IGNORE => Self::Ignore, ffi::GDK_AXIS_X => Self::X, ffi::GDK_AXIS_Y => Self::Y, ffi::GDK_AXIS_PRESSURE => Self::Pressure, ffi::GDK_AXIS_XTILT => Self::Xtilt, ffi::GDK_AXIS_YTILT => Self::Ytilt, ffi::GDK_AXIS_WHEEL => Self::Wheel, ffi::GDK_AXIS_DISTANCE => Self::Distance, ffi::GDK_AXIS_ROTATION => Self::Rotation, ffi::GDK_AXIS_SLIDER => Self::Slider, ffi::GDK_AXIS_LAST => Self::Last, value => Self::__Unknown(value), } } } impl StaticType for AxisUse { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_axis_use_get_type()) } } } impl glib::value::ValueType for AxisUse { type Type = Self; } unsafe impl<'a> FromValue<'a> for AxisUse { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for AxisUse { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkByteOrder")] pub enum ByteOrder { #[doc(alias = "GDK_LSB_FIRST")] LsbFirst, #[doc(alias = "GDK_MSB_FIRST")] MsbFirst, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for ByteOrder { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "ByteOrder::{}", match *self { Self::LsbFirst => "LsbFirst", Self::MsbFirst => "MsbFirst", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for ByteOrder { type GlibType = ffi::GdkByteOrder; fn into_glib(self) -> ffi::GdkByteOrder { match self { Self::LsbFirst => ffi::GDK_LSB_FIRST, Self::MsbFirst => ffi::GDK_MSB_FIRST, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ByteOrder { unsafe fn from_glib(value: ffi::GdkByteOrder) -> Self { skip_assert_initialized!(); match value { ffi::GDK_LSB_FIRST => Self::LsbFirst, ffi::GDK_MSB_FIRST => Self::MsbFirst, value => Self::__Unknown(value), } } } impl StaticType for ByteOrder { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_byte_order_get_type()) } } } impl glib::value::ValueType for ByteOrder { type Type = Self; } unsafe impl<'a> FromValue<'a> for ByteOrder { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for ByteOrder { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkCrossingMode")] pub enum CrossingMode { #[doc(alias = "GDK_CROSSING_NORMAL")] Normal, #[doc(alias = "GDK_CROSSING_GRAB")] Grab, #[doc(alias = "GDK_CROSSING_UNGRAB")] Ungrab, #[doc(alias = "GDK_CROSSING_GTK_GRAB")] GtkGrab, #[doc(alias = "GDK_CROSSING_GTK_UNGRAB")] GtkUngrab, #[doc(alias = "GDK_CROSSING_STATE_CHANGED")] StateChanged, #[doc(alias = "GDK_CROSSING_TOUCH_BEGIN")] TouchBegin, #[doc(alias = "GDK_CROSSING_TOUCH_END")] TouchEnd, #[doc(alias = "GDK_CROSSING_DEVICE_SWITCH")] DeviceSwitch, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for CrossingMode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "CrossingMode::{}", match *self { Self::Normal => "Normal", Self::Grab => "Grab", Self::Ungrab => "Ungrab", Self::GtkGrab => "GtkGrab", Self::GtkUngrab => "GtkUngrab", Self::StateChanged => "StateChanged", Self::TouchBegin => "TouchBegin", Self::TouchEnd => "TouchEnd", Self::DeviceSwitch => "DeviceSwitch", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for CrossingMode { type GlibType = ffi::GdkCrossingMode; fn into_glib(self) -> ffi::GdkCrossingMode { match self { Self::Normal => ffi::GDK_CROSSING_NORMAL, Self::Grab => ffi::GDK_CROSSING_GRAB, Self::Ungrab => ffi::GDK_CROSSING_UNGRAB, Self::GtkGrab => ffi::GDK_CROSSING_GTK_GRAB, Self::GtkUngrab => ffi::GDK_CROSSING_GTK_UNGRAB, Self::StateChanged => ffi::GDK_CROSSING_STATE_CHANGED, Self::TouchBegin => ffi::GDK_CROSSING_TOUCH_BEGIN, Self::TouchEnd => ffi::GDK_CROSSING_TOUCH_END, Self::DeviceSwitch => ffi::GDK_CROSSING_DEVICE_SWITCH, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for CrossingMode { unsafe fn from_glib(value: ffi::GdkCrossingMode) -> Self { skip_assert_initialized!(); match value { ffi::GDK_CROSSING_NORMAL => Self::Normal, ffi::GDK_CROSSING_GRAB => Self::Grab, ffi::GDK_CROSSING_UNGRAB => Self::Ungrab, ffi::GDK_CROSSING_GTK_GRAB => Self::GtkGrab, ffi::GDK_CROSSING_GTK_UNGRAB => Self::GtkUngrab, ffi::GDK_CROSSING_STATE_CHANGED => Self::StateChanged, ffi::GDK_CROSSING_TOUCH_BEGIN => Self::TouchBegin, ffi::GDK_CROSSING_TOUCH_END => Self::TouchEnd, ffi::GDK_CROSSING_DEVICE_SWITCH => Self::DeviceSwitch, value => Self::__Unknown(value), } } } impl StaticType for CrossingMode { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_crossing_mode_get_type()) } } } impl glib::value::ValueType for CrossingMode { type Type = Self; } unsafe impl<'a> FromValue<'a> for CrossingMode { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for CrossingMode { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkCursorType")] pub enum CursorType { #[doc(alias = "GDK_X_CURSOR")] XCursor, #[doc(alias = "GDK_ARROW")] Arrow, #[doc(alias = "GDK_BASED_ARROW_DOWN")] BasedArrowDown, #[doc(alias = "GDK_BASED_ARROW_UP")] BasedArrowUp, #[doc(alias = "GDK_BOAT")] Boat, #[doc(alias = "GDK_BOGOSITY")] Bogosity, #[doc(alias = "GDK_BOTTOM_LEFT_CORNER")] BottomLeftCorner, #[doc(alias = "GDK_BOTTOM_RIGHT_CORNER")] BottomRightCorner, #[doc(alias = "GDK_BOTTOM_SIDE")] BottomSide, #[doc(alias = "GDK_BOTTOM_TEE")] BottomTee, #[doc(alias = "GDK_BOX_SPIRAL")] BoxSpiral, #[doc(alias = "GDK_CENTER_PTR")] CenterPtr, #[doc(alias = "GDK_CIRCLE")] Circle, #[doc(alias = "GDK_CLOCK")] Clock, #[doc(alias = "GDK_COFFEE_MUG")] CoffeeMug, #[doc(alias = "GDK_CROSS")] Cross, #[doc(alias = "GDK_CROSS_REVERSE")] CrossReverse, #[doc(alias = "GDK_CROSSHAIR")] Crosshair, #[doc(alias = "GDK_DIAMOND_CROSS")] DiamondCross, #[doc(alias = "GDK_DOT")] Dot, #[doc(alias = "GDK_DOTBOX")] Dotbox, #[doc(alias = "GDK_DOUBLE_ARROW")] DoubleArrow, #[doc(alias = "GDK_DRAFT_LARGE")] DraftLarge, #[doc(alias = "GDK_DRAFT_SMALL")] DraftSmall, #[doc(alias = "GDK_DRAPED_BOX")] DrapedBox, #[doc(alias = "GDK_EXCHANGE")] Exchange, #[doc(alias = "GDK_FLEUR")] Fleur, #[doc(alias = "GDK_GOBBLER")] Gobbler, #[doc(alias = "GDK_GUMBY")] Gumby, #[doc(alias = "GDK_HAND1")] Hand1, #[doc(alias = "GDK_HAND2")] Hand2, #[doc(alias = "GDK_HEART")] Heart, #[doc(alias = "GDK_ICON")] Icon, #[doc(alias = "GDK_IRON_CROSS")] IronCross, #[doc(alias = "GDK_LEFT_PTR")] LeftPtr, #[doc(alias = "GDK_LEFT_SIDE")] LeftSide, #[doc(alias = "GDK_LEFT_TEE")] LeftTee, #[doc(alias = "GDK_LEFTBUTTON")] Leftbutton, #[doc(alias = "GDK_LL_ANGLE")] LlAngle, #[doc(alias = "GDK_LR_ANGLE")] LrAngle, #[doc(alias = "GDK_MAN")] Man, #[doc(alias = "GDK_MIDDLEBUTTON")] Middlebutton, #[doc(alias = "GDK_MOUSE")] Mouse, #[doc(alias = "GDK_PENCIL")] Pencil, #[doc(alias = "GDK_PIRATE")] Pirate, #[doc(alias = "GDK_PLUS")] Plus, #[doc(alias = "GDK_QUESTION_ARROW")] QuestionArrow, #[doc(alias = "GDK_RIGHT_PTR")] RightPtr, #[doc(alias = "GDK_RIGHT_SIDE")] RightSide, #[doc(alias = "GDK_RIGHT_TEE")] RightTee, #[doc(alias = "GDK_RIGHTBUTTON")] Rightbutton, #[doc(alias = "GDK_RTL_LOGO")] RtlLogo, #[doc(alias = "GDK_SAILBOAT")] Sailboat, #[doc(alias = "GDK_SB_DOWN_ARROW")] SbDownArrow, #[doc(alias = "GDK_SB_H_DOUBLE_ARROW")] SbHDoubleArrow, #[doc(alias = "GDK_SB_LEFT_ARROW")] SbLeftArrow, #[doc(alias = "GDK_SB_RIGHT_ARROW")] SbRightArrow, #[doc(alias = "GDK_SB_UP_ARROW")] SbUpArrow, #[doc(alias = "GDK_SB_V_DOUBLE_ARROW")] SbVDoubleArrow, #[doc(alias = "GDK_SHUTTLE")] Shuttle, #[doc(alias = "GDK_SIZING")] Sizing, #[doc(alias = "GDK_SPIDER")] Spider, #[doc(alias = "GDK_SPRAYCAN")] Spraycan, #[doc(alias = "GDK_STAR")] Star, #[doc(alias = "GDK_TARGET")] Target, #[doc(alias = "GDK_TCROSS")] Tcross, #[doc(alias = "GDK_TOP_LEFT_ARROW")] TopLeftArrow, #[doc(alias = "GDK_TOP_LEFT_CORNER")] TopLeftCorner, #[doc(alias = "GDK_TOP_RIGHT_CORNER")] TopRightCorner, #[doc(alias = "GDK_TOP_SIDE")] TopSide, #[doc(alias = "GDK_TOP_TEE")] TopTee, #[doc(alias = "GDK_TREK")] Trek, #[doc(alias = "GDK_UL_ANGLE")] UlAngle, #[doc(alias = "GDK_UMBRELLA")] Umbrella, #[doc(alias = "GDK_UR_ANGLE")] UrAngle, #[doc(alias = "GDK_WATCH")] Watch, #[doc(alias = "GDK_XTERM")] Xterm, #[doc(alias = "GDK_LAST_CURSOR")] LastCursor, #[doc(alias = "GDK_BLANK_CURSOR")] BlankCursor, #[doc(alias = "GDK_CURSOR_IS_PIXMAP")] CursorIsPixmap, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for CursorType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "CursorType::{}", match *self { Self::XCursor => "XCursor", Self::Arrow => "Arrow", Self::BasedArrowDown => "BasedArrowDown", Self::BasedArrowUp => "BasedArrowUp", Self::Boat => "Boat", Self::Bogosity => "Bogosity", Self::BottomLeftCorner => "BottomLeftCorner", Self::BottomRightCorner => "BottomRightCorner", Self::BottomSide => "BottomSide", Self::BottomTee => "BottomTee", Self::BoxSpiral => "BoxSpiral", Self::CenterPtr => "CenterPtr", Self::Circle => "Circle", Self::Clock => "Clock", Self::CoffeeMug => "CoffeeMug", Self::Cross => "Cross", Self::CrossReverse => "CrossReverse", Self::Crosshair => "Crosshair", Self::DiamondCross => "DiamondCross", Self::Dot => "Dot", Self::Dotbox => "Dotbox", Self::DoubleArrow => "DoubleArrow", Self::DraftLarge => "DraftLarge", Self::DraftSmall => "DraftSmall", Self::DrapedBox => "DrapedBox", Self::Exchange => "Exchange", Self::Fleur => "Fleur", Self::Gobbler => "Gobbler", Self::Gumby => "Gumby", Self::Hand1 => "Hand1", Self::Hand2 => "Hand2", Self::Heart => "Heart", Self::Icon => "Icon", Self::IronCross => "IronCross", Self::LeftPtr => "LeftPtr", Self::LeftSide => "LeftSide", Self::LeftTee => "LeftTee", Self::Leftbutton => "Leftbutton", Self::LlAngle => "LlAngle", Self::LrAngle => "LrAngle", Self::Man => "Man", Self::Middlebutton => "Middlebutton", Self::Mouse => "Mouse", Self::Pencil => "Pencil", Self::Pirate => "Pirate", Self::Plus => "Plus", Self::QuestionArrow => "QuestionArrow", Self::RightPtr => "RightPtr", Self::RightSide => "RightSide", Self::RightTee => "RightTee", Self::Rightbutton => "Rightbutton", Self::RtlLogo => "RtlLogo", Self::Sailboat => "Sailboat", Self::SbDownArrow => "SbDownArrow", Self::SbHDoubleArrow => "SbHDoubleArrow", Self::SbLeftArrow => "SbLeftArrow", Self::SbRightArrow => "SbRightArrow", Self::SbUpArrow => "SbUpArrow", Self::SbVDoubleArrow => "SbVDoubleArrow", Self::Shuttle => "Shuttle", Self::Sizing => "Sizing", Self::Spider => "Spider", Self::Spraycan => "Spraycan", Self::Star => "Star", Self::Target => "Target", Self::Tcross => "Tcross", Self::TopLeftArrow => "TopLeftArrow", Self::TopLeftCorner => "TopLeftCorner", Self::TopRightCorner => "TopRightCorner", Self::TopSide => "TopSide", Self::TopTee => "TopTee", Self::Trek => "Trek", Self::UlAngle => "UlAngle", Self::Umbrella => "Umbrella", Self::UrAngle => "UrAngle", Self::Watch => "Watch", Self::Xterm => "Xterm", Self::LastCursor => "LastCursor", Self::BlankCursor => "BlankCursor", Self::CursorIsPixmap => "CursorIsPixmap", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for CursorType { type GlibType = ffi::GdkCursorType; fn into_glib(self) -> ffi::GdkCursorType { match self { Self::XCursor => ffi::GDK_X_CURSOR, Self::Arrow => ffi::GDK_ARROW, Self::BasedArrowDown => ffi::GDK_BASED_ARROW_DOWN, Self::BasedArrowUp => ffi::GDK_BASED_ARROW_UP, Self::Boat => ffi::GDK_BOAT, Self::Bogosity => ffi::GDK_BOGOSITY, Self::BottomLeftCorner => ffi::GDK_BOTTOM_LEFT_CORNER, Self::BottomRightCorner => ffi::GDK_BOTTOM_RIGHT_CORNER, Self::BottomSide => ffi::GDK_BOTTOM_SIDE, Self::BottomTee => ffi::GDK_BOTTOM_TEE, Self::BoxSpiral => ffi::GDK_BOX_SPIRAL, Self::CenterPtr => ffi::GDK_CENTER_PTR, Self::Circle => ffi::GDK_CIRCLE, Self::Clock => ffi::GDK_CLOCK, Self::CoffeeMug => ffi::GDK_COFFEE_MUG, Self::Cross => ffi::GDK_CROSS, Self::CrossReverse => ffi::GDK_CROSS_REVERSE, Self::Crosshair => ffi::GDK_CROSSHAIR, Self::DiamondCross => ffi::GDK_DIAMOND_CROSS, Self::Dot => ffi::GDK_DOT, Self::Dotbox => ffi::GDK_DOTBOX, Self::DoubleArrow => ffi::GDK_DOUBLE_ARROW, Self::DraftLarge => ffi::GDK_DRAFT_LARGE, Self::DraftSmall => ffi::GDK_DRAFT_SMALL, Self::DrapedBox => ffi::GDK_DRAPED_BOX, Self::Exchange => ffi::GDK_EXCHANGE, Self::Fleur => ffi::GDK_FLEUR, Self::Gobbler => ffi::GDK_GOBBLER, Self::Gumby => ffi::GDK_GUMBY, Self::Hand1 => ffi::GDK_HAND1, Self::Hand2 => ffi::GDK_HAND2, Self::Heart => ffi::GDK_HEART, Self::Icon => ffi::GDK_ICON, Self::IronCross => ffi::GDK_IRON_CROSS, Self::LeftPtr => ffi::GDK_LEFT_PTR, Self::LeftSide => ffi::GDK_LEFT_SIDE, Self::LeftTee => ffi::GDK_LEFT_TEE, Self::Leftbutton => ffi::GDK_LEFTBUTTON, Self::LlAngle => ffi::GDK_LL_ANGLE, Self::LrAngle => ffi::GDK_LR_ANGLE, Self::Man => ffi::GDK_MAN, Self::Middlebutton => ffi::GDK_MIDDLEBUTTON, Self::Mouse => ffi::GDK_MOUSE, Self::Pencil => ffi::GDK_PENCIL, Self::Pirate => ffi::GDK_PIRATE, Self::Plus => ffi::GDK_PLUS, Self::QuestionArrow => ffi::GDK_QUESTION_ARROW, Self::RightPtr => ffi::GDK_RIGHT_PTR, Self::RightSide => ffi::GDK_RIGHT_SIDE, Self::RightTee => ffi::GDK_RIGHT_TEE, Self::Rightbutton => ffi::GDK_RIGHTBUTTON, Self::RtlLogo => ffi::GDK_RTL_LOGO, Self::Sailboat => ffi::GDK_SAILBOAT, Self::SbDownArrow => ffi::GDK_SB_DOWN_ARROW, Self::SbHDoubleArrow => ffi::GDK_SB_H_DOUBLE_ARROW, Self::SbLeftArrow => ffi::GDK_SB_LEFT_ARROW, Self::SbRightArrow => ffi::GDK_SB_RIGHT_ARROW, Self::SbUpArrow => ffi::GDK_SB_UP_ARROW, Self::SbVDoubleArrow => ffi::GDK_SB_V_DOUBLE_ARROW, Self::Shuttle => ffi::GDK_SHUTTLE, Self::Sizing => ffi::GDK_SIZING, Self::Spider => ffi::GDK_SPIDER, Self::Spraycan => ffi::GDK_SPRAYCAN, Self::Star => ffi::GDK_STAR, Self::Target => ffi::GDK_TARGET, Self::Tcross => ffi::GDK_TCROSS, Self::TopLeftArrow => ffi::GDK_TOP_LEFT_ARROW, Self::TopLeftCorner => ffi::GDK_TOP_LEFT_CORNER, Self::TopRightCorner => ffi::GDK_TOP_RIGHT_CORNER, Self::TopSide => ffi::GDK_TOP_SIDE, Self::TopTee => ffi::GDK_TOP_TEE, Self::Trek => ffi::GDK_TREK, Self::UlAngle => ffi::GDK_UL_ANGLE, Self::Umbrella => ffi::GDK_UMBRELLA, Self::UrAngle => ffi::GDK_UR_ANGLE, Self::Watch => ffi::GDK_WATCH, Self::Xterm => ffi::GDK_XTERM, Self::LastCursor => ffi::GDK_LAST_CURSOR, Self::BlankCursor => ffi::GDK_BLANK_CURSOR, Self::CursorIsPixmap => ffi::GDK_CURSOR_IS_PIXMAP, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for CursorType { unsafe fn from_glib(value: ffi::GdkCursorType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_X_CURSOR => Self::XCursor, ffi::GDK_ARROW => Self::Arrow, ffi::GDK_BASED_ARROW_DOWN => Self::BasedArrowDown, ffi::GDK_BASED_ARROW_UP => Self::BasedArrowUp, ffi::GDK_BOAT => Self::Boat, ffi::GDK_BOGOSITY => Self::Bogosity, ffi::GDK_BOTTOM_LEFT_CORNER => Self::BottomLeftCorner, ffi::GDK_BOTTOM_RIGHT_CORNER => Self::BottomRightCorner, ffi::GDK_BOTTOM_SIDE => Self::BottomSide, ffi::GDK_BOTTOM_TEE => Self::BottomTee, ffi::GDK_BOX_SPIRAL => Self::BoxSpiral, ffi::GDK_CENTER_PTR => Self::CenterPtr, ffi::GDK_CIRCLE => Self::Circle, ffi::GDK_CLOCK => Self::Clock, ffi::GDK_COFFEE_MUG => Self::CoffeeMug, ffi::GDK_CROSS => Self::Cross, ffi::GDK_CROSS_REVERSE => Self::CrossReverse, ffi::GDK_CROSSHAIR => Self::Crosshair, ffi::GDK_DIAMOND_CROSS => Self::DiamondCross, ffi::GDK_DOT => Self::Dot, ffi::GDK_DOTBOX => Self::Dotbox, ffi::GDK_DOUBLE_ARROW => Self::DoubleArrow, ffi::GDK_DRAFT_LARGE => Self::DraftLarge, ffi::GDK_DRAFT_SMALL => Self::DraftSmall, ffi::GDK_DRAPED_BOX => Self::DrapedBox, ffi::GDK_EXCHANGE => Self::Exchange, ffi::GDK_FLEUR => Self::Fleur, ffi::GDK_GOBBLER => Self::Gobbler, ffi::GDK_GUMBY => Self::Gumby, ffi::GDK_HAND1 => Self::Hand1, ffi::GDK_HAND2 => Self::Hand2, ffi::GDK_HEART => Self::Heart, ffi::GDK_ICON => Self::Icon, ffi::GDK_IRON_CROSS => Self::IronCross, ffi::GDK_LEFT_PTR => Self::LeftPtr, ffi::GDK_LEFT_SIDE => Self::LeftSide, ffi::GDK_LEFT_TEE => Self::LeftTee, ffi::GDK_LEFTBUTTON => Self::Leftbutton, ffi::GDK_LL_ANGLE => Self::LlAngle, ffi::GDK_LR_ANGLE => Self::LrAngle, ffi::GDK_MAN => Self::Man, ffi::GDK_MIDDLEBUTTON => Self::Middlebutton, ffi::GDK_MOUSE => Self::Mouse, ffi::GDK_PENCIL => Self::Pencil, ffi::GDK_PIRATE => Self::Pirate, ffi::GDK_PLUS => Self::Plus, ffi::GDK_QUESTION_ARROW => Self::QuestionArrow, ffi::GDK_RIGHT_PTR => Self::RightPtr, ffi::GDK_RIGHT_SIDE => Self::RightSide, ffi::GDK_RIGHT_TEE => Self::RightTee, ffi::GDK_RIGHTBUTTON => Self::Rightbutton, ffi::GDK_RTL_LOGO => Self::RtlLogo, ffi::GDK_SAILBOAT => Self::Sailboat, ffi::GDK_SB_DOWN_ARROW => Self::SbDownArrow, ffi::GDK_SB_H_DOUBLE_ARROW => Self::SbHDoubleArrow, ffi::GDK_SB_LEFT_ARROW => Self::SbLeftArrow, ffi::GDK_SB_RIGHT_ARROW => Self::SbRightArrow, ffi::GDK_SB_UP_ARROW => Self::SbUpArrow, ffi::GDK_SB_V_DOUBLE_ARROW => Self::SbVDoubleArrow, ffi::GDK_SHUTTLE => Self::Shuttle, ffi::GDK_SIZING => Self::Sizing, ffi::GDK_SPIDER => Self::Spider, ffi::GDK_SPRAYCAN => Self::Spraycan, ffi::GDK_STAR => Self::Star, ffi::GDK_TARGET => Self::Target, ffi::GDK_TCROSS => Self::Tcross, ffi::GDK_TOP_LEFT_ARROW => Self::TopLeftArrow, ffi::GDK_TOP_LEFT_CORNER => Self::TopLeftCorner, ffi::GDK_TOP_RIGHT_CORNER => Self::TopRightCorner, ffi::GDK_TOP_SIDE => Self::TopSide, ffi::GDK_TOP_TEE => Self::TopTee, ffi::GDK_TREK => Self::Trek, ffi::GDK_UL_ANGLE => Self::UlAngle, ffi::GDK_UMBRELLA => Self::Umbrella, ffi::GDK_UR_ANGLE => Self::UrAngle, ffi::GDK_WATCH => Self::Watch, ffi::GDK_XTERM => Self::Xterm, ffi::GDK_LAST_CURSOR => Self::LastCursor, ffi::GDK_BLANK_CURSOR => Self::BlankCursor, ffi::GDK_CURSOR_IS_PIXMAP => Self::CursorIsPixmap, value => Self::__Unknown(value), } } } impl StaticType for CursorType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_cursor_type_get_type()) } } } impl glib::value::ValueType for CursorType { type Type = Self; } unsafe impl<'a> FromValue<'a> for CursorType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for CursorType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkDevicePadFeature")] pub enum DevicePadFeature { #[doc(alias = "GDK_DEVICE_PAD_FEATURE_BUTTON")] Button, #[doc(alias = "GDK_DEVICE_PAD_FEATURE_RING")] Ring, #[doc(alias = "GDK_DEVICE_PAD_FEATURE_STRIP")] Strip, #[doc(hidden)] __Unknown(i32), } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl fmt::Display for DevicePadFeature { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "DevicePadFeature::{}", match *self { Self::Button => "Button", Self::Ring => "Ring", Self::Strip => "Strip", _ => "Unknown", } ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl IntoGlib for DevicePadFeature { type GlibType = ffi::GdkDevicePadFeature; fn into_glib(self) -> ffi::GdkDevicePadFeature { match self { Self::Button => ffi::GDK_DEVICE_PAD_FEATURE_BUTTON, Self::Ring => ffi::GDK_DEVICE_PAD_FEATURE_RING, Self::Strip => ffi::GDK_DEVICE_PAD_FEATURE_STRIP, Self::__Unknown(value) => value, } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl FromGlib for DevicePadFeature { unsafe fn from_glib(value: ffi::GdkDevicePadFeature) -> Self { skip_assert_initialized!(); match value { ffi::GDK_DEVICE_PAD_FEATURE_BUTTON => Self::Button, ffi::GDK_DEVICE_PAD_FEATURE_RING => Self::Ring, ffi::GDK_DEVICE_PAD_FEATURE_STRIP => Self::Strip, value => Self::__Unknown(value), } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl StaticType for DevicePadFeature { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_device_pad_feature_get_type()) } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl glib::value::ValueType for DevicePadFeature { type Type = Self; } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] unsafe impl<'a> FromValue<'a> for DevicePadFeature { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl ToValue for DevicePadFeature { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkDeviceToolType")] pub enum DeviceToolType { #[doc(alias = "GDK_DEVICE_TOOL_TYPE_UNKNOWN")] Unknown, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_PEN")] Pen, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_ERASER")] Eraser, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_BRUSH")] Brush, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_PENCIL")] Pencil, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_AIRBRUSH")] Airbrush, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_MOUSE")] Mouse, #[doc(alias = "GDK_DEVICE_TOOL_TYPE_LENS")] Lens, #[doc(hidden)] __Unknown(i32), } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl fmt::Display for DeviceToolType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "DeviceToolType::{}", match *self { Self::Unknown => "Unknown", Self::Pen => "Pen", Self::Eraser => "Eraser", Self::Brush => "Brush", Self::Pencil => "Pencil", Self::Airbrush => "Airbrush", Self::Mouse => "Mouse", Self::Lens => "Lens", _ => "Unknown", } ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl IntoGlib for DeviceToolType { type GlibType = ffi::GdkDeviceToolType; fn into_glib(self) -> ffi::GdkDeviceToolType { match self { Self::Unknown => ffi::GDK_DEVICE_TOOL_TYPE_UNKNOWN, Self::Pen => ffi::GDK_DEVICE_TOOL_TYPE_PEN, Self::Eraser => ffi::GDK_DEVICE_TOOL_TYPE_ERASER, Self::Brush => ffi::GDK_DEVICE_TOOL_TYPE_BRUSH, Self::Pencil => ffi::GDK_DEVICE_TOOL_TYPE_PENCIL, Self::Airbrush => ffi::GDK_DEVICE_TOOL_TYPE_AIRBRUSH, Self::Mouse => ffi::GDK_DEVICE_TOOL_TYPE_MOUSE, Self::Lens => ffi::GDK_DEVICE_TOOL_TYPE_LENS, Self::__Unknown(value) => value, } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl FromGlib for DeviceToolType { unsafe fn from_glib(value: ffi::GdkDeviceToolType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_DEVICE_TOOL_TYPE_UNKNOWN => Self::Unknown, ffi::GDK_DEVICE_TOOL_TYPE_PEN => Self::Pen, ffi::GDK_DEVICE_TOOL_TYPE_ERASER => Self::Eraser, ffi::GDK_DEVICE_TOOL_TYPE_BRUSH => Self::Brush, ffi::GDK_DEVICE_TOOL_TYPE_PENCIL => Self::Pencil, ffi::GDK_DEVICE_TOOL_TYPE_AIRBRUSH => Self::Airbrush, ffi::GDK_DEVICE_TOOL_TYPE_MOUSE => Self::Mouse, ffi::GDK_DEVICE_TOOL_TYPE_LENS => Self::Lens, value => Self::__Unknown(value), } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl glib::value::ValueType for DeviceToolType { type Type = Self; } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] unsafe impl<'a> FromValue<'a> for DeviceToolType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl ToValue for DeviceToolType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkDeviceType")] pub enum DeviceType { #[doc(alias = "GDK_DEVICE_TYPE_MASTER")] Master, #[doc(alias = "GDK_DEVICE_TYPE_SLAVE")] Slave, #[doc(alias = "GDK_DEVICE_TYPE_FLOATING")] Floating, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for DeviceType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "DeviceType::{}", match *self { Self::Master => "Master", Self::Slave => "Slave", Self::Floating => "Floating", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for DeviceType { type GlibType = ffi::GdkDeviceType; fn into_glib(self) -> ffi::GdkDeviceType { match self { Self::Master => ffi::GDK_DEVICE_TYPE_MASTER, Self::Slave => ffi::GDK_DEVICE_TYPE_SLAVE, Self::Floating => ffi::GDK_DEVICE_TYPE_FLOATING, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for DeviceType { unsafe fn from_glib(value: ffi::GdkDeviceType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_DEVICE_TYPE_MASTER => Self::Master, ffi::GDK_DEVICE_TYPE_SLAVE => Self::Slave, ffi::GDK_DEVICE_TYPE_FLOATING => Self::Floating, value => Self::__Unknown(value), } } } impl StaticType for DeviceType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_device_type_get_type()) } } } impl glib::value::ValueType for DeviceType { type Type = Self; } unsafe impl<'a> FromValue<'a> for DeviceType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for DeviceType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkDragCancelReason")] pub enum DragCancelReason { #[doc(alias = "GDK_DRAG_CANCEL_NO_TARGET")] NoTarget, #[doc(alias = "GDK_DRAG_CANCEL_USER_CANCELLED")] UserCancelled, #[doc(alias = "GDK_DRAG_CANCEL_ERROR")] Error, #[doc(hidden)] __Unknown(i32), } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl fmt::Display for DragCancelReason { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "DragCancelReason::{}", match *self { Self::NoTarget => "NoTarget", Self::UserCancelled => "UserCancelled", Self::Error => "Error", _ => "Unknown", } ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(hidden)] impl IntoGlib for DragCancelReason { type GlibType = ffi::GdkDragCancelReason; fn into_glib(self) -> ffi::GdkDragCancelReason { match self { Self::NoTarget => ffi::GDK_DRAG_CANCEL_NO_TARGET, Self::UserCancelled => ffi::GDK_DRAG_CANCEL_USER_CANCELLED, Self::Error => ffi::GDK_DRAG_CANCEL_ERROR, Self::__Unknown(value) => value, } } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(hidden)] impl FromGlib for DragCancelReason { unsafe fn from_glib(value: ffi::GdkDragCancelReason) -> Self { skip_assert_initialized!(); match value { ffi::GDK_DRAG_CANCEL_NO_TARGET => Self::NoTarget, ffi::GDK_DRAG_CANCEL_USER_CANCELLED => Self::UserCancelled, ffi::GDK_DRAG_CANCEL_ERROR => Self::Error, value => Self::__Unknown(value), } } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl glib::value::ValueType for DragCancelReason { type Type = Self; } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] unsafe impl<'a> FromValue<'a> for DragCancelReason { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl ToValue for DragCancelReason { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkDragProtocol")] pub enum DragProtocol { #[doc(alias = "GDK_DRAG_PROTO_NONE")] None, #[doc(alias = "GDK_DRAG_PROTO_MOTIF")] Motif, #[doc(alias = "GDK_DRAG_PROTO_XDND")] Xdnd, #[doc(alias = "GDK_DRAG_PROTO_ROOTWIN")] Rootwin, #[doc(alias = "GDK_DRAG_PROTO_WIN32_DROPFILES")] Win32Dropfiles, #[doc(alias = "GDK_DRAG_PROTO_OLE2")] Ole2, #[doc(alias = "GDK_DRAG_PROTO_LOCAL")] Local, #[doc(alias = "GDK_DRAG_PROTO_WAYLAND")] Wayland, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for DragProtocol { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "DragProtocol::{}", match *self { Self::None => "None", Self::Motif => "Motif", Self::Xdnd => "Xdnd", Self::Rootwin => "Rootwin", Self::Win32Dropfiles => "Win32Dropfiles", Self::Ole2 => "Ole2", Self::Local => "Local", Self::Wayland => "Wayland", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for DragProtocol { type GlibType = ffi::GdkDragProtocol; fn into_glib(self) -> ffi::GdkDragProtocol { match self { Self::None => ffi::GDK_DRAG_PROTO_NONE, Self::Motif => ffi::GDK_DRAG_PROTO_MOTIF, Self::Xdnd => ffi::GDK_DRAG_PROTO_XDND, Self::Rootwin => ffi::GDK_DRAG_PROTO_ROOTWIN, Self::Win32Dropfiles => ffi::GDK_DRAG_PROTO_WIN32_DROPFILES, Self::Ole2 => ffi::GDK_DRAG_PROTO_OLE2, Self::Local => ffi::GDK_DRAG_PROTO_LOCAL, Self::Wayland => ffi::GDK_DRAG_PROTO_WAYLAND, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for DragProtocol { unsafe fn from_glib(value: ffi::GdkDragProtocol) -> Self { skip_assert_initialized!(); match value { ffi::GDK_DRAG_PROTO_NONE => Self::None, ffi::GDK_DRAG_PROTO_MOTIF => Self::Motif, ffi::GDK_DRAG_PROTO_XDND => Self::Xdnd, ffi::GDK_DRAG_PROTO_ROOTWIN => Self::Rootwin, ffi::GDK_DRAG_PROTO_WIN32_DROPFILES => Self::Win32Dropfiles, ffi::GDK_DRAG_PROTO_OLE2 => Self::Ole2, ffi::GDK_DRAG_PROTO_LOCAL => Self::Local, ffi::GDK_DRAG_PROTO_WAYLAND => Self::Wayland, value => Self::__Unknown(value), } } } impl StaticType for DragProtocol { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_drag_protocol_get_type()) } } } impl glib::value::ValueType for DragProtocol { type Type = Self; } unsafe impl<'a> FromValue<'a> for DragProtocol { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for DragProtocol { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkEventType")] pub enum EventType { #[doc(alias = "GDK_NOTHING")] Nothing, #[doc(alias = "GDK_DELETE")] Delete, #[doc(alias = "GDK_DESTROY")] Destroy, #[doc(alias = "GDK_EXPOSE")] Expose, #[doc(alias = "GDK_MOTION_NOTIFY")] MotionNotify, #[doc(alias = "GDK_BUTTON_PRESS")] ButtonPress, #[doc(alias = "GDK_DOUBLE_BUTTON_PRESS")] DoubleButtonPress, #[doc(alias = "GDK_TRIPLE_BUTTON_PRESS")] TripleButtonPress, #[doc(alias = "GDK_BUTTON_RELEASE")] ButtonRelease, #[doc(alias = "GDK_KEY_PRESS")] KeyPress, #[doc(alias = "GDK_KEY_RELEASE")] KeyRelease, #[doc(alias = "GDK_ENTER_NOTIFY")] EnterNotify, #[doc(alias = "GDK_LEAVE_NOTIFY")] LeaveNotify, #[doc(alias = "GDK_FOCUS_CHANGE")] FocusChange, #[doc(alias = "GDK_CONFIGURE")] Configure, #[doc(alias = "GDK_MAP")] Map, #[doc(alias = "GDK_UNMAP")] Unmap, #[doc(alias = "GDK_PROPERTY_NOTIFY")] PropertyNotify, #[doc(alias = "GDK_SELECTION_CLEAR")] SelectionClear, #[doc(alias = "GDK_SELECTION_REQUEST")] SelectionRequest, #[doc(alias = "GDK_SELECTION_NOTIFY")] SelectionNotify, #[doc(alias = "GDK_PROXIMITY_IN")] ProximityIn, #[doc(alias = "GDK_PROXIMITY_OUT")] ProximityOut, #[doc(alias = "GDK_DRAG_ENTER")] DragEnter, #[doc(alias = "GDK_DRAG_LEAVE")] DragLeave, #[doc(alias = "GDK_DRAG_MOTION")] DragMotion, #[doc(alias = "GDK_DRAG_STATUS")] DragStatus, #[doc(alias = "GDK_DROP_START")] DropStart, #[doc(alias = "GDK_DROP_FINISHED")] DropFinished, #[doc(alias = "GDK_CLIENT_EVENT")] ClientEvent, #[doc(alias = "GDK_VISIBILITY_NOTIFY")] VisibilityNotify, #[doc(alias = "GDK_SCROLL")] Scroll, #[doc(alias = "GDK_WINDOW_STATE")] WindowState, #[doc(alias = "GDK_SETTING")] Setting, #[doc(alias = "GDK_OWNER_CHANGE")] OwnerChange, #[doc(alias = "GDK_GRAB_BROKEN")] GrabBroken, #[doc(alias = "GDK_DAMAGE")] Damage, #[doc(alias = "GDK_TOUCH_BEGIN")] TouchBegin, #[doc(alias = "GDK_TOUCH_UPDATE")] TouchUpdate, #[doc(alias = "GDK_TOUCH_END")] TouchEnd, #[doc(alias = "GDK_TOUCH_CANCEL")] TouchCancel, #[doc(alias = "GDK_TOUCHPAD_SWIPE")] TouchpadSwipe, #[doc(alias = "GDK_TOUCHPAD_PINCH")] TouchpadPinch, #[doc(alias = "GDK_PAD_BUTTON_PRESS")] PadButtonPress, #[doc(alias = "GDK_PAD_BUTTON_RELEASE")] PadButtonRelease, #[doc(alias = "GDK_PAD_RING")] PadRing, #[doc(alias = "GDK_PAD_STRIP")] PadStrip, #[doc(alias = "GDK_PAD_GROUP_MODE")] PadGroupMode, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for EventType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "EventType::{}", match *self { Self::Nothing => "Nothing", Self::Delete => "Delete", Self::Destroy => "Destroy", Self::Expose => "Expose", Self::MotionNotify => "MotionNotify", Self::ButtonPress => "ButtonPress", Self::DoubleButtonPress => "DoubleButtonPress", Self::TripleButtonPress => "TripleButtonPress", Self::ButtonRelease => "ButtonRelease", Self::KeyPress => "KeyPress", Self::KeyRelease => "KeyRelease", Self::EnterNotify => "EnterNotify", Self::LeaveNotify => "LeaveNotify", Self::FocusChange => "FocusChange", Self::Configure => "Configure", Self::Map => "Map", Self::Unmap => "Unmap", Self::PropertyNotify => "PropertyNotify", Self::SelectionClear => "SelectionClear", Self::SelectionRequest => "SelectionRequest", Self::SelectionNotify => "SelectionNotify", Self::ProximityIn => "ProximityIn", Self::ProximityOut => "ProximityOut", Self::DragEnter => "DragEnter", Self::DragLeave => "DragLeave", Self::DragMotion => "DragMotion", Self::DragStatus => "DragStatus", Self::DropStart => "DropStart", Self::DropFinished => "DropFinished", Self::ClientEvent => "ClientEvent", Self::VisibilityNotify => "VisibilityNotify", Self::Scroll => "Scroll", Self::WindowState => "WindowState", Self::Setting => "Setting", Self::OwnerChange => "OwnerChange", Self::GrabBroken => "GrabBroken", Self::Damage => "Damage", Self::TouchBegin => "TouchBegin", Self::TouchUpdate => "TouchUpdate", Self::TouchEnd => "TouchEnd", Self::TouchCancel => "TouchCancel", Self::TouchpadSwipe => "TouchpadSwipe", Self::TouchpadPinch => "TouchpadPinch", Self::PadButtonPress => "PadButtonPress", Self::PadButtonRelease => "PadButtonRelease", Self::PadRing => "PadRing", Self::PadStrip => "PadStrip", Self::PadGroupMode => "PadGroupMode", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for EventType { type GlibType = ffi::GdkEventType; fn into_glib(self) -> ffi::GdkEventType { match self { Self::Nothing => ffi::GDK_NOTHING, Self::Delete => ffi::GDK_DELETE, Self::Destroy => ffi::GDK_DESTROY, Self::Expose => ffi::GDK_EXPOSE, Self::MotionNotify => ffi::GDK_MOTION_NOTIFY, Self::ButtonPress => ffi::GDK_BUTTON_PRESS, Self::DoubleButtonPress => ffi::GDK_DOUBLE_BUTTON_PRESS, Self::TripleButtonPress => ffi::GDK_TRIPLE_BUTTON_PRESS, Self::ButtonRelease => ffi::GDK_BUTTON_RELEASE, Self::KeyPress => ffi::GDK_KEY_PRESS, Self::KeyRelease => ffi::GDK_KEY_RELEASE, Self::EnterNotify => ffi::GDK_ENTER_NOTIFY, Self::LeaveNotify => ffi::GDK_LEAVE_NOTIFY, Self::FocusChange => ffi::GDK_FOCUS_CHANGE, Self::Configure => ffi::GDK_CONFIGURE, Self::Map => ffi::GDK_MAP, Self::Unmap => ffi::GDK_UNMAP, Self::PropertyNotify => ffi::GDK_PROPERTY_NOTIFY, Self::SelectionClear => ffi::GDK_SELECTION_CLEAR, Self::SelectionRequest => ffi::GDK_SELECTION_REQUEST, Self::SelectionNotify => ffi::GDK_SELECTION_NOTIFY, Self::ProximityIn => ffi::GDK_PROXIMITY_IN, Self::ProximityOut => ffi::GDK_PROXIMITY_OUT, Self::DragEnter => ffi::GDK_DRAG_ENTER, Self::DragLeave => ffi::GDK_DRAG_LEAVE, Self::DragMotion => ffi::GDK_DRAG_MOTION, Self::DragStatus => ffi::GDK_DRAG_STATUS, Self::DropStart => ffi::GDK_DROP_START, Self::DropFinished => ffi::GDK_DROP_FINISHED, Self::ClientEvent => ffi::GDK_CLIENT_EVENT, Self::VisibilityNotify => ffi::GDK_VISIBILITY_NOTIFY, Self::Scroll => ffi::GDK_SCROLL, Self::WindowState => ffi::GDK_WINDOW_STATE, Self::Setting => ffi::GDK_SETTING, Self::OwnerChange => ffi::GDK_OWNER_CHANGE, Self::GrabBroken => ffi::GDK_GRAB_BROKEN, Self::Damage => ffi::GDK_DAMAGE, Self::TouchBegin => ffi::GDK_TOUCH_BEGIN, Self::TouchUpdate => ffi::GDK_TOUCH_UPDATE, Self::TouchEnd => ffi::GDK_TOUCH_END, Self::TouchCancel => ffi::GDK_TOUCH_CANCEL, Self::TouchpadSwipe => ffi::GDK_TOUCHPAD_SWIPE, Self::TouchpadPinch => ffi::GDK_TOUCHPAD_PINCH, Self::PadButtonPress => ffi::GDK_PAD_BUTTON_PRESS, Self::PadButtonRelease => ffi::GDK_PAD_BUTTON_RELEASE, Self::PadRing => ffi::GDK_PAD_RING, Self::PadStrip => ffi::GDK_PAD_STRIP, Self::PadGroupMode => ffi::GDK_PAD_GROUP_MODE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for EventType { unsafe fn from_glib(value: ffi::GdkEventType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_NOTHING => Self::Nothing, ffi::GDK_DELETE => Self::Delete, ffi::GDK_DESTROY => Self::Destroy, ffi::GDK_EXPOSE => Self::Expose, ffi::GDK_MOTION_NOTIFY => Self::MotionNotify, ffi::GDK_BUTTON_PRESS => Self::ButtonPress, ffi::GDK_DOUBLE_BUTTON_PRESS => Self::DoubleButtonPress, ffi::GDK_TRIPLE_BUTTON_PRESS => Self::TripleButtonPress, ffi::GDK_BUTTON_RELEASE => Self::ButtonRelease, ffi::GDK_KEY_PRESS => Self::KeyPress, ffi::GDK_KEY_RELEASE => Self::KeyRelease, ffi::GDK_ENTER_NOTIFY => Self::EnterNotify, ffi::GDK_LEAVE_NOTIFY => Self::LeaveNotify, ffi::GDK_FOCUS_CHANGE => Self::FocusChange, ffi::GDK_CONFIGURE => Self::Configure, ffi::GDK_MAP => Self::Map, ffi::GDK_UNMAP => Self::Unmap, ffi::GDK_PROPERTY_NOTIFY => Self::PropertyNotify, ffi::GDK_SELECTION_CLEAR => Self::SelectionClear, ffi::GDK_SELECTION_REQUEST => Self::SelectionRequest, ffi::GDK_SELECTION_NOTIFY => Self::SelectionNotify, ffi::GDK_PROXIMITY_IN => Self::ProximityIn, ffi::GDK_PROXIMITY_OUT => Self::ProximityOut, ffi::GDK_DRAG_ENTER => Self::DragEnter, ffi::GDK_DRAG_LEAVE => Self::DragLeave, ffi::GDK_DRAG_MOTION => Self::DragMotion, ffi::GDK_DRAG_STATUS => Self::DragStatus, ffi::GDK_DROP_START => Self::DropStart, ffi::GDK_DROP_FINISHED => Self::DropFinished, ffi::GDK_CLIENT_EVENT => Self::ClientEvent, ffi::GDK_VISIBILITY_NOTIFY => Self::VisibilityNotify, ffi::GDK_SCROLL => Self::Scroll, ffi::GDK_WINDOW_STATE => Self::WindowState, ffi::GDK_SETTING => Self::Setting, ffi::GDK_OWNER_CHANGE => Self::OwnerChange, ffi::GDK_GRAB_BROKEN => Self::GrabBroken, ffi::GDK_DAMAGE => Self::Damage, ffi::GDK_TOUCH_BEGIN => Self::TouchBegin, ffi::GDK_TOUCH_UPDATE => Self::TouchUpdate, ffi::GDK_TOUCH_END => Self::TouchEnd, ffi::GDK_TOUCH_CANCEL => Self::TouchCancel, ffi::GDK_TOUCHPAD_SWIPE => Self::TouchpadSwipe, ffi::GDK_TOUCHPAD_PINCH => Self::TouchpadPinch, ffi::GDK_PAD_BUTTON_PRESS => Self::PadButtonPress, ffi::GDK_PAD_BUTTON_RELEASE => Self::PadButtonRelease, ffi::GDK_PAD_RING => Self::PadRing, ffi::GDK_PAD_STRIP => Self::PadStrip, ffi::GDK_PAD_GROUP_MODE => Self::PadGroupMode, value => Self::__Unknown(value), } } } impl StaticType for EventType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_event_type_get_type()) } } } impl glib::value::ValueType for EventType { type Type = Self; } unsafe impl<'a> FromValue<'a> for EventType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for EventType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkFullscreenMode")] pub enum FullscreenMode { #[doc(alias = "GDK_FULLSCREEN_ON_CURRENT_MONITOR")] CurrentMonitor, #[doc(alias = "GDK_FULLSCREEN_ON_ALL_MONITORS")] AllMonitors, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for FullscreenMode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "FullscreenMode::{}", match *self { Self::CurrentMonitor => "CurrentMonitor", Self::AllMonitors => "AllMonitors", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for FullscreenMode { type GlibType = ffi::GdkFullscreenMode; fn into_glib(self) -> ffi::GdkFullscreenMode { match self { Self::CurrentMonitor => ffi::GDK_FULLSCREEN_ON_CURRENT_MONITOR, Self::AllMonitors => ffi::GDK_FULLSCREEN_ON_ALL_MONITORS, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for FullscreenMode { unsafe fn from_glib(value: ffi::GdkFullscreenMode) -> Self { skip_assert_initialized!(); match value { ffi::GDK_FULLSCREEN_ON_CURRENT_MONITOR => Self::CurrentMonitor, ffi::GDK_FULLSCREEN_ON_ALL_MONITORS => Self::AllMonitors, value => Self::__Unknown(value), } } } impl StaticType for FullscreenMode { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_fullscreen_mode_get_type()) } } } impl glib::value::ValueType for FullscreenMode { type Type = Self; } unsafe impl<'a> FromValue<'a> for FullscreenMode { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for FullscreenMode { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkGLError")] pub enum GLError { #[doc(alias = "GDK_GL_ERROR_NOT_AVAILABLE")] NotAvailable, #[doc(alias = "GDK_GL_ERROR_UNSUPPORTED_FORMAT")] UnsupportedFormat, #[doc(alias = "GDK_GL_ERROR_UNSUPPORTED_PROFILE")] UnsupportedProfile, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for GLError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "GLError::{}", match *self { Self::NotAvailable => "NotAvailable", Self::UnsupportedFormat => "UnsupportedFormat", Self::UnsupportedProfile => "UnsupportedProfile", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for GLError { type GlibType = ffi::GdkGLError; fn into_glib(self) -> ffi::GdkGLError { match self { Self::NotAvailable => ffi::GDK_GL_ERROR_NOT_AVAILABLE, Self::UnsupportedFormat => ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT, Self::UnsupportedProfile => ffi::GDK_GL_ERROR_UNSUPPORTED_PROFILE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for GLError { unsafe fn from_glib(value: ffi::GdkGLError) -> Self { skip_assert_initialized!(); match value { ffi::GDK_GL_ERROR_NOT_AVAILABLE => Self::NotAvailable, ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT => Self::UnsupportedFormat, ffi::GDK_GL_ERROR_UNSUPPORTED_PROFILE => Self::UnsupportedProfile, value => Self::__Unknown(value), } } } impl ErrorDomain for GLError { fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_gl_error_quark()) } } fn code(self) -> i32 { self.into_glib() } fn from(code: i32) -> Option { skip_assert_initialized!(); match code { ffi::GDK_GL_ERROR_NOT_AVAILABLE => Some(Self::NotAvailable), ffi::GDK_GL_ERROR_UNSUPPORTED_FORMAT => Some(Self::UnsupportedFormat), ffi::GDK_GL_ERROR_UNSUPPORTED_PROFILE => Some(Self::UnsupportedProfile), value => Some(Self::__Unknown(value)), } } } impl StaticType for GLError { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_gl_error_get_type()) } } } impl glib::value::ValueType for GLError { type Type = Self; } unsafe impl<'a> FromValue<'a> for GLError { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for GLError { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkGrabOwnership")] pub enum GrabOwnership { #[doc(alias = "GDK_OWNERSHIP_NONE")] None, #[doc(alias = "GDK_OWNERSHIP_WINDOW")] Window, #[doc(alias = "GDK_OWNERSHIP_APPLICATION")] Application, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for GrabOwnership { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "GrabOwnership::{}", match *self { Self::None => "None", Self::Window => "Window", Self::Application => "Application", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for GrabOwnership { type GlibType = ffi::GdkGrabOwnership; fn into_glib(self) -> ffi::GdkGrabOwnership { match self { Self::None => ffi::GDK_OWNERSHIP_NONE, Self::Window => ffi::GDK_OWNERSHIP_WINDOW, Self::Application => ffi::GDK_OWNERSHIP_APPLICATION, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for GrabOwnership { unsafe fn from_glib(value: ffi::GdkGrabOwnership) -> Self { skip_assert_initialized!(); match value { ffi::GDK_OWNERSHIP_NONE => Self::None, ffi::GDK_OWNERSHIP_WINDOW => Self::Window, ffi::GDK_OWNERSHIP_APPLICATION => Self::Application, value => Self::__Unknown(value), } } } impl StaticType for GrabOwnership { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_grab_ownership_get_type()) } } } impl glib::value::ValueType for GrabOwnership { type Type = Self; } unsafe impl<'a> FromValue<'a> for GrabOwnership { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for GrabOwnership { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkGrabStatus")] pub enum GrabStatus { #[doc(alias = "GDK_GRAB_SUCCESS")] Success, #[doc(alias = "GDK_GRAB_ALREADY_GRABBED")] AlreadyGrabbed, #[doc(alias = "GDK_GRAB_INVALID_TIME")] InvalidTime, #[doc(alias = "GDK_GRAB_NOT_VIEWABLE")] NotViewable, #[doc(alias = "GDK_GRAB_FROZEN")] Frozen, #[doc(alias = "GDK_GRAB_FAILED")] Failed, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for GrabStatus { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "GrabStatus::{}", match *self { Self::Success => "Success", Self::AlreadyGrabbed => "AlreadyGrabbed", Self::InvalidTime => "InvalidTime", Self::NotViewable => "NotViewable", Self::Frozen => "Frozen", Self::Failed => "Failed", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for GrabStatus { type GlibType = ffi::GdkGrabStatus; fn into_glib(self) -> ffi::GdkGrabStatus { match self { Self::Success => ffi::GDK_GRAB_SUCCESS, Self::AlreadyGrabbed => ffi::GDK_GRAB_ALREADY_GRABBED, Self::InvalidTime => ffi::GDK_GRAB_INVALID_TIME, Self::NotViewable => ffi::GDK_GRAB_NOT_VIEWABLE, Self::Frozen => ffi::GDK_GRAB_FROZEN, Self::Failed => ffi::GDK_GRAB_FAILED, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for GrabStatus { unsafe fn from_glib(value: ffi::GdkGrabStatus) -> Self { skip_assert_initialized!(); match value { ffi::GDK_GRAB_SUCCESS => Self::Success, ffi::GDK_GRAB_ALREADY_GRABBED => Self::AlreadyGrabbed, ffi::GDK_GRAB_INVALID_TIME => Self::InvalidTime, ffi::GDK_GRAB_NOT_VIEWABLE => Self::NotViewable, ffi::GDK_GRAB_FROZEN => Self::Frozen, ffi::GDK_GRAB_FAILED => Self::Failed, value => Self::__Unknown(value), } } } impl StaticType for GrabStatus { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_grab_status_get_type()) } } } impl glib::value::ValueType for GrabStatus { type Type = Self; } unsafe impl<'a> FromValue<'a> for GrabStatus { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for GrabStatus { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkGravity")] pub enum Gravity { #[doc(alias = "GDK_GRAVITY_NORTH_WEST")] NorthWest, #[doc(alias = "GDK_GRAVITY_NORTH")] North, #[doc(alias = "GDK_GRAVITY_NORTH_EAST")] NorthEast, #[doc(alias = "GDK_GRAVITY_WEST")] West, #[doc(alias = "GDK_GRAVITY_CENTER")] Center, #[doc(alias = "GDK_GRAVITY_EAST")] East, #[doc(alias = "GDK_GRAVITY_SOUTH_WEST")] SouthWest, #[doc(alias = "GDK_GRAVITY_SOUTH")] South, #[doc(alias = "GDK_GRAVITY_SOUTH_EAST")] SouthEast, #[doc(alias = "GDK_GRAVITY_STATIC")] Static, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for Gravity { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "Gravity::{}", match *self { Self::NorthWest => "NorthWest", Self::North => "North", Self::NorthEast => "NorthEast", Self::West => "West", Self::Center => "Center", Self::East => "East", Self::SouthWest => "SouthWest", Self::South => "South", Self::SouthEast => "SouthEast", Self::Static => "Static", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for Gravity { type GlibType = ffi::GdkGravity; fn into_glib(self) -> ffi::GdkGravity { match self { Self::NorthWest => ffi::GDK_GRAVITY_NORTH_WEST, Self::North => ffi::GDK_GRAVITY_NORTH, Self::NorthEast => ffi::GDK_GRAVITY_NORTH_EAST, Self::West => ffi::GDK_GRAVITY_WEST, Self::Center => ffi::GDK_GRAVITY_CENTER, Self::East => ffi::GDK_GRAVITY_EAST, Self::SouthWest => ffi::GDK_GRAVITY_SOUTH_WEST, Self::South => ffi::GDK_GRAVITY_SOUTH, Self::SouthEast => ffi::GDK_GRAVITY_SOUTH_EAST, Self::Static => ffi::GDK_GRAVITY_STATIC, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for Gravity { unsafe fn from_glib(value: ffi::GdkGravity) -> Self { skip_assert_initialized!(); match value { ffi::GDK_GRAVITY_NORTH_WEST => Self::NorthWest, ffi::GDK_GRAVITY_NORTH => Self::North, ffi::GDK_GRAVITY_NORTH_EAST => Self::NorthEast, ffi::GDK_GRAVITY_WEST => Self::West, ffi::GDK_GRAVITY_CENTER => Self::Center, ffi::GDK_GRAVITY_EAST => Self::East, ffi::GDK_GRAVITY_SOUTH_WEST => Self::SouthWest, ffi::GDK_GRAVITY_SOUTH => Self::South, ffi::GDK_GRAVITY_SOUTH_EAST => Self::SouthEast, ffi::GDK_GRAVITY_STATIC => Self::Static, value => Self::__Unknown(value), } } } impl StaticType for Gravity { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_gravity_get_type()) } } } impl glib::value::ValueType for Gravity { type Type = Self; } unsafe impl<'a> FromValue<'a> for Gravity { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for Gravity { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkInputMode")] pub enum InputMode { #[doc(alias = "GDK_MODE_DISABLED")] Disabled, #[doc(alias = "GDK_MODE_SCREEN")] Screen, #[doc(alias = "GDK_MODE_WINDOW")] Window, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for InputMode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "InputMode::{}", match *self { Self::Disabled => "Disabled", Self::Screen => "Screen", Self::Window => "Window", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for InputMode { type GlibType = ffi::GdkInputMode; fn into_glib(self) -> ffi::GdkInputMode { match self { Self::Disabled => ffi::GDK_MODE_DISABLED, Self::Screen => ffi::GDK_MODE_SCREEN, Self::Window => ffi::GDK_MODE_WINDOW, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for InputMode { unsafe fn from_glib(value: ffi::GdkInputMode) -> Self { skip_assert_initialized!(); match value { ffi::GDK_MODE_DISABLED => Self::Disabled, ffi::GDK_MODE_SCREEN => Self::Screen, ffi::GDK_MODE_WINDOW => Self::Window, value => Self::__Unknown(value), } } } impl StaticType for InputMode { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_input_mode_get_type()) } } } impl glib::value::ValueType for InputMode { type Type = Self; } unsafe impl<'a> FromValue<'a> for InputMode { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for InputMode { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkInputSource")] pub enum InputSource { #[doc(alias = "GDK_SOURCE_MOUSE")] Mouse, #[doc(alias = "GDK_SOURCE_PEN")] Pen, #[doc(alias = "GDK_SOURCE_ERASER")] Eraser, #[doc(alias = "GDK_SOURCE_CURSOR")] Cursor, #[doc(alias = "GDK_SOURCE_KEYBOARD")] Keyboard, #[doc(alias = "GDK_SOURCE_TOUCHSCREEN")] Touchscreen, #[doc(alias = "GDK_SOURCE_TOUCHPAD")] Touchpad, #[doc(alias = "GDK_SOURCE_TRACKPOINT")] Trackpoint, #[doc(alias = "GDK_SOURCE_TABLET_PAD")] TabletPad, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for InputSource { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "InputSource::{}", match *self { Self::Mouse => "Mouse", Self::Pen => "Pen", Self::Eraser => "Eraser", Self::Cursor => "Cursor", Self::Keyboard => "Keyboard", Self::Touchscreen => "Touchscreen", Self::Touchpad => "Touchpad", Self::Trackpoint => "Trackpoint", Self::TabletPad => "TabletPad", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for InputSource { type GlibType = ffi::GdkInputSource; fn into_glib(self) -> ffi::GdkInputSource { match self { Self::Mouse => ffi::GDK_SOURCE_MOUSE, Self::Pen => ffi::GDK_SOURCE_PEN, Self::Eraser => ffi::GDK_SOURCE_ERASER, Self::Cursor => ffi::GDK_SOURCE_CURSOR, Self::Keyboard => ffi::GDK_SOURCE_KEYBOARD, Self::Touchscreen => ffi::GDK_SOURCE_TOUCHSCREEN, Self::Touchpad => ffi::GDK_SOURCE_TOUCHPAD, Self::Trackpoint => ffi::GDK_SOURCE_TRACKPOINT, Self::TabletPad => ffi::GDK_SOURCE_TABLET_PAD, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for InputSource { unsafe fn from_glib(value: ffi::GdkInputSource) -> Self { skip_assert_initialized!(); match value { ffi::GDK_SOURCE_MOUSE => Self::Mouse, ffi::GDK_SOURCE_PEN => Self::Pen, ffi::GDK_SOURCE_ERASER => Self::Eraser, ffi::GDK_SOURCE_CURSOR => Self::Cursor, ffi::GDK_SOURCE_KEYBOARD => Self::Keyboard, ffi::GDK_SOURCE_TOUCHSCREEN => Self::Touchscreen, ffi::GDK_SOURCE_TOUCHPAD => Self::Touchpad, ffi::GDK_SOURCE_TRACKPOINT => Self::Trackpoint, ffi::GDK_SOURCE_TABLET_PAD => Self::TabletPad, value => Self::__Unknown(value), } } } impl StaticType for InputSource { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_input_source_get_type()) } } } impl glib::value::ValueType for InputSource { type Type = Self; } unsafe impl<'a> FromValue<'a> for InputSource { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for InputSource { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkModifierIntent")] pub enum ModifierIntent { #[doc(alias = "GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR")] PrimaryAccelerator, #[doc(alias = "GDK_MODIFIER_INTENT_CONTEXT_MENU")] ContextMenu, #[doc(alias = "GDK_MODIFIER_INTENT_EXTEND_SELECTION")] ExtendSelection, #[doc(alias = "GDK_MODIFIER_INTENT_MODIFY_SELECTION")] ModifySelection, #[doc(alias = "GDK_MODIFIER_INTENT_NO_TEXT_INPUT")] NoTextInput, #[doc(alias = "GDK_MODIFIER_INTENT_SHIFT_GROUP")] ShiftGroup, #[doc(alias = "GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK")] DefaultModMask, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for ModifierIntent { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "ModifierIntent::{}", match *self { Self::PrimaryAccelerator => "PrimaryAccelerator", Self::ContextMenu => "ContextMenu", Self::ExtendSelection => "ExtendSelection", Self::ModifySelection => "ModifySelection", Self::NoTextInput => "NoTextInput", Self::ShiftGroup => "ShiftGroup", Self::DefaultModMask => "DefaultModMask", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for ModifierIntent { type GlibType = ffi::GdkModifierIntent; fn into_glib(self) -> ffi::GdkModifierIntent { match self { Self::PrimaryAccelerator => ffi::GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR, Self::ContextMenu => ffi::GDK_MODIFIER_INTENT_CONTEXT_MENU, Self::ExtendSelection => ffi::GDK_MODIFIER_INTENT_EXTEND_SELECTION, Self::ModifySelection => ffi::GDK_MODIFIER_INTENT_MODIFY_SELECTION, Self::NoTextInput => ffi::GDK_MODIFIER_INTENT_NO_TEXT_INPUT, Self::ShiftGroup => ffi::GDK_MODIFIER_INTENT_SHIFT_GROUP, Self::DefaultModMask => ffi::GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ModifierIntent { unsafe fn from_glib(value: ffi::GdkModifierIntent) -> Self { skip_assert_initialized!(); match value { ffi::GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR => Self::PrimaryAccelerator, ffi::GDK_MODIFIER_INTENT_CONTEXT_MENU => Self::ContextMenu, ffi::GDK_MODIFIER_INTENT_EXTEND_SELECTION => Self::ExtendSelection, ffi::GDK_MODIFIER_INTENT_MODIFY_SELECTION => Self::ModifySelection, ffi::GDK_MODIFIER_INTENT_NO_TEXT_INPUT => Self::NoTextInput, ffi::GDK_MODIFIER_INTENT_SHIFT_GROUP => Self::ShiftGroup, ffi::GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK => Self::DefaultModMask, value => Self::__Unknown(value), } } } impl StaticType for ModifierIntent { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_modifier_intent_get_type()) } } } impl glib::value::ValueType for ModifierIntent { type Type = Self; } unsafe impl<'a> FromValue<'a> for ModifierIntent { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for ModifierIntent { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkNotifyType")] pub enum NotifyType { #[doc(alias = "GDK_NOTIFY_ANCESTOR")] Ancestor, #[doc(alias = "GDK_NOTIFY_VIRTUAL")] Virtual, #[doc(alias = "GDK_NOTIFY_INFERIOR")] Inferior, #[doc(alias = "GDK_NOTIFY_NONLINEAR")] Nonlinear, #[doc(alias = "GDK_NOTIFY_NONLINEAR_VIRTUAL")] NonlinearVirtual, #[doc(alias = "GDK_NOTIFY_UNKNOWN")] Unknown, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for NotifyType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "NotifyType::{}", match *self { Self::Ancestor => "Ancestor", Self::Virtual => "Virtual", Self::Inferior => "Inferior", Self::Nonlinear => "Nonlinear", Self::NonlinearVirtual => "NonlinearVirtual", Self::Unknown => "Unknown", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for NotifyType { type GlibType = ffi::GdkNotifyType; fn into_glib(self) -> ffi::GdkNotifyType { match self { Self::Ancestor => ffi::GDK_NOTIFY_ANCESTOR, Self::Virtual => ffi::GDK_NOTIFY_VIRTUAL, Self::Inferior => ffi::GDK_NOTIFY_INFERIOR, Self::Nonlinear => ffi::GDK_NOTIFY_NONLINEAR, Self::NonlinearVirtual => ffi::GDK_NOTIFY_NONLINEAR_VIRTUAL, Self::Unknown => ffi::GDK_NOTIFY_UNKNOWN, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for NotifyType { unsafe fn from_glib(value: ffi::GdkNotifyType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_NOTIFY_ANCESTOR => Self::Ancestor, ffi::GDK_NOTIFY_VIRTUAL => Self::Virtual, ffi::GDK_NOTIFY_INFERIOR => Self::Inferior, ffi::GDK_NOTIFY_NONLINEAR => Self::Nonlinear, ffi::GDK_NOTIFY_NONLINEAR_VIRTUAL => Self::NonlinearVirtual, ffi::GDK_NOTIFY_UNKNOWN => Self::Unknown, value => Self::__Unknown(value), } } } impl StaticType for NotifyType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_notify_type_get_type()) } } } impl glib::value::ValueType for NotifyType { type Type = Self; } unsafe impl<'a> FromValue<'a> for NotifyType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for NotifyType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkOwnerChange")] pub enum OwnerChange { #[doc(alias = "GDK_OWNER_CHANGE_NEW_OWNER")] NewOwner, #[doc(alias = "GDK_OWNER_CHANGE_DESTROY")] Destroy, #[doc(alias = "GDK_OWNER_CHANGE_CLOSE")] Close, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for OwnerChange { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "OwnerChange::{}", match *self { Self::NewOwner => "NewOwner", Self::Destroy => "Destroy", Self::Close => "Close", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for OwnerChange { type GlibType = ffi::GdkOwnerChange; fn into_glib(self) -> ffi::GdkOwnerChange { match self { Self::NewOwner => ffi::GDK_OWNER_CHANGE_NEW_OWNER, Self::Destroy => ffi::GDK_OWNER_CHANGE_DESTROY, Self::Close => ffi::GDK_OWNER_CHANGE_CLOSE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for OwnerChange { unsafe fn from_glib(value: ffi::GdkOwnerChange) -> Self { skip_assert_initialized!(); match value { ffi::GDK_OWNER_CHANGE_NEW_OWNER => Self::NewOwner, ffi::GDK_OWNER_CHANGE_DESTROY => Self::Destroy, ffi::GDK_OWNER_CHANGE_CLOSE => Self::Close, value => Self::__Unknown(value), } } } impl StaticType for OwnerChange { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_owner_change_get_type()) } } } impl glib::value::ValueType for OwnerChange { type Type = Self; } unsafe impl<'a> FromValue<'a> for OwnerChange { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for OwnerChange { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkPropMode")] pub enum PropMode { #[doc(alias = "GDK_PROP_MODE_REPLACE")] Replace, #[doc(alias = "GDK_PROP_MODE_PREPEND")] Prepend, #[doc(alias = "GDK_PROP_MODE_APPEND")] Append, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for PropMode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "PropMode::{}", match *self { Self::Replace => "Replace", Self::Prepend => "Prepend", Self::Append => "Append", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for PropMode { type GlibType = ffi::GdkPropMode; fn into_glib(self) -> ffi::GdkPropMode { match self { Self::Replace => ffi::GDK_PROP_MODE_REPLACE, Self::Prepend => ffi::GDK_PROP_MODE_PREPEND, Self::Append => ffi::GDK_PROP_MODE_APPEND, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PropMode { unsafe fn from_glib(value: ffi::GdkPropMode) -> Self { skip_assert_initialized!(); match value { ffi::GDK_PROP_MODE_REPLACE => Self::Replace, ffi::GDK_PROP_MODE_PREPEND => Self::Prepend, ffi::GDK_PROP_MODE_APPEND => Self::Append, value => Self::__Unknown(value), } } } impl StaticType for PropMode { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_prop_mode_get_type()) } } } impl glib::value::ValueType for PropMode { type Type = Self; } unsafe impl<'a> FromValue<'a> for PropMode { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for PropMode { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkPropertyState")] pub enum PropertyState { #[doc(alias = "GDK_PROPERTY_NEW_VALUE")] NewValue, #[doc(alias = "GDK_PROPERTY_DELETE")] Delete, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for PropertyState { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "PropertyState::{}", match *self { Self::NewValue => "NewValue", Self::Delete => "Delete", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for PropertyState { type GlibType = ffi::GdkPropertyState; fn into_glib(self) -> ffi::GdkPropertyState { match self { Self::NewValue => ffi::GDK_PROPERTY_NEW_VALUE, Self::Delete => ffi::GDK_PROPERTY_DELETE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for PropertyState { unsafe fn from_glib(value: ffi::GdkPropertyState) -> Self { skip_assert_initialized!(); match value { ffi::GDK_PROPERTY_NEW_VALUE => Self::NewValue, ffi::GDK_PROPERTY_DELETE => Self::Delete, value => Self::__Unknown(value), } } } impl StaticType for PropertyState { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_property_state_get_type()) } } } impl glib::value::ValueType for PropertyState { type Type = Self; } unsafe impl<'a> FromValue<'a> for PropertyState { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for PropertyState { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkScrollDirection")] pub enum ScrollDirection { #[doc(alias = "GDK_SCROLL_UP")] Up, #[doc(alias = "GDK_SCROLL_DOWN")] Down, #[doc(alias = "GDK_SCROLL_LEFT")] Left, #[doc(alias = "GDK_SCROLL_RIGHT")] Right, #[doc(alias = "GDK_SCROLL_SMOOTH")] Smooth, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for ScrollDirection { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "ScrollDirection::{}", match *self { Self::Up => "Up", Self::Down => "Down", Self::Left => "Left", Self::Right => "Right", Self::Smooth => "Smooth", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for ScrollDirection { type GlibType = ffi::GdkScrollDirection; fn into_glib(self) -> ffi::GdkScrollDirection { match self { Self::Up => ffi::GDK_SCROLL_UP, Self::Down => ffi::GDK_SCROLL_DOWN, Self::Left => ffi::GDK_SCROLL_LEFT, Self::Right => ffi::GDK_SCROLL_RIGHT, Self::Smooth => ffi::GDK_SCROLL_SMOOTH, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for ScrollDirection { unsafe fn from_glib(value: ffi::GdkScrollDirection) -> Self { skip_assert_initialized!(); match value { ffi::GDK_SCROLL_UP => Self::Up, ffi::GDK_SCROLL_DOWN => Self::Down, ffi::GDK_SCROLL_LEFT => Self::Left, ffi::GDK_SCROLL_RIGHT => Self::Right, ffi::GDK_SCROLL_SMOOTH => Self::Smooth, value => Self::__Unknown(value), } } } impl StaticType for ScrollDirection { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_scroll_direction_get_type()) } } } impl glib::value::ValueType for ScrollDirection { type Type = Self; } unsafe impl<'a> FromValue<'a> for ScrollDirection { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for ScrollDirection { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkSettingAction")] pub enum SettingAction { #[doc(alias = "GDK_SETTING_ACTION_NEW")] New, #[doc(alias = "GDK_SETTING_ACTION_CHANGED")] Changed, #[doc(alias = "GDK_SETTING_ACTION_DELETED")] Deleted, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for SettingAction { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "SettingAction::{}", match *self { Self::New => "New", Self::Changed => "Changed", Self::Deleted => "Deleted", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for SettingAction { type GlibType = ffi::GdkSettingAction; fn into_glib(self) -> ffi::GdkSettingAction { match self { Self::New => ffi::GDK_SETTING_ACTION_NEW, Self::Changed => ffi::GDK_SETTING_ACTION_CHANGED, Self::Deleted => ffi::GDK_SETTING_ACTION_DELETED, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for SettingAction { unsafe fn from_glib(value: ffi::GdkSettingAction) -> Self { skip_assert_initialized!(); match value { ffi::GDK_SETTING_ACTION_NEW => Self::New, ffi::GDK_SETTING_ACTION_CHANGED => Self::Changed, ffi::GDK_SETTING_ACTION_DELETED => Self::Deleted, value => Self::__Unknown(value), } } } impl StaticType for SettingAction { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_setting_action_get_type()) } } } impl glib::value::ValueType for SettingAction { type Type = Self; } unsafe impl<'a> FromValue<'a> for SettingAction { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for SettingAction { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkSubpixelLayout")] pub enum SubpixelLayout { #[doc(alias = "GDK_SUBPIXEL_LAYOUT_UNKNOWN")] Unknown, #[doc(alias = "GDK_SUBPIXEL_LAYOUT_NONE")] None, #[doc(alias = "GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB")] HorizontalRgb, #[doc(alias = "GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR")] HorizontalBgr, #[doc(alias = "GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB")] VerticalRgb, #[doc(alias = "GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR")] VerticalBgr, #[doc(hidden)] __Unknown(i32), } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl fmt::Display for SubpixelLayout { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "SubpixelLayout::{}", match *self { Self::Unknown => "Unknown", Self::None => "None", Self::HorizontalRgb => "HorizontalRgb", Self::HorizontalBgr => "HorizontalBgr", Self::VerticalRgb => "VerticalRgb", Self::VerticalBgr => "VerticalBgr", _ => "Unknown", } ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl IntoGlib for SubpixelLayout { type GlibType = ffi::GdkSubpixelLayout; fn into_glib(self) -> ffi::GdkSubpixelLayout { match self { Self::Unknown => ffi::GDK_SUBPIXEL_LAYOUT_UNKNOWN, Self::None => ffi::GDK_SUBPIXEL_LAYOUT_NONE, Self::HorizontalRgb => ffi::GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB, Self::HorizontalBgr => ffi::GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR, Self::VerticalRgb => ffi::GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB, Self::VerticalBgr => ffi::GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR, Self::__Unknown(value) => value, } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl FromGlib for SubpixelLayout { unsafe fn from_glib(value: ffi::GdkSubpixelLayout) -> Self { skip_assert_initialized!(); match value { ffi::GDK_SUBPIXEL_LAYOUT_UNKNOWN => Self::Unknown, ffi::GDK_SUBPIXEL_LAYOUT_NONE => Self::None, ffi::GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB => Self::HorizontalRgb, ffi::GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR => Self::HorizontalBgr, ffi::GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB => Self::VerticalRgb, ffi::GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR => Self::VerticalBgr, value => Self::__Unknown(value), } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl StaticType for SubpixelLayout { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_subpixel_layout_get_type()) } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl glib::value::ValueType for SubpixelLayout { type Type = Self; } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] unsafe impl<'a> FromValue<'a> for SubpixelLayout { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl ToValue for SubpixelLayout { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkVisibilityState")] pub enum VisibilityState { #[doc(alias = "GDK_VISIBILITY_UNOBSCURED")] Unobscured, #[doc(alias = "GDK_VISIBILITY_PARTIAL")] Partial, #[doc(alias = "GDK_VISIBILITY_FULLY_OBSCURED")] FullyObscured, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for VisibilityState { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "VisibilityState::{}", match *self { Self::Unobscured => "Unobscured", Self::Partial => "Partial", Self::FullyObscured => "FullyObscured", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for VisibilityState { type GlibType = ffi::GdkVisibilityState; fn into_glib(self) -> ffi::GdkVisibilityState { match self { Self::Unobscured => ffi::GDK_VISIBILITY_UNOBSCURED, Self::Partial => ffi::GDK_VISIBILITY_PARTIAL, Self::FullyObscured => ffi::GDK_VISIBILITY_FULLY_OBSCURED, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for VisibilityState { unsafe fn from_glib(value: ffi::GdkVisibilityState) -> Self { skip_assert_initialized!(); match value { ffi::GDK_VISIBILITY_UNOBSCURED => Self::Unobscured, ffi::GDK_VISIBILITY_PARTIAL => Self::Partial, ffi::GDK_VISIBILITY_FULLY_OBSCURED => Self::FullyObscured, value => Self::__Unknown(value), } } } impl StaticType for VisibilityState { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_visibility_state_get_type()) } } } impl glib::value::ValueType for VisibilityState { type Type = Self; } unsafe impl<'a> FromValue<'a> for VisibilityState { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for VisibilityState { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkVisualType")] pub enum VisualType { #[doc(alias = "GDK_VISUAL_STATIC_GRAY")] StaticGray, #[doc(alias = "GDK_VISUAL_GRAYSCALE")] Grayscale, #[doc(alias = "GDK_VISUAL_STATIC_COLOR")] StaticColor, #[doc(alias = "GDK_VISUAL_PSEUDO_COLOR")] PseudoColor, #[doc(alias = "GDK_VISUAL_TRUE_COLOR")] TrueColor, #[doc(alias = "GDK_VISUAL_DIRECT_COLOR")] DirectColor, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for VisualType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "VisualType::{}", match *self { Self::StaticGray => "StaticGray", Self::Grayscale => "Grayscale", Self::StaticColor => "StaticColor", Self::PseudoColor => "PseudoColor", Self::TrueColor => "TrueColor", Self::DirectColor => "DirectColor", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for VisualType { type GlibType = ffi::GdkVisualType; fn into_glib(self) -> ffi::GdkVisualType { match self { Self::StaticGray => ffi::GDK_VISUAL_STATIC_GRAY, Self::Grayscale => ffi::GDK_VISUAL_GRAYSCALE, Self::StaticColor => ffi::GDK_VISUAL_STATIC_COLOR, Self::PseudoColor => ffi::GDK_VISUAL_PSEUDO_COLOR, Self::TrueColor => ffi::GDK_VISUAL_TRUE_COLOR, Self::DirectColor => ffi::GDK_VISUAL_DIRECT_COLOR, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for VisualType { unsafe fn from_glib(value: ffi::GdkVisualType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_VISUAL_STATIC_GRAY => Self::StaticGray, ffi::GDK_VISUAL_GRAYSCALE => Self::Grayscale, ffi::GDK_VISUAL_STATIC_COLOR => Self::StaticColor, ffi::GDK_VISUAL_PSEUDO_COLOR => Self::PseudoColor, ffi::GDK_VISUAL_TRUE_COLOR => Self::TrueColor, ffi::GDK_VISUAL_DIRECT_COLOR => Self::DirectColor, value => Self::__Unknown(value), } } } impl StaticType for VisualType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_visual_type_get_type()) } } } impl glib::value::ValueType for VisualType { type Type = Self; } unsafe impl<'a> FromValue<'a> for VisualType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for VisualType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkWindowEdge")] pub enum WindowEdge { #[doc(alias = "GDK_WINDOW_EDGE_NORTH_WEST")] NorthWest, #[doc(alias = "GDK_WINDOW_EDGE_NORTH")] North, #[doc(alias = "GDK_WINDOW_EDGE_NORTH_EAST")] NorthEast, #[doc(alias = "GDK_WINDOW_EDGE_WEST")] West, #[doc(alias = "GDK_WINDOW_EDGE_EAST")] East, #[doc(alias = "GDK_WINDOW_EDGE_SOUTH_WEST")] SouthWest, #[doc(alias = "GDK_WINDOW_EDGE_SOUTH")] South, #[doc(alias = "GDK_WINDOW_EDGE_SOUTH_EAST")] SouthEast, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for WindowEdge { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "WindowEdge::{}", match *self { Self::NorthWest => "NorthWest", Self::North => "North", Self::NorthEast => "NorthEast", Self::West => "West", Self::East => "East", Self::SouthWest => "SouthWest", Self::South => "South", Self::SouthEast => "SouthEast", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for WindowEdge { type GlibType = ffi::GdkWindowEdge; fn into_glib(self) -> ffi::GdkWindowEdge { match self { Self::NorthWest => ffi::GDK_WINDOW_EDGE_NORTH_WEST, Self::North => ffi::GDK_WINDOW_EDGE_NORTH, Self::NorthEast => ffi::GDK_WINDOW_EDGE_NORTH_EAST, Self::West => ffi::GDK_WINDOW_EDGE_WEST, Self::East => ffi::GDK_WINDOW_EDGE_EAST, Self::SouthWest => ffi::GDK_WINDOW_EDGE_SOUTH_WEST, Self::South => ffi::GDK_WINDOW_EDGE_SOUTH, Self::SouthEast => ffi::GDK_WINDOW_EDGE_SOUTH_EAST, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for WindowEdge { unsafe fn from_glib(value: ffi::GdkWindowEdge) -> Self { skip_assert_initialized!(); match value { ffi::GDK_WINDOW_EDGE_NORTH_WEST => Self::NorthWest, ffi::GDK_WINDOW_EDGE_NORTH => Self::North, ffi::GDK_WINDOW_EDGE_NORTH_EAST => Self::NorthEast, ffi::GDK_WINDOW_EDGE_WEST => Self::West, ffi::GDK_WINDOW_EDGE_EAST => Self::East, ffi::GDK_WINDOW_EDGE_SOUTH_WEST => Self::SouthWest, ffi::GDK_WINDOW_EDGE_SOUTH => Self::South, ffi::GDK_WINDOW_EDGE_SOUTH_EAST => Self::SouthEast, value => Self::__Unknown(value), } } } impl StaticType for WindowEdge { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_window_edge_get_type()) } } } impl glib::value::ValueType for WindowEdge { type Type = Self; } unsafe impl<'a> FromValue<'a> for WindowEdge { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for WindowEdge { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkWindowType")] pub enum WindowType { #[doc(alias = "GDK_WINDOW_ROOT")] Root, #[doc(alias = "GDK_WINDOW_TOPLEVEL")] Toplevel, #[doc(alias = "GDK_WINDOW_CHILD")] Child, #[doc(alias = "GDK_WINDOW_TEMP")] Temp, #[doc(alias = "GDK_WINDOW_FOREIGN")] Foreign, #[doc(alias = "GDK_WINDOW_OFFSCREEN")] Offscreen, #[doc(alias = "GDK_WINDOW_SUBSURFACE")] Subsurface, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for WindowType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "WindowType::{}", match *self { Self::Root => "Root", Self::Toplevel => "Toplevel", Self::Child => "Child", Self::Temp => "Temp", Self::Foreign => "Foreign", Self::Offscreen => "Offscreen", Self::Subsurface => "Subsurface", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for WindowType { type GlibType = ffi::GdkWindowType; fn into_glib(self) -> ffi::GdkWindowType { match self { Self::Root => ffi::GDK_WINDOW_ROOT, Self::Toplevel => ffi::GDK_WINDOW_TOPLEVEL, Self::Child => ffi::GDK_WINDOW_CHILD, Self::Temp => ffi::GDK_WINDOW_TEMP, Self::Foreign => ffi::GDK_WINDOW_FOREIGN, Self::Offscreen => ffi::GDK_WINDOW_OFFSCREEN, Self::Subsurface => ffi::GDK_WINDOW_SUBSURFACE, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for WindowType { unsafe fn from_glib(value: ffi::GdkWindowType) -> Self { skip_assert_initialized!(); match value { ffi::GDK_WINDOW_ROOT => Self::Root, ffi::GDK_WINDOW_TOPLEVEL => Self::Toplevel, ffi::GDK_WINDOW_CHILD => Self::Child, ffi::GDK_WINDOW_TEMP => Self::Temp, ffi::GDK_WINDOW_FOREIGN => Self::Foreign, ffi::GDK_WINDOW_OFFSCREEN => Self::Offscreen, ffi::GDK_WINDOW_SUBSURFACE => Self::Subsurface, value => Self::__Unknown(value), } } } impl StaticType for WindowType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_window_type_get_type()) } } } impl glib::value::ValueType for WindowType { type Type = Self; } unsafe impl<'a> FromValue<'a> for WindowType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for WindowType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkWindowTypeHint")] pub enum WindowTypeHint { #[doc(alias = "GDK_WINDOW_TYPE_HINT_NORMAL")] Normal, #[doc(alias = "GDK_WINDOW_TYPE_HINT_DIALOG")] Dialog, #[doc(alias = "GDK_WINDOW_TYPE_HINT_MENU")] Menu, #[doc(alias = "GDK_WINDOW_TYPE_HINT_TOOLBAR")] Toolbar, #[doc(alias = "GDK_WINDOW_TYPE_HINT_SPLASHSCREEN")] Splashscreen, #[doc(alias = "GDK_WINDOW_TYPE_HINT_UTILITY")] Utility, #[doc(alias = "GDK_WINDOW_TYPE_HINT_DOCK")] Dock, #[doc(alias = "GDK_WINDOW_TYPE_HINT_DESKTOP")] Desktop, #[doc(alias = "GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU")] DropdownMenu, #[doc(alias = "GDK_WINDOW_TYPE_HINT_POPUP_MENU")] PopupMenu, #[doc(alias = "GDK_WINDOW_TYPE_HINT_TOOLTIP")] Tooltip, #[doc(alias = "GDK_WINDOW_TYPE_HINT_NOTIFICATION")] Notification, #[doc(alias = "GDK_WINDOW_TYPE_HINT_COMBO")] Combo, #[doc(alias = "GDK_WINDOW_TYPE_HINT_DND")] Dnd, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for WindowTypeHint { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "WindowTypeHint::{}", match *self { Self::Normal => "Normal", Self::Dialog => "Dialog", Self::Menu => "Menu", Self::Toolbar => "Toolbar", Self::Splashscreen => "Splashscreen", Self::Utility => "Utility", Self::Dock => "Dock", Self::Desktop => "Desktop", Self::DropdownMenu => "DropdownMenu", Self::PopupMenu => "PopupMenu", Self::Tooltip => "Tooltip", Self::Notification => "Notification", Self::Combo => "Combo", Self::Dnd => "Dnd", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for WindowTypeHint { type GlibType = ffi::GdkWindowTypeHint; fn into_glib(self) -> ffi::GdkWindowTypeHint { match self { Self::Normal => ffi::GDK_WINDOW_TYPE_HINT_NORMAL, Self::Dialog => ffi::GDK_WINDOW_TYPE_HINT_DIALOG, Self::Menu => ffi::GDK_WINDOW_TYPE_HINT_MENU, Self::Toolbar => ffi::GDK_WINDOW_TYPE_HINT_TOOLBAR, Self::Splashscreen => ffi::GDK_WINDOW_TYPE_HINT_SPLASHSCREEN, Self::Utility => ffi::GDK_WINDOW_TYPE_HINT_UTILITY, Self::Dock => ffi::GDK_WINDOW_TYPE_HINT_DOCK, Self::Desktop => ffi::GDK_WINDOW_TYPE_HINT_DESKTOP, Self::DropdownMenu => ffi::GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, Self::PopupMenu => ffi::GDK_WINDOW_TYPE_HINT_POPUP_MENU, Self::Tooltip => ffi::GDK_WINDOW_TYPE_HINT_TOOLTIP, Self::Notification => ffi::GDK_WINDOW_TYPE_HINT_NOTIFICATION, Self::Combo => ffi::GDK_WINDOW_TYPE_HINT_COMBO, Self::Dnd => ffi::GDK_WINDOW_TYPE_HINT_DND, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for WindowTypeHint { unsafe fn from_glib(value: ffi::GdkWindowTypeHint) -> Self { skip_assert_initialized!(); match value { ffi::GDK_WINDOW_TYPE_HINT_NORMAL => Self::Normal, ffi::GDK_WINDOW_TYPE_HINT_DIALOG => Self::Dialog, ffi::GDK_WINDOW_TYPE_HINT_MENU => Self::Menu, ffi::GDK_WINDOW_TYPE_HINT_TOOLBAR => Self::Toolbar, ffi::GDK_WINDOW_TYPE_HINT_SPLASHSCREEN => Self::Splashscreen, ffi::GDK_WINDOW_TYPE_HINT_UTILITY => Self::Utility, ffi::GDK_WINDOW_TYPE_HINT_DOCK => Self::Dock, ffi::GDK_WINDOW_TYPE_HINT_DESKTOP => Self::Desktop, ffi::GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU => Self::DropdownMenu, ffi::GDK_WINDOW_TYPE_HINT_POPUP_MENU => Self::PopupMenu, ffi::GDK_WINDOW_TYPE_HINT_TOOLTIP => Self::Tooltip, ffi::GDK_WINDOW_TYPE_HINT_NOTIFICATION => Self::Notification, ffi::GDK_WINDOW_TYPE_HINT_COMBO => Self::Combo, ffi::GDK_WINDOW_TYPE_HINT_DND => Self::Dnd, value => Self::__Unknown(value), } } } impl StaticType for WindowTypeHint { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_window_type_hint_get_type()) } } } impl glib::value::ValueType for WindowTypeHint { type Type = Self; } unsafe impl<'a> FromValue<'a> for WindowTypeHint { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for WindowTypeHint { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] #[doc(alias = "GdkWindowWindowClass")] pub enum WindowWindowClass { #[doc(alias = "GDK_INPUT_OUTPUT")] InputOutput, #[doc(alias = "GDK_INPUT_ONLY")] InputOnly, #[doc(hidden)] __Unknown(i32), } impl fmt::Display for WindowWindowClass { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, "WindowWindowClass::{}", match *self { Self::InputOutput => "InputOutput", Self::InputOnly => "InputOnly", _ => "Unknown", } ) } } #[doc(hidden)] impl IntoGlib for WindowWindowClass { type GlibType = ffi::GdkWindowWindowClass; fn into_glib(self) -> ffi::GdkWindowWindowClass { match self { Self::InputOutput => ffi::GDK_INPUT_OUTPUT, Self::InputOnly => ffi::GDK_INPUT_ONLY, Self::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for WindowWindowClass { unsafe fn from_glib(value: ffi::GdkWindowWindowClass) -> Self { skip_assert_initialized!(); match value { ffi::GDK_INPUT_OUTPUT => Self::InputOutput, ffi::GDK_INPUT_ONLY => Self::InputOnly, value => Self::__Unknown(value), } } } impl StaticType for WindowWindowClass { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_window_window_class_get_type()) } } } impl glib::value::ValueType for WindowWindowClass { type Type = Self; } unsafe impl<'a> FromValue<'a> for WindowWindowClass { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl ToValue for WindowWindowClass { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } gdk-0.14.3/src/auto/event_sequence.rs000064400000000000000000000011240072674642500156220ustar 00000000000000// 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 glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventSequence(Boxed); match fn { copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::gdk_event_sequence_get_type(), ptr as *mut _) as *mut ffi::GdkEventSequence, free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::gdk_event_sequence_get_type(), ptr as *mut _), type_ => || ffi::gdk_event_sequence_get_type(), } } gdk-0.14.3/src/auto/flags.rs000064400000000000000000001031510072674642500137100ustar 00000000000000// 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 bitflags::bitflags; use glib::translate::*; use glib::value::FromValue; use glib::value::ToValue; use glib::StaticType; use glib::Type; use std::fmt; #[cfg(any(feature = "v3_22", feature = "dox"))] bitflags! { #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "GdkAnchorHints")] pub struct AnchorHints: u32 { #[doc(alias = "GDK_ANCHOR_FLIP_X")] const FLIP_X = ffi::GDK_ANCHOR_FLIP_X as u32; #[doc(alias = "GDK_ANCHOR_FLIP_Y")] const FLIP_Y = ffi::GDK_ANCHOR_FLIP_Y as u32; #[doc(alias = "GDK_ANCHOR_SLIDE_X")] const SLIDE_X = ffi::GDK_ANCHOR_SLIDE_X as u32; #[doc(alias = "GDK_ANCHOR_SLIDE_Y")] const SLIDE_Y = ffi::GDK_ANCHOR_SLIDE_Y as u32; #[doc(alias = "GDK_ANCHOR_RESIZE_X")] const RESIZE_X = ffi::GDK_ANCHOR_RESIZE_X as u32; #[doc(alias = "GDK_ANCHOR_RESIZE_Y")] const RESIZE_Y = ffi::GDK_ANCHOR_RESIZE_Y as u32; #[doc(alias = "GDK_ANCHOR_FLIP")] const FLIP = ffi::GDK_ANCHOR_FLIP as u32; #[doc(alias = "GDK_ANCHOR_SLIDE")] const SLIDE = ffi::GDK_ANCHOR_SLIDE as u32; #[doc(alias = "GDK_ANCHOR_RESIZE")] const RESIZE = ffi::GDK_ANCHOR_RESIZE as u32; } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl fmt::Display for AnchorHints { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl IntoGlib for AnchorHints { type GlibType = ffi::GdkAnchorHints; fn into_glib(self) -> ffi::GdkAnchorHints { self.bits() } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl FromGlib for AnchorHints { unsafe fn from_glib(value: ffi::GdkAnchorHints) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl StaticType for AnchorHints { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_anchor_hints_get_type()) } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl glib::value::ValueType for AnchorHints { type Type = Self; } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] unsafe impl<'a> FromValue<'a> for AnchorHints { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl ToValue for AnchorHints { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(any(feature = "v3_22", feature = "dox"))] bitflags! { #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "GdkAxisFlags")] pub struct AxisFlags: u32 { #[doc(alias = "GDK_AXIS_FLAG_X")] const X = ffi::GDK_AXIS_FLAG_X as u32; #[doc(alias = "GDK_AXIS_FLAG_Y")] const Y = ffi::GDK_AXIS_FLAG_Y as u32; #[doc(alias = "GDK_AXIS_FLAG_PRESSURE")] const PRESSURE = ffi::GDK_AXIS_FLAG_PRESSURE as u32; #[doc(alias = "GDK_AXIS_FLAG_XTILT")] const XTILT = ffi::GDK_AXIS_FLAG_XTILT as u32; #[doc(alias = "GDK_AXIS_FLAG_YTILT")] const YTILT = ffi::GDK_AXIS_FLAG_YTILT as u32; #[doc(alias = "GDK_AXIS_FLAG_WHEEL")] const WHEEL = ffi::GDK_AXIS_FLAG_WHEEL as u32; #[doc(alias = "GDK_AXIS_FLAG_DISTANCE")] const DISTANCE = ffi::GDK_AXIS_FLAG_DISTANCE as u32; #[doc(alias = "GDK_AXIS_FLAG_ROTATION")] const ROTATION = ffi::GDK_AXIS_FLAG_ROTATION as u32; #[doc(alias = "GDK_AXIS_FLAG_SLIDER")] const SLIDER = ffi::GDK_AXIS_FLAG_SLIDER as u32; } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl fmt::Display for AxisFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl IntoGlib for AxisFlags { type GlibType = ffi::GdkAxisFlags; fn into_glib(self) -> ffi::GdkAxisFlags { self.bits() } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(hidden)] impl FromGlib for AxisFlags { unsafe fn from_glib(value: ffi::GdkAxisFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl StaticType for AxisFlags { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_axis_flags_get_type()) } } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl glib::value::ValueType for AxisFlags { type Type = Self; } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] unsafe impl<'a> FromValue<'a> for AxisFlags { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] impl ToValue for AxisFlags { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkDragAction")] pub struct DragAction: u32 { #[doc(alias = "GDK_ACTION_DEFAULT")] const DEFAULT = ffi::GDK_ACTION_DEFAULT as u32; #[doc(alias = "GDK_ACTION_COPY")] const COPY = ffi::GDK_ACTION_COPY as u32; #[doc(alias = "GDK_ACTION_MOVE")] const MOVE = ffi::GDK_ACTION_MOVE as u32; #[doc(alias = "GDK_ACTION_LINK")] const LINK = ffi::GDK_ACTION_LINK as u32; #[doc(alias = "GDK_ACTION_PRIVATE")] const PRIVATE = ffi::GDK_ACTION_PRIVATE as u32; #[doc(alias = "GDK_ACTION_ASK")] const ASK = ffi::GDK_ACTION_ASK as u32; } } impl fmt::Display for DragAction { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for DragAction { type GlibType = ffi::GdkDragAction; fn into_glib(self) -> ffi::GdkDragAction { self.bits() } } #[doc(hidden)] impl FromGlib for DragAction { unsafe fn from_glib(value: ffi::GdkDragAction) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for DragAction { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_drag_action_get_type()) } } } impl glib::value::ValueType for DragAction { type Type = Self; } unsafe impl<'a> FromValue<'a> for DragAction { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for DragAction { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkEventMask")] pub struct EventMask: u32 { #[doc(alias = "GDK_EXPOSURE_MASK")] const EXPOSURE_MASK = ffi::GDK_EXPOSURE_MASK as u32; #[doc(alias = "GDK_POINTER_MOTION_MASK")] const POINTER_MOTION_MASK = ffi::GDK_POINTER_MOTION_MASK as u32; #[doc(alias = "GDK_POINTER_MOTION_HINT_MASK")] const POINTER_MOTION_HINT_MASK = ffi::GDK_POINTER_MOTION_HINT_MASK as u32; #[doc(alias = "GDK_BUTTON_MOTION_MASK")] const BUTTON_MOTION_MASK = ffi::GDK_BUTTON_MOTION_MASK as u32; #[doc(alias = "GDK_BUTTON1_MOTION_MASK")] const BUTTON1_MOTION_MASK = ffi::GDK_BUTTON1_MOTION_MASK as u32; #[doc(alias = "GDK_BUTTON2_MOTION_MASK")] const BUTTON2_MOTION_MASK = ffi::GDK_BUTTON2_MOTION_MASK as u32; #[doc(alias = "GDK_BUTTON3_MOTION_MASK")] const BUTTON3_MOTION_MASK = ffi::GDK_BUTTON3_MOTION_MASK as u32; #[doc(alias = "GDK_BUTTON_PRESS_MASK")] const BUTTON_PRESS_MASK = ffi::GDK_BUTTON_PRESS_MASK as u32; #[doc(alias = "GDK_BUTTON_RELEASE_MASK")] const BUTTON_RELEASE_MASK = ffi::GDK_BUTTON_RELEASE_MASK as u32; #[doc(alias = "GDK_KEY_PRESS_MASK")] const KEY_PRESS_MASK = ffi::GDK_KEY_PRESS_MASK as u32; #[doc(alias = "GDK_KEY_RELEASE_MASK")] const KEY_RELEASE_MASK = ffi::GDK_KEY_RELEASE_MASK as u32; #[doc(alias = "GDK_ENTER_NOTIFY_MASK")] const ENTER_NOTIFY_MASK = ffi::GDK_ENTER_NOTIFY_MASK as u32; #[doc(alias = "GDK_LEAVE_NOTIFY_MASK")] const LEAVE_NOTIFY_MASK = ffi::GDK_LEAVE_NOTIFY_MASK as u32; #[doc(alias = "GDK_FOCUS_CHANGE_MASK")] const FOCUS_CHANGE_MASK = ffi::GDK_FOCUS_CHANGE_MASK as u32; #[doc(alias = "GDK_STRUCTURE_MASK")] const STRUCTURE_MASK = ffi::GDK_STRUCTURE_MASK as u32; #[doc(alias = "GDK_PROPERTY_CHANGE_MASK")] const PROPERTY_CHANGE_MASK = ffi::GDK_PROPERTY_CHANGE_MASK as u32; #[doc(alias = "GDK_VISIBILITY_NOTIFY_MASK")] const VISIBILITY_NOTIFY_MASK = ffi::GDK_VISIBILITY_NOTIFY_MASK as u32; #[doc(alias = "GDK_PROXIMITY_IN_MASK")] const PROXIMITY_IN_MASK = ffi::GDK_PROXIMITY_IN_MASK as u32; #[doc(alias = "GDK_PROXIMITY_OUT_MASK")] const PROXIMITY_OUT_MASK = ffi::GDK_PROXIMITY_OUT_MASK as u32; #[doc(alias = "GDK_SUBSTRUCTURE_MASK")] const SUBSTRUCTURE_MASK = ffi::GDK_SUBSTRUCTURE_MASK as u32; #[doc(alias = "GDK_SCROLL_MASK")] const SCROLL_MASK = ffi::GDK_SCROLL_MASK as u32; #[doc(alias = "GDK_TOUCH_MASK")] const TOUCH_MASK = ffi::GDK_TOUCH_MASK as u32; #[doc(alias = "GDK_SMOOTH_SCROLL_MASK")] const SMOOTH_SCROLL_MASK = ffi::GDK_SMOOTH_SCROLL_MASK as u32; #[doc(alias = "GDK_TOUCHPAD_GESTURE_MASK")] const TOUCHPAD_GESTURE_MASK = ffi::GDK_TOUCHPAD_GESTURE_MASK as u32; #[doc(alias = "GDK_TABLET_PAD_MASK")] const TABLET_PAD_MASK = ffi::GDK_TABLET_PAD_MASK as u32; #[doc(alias = "GDK_ALL_EVENTS_MASK")] const ALL_EVENTS_MASK = ffi::GDK_ALL_EVENTS_MASK as u32; } } impl fmt::Display for EventMask { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for EventMask { type GlibType = ffi::GdkEventMask; fn into_glib(self) -> ffi::GdkEventMask { self.bits() } } #[doc(hidden)] impl FromGlib for EventMask { unsafe fn from_glib(value: ffi::GdkEventMask) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for EventMask { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_event_mask_get_type()) } } } impl glib::value::ValueType for EventMask { type Type = Self; } unsafe impl<'a> FromValue<'a> for EventMask { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for EventMask { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkFrameClockPhase")] pub struct FrameClockPhase: u32 { #[doc(alias = "GDK_FRAME_CLOCK_PHASE_NONE")] const NONE = ffi::GDK_FRAME_CLOCK_PHASE_NONE as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS")] const FLUSH_EVENTS = ffi::GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT")] const BEFORE_PAINT = ffi::GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_UPDATE")] const UPDATE = ffi::GDK_FRAME_CLOCK_PHASE_UPDATE as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_LAYOUT")] const LAYOUT = ffi::GDK_FRAME_CLOCK_PHASE_LAYOUT as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_PAINT")] const PAINT = ffi::GDK_FRAME_CLOCK_PHASE_PAINT as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS")] const RESUME_EVENTS = ffi::GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS as u32; #[doc(alias = "GDK_FRAME_CLOCK_PHASE_AFTER_PAINT")] const AFTER_PAINT = ffi::GDK_FRAME_CLOCK_PHASE_AFTER_PAINT as u32; } } impl fmt::Display for FrameClockPhase { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for FrameClockPhase { type GlibType = ffi::GdkFrameClockPhase; fn into_glib(self) -> ffi::GdkFrameClockPhase { self.bits() } } #[doc(hidden)] impl FromGlib for FrameClockPhase { unsafe fn from_glib(value: ffi::GdkFrameClockPhase) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for FrameClockPhase { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_frame_clock_phase_get_type()) } } } impl glib::value::ValueType for FrameClockPhase { type Type = Self; } unsafe impl<'a> FromValue<'a> for FrameClockPhase { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for FrameClockPhase { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkModifierType")] pub struct ModifierType: u32 { #[doc(alias = "GDK_SHIFT_MASK")] const SHIFT_MASK = ffi::GDK_SHIFT_MASK as u32; #[doc(alias = "GDK_LOCK_MASK")] const LOCK_MASK = ffi::GDK_LOCK_MASK as u32; #[doc(alias = "GDK_CONTROL_MASK")] const CONTROL_MASK = ffi::GDK_CONTROL_MASK as u32; #[doc(alias = "GDK_MOD1_MASK")] const MOD1_MASK = ffi::GDK_MOD1_MASK as u32; #[doc(alias = "GDK_MOD2_MASK")] const MOD2_MASK = ffi::GDK_MOD2_MASK as u32; #[doc(alias = "GDK_MOD3_MASK")] const MOD3_MASK = ffi::GDK_MOD3_MASK as u32; #[doc(alias = "GDK_MOD4_MASK")] const MOD4_MASK = ffi::GDK_MOD4_MASK as u32; #[doc(alias = "GDK_MOD5_MASK")] const MOD5_MASK = ffi::GDK_MOD5_MASK as u32; #[doc(alias = "GDK_BUTTON1_MASK")] const BUTTON1_MASK = ffi::GDK_BUTTON1_MASK as u32; #[doc(alias = "GDK_BUTTON2_MASK")] const BUTTON2_MASK = ffi::GDK_BUTTON2_MASK as u32; #[doc(alias = "GDK_BUTTON3_MASK")] const BUTTON3_MASK = ffi::GDK_BUTTON3_MASK as u32; #[doc(alias = "GDK_BUTTON4_MASK")] const BUTTON4_MASK = ffi::GDK_BUTTON4_MASK as u32; #[doc(alias = "GDK_BUTTON5_MASK")] const BUTTON5_MASK = ffi::GDK_BUTTON5_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_13_MASK")] const MODIFIER_RESERVED_13_MASK = ffi::GDK_MODIFIER_RESERVED_13_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_14_MASK")] const MODIFIER_RESERVED_14_MASK = ffi::GDK_MODIFIER_RESERVED_14_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_15_MASK")] const MODIFIER_RESERVED_15_MASK = ffi::GDK_MODIFIER_RESERVED_15_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_16_MASK")] const MODIFIER_RESERVED_16_MASK = ffi::GDK_MODIFIER_RESERVED_16_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_17_MASK")] const MODIFIER_RESERVED_17_MASK = ffi::GDK_MODIFIER_RESERVED_17_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_18_MASK")] const MODIFIER_RESERVED_18_MASK = ffi::GDK_MODIFIER_RESERVED_18_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_19_MASK")] const MODIFIER_RESERVED_19_MASK = ffi::GDK_MODIFIER_RESERVED_19_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_20_MASK")] const MODIFIER_RESERVED_20_MASK = ffi::GDK_MODIFIER_RESERVED_20_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_21_MASK")] const MODIFIER_RESERVED_21_MASK = ffi::GDK_MODIFIER_RESERVED_21_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_22_MASK")] const MODIFIER_RESERVED_22_MASK = ffi::GDK_MODIFIER_RESERVED_22_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_23_MASK")] const MODIFIER_RESERVED_23_MASK = ffi::GDK_MODIFIER_RESERVED_23_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_24_MASK")] const MODIFIER_RESERVED_24_MASK = ffi::GDK_MODIFIER_RESERVED_24_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_25_MASK")] const MODIFIER_RESERVED_25_MASK = ffi::GDK_MODIFIER_RESERVED_25_MASK as u32; #[doc(alias = "GDK_SUPER_MASK")] const SUPER_MASK = ffi::GDK_SUPER_MASK as u32; #[doc(alias = "GDK_HYPER_MASK")] const HYPER_MASK = ffi::GDK_HYPER_MASK as u32; #[doc(alias = "GDK_META_MASK")] const META_MASK = ffi::GDK_META_MASK as u32; #[doc(alias = "GDK_MODIFIER_RESERVED_29_MASK")] const MODIFIER_RESERVED_29_MASK = ffi::GDK_MODIFIER_RESERVED_29_MASK as u32; #[doc(alias = "GDK_RELEASE_MASK")] const RELEASE_MASK = ffi::GDK_RELEASE_MASK as u32; #[doc(alias = "GDK_MODIFIER_MASK")] const MODIFIER_MASK = ffi::GDK_MODIFIER_MASK as u32; } } impl fmt::Display for ModifierType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for ModifierType { type GlibType = ffi::GdkModifierType; fn into_glib(self) -> ffi::GdkModifierType { self.bits() } } #[doc(hidden)] impl FromGlib for ModifierType { unsafe fn from_glib(value: ffi::GdkModifierType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for ModifierType { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_modifier_type_get_type()) } } } impl glib::value::ValueType for ModifierType { type Type = Self; } unsafe impl<'a> FromValue<'a> for ModifierType { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for ModifierType { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } #[cfg(any(feature = "v3_20", feature = "dox"))] bitflags! { #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "GdkSeatCapabilities")] pub struct SeatCapabilities: u32 { #[doc(alias = "GDK_SEAT_CAPABILITY_NONE")] const NONE = ffi::GDK_SEAT_CAPABILITY_NONE as u32; #[doc(alias = "GDK_SEAT_CAPABILITY_POINTER")] const POINTER = ffi::GDK_SEAT_CAPABILITY_POINTER as u32; #[doc(alias = "GDK_SEAT_CAPABILITY_TOUCH")] const TOUCH = ffi::GDK_SEAT_CAPABILITY_TOUCH as u32; #[doc(alias = "GDK_SEAT_CAPABILITY_TABLET_STYLUS")] const TABLET_STYLUS = ffi::GDK_SEAT_CAPABILITY_TABLET_STYLUS as u32; #[doc(alias = "GDK_SEAT_CAPABILITY_KEYBOARD")] const KEYBOARD = ffi::GDK_SEAT_CAPABILITY_KEYBOARD as u32; #[doc(alias = "GDK_SEAT_CAPABILITY_ALL_POINTING")] const ALL_POINTING = ffi::GDK_SEAT_CAPABILITY_ALL_POINTING as u32; #[doc(alias = "GDK_SEAT_CAPABILITY_ALL")] const ALL = ffi::GDK_SEAT_CAPABILITY_ALL as u32; } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl fmt::Display for SeatCapabilities { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(hidden)] impl IntoGlib for SeatCapabilities { type GlibType = ffi::GdkSeatCapabilities; fn into_glib(self) -> ffi::GdkSeatCapabilities { self.bits() } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(hidden)] impl FromGlib for SeatCapabilities { unsafe fn from_glib(value: ffi::GdkSeatCapabilities) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl StaticType for SeatCapabilities { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_seat_capabilities_get_type()) } } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl glib::value::ValueType for SeatCapabilities { type Type = Self; } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] unsafe impl<'a> FromValue<'a> for SeatCapabilities { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] impl ToValue for SeatCapabilities { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkWMDecoration")] pub struct WMDecoration: u32 { #[doc(alias = "GDK_DECOR_ALL")] const ALL = ffi::GDK_DECOR_ALL as u32; #[doc(alias = "GDK_DECOR_BORDER")] const BORDER = ffi::GDK_DECOR_BORDER as u32; #[doc(alias = "GDK_DECOR_RESIZEH")] const RESIZEH = ffi::GDK_DECOR_RESIZEH as u32; #[doc(alias = "GDK_DECOR_TITLE")] const TITLE = ffi::GDK_DECOR_TITLE as u32; #[doc(alias = "GDK_DECOR_MENU")] const MENU = ffi::GDK_DECOR_MENU as u32; #[doc(alias = "GDK_DECOR_MINIMIZE")] const MINIMIZE = ffi::GDK_DECOR_MINIMIZE as u32; #[doc(alias = "GDK_DECOR_MAXIMIZE")] const MAXIMIZE = ffi::GDK_DECOR_MAXIMIZE as u32; } } impl fmt::Display for WMDecoration { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for WMDecoration { type GlibType = ffi::GdkWMDecoration; fn into_glib(self) -> ffi::GdkWMDecoration { self.bits() } } #[doc(hidden)] impl FromGlib for WMDecoration { unsafe fn from_glib(value: ffi::GdkWMDecoration) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for WMDecoration { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_wm_decoration_get_type()) } } } impl glib::value::ValueType for WMDecoration { type Type = Self; } unsafe impl<'a> FromValue<'a> for WMDecoration { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for WMDecoration { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkWMFunction")] pub struct WMFunction: u32 { #[doc(alias = "GDK_FUNC_ALL")] const ALL = ffi::GDK_FUNC_ALL as u32; #[doc(alias = "GDK_FUNC_RESIZE")] const RESIZE = ffi::GDK_FUNC_RESIZE as u32; #[doc(alias = "GDK_FUNC_MOVE")] const MOVE = ffi::GDK_FUNC_MOVE as u32; #[doc(alias = "GDK_FUNC_MINIMIZE")] const MINIMIZE = ffi::GDK_FUNC_MINIMIZE as u32; #[doc(alias = "GDK_FUNC_MAXIMIZE")] const MAXIMIZE = ffi::GDK_FUNC_MAXIMIZE as u32; #[doc(alias = "GDK_FUNC_CLOSE")] const CLOSE = ffi::GDK_FUNC_CLOSE as u32; } } impl fmt::Display for WMFunction { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for WMFunction { type GlibType = ffi::GdkWMFunction; fn into_glib(self) -> ffi::GdkWMFunction { self.bits() } } #[doc(hidden)] impl FromGlib for WMFunction { unsafe fn from_glib(value: ffi::GdkWMFunction) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for WMFunction { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_wm_function_get_type()) } } } impl glib::value::ValueType for WMFunction { type Type = Self; } unsafe impl<'a> FromValue<'a> for WMFunction { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for WMFunction { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkWindowHints")] pub struct WindowHints: u32 { #[doc(alias = "GDK_HINT_POS")] const POS = ffi::GDK_HINT_POS as u32; #[doc(alias = "GDK_HINT_MIN_SIZE")] const MIN_SIZE = ffi::GDK_HINT_MIN_SIZE as u32; #[doc(alias = "GDK_HINT_MAX_SIZE")] const MAX_SIZE = ffi::GDK_HINT_MAX_SIZE as u32; #[doc(alias = "GDK_HINT_BASE_SIZE")] const BASE_SIZE = ffi::GDK_HINT_BASE_SIZE as u32; #[doc(alias = "GDK_HINT_ASPECT")] const ASPECT = ffi::GDK_HINT_ASPECT as u32; #[doc(alias = "GDK_HINT_RESIZE_INC")] const RESIZE_INC = ffi::GDK_HINT_RESIZE_INC as u32; #[doc(alias = "GDK_HINT_WIN_GRAVITY")] const WIN_GRAVITY = ffi::GDK_HINT_WIN_GRAVITY as u32; #[doc(alias = "GDK_HINT_USER_POS")] const USER_POS = ffi::GDK_HINT_USER_POS as u32; #[doc(alias = "GDK_HINT_USER_SIZE")] const USER_SIZE = ffi::GDK_HINT_USER_SIZE as u32; } } impl fmt::Display for WindowHints { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for WindowHints { type GlibType = ffi::GdkWindowHints; fn into_glib(self) -> ffi::GdkWindowHints { self.bits() } } #[doc(hidden)] impl FromGlib for WindowHints { unsafe fn from_glib(value: ffi::GdkWindowHints) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for WindowHints { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_window_hints_get_type()) } } } impl glib::value::ValueType for WindowHints { type Type = Self; } unsafe impl<'a> FromValue<'a> for WindowHints { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for WindowHints { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } bitflags! { #[doc(alias = "GdkWindowState")] pub struct WindowState: u32 { #[doc(alias = "GDK_WINDOW_STATE_WITHDRAWN")] const WITHDRAWN = ffi::GDK_WINDOW_STATE_WITHDRAWN as u32; #[doc(alias = "GDK_WINDOW_STATE_ICONIFIED")] const ICONIFIED = ffi::GDK_WINDOW_STATE_ICONIFIED as u32; #[doc(alias = "GDK_WINDOW_STATE_MAXIMIZED")] const MAXIMIZED = ffi::GDK_WINDOW_STATE_MAXIMIZED as u32; #[doc(alias = "GDK_WINDOW_STATE_STICKY")] const STICKY = ffi::GDK_WINDOW_STATE_STICKY as u32; #[doc(alias = "GDK_WINDOW_STATE_FULLSCREEN")] const FULLSCREEN = ffi::GDK_WINDOW_STATE_FULLSCREEN as u32; #[doc(alias = "GDK_WINDOW_STATE_ABOVE")] const ABOVE = ffi::GDK_WINDOW_STATE_ABOVE as u32; #[doc(alias = "GDK_WINDOW_STATE_BELOW")] const BELOW = ffi::GDK_WINDOW_STATE_BELOW as u32; #[doc(alias = "GDK_WINDOW_STATE_FOCUSED")] const FOCUSED = ffi::GDK_WINDOW_STATE_FOCUSED as u32; #[doc(alias = "GDK_WINDOW_STATE_TILED")] const TILED = ffi::GDK_WINDOW_STATE_TILED as u32; #[doc(alias = "GDK_WINDOW_STATE_TOP_TILED")] const TOP_TILED = ffi::GDK_WINDOW_STATE_TOP_TILED as u32; #[doc(alias = "GDK_WINDOW_STATE_TOP_RESIZABLE")] const TOP_RESIZABLE = ffi::GDK_WINDOW_STATE_TOP_RESIZABLE as u32; #[doc(alias = "GDK_WINDOW_STATE_RIGHT_TILED")] const RIGHT_TILED = ffi::GDK_WINDOW_STATE_RIGHT_TILED as u32; #[doc(alias = "GDK_WINDOW_STATE_RIGHT_RESIZABLE")] const RIGHT_RESIZABLE = ffi::GDK_WINDOW_STATE_RIGHT_RESIZABLE as u32; #[doc(alias = "GDK_WINDOW_STATE_BOTTOM_TILED")] const BOTTOM_TILED = ffi::GDK_WINDOW_STATE_BOTTOM_TILED as u32; #[doc(alias = "GDK_WINDOW_STATE_BOTTOM_RESIZABLE")] const BOTTOM_RESIZABLE = ffi::GDK_WINDOW_STATE_BOTTOM_RESIZABLE as u32; #[doc(alias = "GDK_WINDOW_STATE_LEFT_TILED")] const LEFT_TILED = ffi::GDK_WINDOW_STATE_LEFT_TILED as u32; #[doc(alias = "GDK_WINDOW_STATE_LEFT_RESIZABLE")] const LEFT_RESIZABLE = ffi::GDK_WINDOW_STATE_LEFT_RESIZABLE as u32; } } impl fmt::Display for WindowState { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { ::fmt(self, f) } } #[doc(hidden)] impl IntoGlib for WindowState { type GlibType = ffi::GdkWindowState; fn into_glib(self) -> ffi::GdkWindowState { self.bits() } } #[doc(hidden)] impl FromGlib for WindowState { unsafe fn from_glib(value: ffi::GdkWindowState) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) } } impl StaticType for WindowState { fn static_type() -> Type { unsafe { from_glib(ffi::gdk_window_state_get_type()) } } } impl glib::value::ValueType for WindowState { type Type = Self; } unsafe impl<'a> FromValue<'a> for WindowState { type Checker = glib::value::GenericValueTypeChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl ToValue for WindowState { fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); } value } fn value_type(&self) -> glib::Type { Self::static_type() } } gdk-0.14.3/src/auto/frame_clock.rs000064400000000000000000000176270072674642500150750ustar 00000000000000// 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 crate::FrameClockPhase; use crate::FrameTimings; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkFrameClock")] pub struct FrameClock(Object); match fn { type_ => || ffi::gdk_frame_clock_get_type(), } } impl FrameClock { #[doc(alias = "gdk_frame_clock_begin_updating")] pub fn begin_updating(&self) { unsafe { ffi::gdk_frame_clock_begin_updating(self.to_glib_none().0); } } #[doc(alias = "gdk_frame_clock_end_updating")] pub fn end_updating(&self) { unsafe { ffi::gdk_frame_clock_end_updating(self.to_glib_none().0); } } #[doc(alias = "gdk_frame_clock_get_current_timings")] #[doc(alias = "get_current_timings")] pub fn current_timings(&self) -> Option { unsafe { from_glib_none(ffi::gdk_frame_clock_get_current_timings( self.to_glib_none().0, )) } } #[doc(alias = "gdk_frame_clock_get_frame_counter")] #[doc(alias = "get_frame_counter")] pub fn frame_counter(&self) -> i64 { unsafe { ffi::gdk_frame_clock_get_frame_counter(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_clock_get_frame_time")] #[doc(alias = "get_frame_time")] pub fn frame_time(&self) -> i64 { unsafe { ffi::gdk_frame_clock_get_frame_time(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_clock_get_history_start")] #[doc(alias = "get_history_start")] pub fn history_start(&self) -> i64 { unsafe { ffi::gdk_frame_clock_get_history_start(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_clock_get_timings")] #[doc(alias = "get_timings")] pub fn timings(&self, frame_counter: i64) -> Option { unsafe { from_glib_none(ffi::gdk_frame_clock_get_timings( self.to_glib_none().0, frame_counter, )) } } #[doc(alias = "gdk_frame_clock_request_phase")] pub fn request_phase(&self, phase: FrameClockPhase) { unsafe { ffi::gdk_frame_clock_request_phase(self.to_glib_none().0, phase.into_glib()); } } #[doc(alias = "after-paint")] pub fn connect_after_paint(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn after_paint_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"after-paint\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( after_paint_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "before-paint")] pub fn connect_before_paint(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn before_paint_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"before-paint\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( before_paint_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "flush-events")] pub fn connect_flush_events(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn flush_events_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"flush-events\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( flush_events_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "layout")] pub fn connect_layout(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn layout_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"layout\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( layout_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "paint")] pub fn connect_paint(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn paint_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"paint\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( paint_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "resume-events")] pub fn connect_resume_events(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn resume_events_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"resume-events\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( resume_events_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "update")] pub fn connect_update(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn update_trampoline( this: *mut ffi::GdkFrameClock, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"update\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( update_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for FrameClock { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("FrameClock") } } gdk-0.14.3/src/auto/frame_timings.rs000064400000000000000000000022350072674642500154410ustar 00000000000000// 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 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), type_ => || ffi::gdk_frame_timings_get_type(), } } impl FrameTimings { #[doc(alias = "gdk_frame_timings_get_complete")] #[doc(alias = "get_complete")] pub fn is_complete(&self) -> bool { unsafe { from_glib(ffi::gdk_frame_timings_get_complete(self.to_glib_none().0)) } } #[doc(alias = "gdk_frame_timings_get_frame_counter")] #[doc(alias = "get_frame_counter")] pub fn frame_counter(&self) -> i64 { unsafe { ffi::gdk_frame_timings_get_frame_counter(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_timings_get_frame_time")] #[doc(alias = "get_frame_time")] pub fn frame_time(&self) -> i64 { unsafe { ffi::gdk_frame_timings_get_frame_time(self.to_glib_none().0) } } } gdk-0.14.3/src/auto/functions.rs000064400000000000000000000345600072674642500146330ustar 00000000000000// 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 crate::Atom; use crate::Display; use crate::Event; use crate::EventType; use crate::ModifierType; use crate::Screen; use crate::Visual; use crate::Window; use crate::WindowState; use glib::translate::*; use std::mem; use std::ptr; #[doc(alias = "gdk_beep")] pub fn beep() { assert_initialized_main_thread!(); unsafe { ffi::gdk_beep(); } } #[doc(alias = "gdk_error_trap_pop")] pub fn error_trap_pop() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_error_trap_pop() } } #[doc(alias = "gdk_error_trap_pop_ignored")] pub fn error_trap_pop_ignored() { assert_initialized_main_thread!(); unsafe { ffi::gdk_error_trap_pop_ignored(); } } #[doc(alias = "gdk_error_trap_push")] pub fn error_trap_push() { assert_initialized_main_thread!(); unsafe { ffi::gdk_error_trap_push(); } } #[doc(alias = "gdk_events_get_angle")] pub fn events_get_angle(event1: &mut Event, event2: &mut Event) -> Option { assert_initialized_main_thread!(); unsafe { let mut angle = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_events_get_angle( event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, angle.as_mut_ptr(), )); let angle = angle.assume_init(); if ret { Some(angle) } else { None } } } #[doc(alias = "gdk_events_get_center")] pub fn events_get_center(event1: &mut Event, event2: &mut Event) -> Option<(f64, f64)> { assert_initialized_main_thread!(); unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_events_get_center( event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, x.as_mut_ptr(), y.as_mut_ptr(), )); let x = x.assume_init(); let y = y.assume_init(); if ret { Some((x, y)) } else { None } } } #[doc(alias = "gdk_events_get_distance")] pub fn events_get_distance(event1: &mut Event, event2: &mut Event) -> Option { assert_initialized_main_thread!(); unsafe { let mut distance = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_events_get_distance( event1.to_glib_none_mut().0, event2.to_glib_none_mut().0, distance.as_mut_ptr(), )); let distance = distance.assume_init(); if ret { Some(distance) } else { None } } } #[doc(alias = "gdk_events_pending")] pub fn events_pending() -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gdk_events_pending()) } } #[doc(alias = "gdk_flush")] pub fn flush() { assert_initialized_main_thread!(); unsafe { ffi::gdk_flush(); } } #[doc(alias = "gdk_get_display_arg_name")] #[doc(alias = "get_display_arg_name")] pub fn display_arg_name() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_get_display_arg_name()) } } #[doc(alias = "gdk_get_program_class")] #[doc(alias = "get_program_class")] pub fn program_class() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_get_program_class()) } } #[doc(alias = "gdk_get_show_events")] #[doc(alias = "get_show_events")] pub fn shows_events() -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gdk_get_show_events()) } } //#[doc(alias = "gdk_init_check")] //pub fn init_check(argv: /*Unimplemented*/Vec) -> bool { // unsafe { TODO: call ffi:gdk_init_check() } //} #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_list_visuals")] pub fn list_visuals() -> Vec { assert_initialized_main_thread!(); unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_list_visuals()) } } #[doc(alias = "gdk_notify_startup_complete")] pub fn notify_startup_complete() { assert_initialized_main_thread!(); unsafe { ffi::gdk_notify_startup_complete(); } } #[doc(alias = "gdk_notify_startup_complete_with_id")] 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); } } #[doc(alias = "gdk_pango_context_get")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_pango_context_get_for_display")] 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, )) } } #[doc(alias = "gdk_pango_context_get_for_screen")] 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, )) } } //#[doc(alias = "gdk_pango_layout_line_get_clip_region")] //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() } //} //#[doc(alias = "gdk_parse_args")] //pub fn parse_args(argv: /*Unimplemented*/Vec) { // unsafe { TODO: call ffi:gdk_parse_args() } //} #[doc(alias = "gdk_pixbuf_get_from_surface")] 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, )) } } #[doc(alias = "gdk_property_delete")] pub fn property_delete(window: &Window, property: &Atom) { skip_assert_initialized!(); unsafe { ffi::gdk_property_delete(window.to_glib_none().0, property.to_glib_none().0); } } #[doc(alias = "gdk_property_get")] pub fn property_get( window: &Window, 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::MaybeUninit::uninit(); let mut actual_length = mem::MaybeUninit::uninit(); let mut data = ptr::null_mut(); let ret = from_glib(ffi::gdk_property_get( window.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, actual_format.as_mut_ptr(), actual_length.as_mut_ptr(), &mut data, )); let actual_format = actual_format.assume_init(); if ret { Some(( actual_property_type, actual_format, FromGlibContainer::from_glib_full_num(data, actual_length.assume_init() as usize), )) } else { None } } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_query_depths")] pub fn query_depths() -> Vec { assert_initialized_main_thread!(); unsafe { let mut depths = ptr::null_mut(); let mut count = mem::MaybeUninit::uninit(); ffi::gdk_query_depths(&mut depths, count.as_mut_ptr()); FromGlibContainer::from_glib_none_num(depths, count.assume_init() as usize) } } //#[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] //#[doc(alias = "gdk_query_visual_types")] //pub fn query_visual_types(visual_types: /*Unimplemented*/CArray TypeId { ns_id: 1, id: 99 }) -> i32 { // unsafe { TODO: call ffi:gdk_query_visual_types() } //} #[doc(alias = "gdk_selection_convert")] pub fn selection_convert(requestor: &Window, selection: &Atom, target: &Atom, time_: u32) { skip_assert_initialized!(); unsafe { ffi::gdk_selection_convert( requestor.to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, time_, ); } } #[doc(alias = "gdk_selection_owner_get")] 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)) } } #[doc(alias = "gdk_selection_owner_get_for_display")] 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, )) } } #[doc(alias = "gdk_selection_owner_set")] pub fn selection_owner_set( owner: Option<&Window>, selection: &Atom, time_: u32, send_event: bool, ) -> bool { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gdk_selection_owner_set( owner.to_glib_none().0, selection.to_glib_none().0, time_, send_event.into_glib(), )) } } #[doc(alias = "gdk_selection_owner_set_for_display")] pub fn selection_owner_set_for_display( display: &Display, owner: Option<&Window>, 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.to_glib_none().0, selection.to_glib_none().0, time_, send_event.into_glib(), )) } } #[doc(alias = "gdk_selection_send_notify")] pub fn selection_send_notify( requestor: &Window, selection: &Atom, target: &Atom, property: &Atom, time_: u32, ) { skip_assert_initialized!(); unsafe { ffi::gdk_selection_send_notify( requestor.to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, property.to_glib_none().0, time_, ); } } #[doc(alias = "gdk_selection_send_notify_for_display")] pub fn selection_send_notify_for_display( display: &Display, requestor: &Window, 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.to_glib_none().0, selection.to_glib_none().0, target.to_glib_none().0, property.to_glib_none().0, time_, ); } } #[doc(alias = "gdk_set_allowed_backends")] pub fn set_allowed_backends(backends: &str) { assert_initialized_main_thread!(); unsafe { ffi::gdk_set_allowed_backends(backends.to_glib_none().0); } } #[doc(alias = "gdk_set_double_click_time")] pub fn set_double_click_time(msec: u32) { assert_initialized_main_thread!(); unsafe { ffi::gdk_set_double_click_time(msec); } } #[doc(alias = "gdk_set_program_class")] pub fn set_program_class(program_class: &str) { assert_initialized_main_thread!(); unsafe { ffi::gdk_set_program_class(program_class.to_glib_none().0); } } #[doc(alias = "gdk_set_show_events")] pub fn set_show_events(show_events: bool) { assert_initialized_main_thread!(); unsafe { ffi::gdk_set_show_events(show_events.into_glib()); } } #[doc(alias = "gdk_synthesize_window_state")] pub fn synthesize_window_state(window: &Window, unset_flags: WindowState, set_flags: WindowState) { skip_assert_initialized!(); unsafe { ffi::gdk_synthesize_window_state( window.to_glib_none().0, unset_flags.into_glib(), set_flags.into_glib(), ); } } #[doc(alias = "gdk_test_render_sync")] pub fn test_render_sync(window: &Window) { skip_assert_initialized!(); unsafe { ffi::gdk_test_render_sync(window.to_glib_none().0); } } #[doc(alias = "gdk_test_simulate_button")] pub fn test_simulate_button( window: &Window, x: i32, y: i32, button: u32, modifiers: ModifierType, button_pressrelease: EventType, ) -> bool { skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_test_simulate_button( window.to_glib_none().0, x, y, button, modifiers.into_glib(), button_pressrelease.into_glib(), )) } } #[doc(alias = "gdk_test_simulate_key")] pub fn test_simulate_key( window: &Window, x: i32, y: i32, keyval: u32, modifiers: ModifierType, key_pressrelease: EventType, ) -> bool { skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_test_simulate_key( window.to_glib_none().0, x, y, keyval, modifiers.into_glib(), key_pressrelease.into_glib(), )) } } #[doc(alias = "gdk_text_property_to_utf8_list_for_display")] 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)) } } #[doc(alias = "gdk_utf8_to_string_target")] 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)) } } gdk-0.14.3/src/auto/gl_context.rs000064400000000000000000000132340072674642500147640ustar 00000000000000// 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 crate::Display; use crate::Window; use glib::translate::*; use std::fmt; use std::mem; use std::ptr; glib::wrapper! { #[doc(alias = "GdkGLContext")] pub struct GLContext(Object); match fn { type_ => || ffi::gdk_gl_context_get_type(), } } impl GLContext { #[doc(alias = "gdk_gl_context_get_debug_enabled")] #[doc(alias = "get_debug_enabled")] pub fn is_debug_enabled(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_get_debug_enabled(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_gl_context_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_get_forward_compatible")] #[doc(alias = "get_forward_compatible")] pub fn is_forward_compatible(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_get_forward_compatible( self.to_glib_none().0, )) } } #[doc(alias = "gdk_gl_context_get_required_version")] #[doc(alias = "get_required_version")] pub fn required_version(&self) -> (i32, i32) { unsafe { let mut major = mem::MaybeUninit::uninit(); let mut minor = mem::MaybeUninit::uninit(); ffi::gdk_gl_context_get_required_version( self.to_glib_none().0, major.as_mut_ptr(), minor.as_mut_ptr(), ); let major = major.assume_init(); let minor = minor.assume_init(); (major, minor) } } #[doc(alias = "gdk_gl_context_get_shared_context")] #[doc(alias = "get_shared_context")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_gl_context_get_use_es")] #[doc(alias = "get_use_es")] pub fn uses_es(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_get_use_es(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_get_version")] #[doc(alias = "get_version")] pub fn version(&self) -> (i32, i32) { unsafe { let mut major = mem::MaybeUninit::uninit(); let mut minor = mem::MaybeUninit::uninit(); ffi::gdk_gl_context_get_version( self.to_glib_none().0, major.as_mut_ptr(), minor.as_mut_ptr(), ); let major = major.assume_init(); let minor = minor.assume_init(); (major, minor) } } #[doc(alias = "gdk_gl_context_get_window")] #[doc(alias = "get_window")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_gl_context_is_legacy")] pub fn is_legacy(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_is_legacy(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_make_current")] pub fn make_current(&self) { unsafe { ffi::gdk_gl_context_make_current(self.to_glib_none().0); } } #[doc(alias = "gdk_gl_context_realize")] pub fn realize(&self) -> Result<(), glib::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)) } } } #[doc(alias = "gdk_gl_context_set_debug_enabled")] pub fn set_debug_enabled(&self, enabled: bool) { unsafe { ffi::gdk_gl_context_set_debug_enabled(self.to_glib_none().0, enabled.into_glib()); } } #[doc(alias = "gdk_gl_context_set_forward_compatible")] pub fn set_forward_compatible(&self, compatible: bool) { unsafe { ffi::gdk_gl_context_set_forward_compatible( self.to_glib_none().0, compatible.into_glib(), ); } } #[doc(alias = "gdk_gl_context_set_required_version")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_gl_context_set_use_es")] pub fn set_use_es(&self, use_es: i32) { unsafe { ffi::gdk_gl_context_set_use_es(self.to_glib_none().0, use_es); } } #[doc(alias = "gdk_gl_context_clear_current")] pub fn clear_current() { assert_initialized_main_thread!(); unsafe { ffi::gdk_gl_context_clear_current(); } } #[doc(alias = "gdk_gl_context_get_current")] #[doc(alias = "get_current")] pub fn 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 { f.write_str("GLContext") } } gdk-0.14.3/src/auto/keymap.rs000064400000000000000000000151560072674642500141110ustar 00000000000000// 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 crate::Display; use crate::ModifierIntent; use crate::ModifierType; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkKeymap")] pub struct Keymap(Object); match fn { type_ => || ffi::gdk_keymap_get_type(), } } impl Keymap { #[doc(alias = "gdk_keymap_get_caps_lock_state")] #[doc(alias = "get_caps_lock_state")] pub fn is_caps_locked(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_get_caps_lock_state(self.to_glib_none().0)) } } #[doc(alias = "gdk_keymap_get_direction")] #[doc(alias = "get_direction")] pub fn direction(&self) -> pango::Direction { unsafe { from_glib(ffi::gdk_keymap_get_direction(self.to_glib_none().0)) } } #[doc(alias = "gdk_keymap_get_modifier_mask")] #[doc(alias = "get_modifier_mask")] pub fn modifier_mask(&self, intent: ModifierIntent) -> ModifierType { unsafe { from_glib(ffi::gdk_keymap_get_modifier_mask( self.to_glib_none().0, intent.into_glib(), )) } } #[doc(alias = "gdk_keymap_get_modifier_state")] #[doc(alias = "get_modifier_state")] pub fn modifier_state(&self) -> u32 { unsafe { ffi::gdk_keymap_get_modifier_state(self.to_glib_none().0) } } #[doc(alias = "gdk_keymap_get_num_lock_state")] #[doc(alias = "get_num_lock_state")] pub fn is_num_locked(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_get_num_lock_state(self.to_glib_none().0)) } } #[doc(alias = "gdk_keymap_get_scroll_lock_state")] #[doc(alias = "get_scroll_lock_state")] pub fn is_scroll_locked(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_get_scroll_lock_state(self.to_glib_none().0)) } } #[doc(alias = "gdk_keymap_have_bidi_layouts")] pub fn have_bidi_layouts(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_have_bidi_layouts(self.to_glib_none().0)) } } #[doc(alias = "gdk_keymap_translate_keyboard_state")] pub fn translate_keyboard_state( &self, hardware_keycode: u32, state: ModifierType, group: i32, ) -> Option<(u32, i32, i32, ModifierType)> { unsafe { let mut keyval = mem::MaybeUninit::uninit(); let mut effective_group = mem::MaybeUninit::uninit(); let mut level = mem::MaybeUninit::uninit(); let mut consumed_modifiers = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_keymap_translate_keyboard_state( self.to_glib_none().0, hardware_keycode, state.into_glib(), group, keyval.as_mut_ptr(), effective_group.as_mut_ptr(), level.as_mut_ptr(), consumed_modifiers.as_mut_ptr(), )); let keyval = keyval.assume_init(); let effective_group = effective_group.assume_init(); let level = level.assume_init(); let consumed_modifiers = consumed_modifiers.assume_init(); if ret { Some(( keyval, effective_group, level, from_glib(consumed_modifiers), )) } else { None } } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_keymap_get_default")] #[doc(alias = "get_default")] pub fn default() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_keymap_get_default()) } } #[doc(alias = "gdk_keymap_get_for_display")] #[doc(alias = "get_for_display")] pub fn for_display(display: &Display) -> Option { skip_assert_initialized!(); unsafe { from_glib_none(ffi::gdk_keymap_get_for_display(display.to_glib_none().0)) } } #[doc(alias = "direction-changed")] pub fn connect_direction_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn direction_changed_trampoline( this: *mut ffi::GdkKeymap, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"direction-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( direction_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "keys-changed")] pub fn connect_keys_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn keys_changed_trampoline( this: *mut ffi::GdkKeymap, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"keys-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( keys_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "state-changed")] pub fn connect_state_changed(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn state_changed_trampoline( this: *mut ffi::GdkKeymap, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"state-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( state_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Keymap { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Keymap") } } gdk-0.14.3/src/auto/mod.rs000064400000000000000000000111670072674642500134000ustar 00000000000000// 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; mod cursor; pub use self::cursor::Cursor; mod device; pub use self::device::Device; mod device_manager; pub use self::device_manager::DeviceManager; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] mod device_pad; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::device_pad::{DevicePad, NONE_DEVICE_PAD}; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] mod device_tool; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::device_tool::DeviceTool; mod display; pub use self::display::Display; mod display_manager; pub use self::display_manager::DisplayManager; mod drag_context; pub use self::drag_context::DragContext; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] mod drawing_context; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::drawing_context::DrawingContext; mod frame_clock; pub use self::frame_clock::FrameClock; mod gl_context; pub use self::gl_context::GLContext; mod keymap; pub use self::keymap::Keymap; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] mod monitor; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::monitor::Monitor; mod screen; pub use self::screen::Screen; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] mod seat; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] pub use self::seat::Seat; mod visual; pub use self::visual::Visual; mod window; pub use self::window::Window; 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; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::enums::DevicePadFeature; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::enums::DeviceToolType; pub use self::enums::DeviceType; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] pub use self::enums::DragCancelReason; pub use self::enums::DragProtocol; pub use self::enums::EventType; pub use self::enums::FullscreenMode; 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use self::flags::AnchorHints; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] pub use super::device_pad::DevicePadExt; } gdk-0.14.3/src/auto/monitor.rs000064400000000000000000000370060072674642500143100ustar 00000000000000// 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 crate::Display; use crate::Rectangle; use crate::SubpixelLayout; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkMonitor")] pub struct Monitor(Object); match fn { type_ => || ffi::gdk_monitor_get_type(), } } impl Monitor { #[doc(alias = "gdk_monitor_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_monitor_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_geometry")] #[doc(alias = "get_geometry")] pub fn geometry(&self) -> Rectangle { unsafe { let mut geometry = Rectangle::uninitialized(); ffi::gdk_monitor_get_geometry(self.to_glib_none().0, geometry.to_glib_none_mut().0); geometry } } #[doc(alias = "gdk_monitor_get_height_mm")] #[doc(alias = "get_height_mm")] pub fn height_mm(&self) -> i32 { unsafe { ffi::gdk_monitor_get_height_mm(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_manufacturer")] #[doc(alias = "get_manufacturer")] pub fn manufacturer(&self) -> Option { unsafe { from_glib_none(ffi::gdk_monitor_get_manufacturer(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_model")] #[doc(alias = "get_model")] pub fn model(&self) -> Option { unsafe { from_glib_none(ffi::gdk_monitor_get_model(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_refresh_rate")] #[doc(alias = "get_refresh_rate")] pub fn refresh_rate(&self) -> i32 { unsafe { ffi::gdk_monitor_get_refresh_rate(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_scale_factor")] #[doc(alias = "get_scale_factor")] pub fn scale_factor(&self) -> i32 { unsafe { ffi::gdk_monitor_get_scale_factor(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_subpixel_layout")] #[doc(alias = "get_subpixel_layout")] pub fn subpixel_layout(&self) -> SubpixelLayout { unsafe { from_glib(ffi::gdk_monitor_get_subpixel_layout(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_width_mm")] #[doc(alias = "get_width_mm")] pub fn width_mm(&self) -> i32 { unsafe { ffi::gdk_monitor_get_width_mm(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_workarea")] #[doc(alias = "get_workarea")] pub fn workarea(&self) -> Rectangle { unsafe { let mut workarea = Rectangle::uninitialized(); ffi::gdk_monitor_get_workarea(self.to_glib_none().0, workarea.to_glib_none_mut().0); workarea } } #[doc(alias = "gdk_monitor_is_primary")] pub fn is_primary(&self) -> bool { unsafe { from_glib(ffi::gdk_monitor_is_primary(self.to_glib_none().0)) } } pub fn get_property_display(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"display\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `display` getter") } } pub fn get_property_geometry(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"geometry\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `geometry` getter") } } #[doc(alias = "height-mm")] pub fn get_property_height_mm(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"height-mm\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `height-mm` getter") } } #[doc(alias = "refresh-rate")] pub fn get_property_refresh_rate(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"refresh-rate\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `refresh-rate` getter") } } #[doc(alias = "scale-factor")] pub fn get_property_scale_factor(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"scale-factor\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `scale-factor` getter") } } #[doc(alias = "width-mm")] pub fn get_property_width_mm(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"width-mm\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `width-mm` getter") } } pub fn get_property_workarea(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, b"workarea\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `workarea` getter") } } #[doc(alias = "invalidate")] pub fn connect_invalidate(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn invalidate_trampoline( this: *mut ffi::GdkMonitor, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"invalidate\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( invalidate_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "geometry")] pub fn connect_geometry_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_geometry_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::geometry\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_geometry_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "height-mm")] pub fn connect_height_mm_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_height_mm_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } 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::<_, unsafe extern "C" fn()>( notify_height_mm_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "manufacturer")] pub fn connect_manufacturer_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_manufacturer_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::manufacturer\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_manufacturer_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "model")] pub fn connect_model_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_model_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::model\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_model_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "refresh-rate")] pub fn connect_refresh_rate_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_refresh_rate_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } 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::<_, unsafe extern "C" fn()>( notify_refresh_rate_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "scale-factor")] pub fn connect_scale_factor_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_scale_factor_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } 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::<_, unsafe extern "C" fn()>( notify_scale_factor_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "subpixel-layout")] pub fn connect_subpixel_layout_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_subpixel_layout_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } 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::<_, unsafe extern "C" fn()>( notify_subpixel_layout_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "width-mm")] pub fn connect_width_mm_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_width_mm_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } 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::<_, unsafe extern "C" fn()>( notify_width_mm_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "workarea")] pub fn connect_workarea_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_workarea_trampoline( this: *mut ffi::GdkMonitor, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::workarea\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_workarea_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Monitor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Monitor") } } gdk-0.14.3/src/auto/screen.rs000064400000000000000000000336260072674642500141040ustar 00000000000000// 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 crate::Display; use crate::Rectangle; use crate::Visual; use crate::Window; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkScreen")] pub struct Screen(Object); match fn { type_ => || ffi::gdk_screen_get_type(), } } impl Screen { #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_active_window")] #[doc(alias = "get_active_window")] pub fn active_window(&self) -> Option { unsafe { from_glib_full(ffi::gdk_screen_get_active_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_screen_get_display(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_height")] #[doc(alias = "get_height")] pub fn height(&self) -> i32 { unsafe { ffi::gdk_screen_get_height(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_height_mm")] #[doc(alias = "get_height_mm")] pub fn height_mm(&self) -> i32 { unsafe { ffi::gdk_screen_get_height_mm(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_at_point")] #[doc(alias = "get_monitor_at_point")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_at_window")] #[doc(alias = "get_monitor_at_window")] pub fn monitor_at_window(&self, window: &Window) -> i32 { unsafe { ffi::gdk_screen_get_monitor_at_window(self.to_glib_none().0, window.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_geometry")] #[doc(alias = "get_monitor_geometry")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_height_mm")] #[doc(alias = "get_monitor_height_mm")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_plug_name")] #[doc(alias = "get_monitor_plug_name")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_scale_factor")] #[doc(alias = "get_monitor_scale_factor")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_width_mm")] #[doc(alias = "get_monitor_width_mm")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_monitor_workarea")] #[doc(alias = "get_monitor_workarea")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_n_monitors")] #[doc(alias = "get_n_monitors")] pub fn n_monitors(&self) -> i32 { unsafe { ffi::gdk_screen_get_n_monitors(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_number")] #[doc(alias = "get_number")] pub fn number(&self) -> i32 { unsafe { ffi::gdk_screen_get_number(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_primary_monitor")] #[doc(alias = "get_primary_monitor")] pub fn primary_monitor(&self) -> i32 { unsafe { ffi::gdk_screen_get_primary_monitor(self.to_glib_none().0) } } #[doc(alias = "gdk_screen_get_resolution")] #[doc(alias = "get_resolution")] pub fn resolution(&self) -> f64 { unsafe { ffi::gdk_screen_get_resolution(self.to_glib_none().0) } } #[doc(alias = "gdk_screen_get_rgba_visual")] #[doc(alias = "get_rgba_visual")] pub fn rgba_visual(&self) -> Option { unsafe { from_glib_none(ffi::gdk_screen_get_rgba_visual(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_root_window")] #[doc(alias = "get_root_window")] pub fn root_window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_screen_get_root_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_system_visual")] #[doc(alias = "get_system_visual")] pub fn system_visual(&self) -> Option { unsafe { from_glib_none(ffi::gdk_screen_get_system_visual(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_toplevel_windows")] #[doc(alias = "get_toplevel_windows")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_screen_get_width")] #[doc(alias = "get_width")] pub fn width(&self) -> i32 { unsafe { ffi::gdk_screen_get_width(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_get_width_mm")] #[doc(alias = "get_width_mm")] pub fn width_mm(&self) -> i32 { unsafe { ffi::gdk_screen_get_width_mm(self.to_glib_none().0) } } #[doc(alias = "gdk_screen_get_window_stack")] #[doc(alias = "get_window_stack")] pub fn window_stack(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gdk_screen_get_window_stack( self.to_glib_none().0, )) } } #[doc(alias = "gdk_screen_is_composited")] pub fn is_composited(&self) -> bool { unsafe { from_glib(ffi::gdk_screen_is_composited(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_list_visuals")] 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 = "Since 3.22")] #[doc(alias = "gdk_screen_make_display_name")] pub fn make_display_name(&self) -> glib::GString { unsafe { from_glib_full(ffi::gdk_screen_make_display_name(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_set_font_options")] 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); } } #[doc(alias = "gdk_screen_set_resolution")] pub fn set_resolution(&self, dpi: f64) { unsafe { ffi::gdk_screen_set_resolution(self.to_glib_none().0, dpi); } } #[doc(alias = "gdk_screen_get_default")] #[doc(alias = "get_default")] pub fn default() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_screen_get_default()) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_height")] #[doc(alias = "height")] pub fn screen_height() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_height() } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_height_mm")] #[doc(alias = "height_mm")] pub fn screen_height_mm() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_height_mm() } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_width")] #[doc(alias = "width")] pub fn screen_width() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_width() } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_screen_width_mm")] #[doc(alias = "width_mm")] pub fn screen_width_mm() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_width_mm() } } #[doc(alias = "composited-changed")] pub fn connect_composited_changed(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"composited-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( composited_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "monitors-changed")] pub fn connect_monitors_changed(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"monitors-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( monitors_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "size-changed")] pub fn connect_size_changed(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"size-changed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( size_changed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "font-options")] pub fn connect_font_options_notify(&self, f: F) -> SignalHandlerId { 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 { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::font-options\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_font_options_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "resolution")] pub fn connect_resolution_notify(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::resolution\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_resolution_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Screen { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Screen") } } gdk-0.14.3/src/auto/seat.rs000064400000000000000000000174130072674642500135550ustar 00000000000000// 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 crate::Cursor; use crate::Device; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] use crate::DeviceTool; use crate::Display; use crate::Event; use crate::GrabStatus; use crate::SeatCapabilities; use crate::Window; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; glib::wrapper! { #[doc(alias = "GdkSeat")] pub struct Seat(Object); match fn { type_ => || ffi::gdk_seat_get_type(), } } impl Seat { #[doc(alias = "gdk_seat_get_capabilities")] #[doc(alias = "get_capabilities")] pub fn capabilities(&self) -> SeatCapabilities { unsafe { from_glib(ffi::gdk_seat_get_capabilities(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_seat_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_keyboard")] #[doc(alias = "get_keyboard")] pub fn keyboard(&self) -> Option { unsafe { from_glib_none(ffi::gdk_seat_get_keyboard(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_pointer")] #[doc(alias = "get_pointer")] pub fn pointer(&self) -> Option { unsafe { from_glib_none(ffi::gdk_seat_get_pointer(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_slaves")] #[doc(alias = "get_slaves")] pub fn slaves(&self, capabilities: SeatCapabilities) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_seat_get_slaves( self.to_glib_none().0, capabilities.into_glib(), )) } } #[doc(alias = "gdk_seat_grab")] pub fn grab( &self, window: &Window, 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 = if prepare_func_data.is_some() { Some(prepare_func_func as _) } else { None }; 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.to_glib_none().0, capabilities.into_glib(), owner_events.into_glib(), cursor.to_glib_none().0, event.to_glib_none().0, prepare_func, super_callback0 as *const _ as usize as *mut _, )) } } #[doc(alias = "gdk_seat_ungrab")] pub fn ungrab(&self) { unsafe { ffi::gdk_seat_ungrab(self.to_glib_none().0); } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "device-added")] pub fn connect_device_added(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"device-added\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( device_added_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "device-removed")] pub fn connect_device_removed(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"device-removed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( device_removed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "tool-added")] pub fn connect_tool_added(&self, f: F) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"tool-added\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( tool_added_trampoline:: as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "tool-removed")] pub fn connect_tool_removed( &self, f: F, ) -> SignalHandlerId { 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)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"tool-removed\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( tool_removed_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Seat { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Seat") } } gdk-0.14.3/src/auto/versions.txt000064400000000000000000000002040072674642500146520ustar 00000000000000Generated by gir (https://github.com/gtk-rs/gir @ 8891a2f2c34b) from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377690e9) gdk-0.14.3/src/auto/visual.rs000064400000000000000000000147130072674642500141240ustar 00000000000000// 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 crate::ByteOrder; use crate::Screen; use crate::VisualType; use glib::translate::*; use std::fmt; use std::mem; glib::wrapper! { #[doc(alias = "GdkVisual")] pub struct Visual(Object); match fn { type_ => || ffi::gdk_visual_get_type(), } } impl Visual { #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_bits_per_rgb")] #[doc(alias = "get_bits_per_rgb")] pub fn bits_per_rgb(&self) -> i32 { unsafe { ffi::gdk_visual_get_bits_per_rgb(self.to_glib_none().0) } } #[doc(alias = "gdk_visual_get_blue_pixel_details")] #[doc(alias = "get_blue_pixel_details")] pub fn blue_pixel_details(&self) -> (u32, i32, i32) { unsafe { let mut mask = mem::MaybeUninit::uninit(); let mut shift = mem::MaybeUninit::uninit(); let mut precision = mem::MaybeUninit::uninit(); ffi::gdk_visual_get_blue_pixel_details( self.to_glib_none().0, mask.as_mut_ptr(), shift.as_mut_ptr(), precision.as_mut_ptr(), ); let mask = mask.assume_init(); let shift = shift.assume_init(); let precision = precision.assume_init(); (mask, shift, precision) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_byte_order")] #[doc(alias = "get_byte_order")] pub fn byte_order(&self) -> ByteOrder { unsafe { from_glib(ffi::gdk_visual_get_byte_order(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_colormap_size")] #[doc(alias = "get_colormap_size")] pub fn colormap_size(&self) -> i32 { unsafe { ffi::gdk_visual_get_colormap_size(self.to_glib_none().0) } } #[doc(alias = "gdk_visual_get_depth")] #[doc(alias = "get_depth")] pub fn depth(&self) -> i32 { unsafe { ffi::gdk_visual_get_depth(self.to_glib_none().0) } } #[doc(alias = "gdk_visual_get_green_pixel_details")] #[doc(alias = "get_green_pixel_details")] pub fn green_pixel_details(&self) -> (u32, i32, i32) { unsafe { let mut mask = mem::MaybeUninit::uninit(); let mut shift = mem::MaybeUninit::uninit(); let mut precision = mem::MaybeUninit::uninit(); ffi::gdk_visual_get_green_pixel_details( self.to_glib_none().0, mask.as_mut_ptr(), shift.as_mut_ptr(), precision.as_mut_ptr(), ); let mask = mask.assume_init(); let shift = shift.assume_init(); let precision = precision.assume_init(); (mask, shift, precision) } } #[doc(alias = "gdk_visual_get_red_pixel_details")] #[doc(alias = "get_red_pixel_details")] pub fn red_pixel_details(&self) -> (u32, i32, i32) { unsafe { let mut mask = mem::MaybeUninit::uninit(); let mut shift = mem::MaybeUninit::uninit(); let mut precision = mem::MaybeUninit::uninit(); ffi::gdk_visual_get_red_pixel_details( self.to_glib_none().0, mask.as_mut_ptr(), shift.as_mut_ptr(), precision.as_mut_ptr(), ); let mask = mask.assume_init(); let shift = shift.assume_init(); let precision = precision.assume_init(); (mask, shift, precision) } } #[doc(alias = "gdk_visual_get_screen")] #[doc(alias = "get_screen")] pub fn screen(&self) -> Screen { unsafe { from_glib_none(ffi::gdk_visual_get_screen(self.to_glib_none().0)) } } #[doc(alias = "gdk_visual_get_visual_type")] #[doc(alias = "get_visual_type")] pub fn visual_type(&self) -> VisualType { unsafe { from_glib(ffi::gdk_visual_get_visual_type(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_best")] #[doc(alias = "get_best")] pub fn best() -> Visual { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_visual_get_best()) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_best_depth")] #[doc(alias = "get_best_depth")] pub fn best_depth() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_visual_get_best_depth() } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_best_type")] #[doc(alias = "get_best_type")] pub fn best_type() -> VisualType { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gdk_visual_get_best_type()) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_best_with_both")] #[doc(alias = "get_best_with_both")] pub fn 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.into_glib(), )) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_best_with_depth")] #[doc(alias = "get_best_with_depth")] pub fn 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 = "Since 3.22")] #[doc(alias = "gdk_visual_get_best_with_type")] #[doc(alias = "get_best_with_type")] pub fn best_with_type(visual_type: VisualType) -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_visual_get_best_with_type(visual_type.into_glib())) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_visual_get_system")] #[doc(alias = "get_system")] pub fn 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 { f.write_str("Visual") } } gdk-0.14.3/src/auto/window.rs000064400000000000000000001342710072674642500141320ustar 00000000000000// 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] use crate::AnchorHints; use crate::Cursor; use crate::Device; use crate::Display; use crate::DragProtocol; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] use crate::DrawingContext; use crate::Event; use crate::EventMask; use crate::FrameClock; use crate::FullscreenMode; use crate::GLContext; use crate::Geometry; #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] use crate::Gravity; use crate::InputSource; use crate::ModifierType; use crate::Rectangle; use crate::Screen; use crate::Visual; use crate::WMDecoration; use crate::WMFunction; use crate::WindowEdge; use crate::WindowHints; use crate::WindowState; use crate::WindowType; use crate::WindowTypeHint; use crate::RGBA; use glib::object::ObjectType as ObjectType_; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::fmt; use std::mem; use std::mem::transmute; use std::ptr; glib::wrapper! { #[doc(alias = "GdkWindow")] pub struct Window(Object); match fn { type_ => || ffi::gdk_window_get_type(), } } impl Window { //#[doc(alias = "gdk_window_add_filter")] //pub fn add_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gdk_window_add_filter() } //} #[doc(alias = "gdk_window_beep")] pub fn beep(&self) { unsafe { ffi::gdk_window_beep(self.to_glib_none().0); } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_window_begin_draw_frame")] pub fn begin_draw_frame(&self, region: &cairo::Region) -> Option { unsafe { from_glib_none(ffi::gdk_window_begin_draw_frame( self.to_glib_none().0, region.to_glib_none().0, )) } } #[doc(alias = "gdk_window_begin_move_drag")] pub fn begin_move_drag(&self, button: i32, root_x: i32, root_y: i32, timestamp: u32) { unsafe { ffi::gdk_window_begin_move_drag( self.to_glib_none().0, button, root_x, root_y, timestamp, ); } } #[doc(alias = "gdk_window_begin_move_drag_for_device")] pub 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.to_glib_none().0, device.to_glib_none().0, button, root_x, root_y, timestamp, ); } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_window_begin_paint_rect")] pub fn begin_paint_rect(&self, rectangle: &Rectangle) { unsafe { ffi::gdk_window_begin_paint_rect(self.to_glib_none().0, rectangle.to_glib_none().0); } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_window_begin_paint_region")] pub fn begin_paint_region(&self, region: &cairo::Region) { unsafe { ffi::gdk_window_begin_paint_region(self.to_glib_none().0, region.to_glib_none().0); } } #[doc(alias = "gdk_window_begin_resize_drag")] pub 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.to_glib_none().0, edge.into_glib(), button, root_x, root_y, timestamp, ); } } #[doc(alias = "gdk_window_begin_resize_drag_for_device")] pub 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.to_glib_none().0, edge.into_glib(), device.to_glib_none().0, button, root_x, root_y, timestamp, ); } } #[doc(alias = "gdk_window_coords_from_parent")] pub fn coords_from_parent(&self, parent_x: f64, parent_y: f64) -> (f64, f64) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); ffi::gdk_window_coords_from_parent( self.to_glib_none().0, parent_x, parent_y, x.as_mut_ptr(), y.as_mut_ptr(), ); let x = x.assume_init(); let y = y.assume_init(); (x, y) } } #[doc(alias = "gdk_window_coords_to_parent")] pub fn coords_to_parent(&self, x: f64, y: f64) -> (f64, f64) { unsafe { let mut parent_x = mem::MaybeUninit::uninit(); let mut parent_y = mem::MaybeUninit::uninit(); ffi::gdk_window_coords_to_parent( self.to_glib_none().0, x, y, parent_x.as_mut_ptr(), parent_y.as_mut_ptr(), ); let parent_x = parent_x.assume_init(); let parent_y = parent_y.assume_init(); (parent_x, parent_y) } } #[doc(alias = "gdk_window_create_gl_context")] pub fn create_gl_context(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::gdk_window_create_gl_context(self.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } #[doc(alias = "gdk_window_deiconify")] pub fn deiconify(&self) { unsafe { ffi::gdk_window_deiconify(self.to_glib_none().0); } } #[doc(alias = "gdk_window_destroy")] pub fn destroy(&self) { unsafe { ffi::gdk_window_destroy(self.to_glib_none().0); } } #[doc(alias = "gdk_window_destroy_notify")] pub fn destroy_notify(&self) { unsafe { ffi::gdk_window_destroy_notify(self.to_glib_none().0); } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_window_end_draw_frame")] pub fn end_draw_frame(&self, context: &DrawingContext) { unsafe { ffi::gdk_window_end_draw_frame(self.to_glib_none().0, context.to_glib_none().0); } } #[doc(alias = "gdk_window_end_paint")] pub fn end_paint(&self) { unsafe { ffi::gdk_window_end_paint(self.to_glib_none().0); } } #[doc(alias = "gdk_window_ensure_native")] pub fn ensure_native(&self) -> bool { unsafe { from_glib(ffi::gdk_window_ensure_native(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_focus")] pub fn focus(&self, timestamp: u32) { unsafe { ffi::gdk_window_focus(self.to_glib_none().0, timestamp); } } #[doc(alias = "gdk_window_freeze_updates")] pub fn freeze_updates(&self) { unsafe { ffi::gdk_window_freeze_updates(self.to_glib_none().0); } } #[doc(alias = "gdk_window_fullscreen")] pub fn fullscreen(&self) { unsafe { ffi::gdk_window_fullscreen(self.to_glib_none().0); } } #[doc(alias = "gdk_window_fullscreen_on_monitor")] pub fn fullscreen_on_monitor(&self, monitor: i32) { unsafe { ffi::gdk_window_fullscreen_on_monitor(self.to_glib_none().0, monitor); } } #[doc(alias = "gdk_window_geometry_changed")] pub fn geometry_changed(&self) { unsafe { ffi::gdk_window_geometry_changed(self.to_glib_none().0); } } #[doc(alias = "gdk_window_get_accept_focus")] #[doc(alias = "get_accept_focus")] pub fn accepts_focus(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_accept_focus(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_children")] #[doc(alias = "get_children")] pub fn children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_window_get_children( self.to_glib_none().0, )) } } //#[doc(alias = "gdk_window_get_children_with_user_data")] //#[doc(alias = "get_children_with_user_data")] //pub fn children_with_user_data(&self, user_data: /*Unimplemented*/Option) -> Vec { // unsafe { TODO: call ffi:gdk_window_get_children_with_user_data() } //} #[doc(alias = "gdk_window_get_clip_region")] #[doc(alias = "get_clip_region")] pub fn clip_region(&self) -> Option { unsafe { from_glib_full(ffi::gdk_window_get_clip_region(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_cursor")] #[doc(alias = "get_cursor")] pub fn cursor(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_cursor(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_decorations")] #[doc(alias = "get_decorations")] pub fn decorations(&self) -> Option { unsafe { let mut decorations = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_window_get_decorations( self.to_glib_none().0, decorations.as_mut_ptr(), )); let decorations = decorations.assume_init(); if ret { Some(from_glib(decorations)) } else { None } } } #[doc(alias = "gdk_window_get_device_cursor")] #[doc(alias = "get_device_cursor")] pub fn device_cursor(&self, device: &Device) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_device_cursor( self.to_glib_none().0, device.to_glib_none().0, )) } } #[doc(alias = "gdk_window_get_device_events")] #[doc(alias = "get_device_events")] pub fn device_events(&self, device: &Device) -> EventMask { unsafe { from_glib(ffi::gdk_window_get_device_events( self.to_glib_none().0, device.to_glib_none().0, )) } } #[doc(alias = "gdk_window_get_device_position")] #[doc(alias = "get_device_position")] pub fn device_position(&self, device: &Device) -> (Option, i32, i32, ModifierType) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let mut mask = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_window_get_device_position( self.to_glib_none().0, device.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr(), mask.as_mut_ptr(), )); let x = x.assume_init(); let y = y.assume_init(); let mask = mask.assume_init(); (ret, x, y, from_glib(mask)) } } #[doc(alias = "gdk_window_get_device_position_double")] #[doc(alias = "get_device_position_double")] pub fn device_position_double( &self, device: &Device, ) -> (Option, f64, f64, ModifierType) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let mut mask = mem::MaybeUninit::uninit(); let ret = from_glib_none(ffi::gdk_window_get_device_position_double( self.to_glib_none().0, device.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr(), mask.as_mut_ptr(), )); let x = x.assume_init(); let y = y.assume_init(); let mask = mask.assume_init(); (ret, x, y, from_glib(mask)) } } #[doc(alias = "gdk_window_get_display")] #[doc(alias = "get_display")] pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_window_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_drag_protocol")] #[doc(alias = "get_drag_protocol")] pub fn drag_protocol(&self) -> (DragProtocol, Window) { unsafe { let mut target = ptr::null_mut(); let ret = from_glib(ffi::gdk_window_get_drag_protocol( self.to_glib_none().0, &mut target, )); (ret, from_glib_full(target)) } } #[doc(alias = "gdk_window_get_effective_parent")] #[doc(alias = "get_effective_parent")] pub fn effective_parent(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_effective_parent(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_effective_toplevel")] #[doc(alias = "get_effective_toplevel")] pub fn effective_toplevel(&self) -> Window { unsafe { from_glib_none(ffi::gdk_window_get_effective_toplevel( self.to_glib_none().0, )) } } #[doc(alias = "gdk_window_get_event_compression")] #[doc(alias = "get_event_compression")] pub fn does_event_compression(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_event_compression(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_events")] #[doc(alias = "get_events")] pub fn events(&self) -> EventMask { unsafe { from_glib(ffi::gdk_window_get_events(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_focus_on_map")] #[doc(alias = "get_focus_on_map")] pub fn gets_focus_on_map(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_focus_on_map(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_frame_clock")] #[doc(alias = "get_frame_clock")] pub fn frame_clock(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_frame_clock(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_frame_extents")] #[doc(alias = "get_frame_extents")] pub fn frame_extents(&self) -> Rectangle { unsafe { let mut rect = Rectangle::uninitialized(); ffi::gdk_window_get_frame_extents(self.to_glib_none().0, rect.to_glib_none_mut().0); rect } } #[doc(alias = "gdk_window_get_fullscreen_mode")] #[doc(alias = "get_fullscreen_mode")] pub fn fullscreen_mode(&self) -> FullscreenMode { unsafe { from_glib(ffi::gdk_window_get_fullscreen_mode(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_geometry")] #[doc(alias = "get_geometry")] pub fn geometry(&self) -> (i32, i32, i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); ffi::gdk_window_get_geometry( self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr(), width.as_mut_ptr(), height.as_mut_ptr(), ); let x = x.assume_init(); let y = y.assume_init(); let width = width.assume_init(); let height = height.assume_init(); (x, y, width, height) } } #[doc(alias = "gdk_window_get_group")] #[doc(alias = "get_group")] pub fn group(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_group(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_height")] #[doc(alias = "get_height")] pub fn height(&self) -> i32 { unsafe { ffi::gdk_window_get_height(self.to_glib_none().0) } } #[doc(alias = "gdk_window_get_modal_hint")] #[doc(alias = "get_modal_hint")] pub fn is_modal_hint(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_modal_hint(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_origin")] #[doc(alias = "get_origin")] pub fn origin(&self) -> (i32, i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); let ret = ffi::gdk_window_get_origin(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); let x = x.assume_init(); let y = y.assume_init(); (ret, x, y) } } #[doc(alias = "gdk_window_get_parent")] #[doc(alias = "get_parent")] pub fn parent(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_parent(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_pass_through")] #[doc(alias = "get_pass_through")] pub fn is_pass_through(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_pass_through(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_position")] #[doc(alias = "get_position")] pub fn position(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); ffi::gdk_window_get_position(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); let x = x.assume_init(); let y = y.assume_init(); (x, y) } } #[doc(alias = "gdk_window_get_root_coords")] #[doc(alias = "get_root_coords")] pub fn root_coords(&self, x: i32, y: i32) -> (i32, i32) { unsafe { let mut root_x = mem::MaybeUninit::uninit(); let mut root_y = mem::MaybeUninit::uninit(); ffi::gdk_window_get_root_coords( self.to_glib_none().0, x, y, root_x.as_mut_ptr(), root_y.as_mut_ptr(), ); let root_x = root_x.assume_init(); let root_y = root_y.assume_init(); (root_x, root_y) } } #[doc(alias = "gdk_window_get_root_origin")] #[doc(alias = "get_root_origin")] pub fn root_origin(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); ffi::gdk_window_get_root_origin(self.to_glib_none().0, x.as_mut_ptr(), y.as_mut_ptr()); let x = x.assume_init(); let y = y.assume_init(); (x, y) } } #[doc(alias = "gdk_window_get_scale_factor")] #[doc(alias = "get_scale_factor")] pub fn scale_factor(&self) -> i32 { unsafe { ffi::gdk_window_get_scale_factor(self.to_glib_none().0) } } #[doc(alias = "gdk_window_get_screen")] #[doc(alias = "get_screen")] pub fn screen(&self) -> Screen { unsafe { from_glib_none(ffi::gdk_window_get_screen(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_source_events")] #[doc(alias = "get_source_events")] pub fn source_events(&self, source: InputSource) -> EventMask { unsafe { from_glib(ffi::gdk_window_get_source_events( self.to_glib_none().0, source.into_glib(), )) } } #[doc(alias = "gdk_window_get_state")] #[doc(alias = "get_state")] pub fn state(&self) -> WindowState { unsafe { from_glib(ffi::gdk_window_get_state(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_support_multidevice")] #[doc(alias = "get_support_multidevice")] pub fn supports_multidevice(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_support_multidevice( self.to_glib_none().0, )) } } #[doc(alias = "gdk_window_get_toplevel")] #[doc(alias = "get_toplevel")] pub fn toplevel(&self) -> Window { unsafe { from_glib_none(ffi::gdk_window_get_toplevel(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_type_hint")] #[doc(alias = "get_type_hint")] pub fn type_hint(&self) -> WindowTypeHint { unsafe { from_glib(ffi::gdk_window_get_type_hint(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_update_area")] #[doc(alias = "get_update_area")] pub fn update_area(&self) -> Option { unsafe { from_glib_full(ffi::gdk_window_get_update_area(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_visible_region")] #[doc(alias = "get_visible_region")] pub fn visible_region(&self) -> Option { unsafe { from_glib_full(ffi::gdk_window_get_visible_region(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_visual")] #[doc(alias = "get_visual")] pub fn visual(&self) -> Visual { unsafe { from_glib_none(ffi::gdk_window_get_visual(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_width")] #[doc(alias = "get_width")] pub fn width(&self) -> i32 { unsafe { ffi::gdk_window_get_width(self.to_glib_none().0) } } #[doc(alias = "gdk_window_get_window_type")] #[doc(alias = "get_window_type")] pub fn window_type(&self) -> WindowType { unsafe { from_glib(ffi::gdk_window_get_window_type(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_has_native")] pub fn has_native(&self) -> bool { unsafe { from_glib(ffi::gdk_window_has_native(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_hide")] pub fn hide(&self) { unsafe { ffi::gdk_window_hide(self.to_glib_none().0); } } #[doc(alias = "gdk_window_iconify")] pub fn iconify(&self) { unsafe { ffi::gdk_window_iconify(self.to_glib_none().0); } } #[doc(alias = "gdk_window_input_shape_combine_region")] pub 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.to_glib_none().0, shape_region.to_glib_none().0, offset_x, offset_y, ); } } #[doc(alias = "gdk_window_invalidate_maybe_recurse")] pub 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.into_glib() } let child_func = if child_func_data.is_some() { Some(child_func_func as _) } else { None }; let super_callback0: &Option<&mut dyn (FnMut(&Window) -> bool)> = &child_func_data; unsafe { ffi::gdk_window_invalidate_maybe_recurse( self.to_glib_none().0, region.to_glib_none().0, child_func, super_callback0 as *const _ as usize as *mut _, ); } } #[doc(alias = "gdk_window_invalidate_rect")] pub fn invalidate_rect(&self, rect: Option<&Rectangle>, invalidate_children: bool) { unsafe { ffi::gdk_window_invalidate_rect( self.to_glib_none().0, rect.to_glib_none().0, invalidate_children.into_glib(), ); } } #[doc(alias = "gdk_window_invalidate_region")] pub fn invalidate_region(&self, region: &cairo::Region, invalidate_children: bool) { unsafe { ffi::gdk_window_invalidate_region( self.to_glib_none().0, region.to_glib_none().0, invalidate_children.into_glib(), ); } } #[doc(alias = "gdk_window_is_destroyed")] pub fn is_destroyed(&self) -> bool { unsafe { from_glib(ffi::gdk_window_is_destroyed(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_is_input_only")] pub fn is_input_only(&self) -> bool { unsafe { from_glib(ffi::gdk_window_is_input_only(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_is_shaped")] pub fn is_shaped(&self) -> bool { unsafe { from_glib(ffi::gdk_window_is_shaped(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_is_viewable")] pub fn is_viewable(&self) -> bool { unsafe { from_glib(ffi::gdk_window_is_viewable(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_is_visible")] pub fn is_visible(&self) -> bool { unsafe { from_glib(ffi::gdk_window_is_visible(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_lower")] pub fn lower(&self) { unsafe { ffi::gdk_window_lower(self.to_glib_none().0); } } #[doc(alias = "gdk_window_mark_paint_from_clip")] pub fn mark_paint_from_clip(&self, cr: &cairo::Context) { unsafe { ffi::gdk_window_mark_paint_from_clip( self.to_glib_none().0, mut_override(cr.to_glib_none().0), ); } } #[doc(alias = "gdk_window_maximize")] pub fn maximize(&self) { unsafe { ffi::gdk_window_maximize(self.to_glib_none().0); } } #[doc(alias = "gdk_window_merge_child_input_shapes")] pub fn merge_child_input_shapes(&self) { unsafe { ffi::gdk_window_merge_child_input_shapes(self.to_glib_none().0); } } #[doc(alias = "gdk_window_merge_child_shapes")] pub fn merge_child_shapes(&self) { unsafe { ffi::gdk_window_merge_child_shapes(self.to_glib_none().0); } } #[doc(alias = "gdk_window_move")] #[doc(alias = "move")] pub fn move_(&self, x: i32, y: i32) { unsafe { ffi::gdk_window_move(self.to_glib_none().0, x, y); } } #[doc(alias = "gdk_window_move_region")] pub fn move_region(&self, region: &cairo::Region, dx: i32, dy: i32) { unsafe { ffi::gdk_window_move_region(self.to_glib_none().0, region.to_glib_none().0, dx, dy); } } #[doc(alias = "gdk_window_move_resize")] pub fn move_resize(&self, x: i32, y: i32, width: i32, height: i32) { unsafe { ffi::gdk_window_move_resize(self.to_glib_none().0, x, y, width, height); } } #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] #[doc(alias = "gdk_window_move_to_rect")] pub 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.to_glib_none().0, rect.to_glib_none().0, rect_anchor.into_glib(), window_anchor.into_glib(), anchor_hints.into_glib(), rect_anchor_dx, rect_anchor_dy, ); } } #[doc(alias = "gdk_window_peek_children")] pub fn peek_children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gdk_window_peek_children( self.to_glib_none().0, )) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_window_process_updates")] pub fn process_updates(&self, update_children: bool) { unsafe { ffi::gdk_window_process_updates(self.to_glib_none().0, update_children.into_glib()); } } #[doc(alias = "gdk_window_raise")] pub fn raise(&self) { unsafe { ffi::gdk_window_raise(self.to_glib_none().0); } } #[doc(alias = "gdk_window_register_dnd")] pub fn register_dnd(&self) { unsafe { ffi::gdk_window_register_dnd(self.to_glib_none().0); } } //#[doc(alias = "gdk_window_remove_filter")] //pub fn remove_filter(&self, function: /*Unimplemented*/Fn(/*Unimplemented*/XEvent, &Event) -> /*Ignored*/FilterReturn, data: /*Unimplemented*/Option) { // unsafe { TODO: call ffi:gdk_window_remove_filter() } //} #[doc(alias = "gdk_window_reparent")] pub fn reparent(&self, new_parent: &Window, x: i32, y: i32) { unsafe { ffi::gdk_window_reparent(self.to_glib_none().0, new_parent.to_glib_none().0, x, y); } } #[doc(alias = "gdk_window_resize")] pub fn resize(&self, width: i32, height: i32) { unsafe { ffi::gdk_window_resize(self.to_glib_none().0, width, height); } } #[doc(alias = "gdk_window_restack")] pub fn restack(&self, sibling: Option<&Window>, above: bool) { unsafe { ffi::gdk_window_restack( self.to_glib_none().0, sibling.to_glib_none().0, above.into_glib(), ); } } #[doc(alias = "gdk_window_scroll")] pub fn scroll(&self, dx: i32, dy: i32) { unsafe { ffi::gdk_window_scroll(self.to_glib_none().0, dx, dy); } } #[doc(alias = "gdk_window_set_accept_focus")] pub fn set_accept_focus(&self, accept_focus: bool) { unsafe { ffi::gdk_window_set_accept_focus(self.to_glib_none().0, accept_focus.into_glib()); } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_window_set_background_rgba")] pub fn set_background_rgba(&self, rgba: &RGBA) { unsafe { ffi::gdk_window_set_background_rgba(self.to_glib_none().0, rgba.to_glib_none().0); } } #[doc(alias = "gdk_window_set_child_input_shapes")] pub fn set_child_input_shapes(&self) { unsafe { ffi::gdk_window_set_child_input_shapes(self.to_glib_none().0); } } #[doc(alias = "gdk_window_set_child_shapes")] pub fn set_child_shapes(&self) { unsafe { ffi::gdk_window_set_child_shapes(self.to_glib_none().0); } } #[doc(alias = "gdk_window_set_cursor")] pub fn set_cursor(&self, cursor: Option<&Cursor>) { unsafe { ffi::gdk_window_set_cursor(self.to_glib_none().0, cursor.to_glib_none().0); } } #[doc(alias = "gdk_window_set_decorations")] pub fn set_decorations(&self, decorations: WMDecoration) { unsafe { ffi::gdk_window_set_decorations(self.to_glib_none().0, decorations.into_glib()); } } #[doc(alias = "gdk_window_set_device_cursor")] pub fn set_device_cursor(&self, device: &Device, cursor: &Cursor) { unsafe { ffi::gdk_window_set_device_cursor( self.to_glib_none().0, device.to_glib_none().0, cursor.to_glib_none().0, ); } } #[doc(alias = "gdk_window_set_device_events")] pub fn set_device_events(&self, device: &Device, event_mask: EventMask) { unsafe { ffi::gdk_window_set_device_events( self.to_glib_none().0, device.to_glib_none().0, event_mask.into_glib(), ); } } #[doc(alias = "gdk_window_set_event_compression")] pub fn set_event_compression(&self, event_compression: bool) { unsafe { ffi::gdk_window_set_event_compression( self.to_glib_none().0, event_compression.into_glib(), ); } } #[doc(alias = "gdk_window_set_events")] pub fn set_events(&self, event_mask: EventMask) { unsafe { ffi::gdk_window_set_events(self.to_glib_none().0, event_mask.into_glib()); } } #[doc(alias = "gdk_window_set_focus_on_map")] pub fn set_focus_on_map(&self, focus_on_map: bool) { unsafe { ffi::gdk_window_set_focus_on_map(self.to_glib_none().0, focus_on_map.into_glib()); } } #[doc(alias = "gdk_window_set_fullscreen_mode")] pub fn set_fullscreen_mode(&self, mode: FullscreenMode) { unsafe { ffi::gdk_window_set_fullscreen_mode(self.to_glib_none().0, mode.into_glib()); } } #[doc(alias = "gdk_window_set_functions")] pub fn set_functions(&self, functions: WMFunction) { unsafe { ffi::gdk_window_set_functions(self.to_glib_none().0, functions.into_glib()); } } #[doc(alias = "gdk_window_set_geometry_hints")] pub fn set_geometry_hints(&self, geometry: &Geometry, geom_mask: WindowHints) { unsafe { ffi::gdk_window_set_geometry_hints( self.to_glib_none().0, geometry.to_glib_none().0, geom_mask.into_glib(), ); } } #[doc(alias = "gdk_window_set_group")] pub fn set_group(&self, leader: Option<&Window>) { unsafe { ffi::gdk_window_set_group(self.to_glib_none().0, leader.to_glib_none().0); } } #[doc(alias = "gdk_window_set_icon_list")] pub fn set_icon_list(&self, pixbufs: &[gdk_pixbuf::Pixbuf]) { unsafe { ffi::gdk_window_set_icon_list(self.to_glib_none().0, pixbufs.to_glib_none().0); } } #[doc(alias = "gdk_window_set_icon_name")] pub fn set_icon_name(&self, name: Option<&str>) { unsafe { ffi::gdk_window_set_icon_name(self.to_glib_none().0, name.to_glib_none().0); } } //#[doc(alias = "gdk_window_set_invalidate_handler")] //pub fn set_invalidate_handler(&self, handler: P) { // unsafe { TODO: call ffi:gdk_window_set_invalidate_handler() } //} #[doc(alias = "gdk_window_set_keep_above")] pub fn set_keep_above(&self, setting: bool) { unsafe { ffi::gdk_window_set_keep_above(self.to_glib_none().0, setting.into_glib()); } } #[doc(alias = "gdk_window_set_keep_below")] pub fn set_keep_below(&self, setting: bool) { unsafe { ffi::gdk_window_set_keep_below(self.to_glib_none().0, setting.into_glib()); } } #[doc(alias = "gdk_window_set_modal_hint")] pub fn set_modal_hint(&self, modal: bool) { unsafe { ffi::gdk_window_set_modal_hint(self.to_glib_none().0, modal.into_glib()); } } #[doc(alias = "gdk_window_set_opacity")] pub fn set_opacity(&self, opacity: f64) { unsafe { ffi::gdk_window_set_opacity(self.to_glib_none().0, opacity); } } #[doc(alias = "gdk_window_set_opaque_region")] pub fn set_opaque_region(&self, region: Option<&cairo::Region>) { unsafe { ffi::gdk_window_set_opaque_region( self.to_glib_none().0, mut_override(region.to_glib_none().0), ); } } #[doc(alias = "gdk_window_set_override_redirect")] pub fn set_override_redirect(&self, override_redirect: bool) { unsafe { ffi::gdk_window_set_override_redirect( self.to_glib_none().0, override_redirect.into_glib(), ); } } #[doc(alias = "gdk_window_set_pass_through")] pub fn set_pass_through(&self, pass_through: bool) { unsafe { ffi::gdk_window_set_pass_through(self.to_glib_none().0, pass_through.into_glib()); } } #[doc(alias = "gdk_window_set_role")] pub fn set_role(&self, role: &str) { unsafe { ffi::gdk_window_set_role(self.to_glib_none().0, role.to_glib_none().0); } } #[doc(alias = "gdk_window_set_shadow_width")] pub fn set_shadow_width(&self, left: i32, right: i32, top: i32, bottom: i32) { unsafe { ffi::gdk_window_set_shadow_width(self.to_glib_none().0, left, right, top, bottom); } } #[doc(alias = "gdk_window_set_skip_pager_hint")] pub fn set_skip_pager_hint(&self, skips_pager: bool) { unsafe { ffi::gdk_window_set_skip_pager_hint(self.to_glib_none().0, skips_pager.into_glib()); } } #[doc(alias = "gdk_window_set_skip_taskbar_hint")] pub fn set_skip_taskbar_hint(&self, skips_taskbar: bool) { unsafe { ffi::gdk_window_set_skip_taskbar_hint(self.to_glib_none().0, skips_taskbar.into_glib()); } } #[doc(alias = "gdk_window_set_source_events")] pub fn set_source_events(&self, source: InputSource, event_mask: EventMask) { unsafe { ffi::gdk_window_set_source_events( self.to_glib_none().0, source.into_glib(), event_mask.into_glib(), ); } } #[doc(alias = "gdk_window_set_startup_id")] pub fn set_startup_id(&self, startup_id: &str) { unsafe { ffi::gdk_window_set_startup_id(self.to_glib_none().0, startup_id.to_glib_none().0); } } #[doc(alias = "gdk_window_set_support_multidevice")] pub fn set_support_multidevice(&self, support_multidevice: bool) { unsafe { ffi::gdk_window_set_support_multidevice( self.to_glib_none().0, support_multidevice.into_glib(), ); } } #[doc(alias = "gdk_window_set_title")] pub fn set_title(&self, title: &str) { unsafe { ffi::gdk_window_set_title(self.to_glib_none().0, title.to_glib_none().0); } } #[doc(alias = "gdk_window_set_transient_for")] pub fn set_transient_for(&self, parent: &Window) { unsafe { ffi::gdk_window_set_transient_for(self.to_glib_none().0, parent.to_glib_none().0); } } #[doc(alias = "gdk_window_set_type_hint")] pub fn set_type_hint(&self, hint: WindowTypeHint) { unsafe { ffi::gdk_window_set_type_hint(self.to_glib_none().0, hint.into_glib()); } } #[doc(alias = "gdk_window_set_urgency_hint")] pub fn set_urgency_hint(&self, urgent: bool) { unsafe { ffi::gdk_window_set_urgency_hint(self.to_glib_none().0, urgent.into_glib()); } } #[doc(alias = "gdk_window_shape_combine_region")] pub fn shape_combine_region( &self, shape_region: Option<&cairo::Region>, offset_x: i32, offset_y: i32, ) { unsafe { ffi::gdk_window_shape_combine_region( self.to_glib_none().0, shape_region.to_glib_none().0, offset_x, offset_y, ); } } #[doc(alias = "gdk_window_show")] pub fn show(&self) { unsafe { ffi::gdk_window_show(self.to_glib_none().0); } } #[doc(alias = "gdk_window_show_unraised")] pub fn show_unraised(&self) { unsafe { ffi::gdk_window_show_unraised(self.to_glib_none().0); } } #[doc(alias = "gdk_window_show_window_menu")] pub fn show_window_menu(&self, event: &mut Event) -> bool { unsafe { from_glib(ffi::gdk_window_show_window_menu( self.to_glib_none().0, event.to_glib_none_mut().0, )) } } #[doc(alias = "gdk_window_stick")] pub fn stick(&self) { unsafe { ffi::gdk_window_stick(self.to_glib_none().0); } } #[doc(alias = "gdk_window_thaw_updates")] pub fn thaw_updates(&self) { unsafe { ffi::gdk_window_thaw_updates(self.to_glib_none().0); } } #[doc(alias = "gdk_window_unfullscreen")] pub fn unfullscreen(&self) { unsafe { ffi::gdk_window_unfullscreen(self.to_glib_none().0); } } #[doc(alias = "gdk_window_unmaximize")] pub fn unmaximize(&self) { unsafe { ffi::gdk_window_unmaximize(self.to_glib_none().0); } } #[doc(alias = "gdk_window_unstick")] pub fn unstick(&self) { unsafe { ffi::gdk_window_unstick(self.to_glib_none().0); } } #[doc(alias = "gdk_window_withdraw")] pub fn withdraw(&self) { unsafe { ffi::gdk_window_withdraw(self.to_glib_none().0); } } #[doc(alias = "gdk_window_constrain_size")] 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::MaybeUninit::uninit(); let mut new_height = mem::MaybeUninit::uninit(); ffi::gdk_window_constrain_size( geometry.to_glib_none_mut().0, flags.into_glib(), width, height, new_width.as_mut_ptr(), new_height.as_mut_ptr(), ); let new_width = new_width.assume_init(); let new_height = new_height.assume_init(); (new_width, new_height) } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_window_process_all_updates")] pub fn process_all_updates() { assert_initialized_main_thread!(); unsafe { ffi::gdk_window_process_all_updates(); } } #[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")] #[doc(alias = "gdk_window_set_debug_updates")] pub fn set_debug_updates(setting: bool) { assert_initialized_main_thread!(); unsafe { ffi::gdk_window_set_debug_updates(setting.into_glib()); } } #[doc(alias = "create-surface")] pub fn connect_create_surface cairo::Surface + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn create_surface_trampoline< F: Fn(&Window, i32, i32) -> 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 { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), width, height).to_glib_full() } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"create-surface\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( create_surface_trampoline:: as *const (), )), Box_::into_raw(f), ) } } //#[doc(alias = "from-embedder")] //pub fn connect_from_embedder(&self, f: F) -> SignalHandlerId { // Out offscreen_x: *.Double // Out offscreen_y: *.Double //} //#[cfg(any(feature = "v3_22", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] //#[doc(alias = "moved-to-rect")] //pub fn connect_moved_to_rect(&self, f: F) -> SignalHandlerId { // Unimplemented flipped_rect: *.Pointer // Unimplemented final_rect: *.Pointer //} #[doc(alias = "pick-embedded-child")] pub fn connect_pick_embedded_child Option + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn pick_embedded_child_trampoline< F: Fn(&Window, f64, f64) -> Option + 'static, >( this: *mut ffi::GdkWindow, x: libc::c_double, y: libc::c_double, f: glib::ffi::gpointer, ) -> *mut ffi::GdkWindow { let f: &F = &*(f as *const F); f(&from_glib_borrow(this), x, y) /*Not checked*/ .to_glib_none() .0 } 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::<_, unsafe extern "C" fn()>( pick_embedded_child_trampoline:: as *const (), )), Box_::into_raw(f), ) } } //#[doc(alias = "to-embedder")] //pub fn connect_to_embedder(&self, f: F) -> SignalHandlerId { // Out embedder_x: *.Double // Out embedder_y: *.Double //} #[doc(alias = "cursor")] pub fn connect_cursor_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_cursor_trampoline( this: *mut ffi::GdkWindow, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::cursor\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_cursor_trampoline:: as *const (), )), Box_::into_raw(f), ) } } } impl fmt::Display for Window { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Window") } } gdk-0.14.3/src/cairo_interaction.rs000064400000000000000000000105050072674642500153400ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::{Rectangle, Window, RGBA}; use cairo::Surface; use cairo::{Context, Region}; use gdk_pixbuf::Pixbuf; use glib::object::IsA; use glib::translate::*; pub trait GdkSurfaceExt { #[doc(alias = "gdk_cairo_region_create_from_surface")] fn create_region(&self) -> Option; } impl GdkSurfaceExt 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 GdkPixbufExt { #[doc(alias = "gdk_cairo_surface_create_from_pixbuf")] fn create_surface>(&self, scale: i32, for_window: Option<&W>) -> Option; } impl GdkPixbufExt for Pixbuf { fn create_surface>( &self, scale: i32, for_window: Option<&W>, ) -> Option { unsafe { from_glib_full(ffi::gdk_cairo_surface_create_from_pixbuf( self.to_glib_none().0, scale, for_window.map(std::convert::AsRef::as_ref).to_glib_none().0, )) } } } pub trait GdkContextExt { fn create_from_window>(window: &W) -> Context; #[allow(clippy::too_many_arguments)] unsafe fn draw_from_gl>( &self, window: &W, source: i32, source_type: i32, buffer_scale: i32, x: i32, y: i32, width: i32, height: i32, ); #[doc(alias = "get_clip_rectangle")] #[doc(alias = "gdk_cairo_get_clip_rectangle")] fn clip_rectangle(&self) -> Option; #[doc(alias = "gdk_cairo_set_source_rgba")] fn set_source_rgba(&self, rgba: &RGBA); #[doc(alias = "gdk_cairo_set_source_pixbuf")] fn set_source_pixbuf(&self, pixbuf: &Pixbuf, x: f64, y: f64); #[doc(alias = "gdk_cairo_set_source_window")] fn set_source_window>(&self, window: &W, x: f64, y: f64); #[doc(alias = "gdk_cairo_rectangle")] fn rectangle(&self, rectangle: &Rectangle); fn add_region(&self, region: &Region); } impl GdkContextExt for Context { fn create_from_window>(window: &W) -> Context { skip_assert_initialized!(); unsafe { from_glib_full(ffi::gdk_cairo_create(window.as_ref().to_glib_none().0)) } } unsafe fn draw_from_gl>( &self, window: &W, source: i32, source_type: i32, buffer_scale: i32, x: i32, y: i32, width: i32, height: i32, ) { skip_assert_initialized!(); ffi::gdk_cairo_draw_from_gl( mut_override(self.to_glib_none().0), window.as_ref().to_glib_none().0, source, source_type, buffer_scale, x, y, width, height, ); } fn 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: &W, x: f64, y: f64) { unsafe { ffi::gdk_cairo_set_source_window( self.to_glib_none().0, window.as_ref().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); } } } gdk-0.14.3/src/change_data.rs000064400000000000000000000020700072674642500140600ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[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(&self) -> *const u8 { match *self { Self::UChars(d) => d.as_ptr() as *const _, Self::UShorts(d) => d.as_ptr() as *const _, Self::ULongs(d) => d.as_ptr() as *const _, Self::UChar(d) => &d as *const _ as *const _, Self::UShort(d) => &d as *const _ as *const _, Self::ULong(d) => &d as *const _ as *const _, } } pub fn len(&self) -> usize { match *self { Self::UChars(d) => d.len(), Self::UShorts(d) => d.len(), Self::ULongs(d) => d.len(), Self::UChar(_) | Self::UShort(_) | Self::ULong(_) => 1, } } pub fn is_empty(&self) -> bool { self.len() != 0 } } gdk-0.14.3/src/device.rs000064400000000000000000000031540072674642500131050ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::AxisUse; use crate::Device; use crate::TimeCoord; use crate::Window; use glib::object::IsA; use glib::translate::*; use std::mem; use std::ptr; impl Device { #[doc(alias = "gdk_device_get_axis")] #[doc(alias = "get_axis")] pub fn is_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_.into_glib(), value, )) } } #[doc(alias = "gdk_device_get_history")] #[doc(alias = "get_history")] pub fn history>(&self, window: &P, start: u32, stop: u32) -> Vec { unsafe { let mut events = ptr::null_mut(); let mut n_events = mem::MaybeUninit::uninit(); let ret: bool = from_glib(ffi::gdk_device_get_history( self.to_glib_none().0, window.as_ref().to_glib_none().0, start, stop, &mut events, n_events.as_mut_ptr(), )); if !ret { return Vec::new(); } let n_events = n_events.assume_init() as usize; let mut r_events = Vec::with_capacity(n_events); for i in 0..n_events { r_events.push((*(events.add(i) as *mut TimeCoord)).clone()); } ffi::gdk_device_free_history(events, n_events as _); r_events } } } gdk-0.14.3/src/device_manager.rs000064400000000000000000000004570072674642500146020ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::DeviceManager; impl DeviceManager { #[doc(alias = "gdk_disable_multidevice")] pub fn disable_multidevice() { assert_not_initialized!(); unsafe { ffi::gdk_disable_multidevice() } } } gdk-0.14.3/src/drag_context.rs000064400000000000000000000114530072674642500143300ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::atom::Atom; use crate::Device; use crate::DragAction; use crate::DragContext; use crate::DragProtocol; use crate::Screen; use crate::Window; use glib::object::IsA; use glib::translate::*; use std::ptr; impl DragContext { #[doc(alias = "gdk_drag_get_selection")] pub fn drag_get_selection(&self) -> Atom { unsafe { from_glib_none(ffi::gdk_drag_get_selection(self.to_glib_none().0) as *mut _) } } #[doc(alias = "gdk_drag_abort")] pub fn drag_abort(&self, time_: u32) { unsafe { ffi::gdk_drag_abort(self.to_glib_none().0, time_) } } #[doc(alias = "gdk_drop_reply")] pub fn drop_reply(&self, accepted: bool, time_: u32) { unsafe { ffi::gdk_drop_reply(self.to_glib_none().0, accepted.into_glib(), time_) } } #[doc(alias = "gdk_drag_drop")] pub fn drop(&self, time_: u32) { unsafe { ffi::gdk_drag_drop(self.to_glib_none().0, time_) } } #[doc(alias = "gdk_drag_find_window_for_screen")] 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)) } } #[allow(clippy::too_many_arguments)] #[doc(alias = "gdk_drag_motion")] 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.into_glib(), x_root, y_root, suggested_action.into_glib(), possible_actions.into_glib(), time_, )) } } #[doc(alias = "gdk_drop_finish")] pub fn drop_finish(&self, success: bool, time_: u32) { unsafe { ffi::gdk_drop_finish(self.to_glib_none().0, success.into_glib(), time_) } } #[doc(alias = "gdk_drag_status")] pub fn drag_status(&self, action: DragAction, time_: u32) { unsafe { ffi::gdk_drag_status(self.to_glib_none().0, action.into_glib(), time_) } } #[doc(alias = "gdk_drag_drop_succeeded")] pub fn drag_drop_succeeded(&self) -> bool { unsafe { from_glib(ffi::gdk_drag_drop_succeeded(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_begin")] 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, )) } } #[doc(alias = "gdk_drag_begin_for_device")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_drag_begin_from_point")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_drag_drop_done")] pub fn drag_drop_done(&self, success: bool) { skip_assert_initialized!(); unsafe { ffi::gdk_drag_drop_done(self.to_glib_none().0, success.into_glib()); } } } gdk-0.14.3/src/event.rs000064400000000000000000000415040072674642500127700ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; use libc::c_void; use std::fmt; use std::mem; use std::ptr; use crate::AxisUse; use crate::Device; #[cfg(any(feature = "v3_22", feature = "dox"))] use crate::DeviceTool; use crate::EventSequence; use crate::EventType; use crate::ModifierType; use crate::Screen; use crate::ScrollDirection; #[cfg(any(feature = "v3_20", feature = "dox"))] use crate::Seat; use crate::Window; glib::wrapper! { /// A generic GDK event. #[derive(PartialEq, Eq, PartialOrd, Ord, Hash)] #[doc(alias = "GdkEvent")] pub struct Event(Boxed); match fn { copy => |ptr| ffi::gdk_event_copy(ptr), free => |ptr| ffi::gdk_event_free(ptr), type_ => || ffi::gdk_event_get_type(), } } impl Event { /// Creates a new event. #[doc(alias = "gdk_event_new")] pub fn new(type_: EventType) -> Event { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_event_new(type_.into_glib())) } } #[doc(alias = "gdk_event_get")] pub fn get() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gdk_event_get()) } } #[doc(alias = "gdk_event_put")] 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. #[doc(alias = "gdk_event_handler_set")] pub fn set_handler(handler: Option) { assert_initialized_main_thread!(); unsafe extern "C" fn event_handler_trampoline( event: *mut ffi::GdkEvent, ptr: glib::ffi::gpointer, ) { if !ptr.is_null() { 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.is_null() { // convert back to Box and free let _boxed: Box = Box::from_raw(ptr as *mut _); } } 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) } } } #[doc(alias = "gdk_event_get_axis")] #[doc(alias = "get_axis")] pub fn 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.into_glib(), &mut value, )) } { Some(value) } else { None } } #[doc(alias = "gdk_event_get_button")] #[doc(alias = "get_button")] pub fn 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 } } #[doc(alias = "gdk_event_get_click_count")] #[doc(alias = "get_click_count")] pub fn 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 } } #[doc(alias = "gdk_event_get_coords")] #[doc(alias = "get_coords")] pub fn 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 } } #[doc(alias = "gdk_event_get_keycode")] #[doc(alias = "get_keycode")] pub fn 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 } } #[doc(alias = "gdk_event_get_keyval")] #[doc(alias = "get_keyval")] pub fn 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 } } #[doc(alias = "gdk_event_get_root_coords")] #[doc(alias = "get_root_coords")] pub fn 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 } } #[doc(alias = "gdk_event_get_scroll_direction")] #[doc(alias = "get_scroll_direction")] pub fn scroll_direction(&self) -> Option { unsafe { let mut direction = mem::MaybeUninit::uninit(); if from_glib(ffi::gdk_event_get_scroll_direction( self.to_glib_none().0, direction.as_mut_ptr(), )) { Some(from_glib(direction.assume_init())) } else { None } } } #[doc(alias = "gdk_event_get_scroll_deltas")] #[doc(alias = "get_scroll_deltas")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_event_is_scroll_stop_event")] pub fn is_scroll_stop_event(&self) -> bool { unsafe { from_glib(ffi::gdk_event_is_scroll_stop_event(self.to_glib_none().0)) } } #[doc(alias = "gdk_event_get_scroll_direction")] #[doc(alias = "get_state")] pub fn state(&self) -> Option { unsafe { let mut state = mem::MaybeUninit::uninit(); if from_glib(ffi::gdk_event_get_scroll_direction( self.to_glib_none().0, state.as_mut_ptr(), )) { Some(from_glib(state.assume_init() as u32)) } else { None } } } #[doc(alias = "gdk_event_get_time")] #[doc(alias = "get_time")] pub fn time(&self) -> u32 { unsafe { ffi::gdk_event_get_time(self.to_glib_none().0) } } /// Returns the associated `Window` if applicable. #[doc(alias = "gdk_event_get_window")] #[doc(alias = "get_window")] pub fn window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_event_get_event_sequence")] #[doc(alias = "get_event_sequence")] pub fn event_sequence(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_event_sequence(self.to_glib_none().0)) } } #[doc(alias = "gdk_event_triggers_context_menu")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_event_get_seat")] #[doc(alias = "get_seat")] pub fn seat(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_seat(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_get_scancode")] #[doc(alias = "get_scancode")] pub fn scancode(&self) -> i32 { unsafe { ffi::gdk_event_get_scancode(mut_override(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_get_pointer_emulated")] #[doc(alias = "get_pointer_emulated")] pub fn is_pointer_emulated(&self) -> bool { unsafe { from_glib(ffi::gdk_event_get_pointer_emulated(mut_override( self.to_glib_none().0, ))) } } #[doc(alias = "gdk_event_set_screen")] 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) } } #[doc(alias = "gdk_event_get_screen")] #[doc(alias = "get_screen")] pub fn screen(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_screen(self.to_glib_none().0)) } } #[doc(alias = "gdk_event_set_device")] 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) } } #[doc(alias = "gdk_event_get_device")] #[doc(alias = "get_device")] pub fn device(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_device(self.to_glib_none().0)) } } #[doc(alias = "gdk_event_set_source_device")] 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) } } #[doc(alias = "gdk_event_get_source_device")] #[doc(alias = "get_source_device")] pub fn 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_set_device_tool")] 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_get_device_tool")] #[doc(alias = "get_device_tool")] pub fn device_tool(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_device_tool(self.to_glib_none().0)) } } /// Returns the event type. #[doc(alias = "get_event_type")] pub fn event_type(&self) -> EventType { unsafe { from_glib(self.as_ref().type_) } } /// Returns whether the event was sent explicitly. #[allow(clippy::cast_lossless)] #[doc(alias = "get_send_event")] pub fn is_send_event(&self) -> bool { unsafe { 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(&*(self as *const _ as *const _)) } } 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(&mut *(self as *mut _ as *mut _)) } } 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.event_type()) .finish() } } /// A helper trait implemented by all event subtypes. pub unsafe 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, ) -> glib::translate::Borrowed { glib::translate::Borrowed::new( <$name as crate::event::FromEvent>::from( crate::Event::from_glib_borrow(ptr as *mut ::ffi::GdkEvent).into_inner(), ) .map_err(std::mem::forget) .unwrap(), ) } } 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)|+) => { unsafe impl crate::event::FromEvent for $name { #[inline] fn is(ev: &crate::event::Event) -> bool { skip_assert_initialized!(); matches!(ev.as_ref().type_, $($ty)|+) } #[inline] fn from(ev: crate::event::Event) -> Result { skip_assert_initialized!(); if Self::is(&ev) { Ok($name(ev)) } else { Err(ev) } } } impl ::std::ops::Deref for $name { type Target = crate::event::Event; fn deref(&self) -> &crate::event::Event { &self.0 } } impl ::std::ops::DerefMut for $name { fn deref_mut(&mut self) -> &mut crate::event::Event { &mut self.0 } } }; } unsafe impl FromEvent for Event { #[inline] fn is(_ev: &Event) -> bool { skip_assert_initialized!(); true } #[inline] fn from(ev: Event) -> Result { skip_assert_initialized!(); Ok(ev) } } gdk-0.14.3/src/event_button.rs000064400000000000000000000030020072674642500143520ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventButton(crate::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 { #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_button")] pub fn button(&self) -> u32 { self.as_ref().button } #[doc(alias = "get_device")] pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } #[doc(alias = "get_axes")] pub fn axes(&self) -> Option<(f64, f64)> { let axes = self.as_ref().axes; if axes.is_null() { None } else { unsafe { Some((*axes, *axes.offset(1))) } } } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } } gdk-0.14.3/src/event_configure.rs000064400000000000000000000013410072674642500150240ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventConfigure(crate::Event); event_wrapper!(EventConfigure, GdkEventConfigure); event_subtype!(EventConfigure, ffi::GDK_CONFIGURE); impl EventConfigure { #[doc(alias = "get_position")] pub fn position(&self) -> (i32, i32) { (self.as_ref().x, self.as_ref().y) } #[doc(alias = "get_size")] pub fn 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) } } gdk-0.14.3/src/event_crossing.rs000064400000000000000000000027430072674642500147010ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventCrossing(crate::Event); event_wrapper!(EventCrossing, GdkEventCrossing); event_subtype!(EventCrossing, ffi::GDK_ENTER_NOTIFY | ffi::GDK_LEAVE_NOTIFY); impl EventCrossing { #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_subwindow")] pub fn subwindow(&self) -> Option { unsafe { from_glib_none(self.as_ref().subwindow) } } #[doc(alias = "get_mode")] pub fn mode(&self) -> crate::CrossingMode { unsafe { from_glib(self.as_ref().mode) } } #[doc(alias = "get_detail")] pub fn detail(&self) -> crate::NotifyType { unsafe { from_glib(self.as_ref().detail) } } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } #[doc(alias = "get_focus")] pub fn gets_focus(&self) -> bool { unsafe { from_glib(self.as_ref().focus) } } } gdk-0.14.3/src/event_dnd.rs000064400000000000000000000016220072674642500136120ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventDND(crate::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 { #[doc(alias = "get_context")] pub fn context(&self) -> Option { unsafe { from_glib_none(self.as_ref().context) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_root")] pub fn root(&self) -> (i16, i16) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } } gdk-0.14.3/src/event_expose.rs000064400000000000000000000013650072674642500143540ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::Rectangle; use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventExpose(crate::Event); event_wrapper!(EventExpose, GdkEventExpose); event_subtype!(EventExpose, ffi::GDK_EXPOSE | ffi::GDK_DAMAGE); impl EventExpose { #[doc(alias = "get_region")] pub fn region(&self) -> Option { unsafe { from_glib_none(self.as_ref().region) } } #[doc(alias = "get_count")] pub fn count(&self) -> u32 { self.as_ref().count as u32 } #[doc(alias = "get_area")] pub fn area(&self) -> Rectangle { unsafe { from_glib_none(&self.as_ref().area as *const _) } } } gdk-0.14.3/src/event_focus.rs000064400000000000000000000006730072674642500141710ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventFocus(crate::Event); event_wrapper!(EventFocus, GdkEventFocus); event_subtype!(EventFocus, ffi::GDK_FOCUS_CHANGE); impl EventFocus { #[doc(alias = "get_in")] pub fn is_in(&self) -> bool { unsafe { from_glib(self.as_ref().in_ as _) } } } gdk-0.14.3/src/event_grab_broken.rs000064400000000000000000000013030072674642500153140ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventGrabBroken(crate::Event); event_wrapper!(EventGrabBroken, GdkEventGrabBroken); event_subtype!(EventGrabBroken, ffi::GDK_GRAB_BROKEN); impl EventGrabBroken { pub fn is_keyboard(&self) -> bool { unsafe { from_glib(self.as_ref().keyboard) } } pub fn is_implicit(&self) -> bool { unsafe { from_glib(self.as_ref().implicit) } } #[doc(alias = "get_grab_window")] pub fn grab_window(&self) -> Option { unsafe { from_glib_none(self.as_ref().grab_window) } } } gdk-0.14.3/src/event_key.rs000064400000000000000000000023550072674642500136410ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventKey(crate::Event); event_wrapper!(EventKey, GdkEventKey); event_subtype!(EventKey, ffi::GDK_KEY_PRESS | ffi::GDK_KEY_RELEASE); impl EventKey { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } #[doc(alias = "get_keyval")] pub fn keyval(&self) -> crate::keys::Key { unsafe { from_glib(self.as_ref().keyval) } } #[doc(alias = "get_length")] pub fn length(&self) -> u32 { let length = self.as_ref().length; assert!(length >= 0, "Unexpected negative value"); length as u32 } #[doc(alias = "get_hardware_keycode")] pub fn hardware_keycode(&self) -> u16 { self.as_ref().hardware_keycode } #[doc(alias = "get_group")] pub fn group(&self) -> u8 { self.as_ref().group } #[doc(alias = "get_is_modifier")] pub fn is_modifier(&self) -> bool { self.as_ref().is_modifier & 1 != 0 } } gdk-0.14.3/src/event_motion.rs000064400000000000000000000031040072674642500143470ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventMotion(crate::Event); event_wrapper!(EventMotion, GdkEventMotion); event_subtype!(EventMotion, ffi::GDK_MOTION_NOTIFY); impl EventMotion { #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "gdk_event_request_motions")] pub fn request_motions(&self) { unsafe { ffi::gdk_event_request_motions(self.as_ref()) } } #[doc(alias = "get_device")] pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } #[doc(alias = "get_axes")] pub fn axes(&self) -> Option<(f64, f64)> { let axes = self.as_ref().axes; if axes.is_null() { None } else { unsafe { Some((*axes, *axes.offset(1))) } } } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } #[doc(alias = "get_is_hint")] pub fn is_hint(&self) -> bool { unsafe { from_glib(self.as_ref().is_hint as _) } } } gdk-0.14.3/src/event_owner_change.rs000064400000000000000000000017700072674642500155100ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventOwnerChange(crate::Event); event_wrapper!(EventOwnerChange, GdkEventOwnerChange); event_subtype!(EventOwnerChange, ffi::GDK_OWNER_CHANGE); impl EventOwnerChange { #[doc(alias = "get_owner")] pub fn owner(&self) -> Option { unsafe { from_glib_none(self.as_ref().owner) } } #[doc(alias = "get_reason")] pub fn reason(&self) -> crate::OwnerChange { unsafe { from_glib(self.as_ref().reason) } } #[doc(alias = "get_selection")] pub fn selection(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().selection as *mut _) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_selection_time")] pub fn selection_time(&self) -> u32 { self.as_ref().selection_time } } gdk-0.14.3/src/event_pad_axis.rs000064400000000000000000000015110072674642500146320ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventPadAxis(crate::Event); event_wrapper!(EventPadAxis, GdkEventPadAxis); event_subtype!(EventPadAxis, ffi::GDK_PAD_RING | ffi::GDK_PAD_STRIP); impl EventPadAxis { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_group")] pub fn group(&self) -> u32 { self.as_ref().group } #[doc(alias = "get_index")] pub fn index(&self) -> u32 { self.as_ref().index } #[doc(alias = "get_mode")] pub fn mode(&self) -> u32 { self.as_ref().mode } #[doc(alias = "get_value")] pub fn value(&self) -> f64 { self.as_ref().value } } gdk-0.14.3/src/event_pad_button.rs000064400000000000000000000014150072674642500152040ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventPadButton(crate::Event); event_wrapper!(EventPadButton, GdkEventPadButton); event_subtype!( EventPadButton, ffi::GDK_PAD_BUTTON_PRESS | ffi::GDK_PAD_BUTTON_RELEASE ); impl EventPadButton { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_group")] pub fn group(&self) -> u32 { self.as_ref().group } #[doc(alias = "get_button")] pub fn button(&self) -> u32 { self.as_ref().button } #[doc(alias = "get_mode")] pub fn mode(&self) -> u32 { self.as_ref().mode } } gdk-0.14.3/src/event_pad_group_mode.rs000064400000000000000000000012130072674642500160250ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventPadGroupMode(crate::Event); event_wrapper!(EventPadGroupMode, GdkEventPadGroupMode); event_subtype!(EventPadGroupMode, ffi::GDK_PAD_GROUP_MODE); impl EventPadGroupMode { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_group")] pub fn group(&self) -> u32 { self.as_ref().group } #[doc(alias = "get_mode")] pub fn mode(&self) -> u32 { self.as_ref().mode } } gdk-0.14.3/src/event_property.rs000064400000000000000000000013020072674642500147240ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventProperty(crate::Event); event_wrapper!(EventProperty, GdkEventProperty); event_subtype!(EventProperty, ffi::GDK_PROPERTY_NOTIFY); impl EventProperty { #[doc(alias = "get_atom")] pub fn atom(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().atom) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_state")] pub fn state(&self) -> crate::PropertyState { unsafe { from_glib(self.as_ref().state) } } } gdk-0.14.3/src/event_proximity.rs000064400000000000000000000011540072674642500151110ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventProximity(crate::Event); event_wrapper!(EventProximity, GdkEventProximity); event_subtype!( EventProximity, ffi::GDK_PROXIMITY_IN | ffi::GDK_PROXIMITY_OUT ); impl EventProximity { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_device")] pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } } gdk-0.14.3/src/event_scroll.rs000064400000000000000000000027350072674642500143510ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventScroll(crate::Event); event_wrapper!(EventScroll, GdkEventScroll); event_subtype!(EventScroll, ffi::GDK_SCROLL); impl EventScroll { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } #[doc(alias = "get_device")] pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } #[doc(alias = "get_direction")] pub fn direction(&self) -> crate::ScrollDirection { unsafe { from_glib(self.as_ref().direction) } } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } #[doc(alias = "get_delta")] pub fn delta(&self) -> (f64, f64) { let dx = self.as_ref().delta_x; let dy = self.as_ref().delta_y; (dx, dy) } #[doc(alias = "get_is_stop")] pub fn is_stop(&self) -> bool { self.as_ref().is_stop & 1 != 0 } } gdk-0.14.3/src/event_selection.rs000064400000000000000000000021430072674642500150310ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventSelection(crate::Event); event_wrapper!(EventSelection, GdkEventSelection); event_subtype!( EventSelection, ffi::GDK_SELECTION_CLEAR | ffi::GDK_SELECTION_NOTIFY | ffi::GDK_SELECTION_REQUEST ); impl EventSelection { #[doc(alias = "get_selection")] pub fn selection(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().selection as *mut _) } } #[doc(alias = "get_target")] pub fn target(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().target as *mut _) } } #[doc(alias = "get_property")] pub fn property(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().property as *mut _) } } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_requestor")] pub fn requestor(&self) -> Option { unsafe { from_glib_none(self.as_ref().requestor) } } } gdk-0.14.3/src/event_setting.rs000064400000000000000000000011560072674642500145240ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; use glib::GString; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventSetting(crate::Event); event_wrapper!(EventSetting, GdkEventSetting); event_subtype!(EventSetting, ffi::GDK_SETTING); impl EventSetting { #[doc(alias = "get_name")] pub fn name(&self) -> Option { unsafe { from_glib_none(self.as_ref().name) } } #[doc(alias = "get_action")] pub fn action(&self) -> crate::SettingAction { unsafe { from_glib(self.as_ref().action) } } } gdk-0.14.3/src/event_touch.rs000064400000000000000000000032150072674642500141670ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventTouch(crate::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 { #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } pub fn is_emulating_pointer(&self) -> bool { unsafe { from_glib(self.as_ref().emulating_pointer) } } #[doc(alias = "get_device")] pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } #[doc(alias = "get_axes")] pub fn axes(&self) -> Option<(f64, f64)> { let axes = self.as_ref().axes; if axes.is_null() { None } else { unsafe { Some((*axes, *axes.offset(1))) } } } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } #[doc(alias = "get_event_sequence")] pub fn event_sequence(&self) -> Option { unsafe { from_glib_none(self.as_ref().sequence) } } } gdk-0.14.3/src/event_touchpad_pinch.rs000064400000000000000000000030110072674642500160270ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventTouchpadPinch(crate::Event); event_wrapper!(EventTouchpadPinch, GdkEventTouchpadPinch); event_subtype!(EventTouchpadPinch, ffi::GDK_TOUCHPAD_PINCH); impl EventTouchpadPinch { pub fn is_phase(&self) -> bool { unsafe { from_glib(self.as_ref().phase as _) } } #[doc(alias = "get_n_fingers")] pub fn n_fingers(&self) -> i8 { self.as_ref().n_fingers } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_delta")] pub fn delta(&self) -> (f64, f64) { let dx = self.as_ref().dx; let dy = self.as_ref().dy; (dx, dy) } #[doc(alias = "get_angle_delta")] pub fn angle_delta(&self) -> f64 { self.as_ref().angle_delta } #[doc(alias = "get_scale")] pub fn scale(&self) -> f64 { self.as_ref().scale } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } } gdk-0.14.3/src/event_touchpad_swipe.rs000064400000000000000000000024570072674642500160720ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventTouchpadSwipe(crate::Event); event_wrapper!(EventTouchpadSwipe, GdkEventTouchpadSwipe); event_subtype!(EventTouchpadSwipe, ffi::GDK_TOUCHPAD_SWIPE); impl EventTouchpadSwipe { pub fn is_phase(&self) -> bool { unsafe { from_glib(self.as_ref().phase as _) } } #[doc(alias = "get_n_fingers")] pub fn n_fingers(&self) -> i8 { self.as_ref().n_fingers } #[doc(alias = "get_time")] pub fn time(&self) -> u32 { self.as_ref().time } #[doc(alias = "get_position")] pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } #[doc(alias = "get_delta")] pub fn delta(&self) -> (f64, f64) { let dx = self.as_ref().dx; let dy = self.as_ref().dy; (dx, dy) } #[doc(alias = "get_root")] pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } #[doc(alias = "get_state")] pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } } gdk-0.14.3/src/event_visibility.rs000064400000000000000000000007530072674642500152400ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventVisibility(crate::Event); event_wrapper!(EventVisibility, GdkEventVisibility); event_subtype!(EventVisibility, ffi::GDK_VISIBILITY_NOTIFY); impl EventVisibility { #[doc(alias = "get_state")] pub fn state(&self) -> crate::VisibilityState { unsafe { from_glib(self.as_ref().state) } } } gdk-0.14.3/src/event_window_state.rs000064400000000000000000000012460072674642500155560ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct EventWindowState(crate::Event); event_wrapper!(EventWindowState, GdkEventWindowState); event_subtype!(EventWindowState, ffi::GDK_WINDOW_STATE); impl EventWindowState { #[doc(alias = "get_changed_mask")] pub fn changed_mask(&self) -> crate::WindowState { unsafe { from_glib(self.as_ref().changed_mask) } } #[doc(alias = "get_new_window_state")] pub fn new_window_state(&self) -> crate::WindowState { unsafe { from_glib(self.as_ref().new_window_state) } } } gdk-0.14.3/src/frame_clock.rs000064400000000000000000000012550072674642500141130ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::FrameClock; use glib::translate::*; impl FrameClock { #[doc(alias = "gdk_frame_clock_get_refresh_info")] #[doc(alias = "get_refresh_info")] pub fn 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) } } } gdk-0.14.3/src/frame_timings.rs000064400000000000000000000032770072674642500145000ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::FrameTimings; use glib::translate::*; use std::num::NonZeroU64; impl FrameTimings { #[doc(alias = "gdk_frame_timings_get_predicted_presentation_time")] #[doc(alias = "get_predicted_presentation_time")] pub fn 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) } #[doc(alias = "gdk_frame_timings_get_presentation_time")] #[doc(alias = "get_presentation_time")] pub fn 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) } #[doc(alias = "gdk_frame_timings_get_refresh_interval")] #[doc(alias = "get_refresh_interval")] pub fn 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) } } gdk-0.14.3/src/functions.rs000064400000000000000000000043360072674642500136610ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[repr(packed)] pub struct GRange(pub i32, pub i32); #[doc(alias = "gdk_pango_layout_line_get_clip_region")] 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, )) } } #[doc(alias = "gdk_pango_layout_get_clip_region")] 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, )) } } #[doc(alias = "gdk_setting_get")] 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 { Some(value) } else { None } } } #[doc(alias = "gdk_property_change")] 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.into_glib(), data.to_glib(), nelements as i32, ); } } gdk-0.14.3/src/geometry.rs000064400000000000000000000033440072674642500135020ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::Gravity; use glib::translate::*; #[derive(Clone, Copy, Debug, PartialEq)] #[repr(C)] #[doc(alias = "GdkGeometry")] 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 } } gdk-0.14.3/src/keymap.rs000064400000000000000000000064060072674642500131370ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::keys::Key; use crate::Keymap; use crate::KeymapKey; use crate::ModifierType; use glib::translate::*; use std::mem; use std::ptr; impl Keymap { #[doc(alias = "gdk_keymap_get_entries_for_keycode")] #[doc(alias = "get_entries_for_keycode")] pub fn entries_for_keycode(&self, hardware_keycode: u32) -> Vec<(KeymapKey, u32)> { unsafe { let mut keys = ptr::null_mut(); let mut keyvals = ptr::null_mut(); let mut n_entries = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_keymap_get_entries_for_keycode( self.to_glib_none().0, hardware_keycode, &mut keys, &mut keyvals, n_entries.as_mut_ptr(), )); if ret { let n_entries = n_entries.assume_init() as usize; let mut entries = Vec::with_capacity(n_entries); for i in 0..n_entries { entries.push((from_glib_none(keys.add(i)), ptr::read(keyvals.add(i)))); } glib::ffi::g_free(keys as *mut _); glib::ffi::g_free(keyvals as *mut _); entries } else { Vec::new() } } } #[doc(alias = "gdk_keymap_get_entries_for_keyval")] #[doc(alias = "get_entries_for_keyval")] pub fn entries_for_keyval(&self, keyval: u32) -> Vec { unsafe { let mut keys = ptr::null_mut(); let mut n_keys = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_keymap_get_entries_for_keyval( self.to_glib_none().0, keyval, &mut keys, n_keys.as_mut_ptr(), )); if ret { let n_keys = n_keys.assume_init() as usize; let mut r_keys = Vec::with_capacity(n_keys); for i in 0..n_keys { r_keys.push(from_glib_none(keys.add(i))); } glib::ffi::g_free(keys as *mut _); r_keys } else { Vec::new() } } } #[doc(alias = "gdk_keymap_add_virtual_modifiers")] pub fn add_virtual_modifiers(&self, state: &mut ModifierType) { unsafe { let mut s = state.into_glib(); ffi::gdk_keymap_add_virtual_modifiers(self.to_glib_none().0, &mut s); *state = from_glib(s); } } #[doc(alias = "gdk_keymap_map_virtual_modifiers")] pub fn map_virtual_modifiers(&self, state: &mut ModifierType) -> bool { unsafe { let mut s = state.into_glib(); let ret = from_glib(ffi::gdk_keymap_map_virtual_modifiers( self.to_glib_none().0, &mut s, )); *state = from_glib(s); ret } } #[doc(alias = "gdk_keymap_lookup_key")] pub fn lookup_key(&self, key: &KeymapKey) -> Option { let key = unsafe { ffi::gdk_keymap_lookup_key(self.to_glib_none().0, key.to_glib_none().0) }; if key != 0 { Some(Key::from(key)) } else { None } } } gdk-0.14.3/src/keymap_key.rs000064400000000000000000000030320072674642500137770ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[repr(C)] #[doc(alias = "GdkKeymapKey")] pub struct KeymapKey { pub keycode: u32, pub group: i32, pub level: i32, } #[doc(hidden)] impl<'a> ToGlibPtr<'a, *const ffi::GdkKeymapKey> for KeymapKey { type Storage = &'a Self; #[inline] fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GdkKeymapKey, Self> { let ptr: *const KeymapKey = &*self; Stash(ptr as *const ffi::GdkKeymapKey, self) } } #[doc(hidden)] impl<'a> ToGlibPtrMut<'a, *mut ffi::GdkKeymapKey> for KeymapKey { type Storage = &'a mut Self; #[inline] fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GdkKeymapKey, Self> { let ptr: *mut KeymapKey = &mut *self; StashMut(ptr as *mut ffi::GdkKeymapKey, self) } } #[doc(hidden)] impl FromGlibPtrNone<*const ffi::GdkKeymapKey> for KeymapKey { unsafe fn from_glib_none(ptr: *const ffi::GdkKeymapKey) -> Self { *(ptr as *const KeymapKey) } } #[doc(hidden)] impl FromGlibPtrNone<*mut ffi::GdkKeymapKey> for KeymapKey { unsafe fn from_glib_none(ptr: *mut ffi::GdkKeymapKey) -> Self { *(ptr as *mut KeymapKey) } } #[doc(hidden)] impl FromGlibPtrFull<*mut ffi::GdkKeymapKey> for KeymapKey { #[inline] unsafe fn from_glib_full(ptr: *mut ffi::GdkKeymapKey) -> Self { let geom = *(ptr as *mut KeymapKey); glib::ffi::g_free(ptr as *mut _); geom } } gdk-0.14.3/src/keys.rs000064400000000000000000005005600072674642500126240ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; use glib::GString; use libc::c_uint; use std::mem; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Key(u32); impl ::std::ops::Deref for Key { type Target = u32; fn deref(&self) -> &u32 { &self.0 } } impl ::std::ops::DerefMut for Key { fn deref_mut(&mut self) -> &mut u32 { &mut self.0 } } impl ::std::convert::From for Key { fn from(value: u32) -> Self { skip_assert_initialized!(); Self(value) } } impl FromGlib for Key { unsafe fn from_glib(value: u32) -> Self { skip_assert_initialized!(); Self(value) } } impl IntoGlib for Key { type GlibType = u32; fn into_glib(self) -> u32 { *self } } impl Key { #[doc(alias = "gdk_keyval_from_name")] pub fn from_name(keyval_name: &str) -> Self { skip_assert_initialized!(); Self(unsafe { ffi::gdk_keyval_from_name(keyval_name.to_glib_none().0) }) } #[doc(alias = "gdk_unicode_to_keyval")] pub fn from_unicode(c: char) -> Self { skip_assert_initialized!(); Self(unsafe { ffi::gdk_unicode_to_keyval(u32::from(c)) }) } #[doc(alias = "gdk_keyval_to_unicode")] pub fn to_unicode(&self) -> Option { skip_assert_initialized!(); unsafe { ::std::char::from_u32(ffi::gdk_keyval_to_unicode(**self)).filter(|x| *x != '\0') } } #[doc(alias = "gdk_keyval_name")] pub fn name(&self) -> Option { skip_assert_initialized!(); unsafe { from_glib_none(ffi::gdk_keyval_name(**self as c_uint)) } } #[doc(alias = "gdk_keyval_is_upper")] pub fn is_upper(&self) -> bool { skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_keyval_is_upper(**self)) } } #[doc(alias = "gdk_keyval_is_lower")] pub fn is_lower(&self) -> bool { skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_keyval_is_lower(**self)) } } #[doc(alias = "gdk_keyval_to_upper")] pub fn to_upper(&self) -> Self { skip_assert_initialized!(); unsafe { ffi::gdk_keyval_to_upper(**self) }.into() } #[doc(alias = "gdk_keyval_to_lower")] pub fn to_lower(&self) -> Self { skip_assert_initialized!(); unsafe { ffi::gdk_keyval_to_lower(**self) }.into() } #[doc(alias = "gdk_keyval_convert_case")] pub fn convert_case(&self) -> (Self, Self) { skip_assert_initialized!(); unsafe { let mut lower = mem::MaybeUninit::uninit(); let mut upper = mem::MaybeUninit::uninit(); ffi::gdk_keyval_convert_case(self.0, lower.as_mut_ptr(), upper.as_mut_ptr()); let lower = lower.assume_init(); let upper = upper.assume_init(); (Self(lower), Self(upper)) } } } impl ::std::fmt::Display for Key { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "Key({})", self.0) } } #[allow(non_upper_case_globals)] pub mod constants { use super::Key; pub const VoidSymbol: Key = Key(ffi::GDK_KEY_VoidSymbol as u32); pub const BackSpace: Key = Key(ffi::GDK_KEY_BackSpace as u32); pub const Tab: Key = Key(ffi::GDK_KEY_Tab as u32); pub const Linefeed: Key = Key(ffi::GDK_KEY_Linefeed as u32); pub const Clear: Key = Key(ffi::GDK_KEY_Clear as u32); pub const Return: Key = Key(ffi::GDK_KEY_Return as u32); pub const Pause: Key = Key(ffi::GDK_KEY_Pause as u32); pub const Scroll_Lock: Key = Key(ffi::GDK_KEY_Scroll_Lock as u32); pub const Sys_Req: Key = Key(ffi::GDK_KEY_Sys_Req as u32); pub const Escape: Key = Key(ffi::GDK_KEY_Escape as u32); pub const Delete: Key = Key(ffi::GDK_KEY_Delete as u32); pub const Multi_key: Key = Key(ffi::GDK_KEY_Multi_key as u32); pub const Codeinput: Key = Key(ffi::GDK_KEY_Codeinput as u32); pub const SingleCandidate: Key = Key(ffi::GDK_KEY_SingleCandidate as u32); pub const MultipleCandidate: Key = Key(ffi::GDK_KEY_MultipleCandidate as u32); pub const PreviousCandidate: Key = Key(ffi::GDK_KEY_PreviousCandidate as u32); pub const Kanji: Key = Key(ffi::GDK_KEY_Kanji as u32); pub const Muhenkan: Key = Key(ffi::GDK_KEY_Muhenkan as u32); pub const Henkan_Mode: Key = Key(ffi::GDK_KEY_Henkan_Mode as u32); pub const Henkan: Key = Key(ffi::GDK_KEY_Henkan as u32); pub const Romaji: Key = Key(ffi::GDK_KEY_Romaji as u32); pub const Hiragana: Key = Key(ffi::GDK_KEY_Hiragana as u32); pub const Katakana: Key = Key(ffi::GDK_KEY_Katakana as u32); pub const Hiragana_Katakana: Key = Key(ffi::GDK_KEY_Hiragana_Katakana as u32); pub const Zenkaku: Key = Key(ffi::GDK_KEY_Zenkaku as u32); pub const Hankaku: Key = Key(ffi::GDK_KEY_Hankaku as u32); pub const Zenkaku_Hankaku: Key = Key(ffi::GDK_KEY_Zenkaku_Hankaku as u32); pub const Touroku: Key = Key(ffi::GDK_KEY_Touroku as u32); pub const Massyo: Key = Key(ffi::GDK_KEY_Massyo as u32); pub const Kana_Lock: Key = Key(ffi::GDK_KEY_Kana_Lock as u32); pub const Kana_Shift: Key = Key(ffi::GDK_KEY_Kana_Shift as u32); pub const Eisu_Shift: Key = Key(ffi::GDK_KEY_Eisu_Shift as u32); pub const Eisu_toggle: Key = Key(ffi::GDK_KEY_Eisu_toggle as u32); pub const Kanji_Bangou: Key = Key(ffi::GDK_KEY_Kanji_Bangou as u32); pub const Zen_Koho: Key = Key(ffi::GDK_KEY_Zen_Koho as u32); pub const Mae_Koho: Key = Key(ffi::GDK_KEY_Mae_Koho as u32); pub const Home: Key = Key(ffi::GDK_KEY_Home as u32); pub const Left: Key = Key(ffi::GDK_KEY_Left as u32); pub const Up: Key = Key(ffi::GDK_KEY_Up as u32); pub const Right: Key = Key(ffi::GDK_KEY_Right as u32); pub const Down: Key = Key(ffi::GDK_KEY_Down as u32); pub const Prior: Key = Key(ffi::GDK_KEY_Prior as u32); pub const Page_Up: Key = Key(ffi::GDK_KEY_Page_Up as u32); pub const Next: Key = Key(ffi::GDK_KEY_Next as u32); pub const Page_Down: Key = Key(ffi::GDK_KEY_Page_Down as u32); pub const End: Key = Key(ffi::GDK_KEY_End as u32); pub const Begin: Key = Key(ffi::GDK_KEY_Begin as u32); pub const Select: Key = Key(ffi::GDK_KEY_Select as u32); pub const Print: Key = Key(ffi::GDK_KEY_Print as u32); pub const Execute: Key = Key(ffi::GDK_KEY_Execute as u32); pub const Insert: Key = Key(ffi::GDK_KEY_Insert as u32); pub const Undo: Key = Key(ffi::GDK_KEY_Undo as u32); pub const Redo: Key = Key(ffi::GDK_KEY_Redo as u32); pub const Menu: Key = Key(ffi::GDK_KEY_Menu as u32); pub const Find: Key = Key(ffi::GDK_KEY_Find as u32); pub const Cancel: Key = Key(ffi::GDK_KEY_Cancel as u32); pub const Help: Key = Key(ffi::GDK_KEY_Help as u32); pub const Break: Key = Key(ffi::GDK_KEY_Break as u32); pub const Mode_switch: Key = Key(ffi::GDK_KEY_Mode_switch as u32); pub const script_switch: Key = Key(ffi::GDK_KEY_script_switch as u32); pub const Num_Lock: Key = Key(ffi::GDK_KEY_Num_Lock as u32); pub const KP_Space: Key = Key(ffi::GDK_KEY_KP_Space as u32); pub const KP_Tab: Key = Key(ffi::GDK_KEY_KP_Tab as u32); pub const KP_Enter: Key = Key(ffi::GDK_KEY_KP_Enter as u32); pub const KP_F1: Key = Key(ffi::GDK_KEY_KP_F1 as u32); pub const KP_F2: Key = Key(ffi::GDK_KEY_KP_F2 as u32); pub const KP_F3: Key = Key(ffi::GDK_KEY_KP_F3 as u32); pub const KP_F4: Key = Key(ffi::GDK_KEY_KP_F4 as u32); pub const KP_Home: Key = Key(ffi::GDK_KEY_KP_Home as u32); pub const KP_Left: Key = Key(ffi::GDK_KEY_KP_Left as u32); pub const KP_Up: Key = Key(ffi::GDK_KEY_KP_Up as u32); pub const KP_Right: Key = Key(ffi::GDK_KEY_KP_Right as u32); pub const KP_Down: Key = Key(ffi::GDK_KEY_KP_Down as u32); pub const KP_Prior: Key = Key(ffi::GDK_KEY_KP_Prior as u32); pub const KP_Page_Up: Key = Key(ffi::GDK_KEY_KP_Page_Up as u32); pub const KP_Next: Key = Key(ffi::GDK_KEY_KP_Next as u32); pub const KP_Page_Down: Key = Key(ffi::GDK_KEY_KP_Page_Down as u32); pub const KP_End: Key = Key(ffi::GDK_KEY_KP_End as u32); pub const KP_Begin: Key = Key(ffi::GDK_KEY_KP_Begin as u32); pub const KP_Insert: Key = Key(ffi::GDK_KEY_KP_Insert as u32); pub const KP_Delete: Key = Key(ffi::GDK_KEY_KP_Delete as u32); pub const KP_Equal: Key = Key(ffi::GDK_KEY_KP_Equal as u32); pub const KP_Multiply: Key = Key(ffi::GDK_KEY_KP_Multiply as u32); pub const KP_Add: Key = Key(ffi::GDK_KEY_KP_Add as u32); pub const KP_Separator: Key = Key(ffi::GDK_KEY_KP_Separator as u32); pub const KP_Subtract: Key = Key(ffi::GDK_KEY_KP_Subtract as u32); pub const KP_Decimal: Key = Key(ffi::GDK_KEY_KP_Decimal as u32); pub const KP_Divide: Key = Key(ffi::GDK_KEY_KP_Divide as u32); pub const KP_0: Key = Key(ffi::GDK_KEY_KP_0 as u32); pub const KP_1: Key = Key(ffi::GDK_KEY_KP_1 as u32); pub const KP_2: Key = Key(ffi::GDK_KEY_KP_2 as u32); pub const KP_3: Key = Key(ffi::GDK_KEY_KP_3 as u32); pub const KP_4: Key = Key(ffi::GDK_KEY_KP_4 as u32); pub const KP_5: Key = Key(ffi::GDK_KEY_KP_5 as u32); pub const KP_6: Key = Key(ffi::GDK_KEY_KP_6 as u32); pub const KP_7: Key = Key(ffi::GDK_KEY_KP_7 as u32); pub const KP_8: Key = Key(ffi::GDK_KEY_KP_8 as u32); pub const KP_9: Key = Key(ffi::GDK_KEY_KP_9 as u32); pub const F1: Key = Key(ffi::GDK_KEY_F1 as u32); pub const F2: Key = Key(ffi::GDK_KEY_F2 as u32); pub const F3: Key = Key(ffi::GDK_KEY_F3 as u32); pub const F4: Key = Key(ffi::GDK_KEY_F4 as u32); pub const F5: Key = Key(ffi::GDK_KEY_F5 as u32); pub const F6: Key = Key(ffi::GDK_KEY_F6 as u32); pub const F7: Key = Key(ffi::GDK_KEY_F7 as u32); pub const F8: Key = Key(ffi::GDK_KEY_F8 as u32); pub const F9: Key = Key(ffi::GDK_KEY_F9 as u32); pub const F10: Key = Key(ffi::GDK_KEY_F10 as u32); pub const F11: Key = Key(ffi::GDK_KEY_F11 as u32); pub const L1: Key = Key(ffi::GDK_KEY_L1 as u32); pub const F12: Key = Key(ffi::GDK_KEY_F12 as u32); pub const L2: Key = Key(ffi::GDK_KEY_L2 as u32); pub const F13: Key = Key(ffi::GDK_KEY_F13 as u32); pub const L3: Key = Key(ffi::GDK_KEY_L3 as u32); pub const F14: Key = Key(ffi::GDK_KEY_F14 as u32); pub const L4: Key = Key(ffi::GDK_KEY_L4 as u32); pub const F15: Key = Key(ffi::GDK_KEY_F15 as u32); pub const L5: Key = Key(ffi::GDK_KEY_L5 as u32); pub const F16: Key = Key(ffi::GDK_KEY_F16 as u32); pub const L6: Key = Key(ffi::GDK_KEY_L6 as u32); pub const F17: Key = Key(ffi::GDK_KEY_F17 as u32); pub const L7: Key = Key(ffi::GDK_KEY_L7 as u32); pub const F18: Key = Key(ffi::GDK_KEY_F18 as u32); pub const L8: Key = Key(ffi::GDK_KEY_L8 as u32); pub const F19: Key = Key(ffi::GDK_KEY_F19 as u32); pub const L9: Key = Key(ffi::GDK_KEY_L9 as u32); pub const F20: Key = Key(ffi::GDK_KEY_F20 as u32); pub const L10: Key = Key(ffi::GDK_KEY_L10 as u32); pub const F21: Key = Key(ffi::GDK_KEY_F21 as u32); pub const R1: Key = Key(ffi::GDK_KEY_R1 as u32); pub const F22: Key = Key(ffi::GDK_KEY_F22 as u32); pub const R2: Key = Key(ffi::GDK_KEY_R2 as u32); pub const F23: Key = Key(ffi::GDK_KEY_F23 as u32); pub const R3: Key = Key(ffi::GDK_KEY_R3 as u32); pub const F24: Key = Key(ffi::GDK_KEY_F24 as u32); pub const R4: Key = Key(ffi::GDK_KEY_R4 as u32); pub const F25: Key = Key(ffi::GDK_KEY_F25 as u32); pub const R5: Key = Key(ffi::GDK_KEY_R5 as u32); pub const F26: Key = Key(ffi::GDK_KEY_F26 as u32); pub const R6: Key = Key(ffi::GDK_KEY_R6 as u32); pub const F27: Key = Key(ffi::GDK_KEY_F27 as u32); pub const R7: Key = Key(ffi::GDK_KEY_R7 as u32); pub const F28: Key = Key(ffi::GDK_KEY_F28 as u32); pub const R8: Key = Key(ffi::GDK_KEY_R8 as u32); pub const F29: Key = Key(ffi::GDK_KEY_F29 as u32); pub const R9: Key = Key(ffi::GDK_KEY_R9 as u32); pub const F30: Key = Key(ffi::GDK_KEY_F30 as u32); pub const R10: Key = Key(ffi::GDK_KEY_R10 as u32); pub const F31: Key = Key(ffi::GDK_KEY_F31 as u32); pub const R11: Key = Key(ffi::GDK_KEY_R11 as u32); pub const F32: Key = Key(ffi::GDK_KEY_F32 as u32); pub const R12: Key = Key(ffi::GDK_KEY_R12 as u32); pub const F33: Key = Key(ffi::GDK_KEY_F33 as u32); pub const R13: Key = Key(ffi::GDK_KEY_R13 as u32); pub const F34: Key = Key(ffi::GDK_KEY_F34 as u32); pub const R14: Key = Key(ffi::GDK_KEY_R14 as u32); pub const F35: Key = Key(ffi::GDK_KEY_F35 as u32); pub const R15: Key = Key(ffi::GDK_KEY_R15 as u32); pub const Shift_L: Key = Key(ffi::GDK_KEY_Shift_L as u32); pub const Shift_R: Key = Key(ffi::GDK_KEY_Shift_R as u32); pub const Control_L: Key = Key(ffi::GDK_KEY_Control_L as u32); pub const Control_R: Key = Key(ffi::GDK_KEY_Control_R as u32); pub const Caps_Lock: Key = Key(ffi::GDK_KEY_Caps_Lock as u32); pub const Shift_Lock: Key = Key(ffi::GDK_KEY_Shift_Lock as u32); pub const Meta_L: Key = Key(ffi::GDK_KEY_Meta_L as u32); pub const Meta_R: Key = Key(ffi::GDK_KEY_Meta_R as u32); pub const Alt_L: Key = Key(ffi::GDK_KEY_Alt_L as u32); pub const Alt_R: Key = Key(ffi::GDK_KEY_Alt_R as u32); pub const Super_L: Key = Key(ffi::GDK_KEY_Super_L as u32); pub const Super_R: Key = Key(ffi::GDK_KEY_Super_R as u32); pub const Hyper_L: Key = Key(ffi::GDK_KEY_Hyper_L as u32); pub const Hyper_R: Key = Key(ffi::GDK_KEY_Hyper_R as u32); pub const ISO_Lock: Key = Key(ffi::GDK_KEY_ISO_Lock as u32); pub const ISO_Level2_Latch: Key = Key(ffi::GDK_KEY_ISO_Level2_Latch as u32); pub const ISO_Level3_Shift: Key = Key(ffi::GDK_KEY_ISO_Level3_Shift as u32); pub const ISO_Level3_Latch: Key = Key(ffi::GDK_KEY_ISO_Level3_Latch as u32); pub const ISO_Level3_Lock: Key = Key(ffi::GDK_KEY_ISO_Level3_Lock as u32); pub const ISO_Level5_Shift: Key = Key(ffi::GDK_KEY_ISO_Level5_Shift as u32); pub const ISO_Level5_Latch: Key = Key(ffi::GDK_KEY_ISO_Level5_Latch as u32); pub const ISO_Level5_Lock: Key = Key(ffi::GDK_KEY_ISO_Level5_Lock as u32); pub const ISO_Group_Shift: Key = Key(ffi::GDK_KEY_ISO_Group_Shift as u32); pub const ISO_Group_Latch: Key = Key(ffi::GDK_KEY_ISO_Group_Latch as u32); pub const ISO_Group_Lock: Key = Key(ffi::GDK_KEY_ISO_Group_Lock as u32); pub const ISO_Next_Group: Key = Key(ffi::GDK_KEY_ISO_Next_Group as u32); pub const ISO_Next_Group_Lock: Key = Key(ffi::GDK_KEY_ISO_Next_Group_Lock as u32); pub const ISO_Prev_Group: Key = Key(ffi::GDK_KEY_ISO_Prev_Group as u32); pub const ISO_Prev_Group_Lock: Key = Key(ffi::GDK_KEY_ISO_Prev_Group_Lock as u32); pub const ISO_First_Group: Key = Key(ffi::GDK_KEY_ISO_First_Group as u32); pub const ISO_First_Group_Lock: Key = Key(ffi::GDK_KEY_ISO_First_Group_Lock as u32); pub const ISO_Last_Group: Key = Key(ffi::GDK_KEY_ISO_Last_Group as u32); pub const ISO_Last_Group_Lock: Key = Key(ffi::GDK_KEY_ISO_Last_Group_Lock as u32); pub const ISO_Left_Tab: Key = Key(ffi::GDK_KEY_ISO_Left_Tab as u32); pub const ISO_Move_Line_Up: Key = Key(ffi::GDK_KEY_ISO_Move_Line_Up as u32); pub const ISO_Move_Line_Down: Key = Key(ffi::GDK_KEY_ISO_Move_Line_Down as u32); pub const ISO_Partial_Line_Up: Key = Key(ffi::GDK_KEY_ISO_Partial_Line_Up as u32); pub const ISO_Partial_Line_Down: Key = Key(ffi::GDK_KEY_ISO_Partial_Line_Down as u32); pub const ISO_Partial_Space_Left: Key = Key(ffi::GDK_KEY_ISO_Partial_Space_Left as u32); pub const ISO_Partial_Space_Right: Key = Key(ffi::GDK_KEY_ISO_Partial_Space_Right as u32); pub const ISO_Set_Margin_Left: Key = Key(ffi::GDK_KEY_ISO_Set_Margin_Left as u32); pub const ISO_Set_Margin_Right: Key = Key(ffi::GDK_KEY_ISO_Set_Margin_Right as u32); pub const ISO_Release_Margin_Left: Key = Key(ffi::GDK_KEY_ISO_Release_Margin_Left as u32); pub const ISO_Release_Margin_Right: Key = Key(ffi::GDK_KEY_ISO_Release_Margin_Right as u32); pub const ISO_Release_Both_Margins: Key = Key(ffi::GDK_KEY_ISO_Release_Both_Margins as u32); pub const ISO_Fast_Cursor_Left: Key = Key(ffi::GDK_KEY_ISO_Fast_Cursor_Left as u32); pub const ISO_Fast_Cursor_Right: Key = Key(ffi::GDK_KEY_ISO_Fast_Cursor_Right as u32); pub const ISO_Fast_Cursor_Up: Key = Key(ffi::GDK_KEY_ISO_Fast_Cursor_Up as u32); pub const ISO_Fast_Cursor_Down: Key = Key(ffi::GDK_KEY_ISO_Fast_Cursor_Down as u32); pub const ISO_Continuous_Underline: Key = Key(ffi::GDK_KEY_ISO_Continuous_Underline as u32); pub const ISO_Discontinuous_Underline: Key = Key(ffi::GDK_KEY_ISO_Discontinuous_Underline as u32); pub const ISO_Emphasize: Key = Key(ffi::GDK_KEY_ISO_Emphasize as u32); pub const ISO_Center_Object: Key = Key(ffi::GDK_KEY_ISO_Center_Object as u32); pub const ISO_Enter: Key = Key(ffi::GDK_KEY_ISO_Enter as u32); pub const dead_grave: Key = Key(ffi::GDK_KEY_dead_grave as u32); pub const dead_acute: Key = Key(ffi::GDK_KEY_dead_acute as u32); pub const dead_circumflex: Key = Key(ffi::GDK_KEY_dead_circumflex as u32); pub const dead_tilde: Key = Key(ffi::GDK_KEY_dead_tilde as u32); pub const dead_perispomeni: Key = Key(ffi::GDK_KEY_dead_perispomeni as u32); pub const dead_macron: Key = Key(ffi::GDK_KEY_dead_macron as u32); pub const dead_breve: Key = Key(ffi::GDK_KEY_dead_breve as u32); pub const dead_abovedot: Key = Key(ffi::GDK_KEY_dead_abovedot as u32); pub const dead_diaeresis: Key = Key(ffi::GDK_KEY_dead_diaeresis as u32); pub const dead_abovering: Key = Key(ffi::GDK_KEY_dead_abovering as u32); pub const dead_doubleacute: Key = Key(ffi::GDK_KEY_dead_doubleacute as u32); pub const dead_caron: Key = Key(ffi::GDK_KEY_dead_caron as u32); pub const dead_cedilla: Key = Key(ffi::GDK_KEY_dead_cedilla as u32); pub const dead_ogonek: Key = Key(ffi::GDK_KEY_dead_ogonek as u32); pub const dead_iota: Key = Key(ffi::GDK_KEY_dead_iota as u32); pub const dead_voiced_sound: Key = Key(ffi::GDK_KEY_dead_voiced_sound as u32); pub const dead_semivoiced_sound: Key = Key(ffi::GDK_KEY_dead_semivoiced_sound as u32); pub const dead_belowdot: Key = Key(ffi::GDK_KEY_dead_belowdot as u32); pub const dead_hook: Key = Key(ffi::GDK_KEY_dead_hook as u32); pub const dead_horn: Key = Key(ffi::GDK_KEY_dead_horn as u32); pub const dead_stroke: Key = Key(ffi::GDK_KEY_dead_stroke as u32); pub const dead_abovecomma: Key = Key(ffi::GDK_KEY_dead_abovecomma as u32); pub const dead_psili: Key = Key(ffi::GDK_KEY_dead_psili as u32); pub const dead_abovereversedcomma: Key = Key(ffi::GDK_KEY_dead_abovereversedcomma as u32); pub const dead_dasia: Key = Key(ffi::GDK_KEY_dead_dasia as u32); pub const dead_doublegrave: Key = Key(ffi::GDK_KEY_dead_doublegrave as u32); pub const dead_belowring: Key = Key(ffi::GDK_KEY_dead_belowring as u32); pub const dead_belowmacron: Key = Key(ffi::GDK_KEY_dead_belowmacron as u32); pub const dead_belowcircumflex: Key = Key(ffi::GDK_KEY_dead_belowcircumflex as u32); pub const dead_belowtilde: Key = Key(ffi::GDK_KEY_dead_belowtilde as u32); pub const dead_belowbreve: Key = Key(ffi::GDK_KEY_dead_belowbreve as u32); pub const dead_belowdiaeresis: Key = Key(ffi::GDK_KEY_dead_belowdiaeresis as u32); pub const dead_invertedbreve: Key = Key(ffi::GDK_KEY_dead_invertedbreve as u32); pub const dead_belowcomma: Key = Key(ffi::GDK_KEY_dead_belowcomma as u32); pub const dead_currency: Key = Key(ffi::GDK_KEY_dead_currency as u32); pub const dead_a: Key = Key(ffi::GDK_KEY_dead_a as u32); pub const dead_A: Key = Key(ffi::GDK_KEY_dead_A as u32); pub const dead_e: Key = Key(ffi::GDK_KEY_dead_e as u32); pub const dead_E: Key = Key(ffi::GDK_KEY_dead_E as u32); pub const dead_i: Key = Key(ffi::GDK_KEY_dead_i as u32); pub const dead_I: Key = Key(ffi::GDK_KEY_dead_I as u32); pub const dead_o: Key = Key(ffi::GDK_KEY_dead_o as u32); pub const dead_O: Key = Key(ffi::GDK_KEY_dead_O as u32); pub const dead_u: Key = Key(ffi::GDK_KEY_dead_u as u32); pub const dead_U: Key = Key(ffi::GDK_KEY_dead_U as u32); pub const dead_small_schwa: Key = Key(ffi::GDK_KEY_dead_small_schwa as u32); pub const dead_capital_schwa: Key = Key(ffi::GDK_KEY_dead_capital_schwa as u32); pub const dead_greek: Key = Key(ffi::GDK_KEY_dead_greek as u32); pub const First_Virtual_Screen: Key = Key(ffi::GDK_KEY_First_Virtual_Screen as u32); pub const Prev_Virtual_Screen: Key = Key(ffi::GDK_KEY_Prev_Virtual_Screen as u32); pub const Next_Virtual_Screen: Key = Key(ffi::GDK_KEY_Next_Virtual_Screen as u32); pub const Last_Virtual_Screen: Key = Key(ffi::GDK_KEY_Last_Virtual_Screen as u32); pub const Terminate_Server: Key = Key(ffi::GDK_KEY_Terminate_Server as u32); pub const AccessX_Enable: Key = Key(ffi::GDK_KEY_AccessX_Enable as u32); pub const AccessX_Feedback_Enable: Key = Key(ffi::GDK_KEY_AccessX_Feedback_Enable as u32); pub const RepeatKeys_Enable: Key = Key(ffi::GDK_KEY_RepeatKeys_Enable as u32); pub const SlowKeys_Enable: Key = Key(ffi::GDK_KEY_SlowKeys_Enable as u32); pub const BounceKeys_Enable: Key = Key(ffi::GDK_KEY_BounceKeys_Enable as u32); pub const StickyKeys_Enable: Key = Key(ffi::GDK_KEY_StickyKeys_Enable as u32); pub const MouseKeys_Enable: Key = Key(ffi::GDK_KEY_MouseKeys_Enable as u32); pub const MouseKeys_Accel_Enable: Key = Key(ffi::GDK_KEY_MouseKeys_Accel_Enable as u32); pub const Overlay1_Enable: Key = Key(ffi::GDK_KEY_Overlay1_Enable as u32); pub const Overlay2_Enable: Key = Key(ffi::GDK_KEY_Overlay2_Enable as u32); pub const AudibleBell_Enable: Key = Key(ffi::GDK_KEY_AudibleBell_Enable as u32); pub const Pointer_Left: Key = Key(ffi::GDK_KEY_Pointer_Left as u32); pub const Pointer_Right: Key = Key(ffi::GDK_KEY_Pointer_Right as u32); pub const Pointer_Up: Key = Key(ffi::GDK_KEY_Pointer_Up as u32); pub const Pointer_Down: Key = Key(ffi::GDK_KEY_Pointer_Down as u32); pub const Pointer_UpLeft: Key = Key(ffi::GDK_KEY_Pointer_UpLeft as u32); pub const Pointer_UpRight: Key = Key(ffi::GDK_KEY_Pointer_UpRight as u32); pub const Pointer_DownLeft: Key = Key(ffi::GDK_KEY_Pointer_DownLeft as u32); pub const Pointer_DownRight: Key = Key(ffi::GDK_KEY_Pointer_DownRight as u32); pub const Pointer_Button_Dflt: Key = Key(ffi::GDK_KEY_Pointer_Button_Dflt as u32); pub const Pointer_Button1: Key = Key(ffi::GDK_KEY_Pointer_Button1 as u32); pub const Pointer_Button2: Key = Key(ffi::GDK_KEY_Pointer_Button2 as u32); pub const Pointer_Button3: Key = Key(ffi::GDK_KEY_Pointer_Button3 as u32); pub const Pointer_Button4: Key = Key(ffi::GDK_KEY_Pointer_Button4 as u32); pub const Pointer_Button5: Key = Key(ffi::GDK_KEY_Pointer_Button5 as u32); pub const Pointer_DblClick_Dflt: Key = Key(ffi::GDK_KEY_Pointer_DblClick_Dflt as u32); pub const Pointer_DblClick1: Key = Key(ffi::GDK_KEY_Pointer_DblClick1 as u32); pub const Pointer_DblClick2: Key = Key(ffi::GDK_KEY_Pointer_DblClick2 as u32); pub const Pointer_DblClick3: Key = Key(ffi::GDK_KEY_Pointer_DblClick3 as u32); pub const Pointer_DblClick4: Key = Key(ffi::GDK_KEY_Pointer_DblClick4 as u32); pub const Pointer_DblClick5: Key = Key(ffi::GDK_KEY_Pointer_DblClick5 as u32); pub const Pointer_Drag_Dflt: Key = Key(ffi::GDK_KEY_Pointer_Drag_Dflt as u32); pub const Pointer_Drag1: Key = Key(ffi::GDK_KEY_Pointer_Drag1 as u32); pub const Pointer_Drag2: Key = Key(ffi::GDK_KEY_Pointer_Drag2 as u32); pub const Pointer_Drag3: Key = Key(ffi::GDK_KEY_Pointer_Drag3 as u32); pub const Pointer_Drag4: Key = Key(ffi::GDK_KEY_Pointer_Drag4 as u32); pub const Pointer_Drag5: Key = Key(ffi::GDK_KEY_Pointer_Drag5 as u32); pub const Pointer_EnableKeys: Key = Key(ffi::GDK_KEY_Pointer_EnableKeys as u32); pub const Pointer_Accelerate: Key = Key(ffi::GDK_KEY_Pointer_Accelerate as u32); pub const Pointer_DfltBtnNext: Key = Key(ffi::GDK_KEY_Pointer_DfltBtnNext as u32); pub const Pointer_DfltBtnPrev: Key = Key(ffi::GDK_KEY_Pointer_DfltBtnPrev as u32); pub const ch: Key = Key(ffi::GDK_KEY_ch as u32); pub const Ch: Key = Key(ffi::GDK_KEY_Ch as u32); pub const CH: Key = Key(ffi::GDK_KEY_CH as u32); pub const c_h: Key = Key(ffi::GDK_KEY_c_h as u32); pub const C_h: Key = Key(ffi::GDK_KEY_C_h as u32); pub const C_H: Key = Key(ffi::GDK_KEY_C_H as u32); pub const _3270_Duplicate: Key = Key(ffi::GDK_KEY_3270_Duplicate as u32); pub const _3270_FieldMark: Key = Key(ffi::GDK_KEY_3270_FieldMark as u32); pub const _3270_Right2: Key = Key(ffi::GDK_KEY_3270_Right2 as u32); pub const _3270_Left2: Key = Key(ffi::GDK_KEY_3270_Left2 as u32); pub const _3270_BackTab: Key = Key(ffi::GDK_KEY_3270_BackTab as u32); pub const _3270_EraseEOF: Key = Key(ffi::GDK_KEY_3270_EraseEOF as u32); pub const _3270_EraseInput: Key = Key(ffi::GDK_KEY_3270_EraseInput as u32); pub const _3270_Reset: Key = Key(ffi::GDK_KEY_3270_Reset as u32); pub const _3270_Quit: Key = Key(ffi::GDK_KEY_3270_Quit as u32); pub const _3270_PA1: Key = Key(ffi::GDK_KEY_3270_PA1 as u32); pub const _3270_PA2: Key = Key(ffi::GDK_KEY_3270_PA2 as u32); pub const _3270_PA3: Key = Key(ffi::GDK_KEY_3270_PA3 as u32); pub const _3270_Test: Key = Key(ffi::GDK_KEY_3270_Test as u32); pub const _3270_Attn: Key = Key(ffi::GDK_KEY_3270_Attn as u32); pub const _3270_CursorBlink: Key = Key(ffi::GDK_KEY_3270_CursorBlink as u32); pub const _3270_AltCursor: Key = Key(ffi::GDK_KEY_3270_AltCursor as u32); pub const _3270_KeyClick: Key = Key(ffi::GDK_KEY_3270_KeyClick as u32); pub const _3270_Jump: Key = Key(ffi::GDK_KEY_3270_Jump as u32); pub const _3270_Ident: Key = Key(ffi::GDK_KEY_3270_Ident as u32); pub const _3270_Rule: Key = Key(ffi::GDK_KEY_3270_Rule as u32); pub const _3270_Copy: Key = Key(ffi::GDK_KEY_3270_Copy as u32); pub const _3270_Play: Key = Key(ffi::GDK_KEY_3270_Play as u32); pub const _3270_Setup: Key = Key(ffi::GDK_KEY_3270_Setup as u32); pub const _3270_Record: Key = Key(ffi::GDK_KEY_3270_Record as u32); pub const _3270_ChangeScreen: Key = Key(ffi::GDK_KEY_3270_ChangeScreen as u32); pub const _3270_DeleteWord: Key = Key(ffi::GDK_KEY_3270_DeleteWord as u32); pub const _3270_ExSelect: Key = Key(ffi::GDK_KEY_3270_ExSelect as u32); pub const _3270_CursorSelect: Key = Key(ffi::GDK_KEY_3270_CursorSelect as u32); pub const _3270_PrintScreen: Key = Key(ffi::GDK_KEY_3270_PrintScreen as u32); pub const _3270_Enter: Key = Key(ffi::GDK_KEY_3270_Enter as u32); pub const space: Key = Key(ffi::GDK_KEY_space as u32); pub const exclam: Key = Key(ffi::GDK_KEY_exclam as u32); pub const quotedbl: Key = Key(ffi::GDK_KEY_quotedbl as u32); pub const numbersign: Key = Key(ffi::GDK_KEY_numbersign as u32); pub const dollar: Key = Key(ffi::GDK_KEY_dollar as u32); pub const percent: Key = Key(ffi::GDK_KEY_percent as u32); pub const ampersand: Key = Key(ffi::GDK_KEY_ampersand as u32); pub const apostrophe: Key = Key(ffi::GDK_KEY_apostrophe as u32); pub const quoteright: Key = Key(ffi::GDK_KEY_quoteright as u32); pub const parenleft: Key = Key(ffi::GDK_KEY_parenleft as u32); pub const parenright: Key = Key(ffi::GDK_KEY_parenright as u32); pub const asterisk: Key = Key(ffi::GDK_KEY_asterisk as u32); pub const plus: Key = Key(ffi::GDK_KEY_plus as u32); pub const comma: Key = Key(ffi::GDK_KEY_comma as u32); pub const minus: Key = Key(ffi::GDK_KEY_minus as u32); pub const period: Key = Key(ffi::GDK_KEY_period as u32); pub const slash: Key = Key(ffi::GDK_KEY_slash as u32); pub const _0: Key = Key(ffi::GDK_KEY_0 as u32); // equivalent to keypad '0' pub const _1: Key = Key(ffi::GDK_KEY_1 as u32); // equivalent to keypad '1' pub const _2: Key = Key(ffi::GDK_KEY_2 as u32); // equivalent to keypad '2' pub const _3: Key = Key(ffi::GDK_KEY_3 as u32); // equivalent to keypad '3' pub const _4: Key = Key(ffi::GDK_KEY_4 as u32); // equivalent to keypad '4' pub const _5: Key = Key(ffi::GDK_KEY_5 as u32); // equivalent to keypad '5' pub const _6: Key = Key(ffi::GDK_KEY_6 as u32); // equivalent to keypad '6' pub const _7: Key = Key(ffi::GDK_KEY_7 as u32); // equivalent to keypad '7' pub const _8: Key = Key(ffi::GDK_KEY_8 as u32); // equivalent to keypad '8' pub const _9: Key = Key(ffi::GDK_KEY_9 as u32); // equivalent to keypad '9' pub const colon: Key = Key(ffi::GDK_KEY_colon as u32); pub const semicolon: Key = Key(ffi::GDK_KEY_semicolon as u32); pub const less: Key = Key(ffi::GDK_KEY_less as u32); pub const equal: Key = Key(ffi::GDK_KEY_equal as u32); pub const greater: Key = Key(ffi::GDK_KEY_greater as u32); pub const question: Key = Key(ffi::GDK_KEY_question as u32); pub const at: Key = Key(ffi::GDK_KEY_at as u32); pub const A: Key = Key(ffi::GDK_KEY_A as u32); pub const B: Key = Key(ffi::GDK_KEY_B as u32); pub const C: Key = Key(ffi::GDK_KEY_C as u32); pub const D: Key = Key(ffi::GDK_KEY_D as u32); pub const E: Key = Key(ffi::GDK_KEY_E as u32); pub const F: Key = Key(ffi::GDK_KEY_F as u32); pub const G: Key = Key(ffi::GDK_KEY_G as u32); pub const H: Key = Key(ffi::GDK_KEY_H as u32); pub const I: Key = Key(ffi::GDK_KEY_I as u32); pub const J: Key = Key(ffi::GDK_KEY_J as u32); pub const K: Key = Key(ffi::GDK_KEY_K as u32); pub const L: Key = Key(ffi::GDK_KEY_L as u32); pub const M: Key = Key(ffi::GDK_KEY_M as u32); pub const N: Key = Key(ffi::GDK_KEY_N as u32); pub const O: Key = Key(ffi::GDK_KEY_O as u32); pub const P: Key = Key(ffi::GDK_KEY_P as u32); pub const Q: Key = Key(ffi::GDK_KEY_Q as u32); pub const R: Key = Key(ffi::GDK_KEY_R as u32); pub const S: Key = Key(ffi::GDK_KEY_S as u32); pub const T: Key = Key(ffi::GDK_KEY_T as u32); pub const U: Key = Key(ffi::GDK_KEY_U as u32); pub const V: Key = Key(ffi::GDK_KEY_V as u32); pub const W: Key = Key(ffi::GDK_KEY_W as u32); pub const X: Key = Key(ffi::GDK_KEY_X as u32); pub const Y: Key = Key(ffi::GDK_KEY_Y as u32); pub const Z: Key = Key(ffi::GDK_KEY_Z as u32); pub const bracketleft: Key = Key(ffi::GDK_KEY_bracketleft as u32); pub const backslash: Key = Key(ffi::GDK_KEY_backslash as u32); pub const bracketright: Key = Key(ffi::GDK_KEY_bracketright as u32); pub const asciicircum: Key = Key(ffi::GDK_KEY_asciicircum as u32); pub const underscore: Key = Key(ffi::GDK_KEY_underscore as u32); pub const grave: Key = Key(ffi::GDK_KEY_grave as u32); pub const quoteleft: Key = Key(ffi::GDK_KEY_quoteleft as u32); pub const a: Key = Key(ffi::GDK_KEY_a as u32); pub const b: Key = Key(ffi::GDK_KEY_b as u32); pub const c: Key = Key(ffi::GDK_KEY_c as u32); pub const d: Key = Key(ffi::GDK_KEY_d as u32); pub const e: Key = Key(ffi::GDK_KEY_e as u32); pub const f: Key = Key(ffi::GDK_KEY_f as u32); pub const g: Key = Key(ffi::GDK_KEY_g as u32); pub const h: Key = Key(ffi::GDK_KEY_h as u32); pub const i: Key = Key(ffi::GDK_KEY_i as u32); pub const j: Key = Key(ffi::GDK_KEY_j as u32); pub const k: Key = Key(ffi::GDK_KEY_k as u32); pub const l: Key = Key(ffi::GDK_KEY_l as u32); pub const m: Key = Key(ffi::GDK_KEY_m as u32); pub const n: Key = Key(ffi::GDK_KEY_n as u32); pub const o: Key = Key(ffi::GDK_KEY_o as u32); pub const p: Key = Key(ffi::GDK_KEY_p as u32); pub const q: Key = Key(ffi::GDK_KEY_q as u32); pub const r: Key = Key(ffi::GDK_KEY_r as u32); pub const s: Key = Key(ffi::GDK_KEY_s as u32); pub const t: Key = Key(ffi::GDK_KEY_t as u32); pub const u: Key = Key(ffi::GDK_KEY_u as u32); pub const v: Key = Key(ffi::GDK_KEY_v as u32); pub const w: Key = Key(ffi::GDK_KEY_w as u32); pub const x: Key = Key(ffi::GDK_KEY_x as u32); pub const y: Key = Key(ffi::GDK_KEY_y as u32); pub const z: Key = Key(ffi::GDK_KEY_z as u32); pub const braceleft: Key = Key(ffi::GDK_KEY_braceleft as u32); pub const bar: Key = Key(ffi::GDK_KEY_bar as u32); pub const braceright: Key = Key(ffi::GDK_KEY_braceright as u32); pub const asciitilde: Key = Key(ffi::GDK_KEY_asciitilde as u32); pub const nobreakspace: Key = Key(ffi::GDK_KEY_nobreakspace as u32); pub const exclamdown: Key = Key(ffi::GDK_KEY_exclamdown as u32); pub const cent: Key = Key(ffi::GDK_KEY_cent as u32); pub const sterling: Key = Key(ffi::GDK_KEY_sterling as u32); pub const currency: Key = Key(ffi::GDK_KEY_currency as u32); pub const yen: Key = Key(ffi::GDK_KEY_yen as u32); pub const brokenbar: Key = Key(ffi::GDK_KEY_brokenbar as u32); pub const section: Key = Key(ffi::GDK_KEY_section as u32); pub const diaeresis: Key = Key(ffi::GDK_KEY_diaeresis as u32); pub const copyright: Key = Key(ffi::GDK_KEY_copyright as u32); pub const ordfeminine: Key = Key(ffi::GDK_KEY_ordfeminine as u32); pub const guillemotleft: Key = Key(ffi::GDK_KEY_guillemotleft as u32); pub const notsign: Key = Key(ffi::GDK_KEY_notsign as u32); pub const hyphen: Key = Key(ffi::GDK_KEY_hyphen as u32); pub const registered: Key = Key(ffi::GDK_KEY_registered as u32); pub const macron: Key = Key(ffi::GDK_KEY_macron as u32); pub const degree: Key = Key(ffi::GDK_KEY_degree as u32); pub const plusminus: Key = Key(ffi::GDK_KEY_plusminus as u32); pub const twosuperior: Key = Key(ffi::GDK_KEY_twosuperior as u32); pub const threesuperior: Key = Key(ffi::GDK_KEY_threesuperior as u32); pub const acute: Key = Key(ffi::GDK_KEY_acute as u32); pub const mu: Key = Key(ffi::GDK_KEY_mu as u32); pub const paragraph: Key = Key(ffi::GDK_KEY_paragraph as u32); pub const periodcentered: Key = Key(ffi::GDK_KEY_periodcentered as u32); pub const cedilla: Key = Key(ffi::GDK_KEY_cedilla as u32); pub const onesuperior: Key = Key(ffi::GDK_KEY_onesuperior as u32); pub const masculine: Key = Key(ffi::GDK_KEY_masculine as u32); pub const guillemotright: Key = Key(ffi::GDK_KEY_guillemotright as u32); pub const onequarter: Key = Key(ffi::GDK_KEY_onequarter as u32); pub const onehalf: Key = Key(ffi::GDK_KEY_onehalf as u32); pub const threequarters: Key = Key(ffi::GDK_KEY_threequarters as u32); pub const questiondown: Key = Key(ffi::GDK_KEY_questiondown as u32); pub const Agrave: Key = Key(ffi::GDK_KEY_Agrave as u32); pub const Aacute: Key = Key(ffi::GDK_KEY_Aacute as u32); pub const Acircumflex: Key = Key(ffi::GDK_KEY_Acircumflex as u32); pub const Atilde: Key = Key(ffi::GDK_KEY_Atilde as u32); pub const Adiaeresis: Key = Key(ffi::GDK_KEY_Adiaeresis as u32); pub const Aring: Key = Key(ffi::GDK_KEY_Aring as u32); pub const AE: Key = Key(ffi::GDK_KEY_AE as u32); pub const Ccedilla: Key = Key(ffi::GDK_KEY_Ccedilla as u32); pub const Egrave: Key = Key(ffi::GDK_KEY_Egrave as u32); pub const Eacute: Key = Key(ffi::GDK_KEY_Eacute as u32); pub const Ecircumflex: Key = Key(ffi::GDK_KEY_Ecircumflex as u32); pub const Ediaeresis: Key = Key(ffi::GDK_KEY_Ediaeresis as u32); pub const Igrave: Key = Key(ffi::GDK_KEY_Igrave as u32); pub const Iacute: Key = Key(ffi::GDK_KEY_Iacute as u32); pub const Icircumflex: Key = Key(ffi::GDK_KEY_Icircumflex as u32); pub const Idiaeresis: Key = Key(ffi::GDK_KEY_Idiaeresis as u32); pub const ETH: Key = Key(ffi::GDK_KEY_ETH as u32); pub const Eth: Key = Key(ffi::GDK_KEY_Eth as u32); pub const Ntilde: Key = Key(ffi::GDK_KEY_Ntilde as u32); pub const Ograve: Key = Key(ffi::GDK_KEY_Ograve as u32); pub const Oacute: Key = Key(ffi::GDK_KEY_Oacute as u32); pub const Ocircumflex: Key = Key(ffi::GDK_KEY_Ocircumflex as u32); pub const Otilde: Key = Key(ffi::GDK_KEY_Otilde as u32); pub const Odiaeresis: Key = Key(ffi::GDK_KEY_Odiaeresis as u32); pub const multiply: Key = Key(ffi::GDK_KEY_multiply as u32); pub const Oslash: Key = Key(ffi::GDK_KEY_Oslash as u32); pub const Ooblique: Key = Key(ffi::GDK_KEY_Ooblique as u32); pub const Ugrave: Key = Key(ffi::GDK_KEY_Ugrave as u32); pub const Uacute: Key = Key(ffi::GDK_KEY_Uacute as u32); pub const Ucircumflex: Key = Key(ffi::GDK_KEY_Ucircumflex as u32); pub const Udiaeresis: Key = Key(ffi::GDK_KEY_Udiaeresis as u32); pub const Yacute: Key = Key(ffi::GDK_KEY_Yacute as u32); pub const THORN: Key = Key(ffi::GDK_KEY_THORN as u32); pub const Thorn: Key = Key(ffi::GDK_KEY_Thorn as u32); pub const ssharp: Key = Key(ffi::GDK_KEY_ssharp as u32); pub const agrave: Key = Key(ffi::GDK_KEY_agrave as u32); pub const aacute: Key = Key(ffi::GDK_KEY_aacute as u32); pub const acircumflex: Key = Key(ffi::GDK_KEY_acircumflex as u32); pub const atilde: Key = Key(ffi::GDK_KEY_atilde as u32); pub const adiaeresis: Key = Key(ffi::GDK_KEY_adiaeresis as u32); pub const aring: Key = Key(ffi::GDK_KEY_aring as u32); pub const ae: Key = Key(ffi::GDK_KEY_ae as u32); pub const ccedilla: Key = Key(ffi::GDK_KEY_ccedilla as u32); pub const egrave: Key = Key(ffi::GDK_KEY_egrave as u32); pub const eacute: Key = Key(ffi::GDK_KEY_eacute as u32); pub const ecircumflex: Key = Key(ffi::GDK_KEY_ecircumflex as u32); pub const ediaeresis: Key = Key(ffi::GDK_KEY_ediaeresis as u32); pub const igrave: Key = Key(ffi::GDK_KEY_igrave as u32); pub const iacute: Key = Key(ffi::GDK_KEY_iacute as u32); pub const icircumflex: Key = Key(ffi::GDK_KEY_icircumflex as u32); pub const idiaeresis: Key = Key(ffi::GDK_KEY_idiaeresis as u32); pub const eth: Key = Key(ffi::GDK_KEY_eth as u32); pub const ntilde: Key = Key(ffi::GDK_KEY_ntilde as u32); pub const ograve: Key = Key(ffi::GDK_KEY_ograve as u32); pub const oacute: Key = Key(ffi::GDK_KEY_oacute as u32); pub const ocircumflex: Key = Key(ffi::GDK_KEY_ocircumflex as u32); pub const otilde: Key = Key(ffi::GDK_KEY_otilde as u32); pub const odiaeresis: Key = Key(ffi::GDK_KEY_odiaeresis as u32); pub const division: Key = Key(ffi::GDK_KEY_division as u32); pub const oslash: Key = Key(ffi::GDK_KEY_oslash as u32); pub const ooblique: Key = Key(ffi::GDK_KEY_ooblique as u32); pub const ugrave: Key = Key(ffi::GDK_KEY_ugrave as u32); pub const uacute: Key = Key(ffi::GDK_KEY_uacute as u32); pub const ucircumflex: Key = Key(ffi::GDK_KEY_ucircumflex as u32); pub const udiaeresis: Key = Key(ffi::GDK_KEY_udiaeresis as u32); pub const yacute: Key = Key(ffi::GDK_KEY_yacute as u32); pub const thorn: Key = Key(ffi::GDK_KEY_thorn as u32); pub const ydiaeresis: Key = Key(ffi::GDK_KEY_ydiaeresis as u32); pub const Aogonek: Key = Key(ffi::GDK_KEY_Aogonek as u32); pub const breve: Key = Key(ffi::GDK_KEY_breve as u32); pub const Lstroke: Key = Key(ffi::GDK_KEY_Lstroke as u32); pub const Lcaron: Key = Key(ffi::GDK_KEY_Lcaron as u32); pub const Sacute: Key = Key(ffi::GDK_KEY_Sacute as u32); pub const Scaron: Key = Key(ffi::GDK_KEY_Scaron as u32); pub const Scedilla: Key = Key(ffi::GDK_KEY_Scedilla as u32); pub const Tcaron: Key = Key(ffi::GDK_KEY_Tcaron as u32); pub const Zacute: Key = Key(ffi::GDK_KEY_Zacute as u32); pub const Zcaron: Key = Key(ffi::GDK_KEY_Zcaron as u32); pub const Zabovedot: Key = Key(ffi::GDK_KEY_Zabovedot as u32); pub const aogonek: Key = Key(ffi::GDK_KEY_aogonek as u32); pub const ogonek: Key = Key(ffi::GDK_KEY_ogonek as u32); pub const lstroke: Key = Key(ffi::GDK_KEY_lstroke as u32); pub const lcaron: Key = Key(ffi::GDK_KEY_lcaron as u32); pub const sacute: Key = Key(ffi::GDK_KEY_sacute as u32); pub const caron: Key = Key(ffi::GDK_KEY_caron as u32); pub const scaron: Key = Key(ffi::GDK_KEY_scaron as u32); pub const scedilla: Key = Key(ffi::GDK_KEY_scedilla as u32); pub const tcaron: Key = Key(ffi::GDK_KEY_tcaron as u32); pub const zacute: Key = Key(ffi::GDK_KEY_zacute as u32); pub const doubleacute: Key = Key(ffi::GDK_KEY_doubleacute as u32); pub const zcaron: Key = Key(ffi::GDK_KEY_zcaron as u32); pub const zabovedot: Key = Key(ffi::GDK_KEY_zabovedot as u32); pub const Racute: Key = Key(ffi::GDK_KEY_Racute as u32); pub const Abreve: Key = Key(ffi::GDK_KEY_Abreve as u32); pub const Lacute: Key = Key(ffi::GDK_KEY_Lacute as u32); pub const Cacute: Key = Key(ffi::GDK_KEY_Cacute as u32); pub const Ccaron: Key = Key(ffi::GDK_KEY_Ccaron as u32); pub const Eogonek: Key = Key(ffi::GDK_KEY_Eogonek as u32); pub const Ecaron: Key = Key(ffi::GDK_KEY_Ecaron as u32); pub const Dcaron: Key = Key(ffi::GDK_KEY_Dcaron as u32); pub const Dstroke: Key = Key(ffi::GDK_KEY_Dstroke as u32); pub const Nacute: Key = Key(ffi::GDK_KEY_Nacute as u32); pub const Ncaron: Key = Key(ffi::GDK_KEY_Ncaron as u32); pub const Odoubleacute: Key = Key(ffi::GDK_KEY_Odoubleacute as u32); pub const Rcaron: Key = Key(ffi::GDK_KEY_Rcaron as u32); pub const Uring: Key = Key(ffi::GDK_KEY_Uring as u32); pub const Udoubleacute: Key = Key(ffi::GDK_KEY_Udoubleacute as u32); pub const Tcedilla: Key = Key(ffi::GDK_KEY_Tcedilla as u32); pub const racute: Key = Key(ffi::GDK_KEY_racute as u32); pub const abreve: Key = Key(ffi::GDK_KEY_abreve as u32); pub const lacute: Key = Key(ffi::GDK_KEY_lacute as u32); pub const cacute: Key = Key(ffi::GDK_KEY_cacute as u32); pub const ccaron: Key = Key(ffi::GDK_KEY_ccaron as u32); pub const eogonek: Key = Key(ffi::GDK_KEY_eogonek as u32); pub const ecaron: Key = Key(ffi::GDK_KEY_ecaron as u32); pub const dcaron: Key = Key(ffi::GDK_KEY_dcaron as u32); pub const dstroke: Key = Key(ffi::GDK_KEY_dstroke as u32); pub const nacute: Key = Key(ffi::GDK_KEY_nacute as u32); pub const ncaron: Key = Key(ffi::GDK_KEY_ncaron as u32); pub const odoubleacute: Key = Key(ffi::GDK_KEY_odoubleacute as u32); pub const rcaron: Key = Key(ffi::GDK_KEY_rcaron as u32); pub const uring: Key = Key(ffi::GDK_KEY_uring as u32); pub const udoubleacute: Key = Key(ffi::GDK_KEY_udoubleacute as u32); pub const tcedilla: Key = Key(ffi::GDK_KEY_tcedilla as u32); pub const abovedot: Key = Key(ffi::GDK_KEY_abovedot as u32); pub const Hstroke: Key = Key(ffi::GDK_KEY_Hstroke as u32); pub const Hcircumflex: Key = Key(ffi::GDK_KEY_Hcircumflex as u32); pub const Iabovedot: Key = Key(ffi::GDK_KEY_Iabovedot as u32); pub const Gbreve: Key = Key(ffi::GDK_KEY_Gbreve as u32); pub const Jcircumflex: Key = Key(ffi::GDK_KEY_Jcircumflex as u32); pub const hstroke: Key = Key(ffi::GDK_KEY_hstroke as u32); pub const hcircumflex: Key = Key(ffi::GDK_KEY_hcircumflex as u32); pub const idotless: Key = Key(ffi::GDK_KEY_idotless as u32); pub const gbreve: Key = Key(ffi::GDK_KEY_gbreve as u32); pub const jcircumflex: Key = Key(ffi::GDK_KEY_jcircumflex as u32); pub const Cabovedot: Key = Key(ffi::GDK_KEY_Cabovedot as u32); pub const Ccircumflex: Key = Key(ffi::GDK_KEY_Ccircumflex as u32); pub const Gabovedot: Key = Key(ffi::GDK_KEY_Gabovedot as u32); pub const Gcircumflex: Key = Key(ffi::GDK_KEY_Gcircumflex as u32); pub const Ubreve: Key = Key(ffi::GDK_KEY_Ubreve as u32); pub const Scircumflex: Key = Key(ffi::GDK_KEY_Scircumflex as u32); pub const cabovedot: Key = Key(ffi::GDK_KEY_cabovedot as u32); pub const ccircumflex: Key = Key(ffi::GDK_KEY_ccircumflex as u32); pub const gabovedot: Key = Key(ffi::GDK_KEY_gabovedot as u32); pub const gcircumflex: Key = Key(ffi::GDK_KEY_gcircumflex as u32); pub const ubreve: Key = Key(ffi::GDK_KEY_ubreve as u32); pub const scircumflex: Key = Key(ffi::GDK_KEY_scircumflex as u32); pub const kra: Key = Key(ffi::GDK_KEY_kra as u32); pub const kappa: Key = Key(ffi::GDK_KEY_kappa as u32); pub const Rcedilla: Key = Key(ffi::GDK_KEY_Rcedilla as u32); pub const Itilde: Key = Key(ffi::GDK_KEY_Itilde as u32); pub const Lcedilla: Key = Key(ffi::GDK_KEY_Lcedilla as u32); pub const Emacron: Key = Key(ffi::GDK_KEY_Emacron as u32); pub const Gcedilla: Key = Key(ffi::GDK_KEY_Gcedilla as u32); pub const Tslash: Key = Key(ffi::GDK_KEY_Tslash as u32); pub const rcedilla: Key = Key(ffi::GDK_KEY_rcedilla as u32); pub const itilde: Key = Key(ffi::GDK_KEY_itilde as u32); pub const lcedilla: Key = Key(ffi::GDK_KEY_lcedilla as u32); pub const emacron: Key = Key(ffi::GDK_KEY_emacron as u32); pub const gcedilla: Key = Key(ffi::GDK_KEY_gcedilla as u32); pub const tslash: Key = Key(ffi::GDK_KEY_tslash as u32); pub const ENG: Key = Key(ffi::GDK_KEY_ENG as u32); pub const eng: Key = Key(ffi::GDK_KEY_eng as u32); pub const Amacron: Key = Key(ffi::GDK_KEY_Amacron as u32); pub const Iogonek: Key = Key(ffi::GDK_KEY_Iogonek as u32); pub const Eabovedot: Key = Key(ffi::GDK_KEY_Eabovedot as u32); pub const Imacron: Key = Key(ffi::GDK_KEY_Imacron as u32); pub const Ncedilla: Key = Key(ffi::GDK_KEY_Ncedilla as u32); pub const Omacron: Key = Key(ffi::GDK_KEY_Omacron as u32); pub const Kcedilla: Key = Key(ffi::GDK_KEY_Kcedilla as u32); pub const Uogonek: Key = Key(ffi::GDK_KEY_Uogonek as u32); pub const Utilde: Key = Key(ffi::GDK_KEY_Utilde as u32); pub const Umacron: Key = Key(ffi::GDK_KEY_Umacron as u32); pub const amacron: Key = Key(ffi::GDK_KEY_amacron as u32); pub const iogonek: Key = Key(ffi::GDK_KEY_iogonek as u32); pub const eabovedot: Key = Key(ffi::GDK_KEY_eabovedot as u32); pub const imacron: Key = Key(ffi::GDK_KEY_imacron as u32); pub const ncedilla: Key = Key(ffi::GDK_KEY_ncedilla as u32); pub const omacron: Key = Key(ffi::GDK_KEY_omacron as u32); pub const kcedilla: Key = Key(ffi::GDK_KEY_kcedilla as u32); pub const uogonek: Key = Key(ffi::GDK_KEY_uogonek as u32); pub const utilde: Key = Key(ffi::GDK_KEY_utilde as u32); pub const umacron: Key = Key(ffi::GDK_KEY_umacron as u32); pub const Wcircumflex: Key = Key(ffi::GDK_KEY_Wcircumflex as u32); pub const wcircumflex: Key = Key(ffi::GDK_KEY_wcircumflex as u32); pub const Ycircumflex: Key = Key(ffi::GDK_KEY_Ycircumflex as u32); pub const ycircumflex: Key = Key(ffi::GDK_KEY_ycircumflex as u32); pub const Babovedot: Key = Key(ffi::GDK_KEY_Babovedot as u32); pub const babovedot: Key = Key(ffi::GDK_KEY_babovedot as u32); pub const Dabovedot: Key = Key(ffi::GDK_KEY_Dabovedot as u32); pub const dabovedot: Key = Key(ffi::GDK_KEY_dabovedot as u32); pub const Fabovedot: Key = Key(ffi::GDK_KEY_Fabovedot as u32); pub const fabovedot: Key = Key(ffi::GDK_KEY_fabovedot as u32); pub const Mabovedot: Key = Key(ffi::GDK_KEY_Mabovedot as u32); pub const mabovedot: Key = Key(ffi::GDK_KEY_mabovedot as u32); pub const Pabovedot: Key = Key(ffi::GDK_KEY_Pabovedot as u32); pub const pabovedot: Key = Key(ffi::GDK_KEY_pabovedot as u32); pub const Sabovedot: Key = Key(ffi::GDK_KEY_Sabovedot as u32); pub const sabovedot: Key = Key(ffi::GDK_KEY_sabovedot as u32); pub const Tabovedot: Key = Key(ffi::GDK_KEY_Tabovedot as u32); pub const tabovedot: Key = Key(ffi::GDK_KEY_tabovedot as u32); pub const Wgrave: Key = Key(ffi::GDK_KEY_Wgrave as u32); pub const wgrave: Key = Key(ffi::GDK_KEY_wgrave as u32); pub const Wacute: Key = Key(ffi::GDK_KEY_Wacute as u32); pub const wacute: Key = Key(ffi::GDK_KEY_wacute as u32); pub const Wdiaeresis: Key = Key(ffi::GDK_KEY_Wdiaeresis as u32); pub const wdiaeresis: Key = Key(ffi::GDK_KEY_wdiaeresis as u32); pub const Ygrave: Key = Key(ffi::GDK_KEY_Ygrave as u32); pub const ygrave: Key = Key(ffi::GDK_KEY_ygrave as u32); pub const OE: Key = Key(ffi::GDK_KEY_OE as u32); pub const oe: Key = Key(ffi::GDK_KEY_oe as u32); pub const Ydiaeresis: Key = Key(ffi::GDK_KEY_Ydiaeresis as u32); pub const overline: Key = Key(ffi::GDK_KEY_overline as u32); pub const kana_fullstop: Key = Key(ffi::GDK_KEY_kana_fullstop as u32); pub const kana_openingbracket: Key = Key(ffi::GDK_KEY_kana_openingbracket as u32); pub const kana_closingbracket: Key = Key(ffi::GDK_KEY_kana_closingbracket as u32); pub const kana_comma: Key = Key(ffi::GDK_KEY_kana_comma as u32); pub const kana_conjunctive: Key = Key(ffi::GDK_KEY_kana_conjunctive as u32); pub const kana_middledot: Key = Key(ffi::GDK_KEY_kana_middledot as u32); pub const kana_WO: Key = Key(ffi::GDK_KEY_kana_WO as u32); pub const kana_a: Key = Key(ffi::GDK_KEY_kana_a as u32); pub const kana_i: Key = Key(ffi::GDK_KEY_kana_i as u32); pub const kana_u: Key = Key(ffi::GDK_KEY_kana_u as u32); pub const kana_e: Key = Key(ffi::GDK_KEY_kana_e as u32); pub const kana_o: Key = Key(ffi::GDK_KEY_kana_o as u32); pub const kana_ya: Key = Key(ffi::GDK_KEY_kana_ya as u32); pub const kana_yu: Key = Key(ffi::GDK_KEY_kana_yu as u32); pub const kana_yo: Key = Key(ffi::GDK_KEY_kana_yo as u32); pub const kana_tsu: Key = Key(ffi::GDK_KEY_kana_tsu as u32); pub const kana_tu: Key = Key(ffi::GDK_KEY_kana_tu as u32); pub const prolongedsound: Key = Key(ffi::GDK_KEY_prolongedsound as u32); pub const kana_A: Key = Key(ffi::GDK_KEY_kana_A as u32); pub const kana_I: Key = Key(ffi::GDK_KEY_kana_I as u32); pub const kana_U: Key = Key(ffi::GDK_KEY_kana_U as u32); pub const kana_E: Key = Key(ffi::GDK_KEY_kana_E as u32); pub const kana_O: Key = Key(ffi::GDK_KEY_kana_O as u32); pub const kana_KA: Key = Key(ffi::GDK_KEY_kana_KA as u32); pub const kana_KI: Key = Key(ffi::GDK_KEY_kana_KI as u32); pub const kana_KU: Key = Key(ffi::GDK_KEY_kana_KU as u32); pub const kana_KE: Key = Key(ffi::GDK_KEY_kana_KE as u32); pub const kana_KO: Key = Key(ffi::GDK_KEY_kana_KO as u32); pub const kana_SA: Key = Key(ffi::GDK_KEY_kana_SA as u32); pub const kana_SHI: Key = Key(ffi::GDK_KEY_kana_SHI as u32); pub const kana_SU: Key = Key(ffi::GDK_KEY_kana_SU as u32); pub const kana_SE: Key = Key(ffi::GDK_KEY_kana_SE as u32); pub const kana_SO: Key = Key(ffi::GDK_KEY_kana_SO as u32); pub const kana_TA: Key = Key(ffi::GDK_KEY_kana_TA as u32); pub const kana_CHI: Key = Key(ffi::GDK_KEY_kana_CHI as u32); pub const kana_TI: Key = Key(ffi::GDK_KEY_kana_TI as u32); pub const kana_TSU: Key = Key(ffi::GDK_KEY_kana_TSU as u32); pub const kana_TU: Key = Key(ffi::GDK_KEY_kana_TU as u32); pub const kana_TE: Key = Key(ffi::GDK_KEY_kana_TE as u32); pub const kana_TO: Key = Key(ffi::GDK_KEY_kana_TO as u32); pub const kana_NA: Key = Key(ffi::GDK_KEY_kana_NA as u32); pub const kana_NI: Key = Key(ffi::GDK_KEY_kana_NI as u32); pub const kana_NU: Key = Key(ffi::GDK_KEY_kana_NU as u32); pub const kana_NE: Key = Key(ffi::GDK_KEY_kana_NE as u32); pub const kana_NO: Key = Key(ffi::GDK_KEY_kana_NO as u32); pub const kana_HA: Key = Key(ffi::GDK_KEY_kana_HA as u32); pub const kana_HI: Key = Key(ffi::GDK_KEY_kana_HI as u32); pub const kana_FU: Key = Key(ffi::GDK_KEY_kana_FU as u32); pub const kana_HU: Key = Key(ffi::GDK_KEY_kana_HU as u32); pub const kana_HE: Key = Key(ffi::GDK_KEY_kana_HE as u32); pub const kana_HO: Key = Key(ffi::GDK_KEY_kana_HO as u32); pub const kana_MA: Key = Key(ffi::GDK_KEY_kana_MA as u32); pub const kana_MI: Key = Key(ffi::GDK_KEY_kana_MI as u32); pub const kana_MU: Key = Key(ffi::GDK_KEY_kana_MU as u32); pub const kana_ME: Key = Key(ffi::GDK_KEY_kana_ME as u32); pub const kana_MO: Key = Key(ffi::GDK_KEY_kana_MO as u32); pub const kana_YA: Key = Key(ffi::GDK_KEY_kana_YA as u32); pub const kana_YU: Key = Key(ffi::GDK_KEY_kana_YU as u32); pub const kana_YO: Key = Key(ffi::GDK_KEY_kana_YO as u32); pub const kana_RA: Key = Key(ffi::GDK_KEY_kana_RA as u32); pub const kana_RI: Key = Key(ffi::GDK_KEY_kana_RI as u32); pub const kana_RU: Key = Key(ffi::GDK_KEY_kana_RU as u32); pub const kana_RE: Key = Key(ffi::GDK_KEY_kana_RE as u32); pub const kana_RO: Key = Key(ffi::GDK_KEY_kana_RO as u32); pub const kana_WA: Key = Key(ffi::GDK_KEY_kana_WA as u32); pub const kana_N: Key = Key(ffi::GDK_KEY_kana_N as u32); pub const voicedsound: Key = Key(ffi::GDK_KEY_voicedsound as u32); pub const semivoicedsound: Key = Key(ffi::GDK_KEY_semivoicedsound as u32); pub const kana_switch: Key = Key(ffi::GDK_KEY_kana_switch as u32); pub const Farsi_0: Key = Key(ffi::GDK_KEY_Farsi_0 as u32); pub const Farsi_1: Key = Key(ffi::GDK_KEY_Farsi_1 as u32); pub const Farsi_2: Key = Key(ffi::GDK_KEY_Farsi_2 as u32); pub const Farsi_3: Key = Key(ffi::GDK_KEY_Farsi_3 as u32); pub const Farsi_4: Key = Key(ffi::GDK_KEY_Farsi_4 as u32); pub const Farsi_5: Key = Key(ffi::GDK_KEY_Farsi_5 as u32); pub const Farsi_6: Key = Key(ffi::GDK_KEY_Farsi_6 as u32); pub const Farsi_7: Key = Key(ffi::GDK_KEY_Farsi_7 as u32); pub const Farsi_8: Key = Key(ffi::GDK_KEY_Farsi_8 as u32); pub const Farsi_9: Key = Key(ffi::GDK_KEY_Farsi_9 as u32); pub const Arabic_percent: Key = Key(ffi::GDK_KEY_Arabic_percent as u32); pub const Arabic_superscript_alef: Key = Key(ffi::GDK_KEY_Arabic_superscript_alef as u32); pub const Arabic_tteh: Key = Key(ffi::GDK_KEY_Arabic_tteh as u32); pub const Arabic_peh: Key = Key(ffi::GDK_KEY_Arabic_peh as u32); pub const Arabic_tcheh: Key = Key(ffi::GDK_KEY_Arabic_tcheh as u32); pub const Arabic_ddal: Key = Key(ffi::GDK_KEY_Arabic_ddal as u32); pub const Arabic_rreh: Key = Key(ffi::GDK_KEY_Arabic_rreh as u32); pub const Arabic_comma: Key = Key(ffi::GDK_KEY_Arabic_comma as u32); pub const Arabic_fullstop: Key = Key(ffi::GDK_KEY_Arabic_fullstop as u32); pub const Arabic_0: Key = Key(ffi::GDK_KEY_Arabic_0 as u32); pub const Arabic_1: Key = Key(ffi::GDK_KEY_Arabic_1 as u32); pub const Arabic_2: Key = Key(ffi::GDK_KEY_Arabic_2 as u32); pub const Arabic_3: Key = Key(ffi::GDK_KEY_Arabic_3 as u32); pub const Arabic_4: Key = Key(ffi::GDK_KEY_Arabic_4 as u32); pub const Arabic_5: Key = Key(ffi::GDK_KEY_Arabic_5 as u32); pub const Arabic_6: Key = Key(ffi::GDK_KEY_Arabic_6 as u32); pub const Arabic_7: Key = Key(ffi::GDK_KEY_Arabic_7 as u32); pub const Arabic_8: Key = Key(ffi::GDK_KEY_Arabic_8 as u32); pub const Arabic_9: Key = Key(ffi::GDK_KEY_Arabic_9 as u32); pub const Arabic_semicolon: Key = Key(ffi::GDK_KEY_Arabic_semicolon as u32); pub const Arabic_question_mark: Key = Key(ffi::GDK_KEY_Arabic_question_mark as u32); pub const Arabic_hamza: Key = Key(ffi::GDK_KEY_Arabic_hamza as u32); pub const Arabic_maddaonalef: Key = Key(ffi::GDK_KEY_Arabic_maddaonalef as u32); pub const Arabic_hamzaonalef: Key = Key(ffi::GDK_KEY_Arabic_hamzaonalef as u32); pub const Arabic_hamzaonwaw: Key = Key(ffi::GDK_KEY_Arabic_hamzaonwaw as u32); pub const Arabic_hamzaunderalef: Key = Key(ffi::GDK_KEY_Arabic_hamzaunderalef as u32); pub const Arabic_hamzaonyeh: Key = Key(ffi::GDK_KEY_Arabic_hamzaonyeh as u32); pub const Arabic_alef: Key = Key(ffi::GDK_KEY_Arabic_alef as u32); pub const Arabic_beh: Key = Key(ffi::GDK_KEY_Arabic_beh as u32); pub const Arabic_tehmarbuta: Key = Key(ffi::GDK_KEY_Arabic_tehmarbuta as u32); pub const Arabic_teh: Key = Key(ffi::GDK_KEY_Arabic_teh as u32); pub const Arabic_theh: Key = Key(ffi::GDK_KEY_Arabic_theh as u32); pub const Arabic_jeem: Key = Key(ffi::GDK_KEY_Arabic_jeem as u32); pub const Arabic_hah: Key = Key(ffi::GDK_KEY_Arabic_hah as u32); pub const Arabic_khah: Key = Key(ffi::GDK_KEY_Arabic_khah as u32); pub const Arabic_dal: Key = Key(ffi::GDK_KEY_Arabic_dal as u32); pub const Arabic_thal: Key = Key(ffi::GDK_KEY_Arabic_thal as u32); pub const Arabic_ra: Key = Key(ffi::GDK_KEY_Arabic_ra as u32); pub const Arabic_zain: Key = Key(ffi::GDK_KEY_Arabic_zain as u32); pub const Arabic_seen: Key = Key(ffi::GDK_KEY_Arabic_seen as u32); pub const Arabic_sheen: Key = Key(ffi::GDK_KEY_Arabic_sheen as u32); pub const Arabic_sad: Key = Key(ffi::GDK_KEY_Arabic_sad as u32); pub const Arabic_dad: Key = Key(ffi::GDK_KEY_Arabic_dad as u32); pub const Arabic_tah: Key = Key(ffi::GDK_KEY_Arabic_tah as u32); pub const Arabic_zah: Key = Key(ffi::GDK_KEY_Arabic_zah as u32); pub const Arabic_ain: Key = Key(ffi::GDK_KEY_Arabic_ain as u32); pub const Arabic_ghain: Key = Key(ffi::GDK_KEY_Arabic_ghain as u32); pub const Arabic_tatweel: Key = Key(ffi::GDK_KEY_Arabic_tatweel as u32); pub const Arabic_feh: Key = Key(ffi::GDK_KEY_Arabic_feh as u32); pub const Arabic_qaf: Key = Key(ffi::GDK_KEY_Arabic_qaf as u32); pub const Arabic_kaf: Key = Key(ffi::GDK_KEY_Arabic_kaf as u32); pub const Arabic_lam: Key = Key(ffi::GDK_KEY_Arabic_lam as u32); pub const Arabic_meem: Key = Key(ffi::GDK_KEY_Arabic_meem as u32); pub const Arabic_noon: Key = Key(ffi::GDK_KEY_Arabic_noon as u32); pub const Arabic_ha: Key = Key(ffi::GDK_KEY_Arabic_ha as u32); pub const Arabic_heh: Key = Key(ffi::GDK_KEY_Arabic_heh as u32); pub const Arabic_waw: Key = Key(ffi::GDK_KEY_Arabic_waw as u32); pub const Arabic_alefmaksura: Key = Key(ffi::GDK_KEY_Arabic_alefmaksura as u32); pub const Arabic_yeh: Key = Key(ffi::GDK_KEY_Arabic_yeh as u32); pub const Arabic_fathatan: Key = Key(ffi::GDK_KEY_Arabic_fathatan as u32); pub const Arabic_dammatan: Key = Key(ffi::GDK_KEY_Arabic_dammatan as u32); pub const Arabic_kasratan: Key = Key(ffi::GDK_KEY_Arabic_kasratan as u32); pub const Arabic_fatha: Key = Key(ffi::GDK_KEY_Arabic_fatha as u32); pub const Arabic_damma: Key = Key(ffi::GDK_KEY_Arabic_damma as u32); pub const Arabic_kasra: Key = Key(ffi::GDK_KEY_Arabic_kasra as u32); pub const Arabic_shadda: Key = Key(ffi::GDK_KEY_Arabic_shadda as u32); pub const Arabic_sukun: Key = Key(ffi::GDK_KEY_Arabic_sukun as u32); pub const Arabic_madda_above: Key = Key(ffi::GDK_KEY_Arabic_madda_above as u32); pub const Arabic_hamza_above: Key = Key(ffi::GDK_KEY_Arabic_hamza_above as u32); pub const Arabic_hamza_below: Key = Key(ffi::GDK_KEY_Arabic_hamza_below as u32); pub const Arabic_jeh: Key = Key(ffi::GDK_KEY_Arabic_jeh as u32); pub const Arabic_veh: Key = Key(ffi::GDK_KEY_Arabic_veh as u32); pub const Arabic_keheh: Key = Key(ffi::GDK_KEY_Arabic_keheh as u32); pub const Arabic_gaf: Key = Key(ffi::GDK_KEY_Arabic_gaf as u32); pub const Arabic_noon_ghunna: Key = Key(ffi::GDK_KEY_Arabic_noon_ghunna as u32); pub const Arabic_heh_doachashmee: Key = Key(ffi::GDK_KEY_Arabic_heh_doachashmee as u32); pub const Farsi_yeh: Key = Key(ffi::GDK_KEY_Farsi_yeh as u32); pub const Arabic_farsi_yeh: Key = Key(ffi::GDK_KEY_Arabic_farsi_yeh as u32); pub const Arabic_yeh_baree: Key = Key(ffi::GDK_KEY_Arabic_yeh_baree as u32); pub const Arabic_heh_goal: Key = Key(ffi::GDK_KEY_Arabic_heh_goal as u32); pub const Arabic_switch: Key = Key(ffi::GDK_KEY_Arabic_switch as u32); pub const Cyrillic_GHE_bar: Key = Key(ffi::GDK_KEY_Cyrillic_GHE_bar as u32); pub const Cyrillic_ghe_bar: Key = Key(ffi::GDK_KEY_Cyrillic_ghe_bar as u32); pub const Cyrillic_ZHE_descender: Key = Key(ffi::GDK_KEY_Cyrillic_ZHE_descender as u32); pub const Cyrillic_zhe_descender: Key = Key(ffi::GDK_KEY_Cyrillic_zhe_descender as u32); pub const Cyrillic_KA_descender: Key = Key(ffi::GDK_KEY_Cyrillic_KA_descender as u32); pub const Cyrillic_ka_descender: Key = Key(ffi::GDK_KEY_Cyrillic_ka_descender as u32); pub const Cyrillic_KA_vertstroke: Key = Key(ffi::GDK_KEY_Cyrillic_KA_vertstroke as u32); pub const Cyrillic_ka_vertstroke: Key = Key(ffi::GDK_KEY_Cyrillic_ka_vertstroke as u32); pub const Cyrillic_EN_descender: Key = Key(ffi::GDK_KEY_Cyrillic_EN_descender as u32); pub const Cyrillic_en_descender: Key = Key(ffi::GDK_KEY_Cyrillic_en_descender as u32); pub const Cyrillic_U_straight: Key = Key(ffi::GDK_KEY_Cyrillic_U_straight as u32); pub const Cyrillic_u_straight: Key = Key(ffi::GDK_KEY_Cyrillic_u_straight as u32); pub const Cyrillic_U_straight_bar: Key = Key(ffi::GDK_KEY_Cyrillic_U_straight_bar as u32); pub const Cyrillic_u_straight_bar: Key = Key(ffi::GDK_KEY_Cyrillic_u_straight_bar as u32); pub const Cyrillic_HA_descender: Key = Key(ffi::GDK_KEY_Cyrillic_HA_descender as u32); pub const Cyrillic_ha_descender: Key = Key(ffi::GDK_KEY_Cyrillic_ha_descender as u32); pub const Cyrillic_CHE_descender: Key = Key(ffi::GDK_KEY_Cyrillic_CHE_descender as u32); pub const Cyrillic_che_descender: Key = Key(ffi::GDK_KEY_Cyrillic_che_descender as u32); pub const Cyrillic_CHE_vertstroke: Key = Key(ffi::GDK_KEY_Cyrillic_CHE_vertstroke as u32); pub const Cyrillic_che_vertstroke: Key = Key(ffi::GDK_KEY_Cyrillic_che_vertstroke as u32); pub const Cyrillic_SHHA: Key = Key(ffi::GDK_KEY_Cyrillic_SHHA as u32); pub const Cyrillic_shha: Key = Key(ffi::GDK_KEY_Cyrillic_shha as u32); pub const Cyrillic_SCHWA: Key = Key(ffi::GDK_KEY_Cyrillic_SCHWA as u32); pub const Cyrillic_schwa: Key = Key(ffi::GDK_KEY_Cyrillic_schwa as u32); pub const Cyrillic_I_macron: Key = Key(ffi::GDK_KEY_Cyrillic_I_macron as u32); pub const Cyrillic_i_macron: Key = Key(ffi::GDK_KEY_Cyrillic_i_macron as u32); pub const Cyrillic_O_bar: Key = Key(ffi::GDK_KEY_Cyrillic_O_bar as u32); pub const Cyrillic_o_bar: Key = Key(ffi::GDK_KEY_Cyrillic_o_bar as u32); pub const Cyrillic_U_macron: Key = Key(ffi::GDK_KEY_Cyrillic_U_macron as u32); pub const Cyrillic_u_macron: Key = Key(ffi::GDK_KEY_Cyrillic_u_macron as u32); pub const Serbian_dje: Key = Key(ffi::GDK_KEY_Serbian_dje as u32); pub const Macedonia_gje: Key = Key(ffi::GDK_KEY_Macedonia_gje as u32); pub const Cyrillic_io: Key = Key(ffi::GDK_KEY_Cyrillic_io as u32); pub const Ukrainian_ie: Key = Key(ffi::GDK_KEY_Ukrainian_ie as u32); pub const Ukranian_je: Key = Key(ffi::GDK_KEY_Ukranian_je as u32); pub const Macedonia_dse: Key = Key(ffi::GDK_KEY_Macedonia_dse as u32); pub const Ukrainian_i: Key = Key(ffi::GDK_KEY_Ukrainian_i as u32); pub const Ukranian_i: Key = Key(ffi::GDK_KEY_Ukranian_i as u32); pub const Ukrainian_yi: Key = Key(ffi::GDK_KEY_Ukrainian_yi as u32); pub const Ukranian_yi: Key = Key(ffi::GDK_KEY_Ukranian_yi as u32); pub const Cyrillic_je: Key = Key(ffi::GDK_KEY_Cyrillic_je as u32); pub const Serbian_je: Key = Key(ffi::GDK_KEY_Serbian_je as u32); pub const Cyrillic_lje: Key = Key(ffi::GDK_KEY_Cyrillic_lje as u32); pub const Serbian_lje: Key = Key(ffi::GDK_KEY_Serbian_lje as u32); pub const Cyrillic_nje: Key = Key(ffi::GDK_KEY_Cyrillic_nje as u32); pub const Serbian_nje: Key = Key(ffi::GDK_KEY_Serbian_nje as u32); pub const Serbian_tshe: Key = Key(ffi::GDK_KEY_Serbian_tshe as u32); pub const Macedonia_kje: Key = Key(ffi::GDK_KEY_Macedonia_kje as u32); pub const Ukrainian_ghe_with_upturn: Key = Key(ffi::GDK_KEY_Ukrainian_ghe_with_upturn as u32); pub const Byelorussian_shortu: Key = Key(ffi::GDK_KEY_Byelorussian_shortu as u32); pub const Cyrillic_dzhe: Key = Key(ffi::GDK_KEY_Cyrillic_dzhe as u32); pub const Serbian_dze: Key = Key(ffi::GDK_KEY_Serbian_dze as u32); pub const numerosign: Key = Key(ffi::GDK_KEY_numerosign as u32); pub const Serbian_DJE: Key = Key(ffi::GDK_KEY_Serbian_DJE as u32); pub const Macedonia_GJE: Key = Key(ffi::GDK_KEY_Macedonia_GJE as u32); pub const Cyrillic_IO: Key = Key(ffi::GDK_KEY_Cyrillic_IO as u32); pub const Ukrainian_IE: Key = Key(ffi::GDK_KEY_Ukrainian_IE as u32); pub const Ukranian_JE: Key = Key(ffi::GDK_KEY_Ukranian_JE as u32); pub const Macedonia_DSE: Key = Key(ffi::GDK_KEY_Macedonia_DSE as u32); pub const Ukrainian_I: Key = Key(ffi::GDK_KEY_Ukrainian_I as u32); pub const Ukranian_I: Key = Key(ffi::GDK_KEY_Ukranian_I as u32); pub const Ukrainian_YI: Key = Key(ffi::GDK_KEY_Ukrainian_YI as u32); pub const Ukranian_YI: Key = Key(ffi::GDK_KEY_Ukranian_YI as u32); pub const Cyrillic_JE: Key = Key(ffi::GDK_KEY_Cyrillic_JE as u32); pub const Serbian_JE: Key = Key(ffi::GDK_KEY_Serbian_JE as u32); pub const Cyrillic_LJE: Key = Key(ffi::GDK_KEY_Cyrillic_LJE as u32); pub const Serbian_LJE: Key = Key(ffi::GDK_KEY_Serbian_LJE as u32); pub const Cyrillic_NJE: Key = Key(ffi::GDK_KEY_Cyrillic_NJE as u32); pub const Serbian_NJE: Key = Key(ffi::GDK_KEY_Serbian_NJE as u32); pub const Serbian_TSHE: Key = Key(ffi::GDK_KEY_Serbian_TSHE as u32); pub const Macedonia_KJE: Key = Key(ffi::GDK_KEY_Macedonia_KJE as u32); pub const Ukrainian_GHE_WITH_UPTURN: Key = Key(ffi::GDK_KEY_Ukrainian_GHE_WITH_UPTURN as u32); pub const Byelorussian_SHORTU: Key = Key(ffi::GDK_KEY_Byelorussian_SHORTU as u32); pub const Cyrillic_DZHE: Key = Key(ffi::GDK_KEY_Cyrillic_DZHE as u32); pub const Serbian_DZE: Key = Key(ffi::GDK_KEY_Serbian_DZE as u32); pub const Cyrillic_yu: Key = Key(ffi::GDK_KEY_Cyrillic_yu as u32); pub const Cyrillic_a: Key = Key(ffi::GDK_KEY_Cyrillic_a as u32); pub const Cyrillic_be: Key = Key(ffi::GDK_KEY_Cyrillic_be as u32); pub const Cyrillic_tse: Key = Key(ffi::GDK_KEY_Cyrillic_tse as u32); pub const Cyrillic_de: Key = Key(ffi::GDK_KEY_Cyrillic_de as u32); pub const Cyrillic_ie: Key = Key(ffi::GDK_KEY_Cyrillic_ie as u32); pub const Cyrillic_ef: Key = Key(ffi::GDK_KEY_Cyrillic_ef as u32); pub const Cyrillic_ghe: Key = Key(ffi::GDK_KEY_Cyrillic_ghe as u32); pub const Cyrillic_ha: Key = Key(ffi::GDK_KEY_Cyrillic_ha as u32); pub const Cyrillic_i: Key = Key(ffi::GDK_KEY_Cyrillic_i as u32); pub const Cyrillic_shorti: Key = Key(ffi::GDK_KEY_Cyrillic_shorti as u32); pub const Cyrillic_ka: Key = Key(ffi::GDK_KEY_Cyrillic_ka as u32); pub const Cyrillic_el: Key = Key(ffi::GDK_KEY_Cyrillic_el as u32); pub const Cyrillic_em: Key = Key(ffi::GDK_KEY_Cyrillic_em as u32); pub const Cyrillic_en: Key = Key(ffi::GDK_KEY_Cyrillic_en as u32); pub const Cyrillic_o: Key = Key(ffi::GDK_KEY_Cyrillic_o as u32); pub const Cyrillic_pe: Key = Key(ffi::GDK_KEY_Cyrillic_pe as u32); pub const Cyrillic_ya: Key = Key(ffi::GDK_KEY_Cyrillic_ya as u32); pub const Cyrillic_er: Key = Key(ffi::GDK_KEY_Cyrillic_er as u32); pub const Cyrillic_es: Key = Key(ffi::GDK_KEY_Cyrillic_es as u32); pub const Cyrillic_te: Key = Key(ffi::GDK_KEY_Cyrillic_te as u32); pub const Cyrillic_u: Key = Key(ffi::GDK_KEY_Cyrillic_u as u32); pub const Cyrillic_zhe: Key = Key(ffi::GDK_KEY_Cyrillic_zhe as u32); pub const Cyrillic_ve: Key = Key(ffi::GDK_KEY_Cyrillic_ve as u32); pub const Cyrillic_softsign: Key = Key(ffi::GDK_KEY_Cyrillic_softsign as u32); pub const Cyrillic_yeru: Key = Key(ffi::GDK_KEY_Cyrillic_yeru as u32); pub const Cyrillic_ze: Key = Key(ffi::GDK_KEY_Cyrillic_ze as u32); pub const Cyrillic_sha: Key = Key(ffi::GDK_KEY_Cyrillic_sha as u32); pub const Cyrillic_e: Key = Key(ffi::GDK_KEY_Cyrillic_e as u32); pub const Cyrillic_shcha: Key = Key(ffi::GDK_KEY_Cyrillic_shcha as u32); pub const Cyrillic_che: Key = Key(ffi::GDK_KEY_Cyrillic_che as u32); pub const Cyrillic_hardsign: Key = Key(ffi::GDK_KEY_Cyrillic_hardsign as u32); pub const Cyrillic_YU: Key = Key(ffi::GDK_KEY_Cyrillic_YU as u32); pub const Cyrillic_A: Key = Key(ffi::GDK_KEY_Cyrillic_A as u32); pub const Cyrillic_BE: Key = Key(ffi::GDK_KEY_Cyrillic_BE as u32); pub const Cyrillic_TSE: Key = Key(ffi::GDK_KEY_Cyrillic_TSE as u32); pub const Cyrillic_DE: Key = Key(ffi::GDK_KEY_Cyrillic_DE as u32); pub const Cyrillic_IE: Key = Key(ffi::GDK_KEY_Cyrillic_IE as u32); pub const Cyrillic_EF: Key = Key(ffi::GDK_KEY_Cyrillic_EF as u32); pub const Cyrillic_GHE: Key = Key(ffi::GDK_KEY_Cyrillic_GHE as u32); pub const Cyrillic_HA: Key = Key(ffi::GDK_KEY_Cyrillic_HA as u32); pub const Cyrillic_I: Key = Key(ffi::GDK_KEY_Cyrillic_I as u32); pub const Cyrillic_SHORTI: Key = Key(ffi::GDK_KEY_Cyrillic_SHORTI as u32); pub const Cyrillic_KA: Key = Key(ffi::GDK_KEY_Cyrillic_KA as u32); pub const Cyrillic_EL: Key = Key(ffi::GDK_KEY_Cyrillic_EL as u32); pub const Cyrillic_EM: Key = Key(ffi::GDK_KEY_Cyrillic_EM as u32); pub const Cyrillic_EN: Key = Key(ffi::GDK_KEY_Cyrillic_EN as u32); pub const Cyrillic_O: Key = Key(ffi::GDK_KEY_Cyrillic_O as u32); pub const Cyrillic_PE: Key = Key(ffi::GDK_KEY_Cyrillic_PE as u32); pub const Cyrillic_YA: Key = Key(ffi::GDK_KEY_Cyrillic_YA as u32); pub const Cyrillic_ER: Key = Key(ffi::GDK_KEY_Cyrillic_ER as u32); pub const Cyrillic_ES: Key = Key(ffi::GDK_KEY_Cyrillic_ES as u32); pub const Cyrillic_TE: Key = Key(ffi::GDK_KEY_Cyrillic_TE as u32); pub const Cyrillic_U: Key = Key(ffi::GDK_KEY_Cyrillic_U as u32); pub const Cyrillic_ZHE: Key = Key(ffi::GDK_KEY_Cyrillic_ZHE as u32); pub const Cyrillic_VE: Key = Key(ffi::GDK_KEY_Cyrillic_VE as u32); pub const Cyrillic_SOFTSIGN: Key = Key(ffi::GDK_KEY_Cyrillic_SOFTSIGN as u32); pub const Cyrillic_YERU: Key = Key(ffi::GDK_KEY_Cyrillic_YERU as u32); pub const Cyrillic_ZE: Key = Key(ffi::GDK_KEY_Cyrillic_ZE as u32); pub const Cyrillic_SHA: Key = Key(ffi::GDK_KEY_Cyrillic_SHA as u32); pub const Cyrillic_E: Key = Key(ffi::GDK_KEY_Cyrillic_E as u32); pub const Cyrillic_SHCHA: Key = Key(ffi::GDK_KEY_Cyrillic_SHCHA as u32); pub const Cyrillic_CHE: Key = Key(ffi::GDK_KEY_Cyrillic_CHE as u32); pub const Cyrillic_HARDSIGN: Key = Key(ffi::GDK_KEY_Cyrillic_HARDSIGN as u32); pub const Greek_ALPHAaccent: Key = Key(ffi::GDK_KEY_Greek_ALPHAaccent as u32); pub const Greek_EPSILONaccent: Key = Key(ffi::GDK_KEY_Greek_EPSILONaccent as u32); pub const Greek_ETAaccent: Key = Key(ffi::GDK_KEY_Greek_ETAaccent as u32); pub const Greek_IOTAaccent: Key = Key(ffi::GDK_KEY_Greek_IOTAaccent as u32); pub const Greek_IOTAdieresis: Key = Key(ffi::GDK_KEY_Greek_IOTAdieresis as u32); pub const Greek_IOTAdiaeresis: Key = Key(ffi::GDK_KEY_Greek_IOTAdiaeresis as u32); pub const Greek_OMICRONaccent: Key = Key(ffi::GDK_KEY_Greek_OMICRONaccent as u32); pub const Greek_UPSILONaccent: Key = Key(ffi::GDK_KEY_Greek_UPSILONaccent as u32); pub const Greek_UPSILONdieresis: Key = Key(ffi::GDK_KEY_Greek_UPSILONdieresis as u32); pub const Greek_OMEGAaccent: Key = Key(ffi::GDK_KEY_Greek_OMEGAaccent as u32); pub const Greek_accentdieresis: Key = Key(ffi::GDK_KEY_Greek_accentdieresis as u32); pub const Greek_horizbar: Key = Key(ffi::GDK_KEY_Greek_horizbar as u32); pub const Greek_alphaaccent: Key = Key(ffi::GDK_KEY_Greek_alphaaccent as u32); pub const Greek_epsilonaccent: Key = Key(ffi::GDK_KEY_Greek_epsilonaccent as u32); pub const Greek_etaaccent: Key = Key(ffi::GDK_KEY_Greek_etaaccent as u32); pub const Greek_iotaaccent: Key = Key(ffi::GDK_KEY_Greek_iotaaccent as u32); pub const Greek_iotadieresis: Key = Key(ffi::GDK_KEY_Greek_iotadieresis as u32); pub const Greek_iotaaccentdieresis: Key = Key(ffi::GDK_KEY_Greek_iotaaccentdieresis as u32); pub const Greek_omicronaccent: Key = Key(ffi::GDK_KEY_Greek_omicronaccent as u32); pub const Greek_upsilonaccent: Key = Key(ffi::GDK_KEY_Greek_upsilonaccent as u32); pub const Greek_upsilondieresis: Key = Key(ffi::GDK_KEY_Greek_upsilondieresis as u32); pub const Greek_upsilonaccentdieresis: Key = Key(ffi::GDK_KEY_Greek_upsilonaccentdieresis as u32); pub const Greek_omegaaccent: Key = Key(ffi::GDK_KEY_Greek_omegaaccent as u32); pub const Greek_ALPHA: Key = Key(ffi::GDK_KEY_Greek_ALPHA as u32); pub const Greek_BETA: Key = Key(ffi::GDK_KEY_Greek_BETA as u32); pub const Greek_GAMMA: Key = Key(ffi::GDK_KEY_Greek_GAMMA as u32); pub const Greek_DELTA: Key = Key(ffi::GDK_KEY_Greek_DELTA as u32); pub const Greek_EPSILON: Key = Key(ffi::GDK_KEY_Greek_EPSILON as u32); pub const Greek_ZETA: Key = Key(ffi::GDK_KEY_Greek_ZETA as u32); pub const Greek_ETA: Key = Key(ffi::GDK_KEY_Greek_ETA as u32); pub const Greek_THETA: Key = Key(ffi::GDK_KEY_Greek_THETA as u32); pub const Greek_IOTA: Key = Key(ffi::GDK_KEY_Greek_IOTA as u32); pub const Greek_KAPPA: Key = Key(ffi::GDK_KEY_Greek_KAPPA as u32); pub const Greek_LAMDA: Key = Key(ffi::GDK_KEY_Greek_LAMDA as u32); pub const Greek_LAMBDA: Key = Key(ffi::GDK_KEY_Greek_LAMBDA as u32); pub const Greek_MU: Key = Key(ffi::GDK_KEY_Greek_MU as u32); pub const Greek_NU: Key = Key(ffi::GDK_KEY_Greek_NU as u32); pub const Greek_XI: Key = Key(ffi::GDK_KEY_Greek_XI as u32); pub const Greek_OMICRON: Key = Key(ffi::GDK_KEY_Greek_OMICRON as u32); pub const Greek_PI: Key = Key(ffi::GDK_KEY_Greek_PI as u32); pub const Greek_RHO: Key = Key(ffi::GDK_KEY_Greek_RHO as u32); pub const Greek_SIGMA: Key = Key(ffi::GDK_KEY_Greek_SIGMA as u32); pub const Greek_TAU: Key = Key(ffi::GDK_KEY_Greek_TAU as u32); pub const Greek_UPSILON: Key = Key(ffi::GDK_KEY_Greek_UPSILON as u32); pub const Greek_PHI: Key = Key(ffi::GDK_KEY_Greek_PHI as u32); pub const Greek_CHI: Key = Key(ffi::GDK_KEY_Greek_CHI as u32); pub const Greek_PSI: Key = Key(ffi::GDK_KEY_Greek_PSI as u32); pub const Greek_OMEGA: Key = Key(ffi::GDK_KEY_Greek_OMEGA as u32); pub const Greek_alpha: Key = Key(ffi::GDK_KEY_Greek_alpha as u32); pub const Greek_beta: Key = Key(ffi::GDK_KEY_Greek_beta as u32); pub const Greek_gamma: Key = Key(ffi::GDK_KEY_Greek_gamma as u32); pub const Greek_delta: Key = Key(ffi::GDK_KEY_Greek_delta as u32); pub const Greek_epsilon: Key = Key(ffi::GDK_KEY_Greek_epsilon as u32); pub const Greek_zeta: Key = Key(ffi::GDK_KEY_Greek_zeta as u32); pub const Greek_eta: Key = Key(ffi::GDK_KEY_Greek_eta as u32); pub const Greek_theta: Key = Key(ffi::GDK_KEY_Greek_theta as u32); pub const Greek_iota: Key = Key(ffi::GDK_KEY_Greek_iota as u32); pub const Greek_kappa: Key = Key(ffi::GDK_KEY_Greek_kappa as u32); pub const Greek_lamda: Key = Key(ffi::GDK_KEY_Greek_lamda as u32); pub const Greek_lambda: Key = Key(ffi::GDK_KEY_Greek_lambda as u32); pub const Greek_mu: Key = Key(ffi::GDK_KEY_Greek_mu as u32); pub const Greek_nu: Key = Key(ffi::GDK_KEY_Greek_nu as u32); pub const Greek_xi: Key = Key(ffi::GDK_KEY_Greek_xi as u32); pub const Greek_omicron: Key = Key(ffi::GDK_KEY_Greek_omicron as u32); pub const Greek_pi: Key = Key(ffi::GDK_KEY_Greek_pi as u32); pub const Greek_rho: Key = Key(ffi::GDK_KEY_Greek_rho as u32); pub const Greek_sigma: Key = Key(ffi::GDK_KEY_Greek_sigma as u32); pub const Greek_finalsmallsigma: Key = Key(ffi::GDK_KEY_Greek_finalsmallsigma as u32); pub const Greek_tau: Key = Key(ffi::GDK_KEY_Greek_tau as u32); pub const Greek_upsilon: Key = Key(ffi::GDK_KEY_Greek_upsilon as u32); pub const Greek_phi: Key = Key(ffi::GDK_KEY_Greek_phi as u32); pub const Greek_chi: Key = Key(ffi::GDK_KEY_Greek_chi as u32); pub const Greek_psi: Key = Key(ffi::GDK_KEY_Greek_psi as u32); pub const Greek_omega: Key = Key(ffi::GDK_KEY_Greek_omega as u32); pub const Greek_switch: Key = Key(ffi::GDK_KEY_Greek_switch as u32); pub const leftradical: Key = Key(ffi::GDK_KEY_leftradical as u32); pub const topleftradical: Key = Key(ffi::GDK_KEY_topleftradical as u32); pub const horizconnector: Key = Key(ffi::GDK_KEY_horizconnector as u32); pub const topintegral: Key = Key(ffi::GDK_KEY_topintegral as u32); pub const botintegral: Key = Key(ffi::GDK_KEY_botintegral as u32); pub const vertconnector: Key = Key(ffi::GDK_KEY_vertconnector as u32); pub const topleftsqbracket: Key = Key(ffi::GDK_KEY_topleftsqbracket as u32); pub const botleftsqbracket: Key = Key(ffi::GDK_KEY_botleftsqbracket as u32); pub const toprightsqbracket: Key = Key(ffi::GDK_KEY_toprightsqbracket as u32); pub const botrightsqbracket: Key = Key(ffi::GDK_KEY_botrightsqbracket as u32); pub const topleftparens: Key = Key(ffi::GDK_KEY_topleftparens as u32); pub const botleftparens: Key = Key(ffi::GDK_KEY_botleftparens as u32); pub const toprightparens: Key = Key(ffi::GDK_KEY_toprightparens as u32); pub const botrightparens: Key = Key(ffi::GDK_KEY_botrightparens as u32); pub const leftmiddlecurlybrace: Key = Key(ffi::GDK_KEY_leftmiddlecurlybrace as u32); pub const rightmiddlecurlybrace: Key = Key(ffi::GDK_KEY_rightmiddlecurlybrace as u32); pub const topleftsummation: Key = Key(ffi::GDK_KEY_topleftsummation as u32); pub const botleftsummation: Key = Key(ffi::GDK_KEY_botleftsummation as u32); pub const topvertsummationconnector: Key = Key(ffi::GDK_KEY_topvertsummationconnector as u32); pub const botvertsummationconnector: Key = Key(ffi::GDK_KEY_botvertsummationconnector as u32); pub const toprightsummation: Key = Key(ffi::GDK_KEY_toprightsummation as u32); pub const botrightsummation: Key = Key(ffi::GDK_KEY_botrightsummation as u32); pub const rightmiddlesummation: Key = Key(ffi::GDK_KEY_rightmiddlesummation as u32); pub const lessthanequal: Key = Key(ffi::GDK_KEY_lessthanequal as u32); pub const notequal: Key = Key(ffi::GDK_KEY_notequal as u32); pub const greaterthanequal: Key = Key(ffi::GDK_KEY_greaterthanequal as u32); pub const integral: Key = Key(ffi::GDK_KEY_integral as u32); pub const therefore: Key = Key(ffi::GDK_KEY_therefore as u32); pub const variation: Key = Key(ffi::GDK_KEY_variation as u32); pub const infinity: Key = Key(ffi::GDK_KEY_infinity as u32); pub const nabla: Key = Key(ffi::GDK_KEY_nabla as u32); pub const approximate: Key = Key(ffi::GDK_KEY_approximate as u32); pub const similarequal: Key = Key(ffi::GDK_KEY_similarequal as u32); pub const ifonlyif: Key = Key(ffi::GDK_KEY_ifonlyif as u32); pub const implies: Key = Key(ffi::GDK_KEY_implies as u32); pub const identical: Key = Key(ffi::GDK_KEY_identical as u32); pub const radical: Key = Key(ffi::GDK_KEY_radical as u32); pub const includedin: Key = Key(ffi::GDK_KEY_includedin as u32); pub const includes: Key = Key(ffi::GDK_KEY_includes as u32); pub const intersection: Key = Key(ffi::GDK_KEY_intersection as u32); pub const union: Key = Key(ffi::GDK_KEY_union as u32); pub const logicaland: Key = Key(ffi::GDK_KEY_logicaland as u32); pub const logicalor: Key = Key(ffi::GDK_KEY_logicalor as u32); pub const partialderivative: Key = Key(ffi::GDK_KEY_partialderivative as u32); pub const function: Key = Key(ffi::GDK_KEY_function as u32); pub const leftarrow: Key = Key(ffi::GDK_KEY_leftarrow as u32); pub const uparrow: Key = Key(ffi::GDK_KEY_uparrow as u32); pub const rightarrow: Key = Key(ffi::GDK_KEY_rightarrow as u32); pub const downarrow: Key = Key(ffi::GDK_KEY_downarrow as u32); pub const blank: Key = Key(ffi::GDK_KEY_blank as u32); pub const soliddiamond: Key = Key(ffi::GDK_KEY_soliddiamond as u32); pub const checkerboard: Key = Key(ffi::GDK_KEY_checkerboard as u32); pub const ht: Key = Key(ffi::GDK_KEY_ht as u32); pub const ff: Key = Key(ffi::GDK_KEY_ff as u32); pub const cr: Key = Key(ffi::GDK_KEY_cr as u32); pub const lf: Key = Key(ffi::GDK_KEY_lf as u32); pub const nl: Key = Key(ffi::GDK_KEY_nl as u32); pub const vt: Key = Key(ffi::GDK_KEY_vt as u32); pub const lowrightcorner: Key = Key(ffi::GDK_KEY_lowrightcorner as u32); pub const uprightcorner: Key = Key(ffi::GDK_KEY_uprightcorner as u32); pub const upleftcorner: Key = Key(ffi::GDK_KEY_upleftcorner as u32); pub const lowleftcorner: Key = Key(ffi::GDK_KEY_lowleftcorner as u32); pub const crossinglines: Key = Key(ffi::GDK_KEY_crossinglines as u32); pub const horizlinescan1: Key = Key(ffi::GDK_KEY_horizlinescan1 as u32); pub const horizlinescan3: Key = Key(ffi::GDK_KEY_horizlinescan3 as u32); pub const horizlinescan5: Key = Key(ffi::GDK_KEY_horizlinescan5 as u32); pub const horizlinescan7: Key = Key(ffi::GDK_KEY_horizlinescan7 as u32); pub const horizlinescan9: Key = Key(ffi::GDK_KEY_horizlinescan9 as u32); pub const leftt: Key = Key(ffi::GDK_KEY_leftt as u32); pub const rightt: Key = Key(ffi::GDK_KEY_rightt as u32); pub const bott: Key = Key(ffi::GDK_KEY_bott as u32); pub const topt: Key = Key(ffi::GDK_KEY_topt as u32); pub const vertbar: Key = Key(ffi::GDK_KEY_vertbar as u32); pub const emspace: Key = Key(ffi::GDK_KEY_emspace as u32); pub const enspace: Key = Key(ffi::GDK_KEY_enspace as u32); pub const em3space: Key = Key(ffi::GDK_KEY_em3space as u32); pub const em4space: Key = Key(ffi::GDK_KEY_em4space as u32); pub const digitspace: Key = Key(ffi::GDK_KEY_digitspace as u32); pub const punctspace: Key = Key(ffi::GDK_KEY_punctspace as u32); pub const thinspace: Key = Key(ffi::GDK_KEY_thinspace as u32); pub const hairspace: Key = Key(ffi::GDK_KEY_hairspace as u32); pub const emdash: Key = Key(ffi::GDK_KEY_emdash as u32); pub const endash: Key = Key(ffi::GDK_KEY_endash as u32); pub const signifblank: Key = Key(ffi::GDK_KEY_signifblank as u32); pub const ellipsis: Key = Key(ffi::GDK_KEY_ellipsis as u32); pub const doubbaselinedot: Key = Key(ffi::GDK_KEY_doubbaselinedot as u32); pub const onethird: Key = Key(ffi::GDK_KEY_onethird as u32); pub const twothirds: Key = Key(ffi::GDK_KEY_twothirds as u32); pub const onefifth: Key = Key(ffi::GDK_KEY_onefifth as u32); pub const twofifths: Key = Key(ffi::GDK_KEY_twofifths as u32); pub const threefifths: Key = Key(ffi::GDK_KEY_threefifths as u32); pub const fourfifths: Key = Key(ffi::GDK_KEY_fourfifths as u32); pub const onesixth: Key = Key(ffi::GDK_KEY_onesixth as u32); pub const fivesixths: Key = Key(ffi::GDK_KEY_fivesixths as u32); pub const careof: Key = Key(ffi::GDK_KEY_careof as u32); pub const figdash: Key = Key(ffi::GDK_KEY_figdash as u32); pub const leftanglebracket: Key = Key(ffi::GDK_KEY_leftanglebracket as u32); pub const decimalpoint: Key = Key(ffi::GDK_KEY_decimalpoint as u32); pub const rightanglebracket: Key = Key(ffi::GDK_KEY_rightanglebracket as u32); pub const marker: Key = Key(ffi::GDK_KEY_marker as u32); pub const oneeighth: Key = Key(ffi::GDK_KEY_oneeighth as u32); pub const threeeighths: Key = Key(ffi::GDK_KEY_threeeighths as u32); pub const fiveeighths: Key = Key(ffi::GDK_KEY_fiveeighths as u32); pub const seveneighths: Key = Key(ffi::GDK_KEY_seveneighths as u32); pub const trademark: Key = Key(ffi::GDK_KEY_trademark as u32); pub const signaturemark: Key = Key(ffi::GDK_KEY_signaturemark as u32); pub const trademarkincircle: Key = Key(ffi::GDK_KEY_trademarkincircle as u32); pub const leftopentriangle: Key = Key(ffi::GDK_KEY_leftopentriangle as u32); pub const rightopentriangle: Key = Key(ffi::GDK_KEY_rightopentriangle as u32); pub const emopencircle: Key = Key(ffi::GDK_KEY_emopencircle as u32); pub const emopenrectangle: Key = Key(ffi::GDK_KEY_emopenrectangle as u32); pub const leftsinglequotemark: Key = Key(ffi::GDK_KEY_leftsinglequotemark as u32); pub const rightsinglequotemark: Key = Key(ffi::GDK_KEY_rightsinglequotemark as u32); pub const leftdoublequotemark: Key = Key(ffi::GDK_KEY_leftdoublequotemark as u32); pub const rightdoublequotemark: Key = Key(ffi::GDK_KEY_rightdoublequotemark as u32); pub const prescription: Key = Key(ffi::GDK_KEY_prescription as u32); pub const permille: Key = Key(ffi::GDK_KEY_permille as u32); pub const minutes: Key = Key(ffi::GDK_KEY_minutes as u32); pub const seconds: Key = Key(ffi::GDK_KEY_seconds as u32); pub const latincross: Key = Key(ffi::GDK_KEY_latincross as u32); pub const hexagram: Key = Key(ffi::GDK_KEY_hexagram as u32); pub const filledrectbullet: Key = Key(ffi::GDK_KEY_filledrectbullet as u32); pub const filledlefttribullet: Key = Key(ffi::GDK_KEY_filledlefttribullet as u32); pub const filledrighttribullet: Key = Key(ffi::GDK_KEY_filledrighttribullet as u32); pub const emfilledcircle: Key = Key(ffi::GDK_KEY_emfilledcircle as u32); pub const emfilledrect: Key = Key(ffi::GDK_KEY_emfilledrect as u32); pub const enopencircbullet: Key = Key(ffi::GDK_KEY_enopencircbullet as u32); pub const enopensquarebullet: Key = Key(ffi::GDK_KEY_enopensquarebullet as u32); pub const openrectbullet: Key = Key(ffi::GDK_KEY_openrectbullet as u32); pub const opentribulletup: Key = Key(ffi::GDK_KEY_opentribulletup as u32); pub const opentribulletdown: Key = Key(ffi::GDK_KEY_opentribulletdown as u32); pub const openstar: Key = Key(ffi::GDK_KEY_openstar as u32); pub const enfilledcircbullet: Key = Key(ffi::GDK_KEY_enfilledcircbullet as u32); pub const enfilledsqbullet: Key = Key(ffi::GDK_KEY_enfilledsqbullet as u32); pub const filledtribulletup: Key = Key(ffi::GDK_KEY_filledtribulletup as u32); pub const filledtribulletdown: Key = Key(ffi::GDK_KEY_filledtribulletdown as u32); pub const leftpointer: Key = Key(ffi::GDK_KEY_leftpointer as u32); pub const rightpointer: Key = Key(ffi::GDK_KEY_rightpointer as u32); pub const club: Key = Key(ffi::GDK_KEY_club as u32); pub const diamond: Key = Key(ffi::GDK_KEY_diamond as u32); pub const heart: Key = Key(ffi::GDK_KEY_heart as u32); pub const maltesecross: Key = Key(ffi::GDK_KEY_maltesecross as u32); pub const dagger: Key = Key(ffi::GDK_KEY_dagger as u32); pub const doubledagger: Key = Key(ffi::GDK_KEY_doubledagger as u32); pub const checkmark: Key = Key(ffi::GDK_KEY_checkmark as u32); pub const ballotcross: Key = Key(ffi::GDK_KEY_ballotcross as u32); pub const musicalsharp: Key = Key(ffi::GDK_KEY_musicalsharp as u32); pub const musicalflat: Key = Key(ffi::GDK_KEY_musicalflat as u32); pub const malesymbol: Key = Key(ffi::GDK_KEY_malesymbol as u32); pub const femalesymbol: Key = Key(ffi::GDK_KEY_femalesymbol as u32); pub const telephone: Key = Key(ffi::GDK_KEY_telephone as u32); pub const telephonerecorder: Key = Key(ffi::GDK_KEY_telephonerecorder as u32); pub const phonographcopyright: Key = Key(ffi::GDK_KEY_phonographcopyright as u32); pub const caret: Key = Key(ffi::GDK_KEY_caret as u32); pub const singlelowquotemark: Key = Key(ffi::GDK_KEY_singlelowquotemark as u32); pub const doublelowquotemark: Key = Key(ffi::GDK_KEY_doublelowquotemark as u32); pub const cursor: Key = Key(ffi::GDK_KEY_cursor as u32); pub const leftcaret: Key = Key(ffi::GDK_KEY_leftcaret as u32); pub const rightcaret: Key = Key(ffi::GDK_KEY_rightcaret as u32); pub const downcaret: Key = Key(ffi::GDK_KEY_downcaret as u32); pub const upcaret: Key = Key(ffi::GDK_KEY_upcaret as u32); pub const overbar: Key = Key(ffi::GDK_KEY_overbar as u32); pub const downtack: Key = Key(ffi::GDK_KEY_downtack as u32); pub const upshoe: Key = Key(ffi::GDK_KEY_upshoe as u32); pub const downstile: Key = Key(ffi::GDK_KEY_downstile as u32); pub const underbar: Key = Key(ffi::GDK_KEY_underbar as u32); pub const jot: Key = Key(ffi::GDK_KEY_jot as u32); pub const quad: Key = Key(ffi::GDK_KEY_quad as u32); pub const uptack: Key = Key(ffi::GDK_KEY_uptack as u32); pub const circle: Key = Key(ffi::GDK_KEY_circle as u32); pub const upstile: Key = Key(ffi::GDK_KEY_upstile as u32); pub const downshoe: Key = Key(ffi::GDK_KEY_downshoe as u32); pub const rightshoe: Key = Key(ffi::GDK_KEY_rightshoe as u32); pub const leftshoe: Key = Key(ffi::GDK_KEY_leftshoe as u32); pub const lefttack: Key = Key(ffi::GDK_KEY_lefttack as u32); pub const righttack: Key = Key(ffi::GDK_KEY_righttack as u32); pub const hebrew_doublelowline: Key = Key(ffi::GDK_KEY_hebrew_doublelowline as u32); pub const hebrew_aleph: Key = Key(ffi::GDK_KEY_hebrew_aleph as u32); pub const hebrew_bet: Key = Key(ffi::GDK_KEY_hebrew_bet as u32); pub const hebrew_beth: Key = Key(ffi::GDK_KEY_hebrew_beth as u32); pub const hebrew_gimel: Key = Key(ffi::GDK_KEY_hebrew_gimel as u32); pub const hebrew_gimmel: Key = Key(ffi::GDK_KEY_hebrew_gimmel as u32); pub const hebrew_dalet: Key = Key(ffi::GDK_KEY_hebrew_dalet as u32); pub const hebrew_daleth: Key = Key(ffi::GDK_KEY_hebrew_daleth as u32); pub const hebrew_he: Key = Key(ffi::GDK_KEY_hebrew_he as u32); pub const hebrew_waw: Key = Key(ffi::GDK_KEY_hebrew_waw as u32); pub const hebrew_zain: Key = Key(ffi::GDK_KEY_hebrew_zain as u32); pub const hebrew_zayin: Key = Key(ffi::GDK_KEY_hebrew_zayin as u32); pub const hebrew_chet: Key = Key(ffi::GDK_KEY_hebrew_chet as u32); pub const hebrew_het: Key = Key(ffi::GDK_KEY_hebrew_het as u32); pub const hebrew_tet: Key = Key(ffi::GDK_KEY_hebrew_tet as u32); pub const hebrew_teth: Key = Key(ffi::GDK_KEY_hebrew_teth as u32); pub const hebrew_yod: Key = Key(ffi::GDK_KEY_hebrew_yod as u32); pub const hebrew_finalkaph: Key = Key(ffi::GDK_KEY_hebrew_finalkaph as u32); pub const hebrew_kaph: Key = Key(ffi::GDK_KEY_hebrew_kaph as u32); pub const hebrew_lamed: Key = Key(ffi::GDK_KEY_hebrew_lamed as u32); pub const hebrew_finalmem: Key = Key(ffi::GDK_KEY_hebrew_finalmem as u32); pub const hebrew_mem: Key = Key(ffi::GDK_KEY_hebrew_mem as u32); pub const hebrew_finalnun: Key = Key(ffi::GDK_KEY_hebrew_finalnun as u32); pub const hebrew_nun: Key = Key(ffi::GDK_KEY_hebrew_nun as u32); pub const hebrew_samech: Key = Key(ffi::GDK_KEY_hebrew_samech as u32); pub const hebrew_samekh: Key = Key(ffi::GDK_KEY_hebrew_samekh as u32); pub const hebrew_ayin: Key = Key(ffi::GDK_KEY_hebrew_ayin as u32); pub const hebrew_finalpe: Key = Key(ffi::GDK_KEY_hebrew_finalpe as u32); pub const hebrew_pe: Key = Key(ffi::GDK_KEY_hebrew_pe as u32); pub const hebrew_finalzade: Key = Key(ffi::GDK_KEY_hebrew_finalzade as u32); pub const hebrew_finalzadi: Key = Key(ffi::GDK_KEY_hebrew_finalzadi as u32); pub const hebrew_zade: Key = Key(ffi::GDK_KEY_hebrew_zade as u32); pub const hebrew_zadi: Key = Key(ffi::GDK_KEY_hebrew_zadi as u32); pub const hebrew_qoph: Key = Key(ffi::GDK_KEY_hebrew_qoph as u32); pub const hebrew_kuf: Key = Key(ffi::GDK_KEY_hebrew_kuf as u32); pub const hebrew_resh: Key = Key(ffi::GDK_KEY_hebrew_resh as u32); pub const hebrew_shin: Key = Key(ffi::GDK_KEY_hebrew_shin as u32); pub const hebrew_taw: Key = Key(ffi::GDK_KEY_hebrew_taw as u32); pub const hebrew_taf: Key = Key(ffi::GDK_KEY_hebrew_taf as u32); pub const Hebrew_switch: Key = Key(ffi::GDK_KEY_Hebrew_switch as u32); pub const Thai_kokai: Key = Key(ffi::GDK_KEY_Thai_kokai as u32); pub const Thai_khokhai: Key = Key(ffi::GDK_KEY_Thai_khokhai as u32); pub const Thai_khokhuat: Key = Key(ffi::GDK_KEY_Thai_khokhuat as u32); pub const Thai_khokhwai: Key = Key(ffi::GDK_KEY_Thai_khokhwai as u32); pub const Thai_khokhon: Key = Key(ffi::GDK_KEY_Thai_khokhon as u32); pub const Thai_khorakhang: Key = Key(ffi::GDK_KEY_Thai_khorakhang as u32); pub const Thai_ngongu: Key = Key(ffi::GDK_KEY_Thai_ngongu as u32); pub const Thai_chochan: Key = Key(ffi::GDK_KEY_Thai_chochan as u32); pub const Thai_choching: Key = Key(ffi::GDK_KEY_Thai_choching as u32); pub const Thai_chochang: Key = Key(ffi::GDK_KEY_Thai_chochang as u32); pub const Thai_soso: Key = Key(ffi::GDK_KEY_Thai_soso as u32); pub const Thai_chochoe: Key = Key(ffi::GDK_KEY_Thai_chochoe as u32); pub const Thai_yoying: Key = Key(ffi::GDK_KEY_Thai_yoying as u32); pub const Thai_dochada: Key = Key(ffi::GDK_KEY_Thai_dochada as u32); pub const Thai_topatak: Key = Key(ffi::GDK_KEY_Thai_topatak as u32); pub const Thai_thothan: Key = Key(ffi::GDK_KEY_Thai_thothan as u32); pub const Thai_thonangmontho: Key = Key(ffi::GDK_KEY_Thai_thonangmontho as u32); pub const Thai_thophuthao: Key = Key(ffi::GDK_KEY_Thai_thophuthao as u32); pub const Thai_nonen: Key = Key(ffi::GDK_KEY_Thai_nonen as u32); pub const Thai_dodek: Key = Key(ffi::GDK_KEY_Thai_dodek as u32); pub const Thai_totao: Key = Key(ffi::GDK_KEY_Thai_totao as u32); pub const Thai_thothung: Key = Key(ffi::GDK_KEY_Thai_thothung as u32); pub const Thai_thothahan: Key = Key(ffi::GDK_KEY_Thai_thothahan as u32); pub const Thai_thothong: Key = Key(ffi::GDK_KEY_Thai_thothong as u32); pub const Thai_nonu: Key = Key(ffi::GDK_KEY_Thai_nonu as u32); pub const Thai_bobaimai: Key = Key(ffi::GDK_KEY_Thai_bobaimai as u32); pub const Thai_popla: Key = Key(ffi::GDK_KEY_Thai_popla as u32); pub const Thai_phophung: Key = Key(ffi::GDK_KEY_Thai_phophung as u32); pub const Thai_fofa: Key = Key(ffi::GDK_KEY_Thai_fofa as u32); pub const Thai_phophan: Key = Key(ffi::GDK_KEY_Thai_phophan as u32); pub const Thai_fofan: Key = Key(ffi::GDK_KEY_Thai_fofan as u32); pub const Thai_phosamphao: Key = Key(ffi::GDK_KEY_Thai_phosamphao as u32); pub const Thai_moma: Key = Key(ffi::GDK_KEY_Thai_moma as u32); pub const Thai_yoyak: Key = Key(ffi::GDK_KEY_Thai_yoyak as u32); pub const Thai_rorua: Key = Key(ffi::GDK_KEY_Thai_rorua as u32); pub const Thai_ru: Key = Key(ffi::GDK_KEY_Thai_ru as u32); pub const Thai_loling: Key = Key(ffi::GDK_KEY_Thai_loling as u32); pub const Thai_lu: Key = Key(ffi::GDK_KEY_Thai_lu as u32); pub const Thai_wowaen: Key = Key(ffi::GDK_KEY_Thai_wowaen as u32); pub const Thai_sosala: Key = Key(ffi::GDK_KEY_Thai_sosala as u32); pub const Thai_sorusi: Key = Key(ffi::GDK_KEY_Thai_sorusi as u32); pub const Thai_sosua: Key = Key(ffi::GDK_KEY_Thai_sosua as u32); pub const Thai_hohip: Key = Key(ffi::GDK_KEY_Thai_hohip as u32); pub const Thai_lochula: Key = Key(ffi::GDK_KEY_Thai_lochula as u32); pub const Thai_oang: Key = Key(ffi::GDK_KEY_Thai_oang as u32); pub const Thai_honokhuk: Key = Key(ffi::GDK_KEY_Thai_honokhuk as u32); pub const Thai_paiyannoi: Key = Key(ffi::GDK_KEY_Thai_paiyannoi as u32); pub const Thai_saraa: Key = Key(ffi::GDK_KEY_Thai_saraa as u32); pub const Thai_maihanakat: Key = Key(ffi::GDK_KEY_Thai_maihanakat as u32); pub const Thai_saraaa: Key = Key(ffi::GDK_KEY_Thai_saraaa as u32); pub const Thai_saraam: Key = Key(ffi::GDK_KEY_Thai_saraam as u32); pub const Thai_sarai: Key = Key(ffi::GDK_KEY_Thai_sarai as u32); pub const Thai_saraii: Key = Key(ffi::GDK_KEY_Thai_saraii as u32); pub const Thai_saraue: Key = Key(ffi::GDK_KEY_Thai_saraue as u32); pub const Thai_sarauee: Key = Key(ffi::GDK_KEY_Thai_sarauee as u32); pub const Thai_sarau: Key = Key(ffi::GDK_KEY_Thai_sarau as u32); pub const Thai_sarauu: Key = Key(ffi::GDK_KEY_Thai_sarauu as u32); pub const Thai_phinthu: Key = Key(ffi::GDK_KEY_Thai_phinthu as u32); pub const Thai_maihanakat_maitho: Key = Key(ffi::GDK_KEY_Thai_maihanakat_maitho as u32); pub const Thai_baht: Key = Key(ffi::GDK_KEY_Thai_baht as u32); pub const Thai_sarae: Key = Key(ffi::GDK_KEY_Thai_sarae as u32); pub const Thai_saraae: Key = Key(ffi::GDK_KEY_Thai_saraae as u32); pub const Thai_sarao: Key = Key(ffi::GDK_KEY_Thai_sarao as u32); pub const Thai_saraaimaimuan: Key = Key(ffi::GDK_KEY_Thai_saraaimaimuan as u32); pub const Thai_saraaimaimalai: Key = Key(ffi::GDK_KEY_Thai_saraaimaimalai as u32); pub const Thai_lakkhangyao: Key = Key(ffi::GDK_KEY_Thai_lakkhangyao as u32); pub const Thai_maiyamok: Key = Key(ffi::GDK_KEY_Thai_maiyamok as u32); pub const Thai_maitaikhu: Key = Key(ffi::GDK_KEY_Thai_maitaikhu as u32); pub const Thai_maiek: Key = Key(ffi::GDK_KEY_Thai_maiek as u32); pub const Thai_maitho: Key = Key(ffi::GDK_KEY_Thai_maitho as u32); pub const Thai_maitri: Key = Key(ffi::GDK_KEY_Thai_maitri as u32); pub const Thai_maichattawa: Key = Key(ffi::GDK_KEY_Thai_maichattawa as u32); pub const Thai_thanthakhat: Key = Key(ffi::GDK_KEY_Thai_thanthakhat as u32); pub const Thai_nikhahit: Key = Key(ffi::GDK_KEY_Thai_nikhahit as u32); pub const Thai_leksun: Key = Key(ffi::GDK_KEY_Thai_leksun as u32); pub const Thai_leknung: Key = Key(ffi::GDK_KEY_Thai_leknung as u32); pub const Thai_leksong: Key = Key(ffi::GDK_KEY_Thai_leksong as u32); pub const Thai_leksam: Key = Key(ffi::GDK_KEY_Thai_leksam as u32); pub const Thai_leksi: Key = Key(ffi::GDK_KEY_Thai_leksi as u32); pub const Thai_lekha: Key = Key(ffi::GDK_KEY_Thai_lekha as u32); pub const Thai_lekhok: Key = Key(ffi::GDK_KEY_Thai_lekhok as u32); pub const Thai_lekchet: Key = Key(ffi::GDK_KEY_Thai_lekchet as u32); pub const Thai_lekpaet: Key = Key(ffi::GDK_KEY_Thai_lekpaet as u32); pub const Thai_lekkao: Key = Key(ffi::GDK_KEY_Thai_lekkao as u32); pub const Hangul: Key = Key(ffi::GDK_KEY_Hangul as u32); pub const Hangul_Start: Key = Key(ffi::GDK_KEY_Hangul_Start as u32); pub const Hangul_End: Key = Key(ffi::GDK_KEY_Hangul_End as u32); pub const Hangul_Hanja: Key = Key(ffi::GDK_KEY_Hangul_Hanja as u32); pub const Hangul_Jamo: Key = Key(ffi::GDK_KEY_Hangul_Jamo as u32); pub const Hangul_Romaja: Key = Key(ffi::GDK_KEY_Hangul_Romaja as u32); pub const Hangul_Codeinput: Key = Key(ffi::GDK_KEY_Hangul_Codeinput as u32); pub const Hangul_Jeonja: Key = Key(ffi::GDK_KEY_Hangul_Jeonja as u32); pub const Hangul_Banja: Key = Key(ffi::GDK_KEY_Hangul_Banja as u32); pub const Hangul_PreHanja: Key = Key(ffi::GDK_KEY_Hangul_PreHanja as u32); pub const Hangul_PostHanja: Key = Key(ffi::GDK_KEY_Hangul_PostHanja as u32); pub const Hangul_SingleCandidate: Key = Key(ffi::GDK_KEY_Hangul_SingleCandidate as u32); pub const Hangul_MultipleCandidate: Key = Key(ffi::GDK_KEY_Hangul_MultipleCandidate as u32); pub const Hangul_PreviousCandidate: Key = Key(ffi::GDK_KEY_Hangul_PreviousCandidate as u32); pub const Hangul_Special: Key = Key(ffi::GDK_KEY_Hangul_Special as u32); pub const Hangul_switch: Key = Key(ffi::GDK_KEY_Hangul_switch as u32); pub const Hangul_Kiyeog: Key = Key(ffi::GDK_KEY_Hangul_Kiyeog as u32); pub const Hangul_SsangKiyeog: Key = Key(ffi::GDK_KEY_Hangul_SsangKiyeog as u32); pub const Hangul_KiyeogSios: Key = Key(ffi::GDK_KEY_Hangul_KiyeogSios as u32); pub const Hangul_Nieun: Key = Key(ffi::GDK_KEY_Hangul_Nieun as u32); pub const Hangul_NieunJieuj: Key = Key(ffi::GDK_KEY_Hangul_NieunJieuj as u32); pub const Hangul_NieunHieuh: Key = Key(ffi::GDK_KEY_Hangul_NieunHieuh as u32); pub const Hangul_Dikeud: Key = Key(ffi::GDK_KEY_Hangul_Dikeud as u32); pub const Hangul_SsangDikeud: Key = Key(ffi::GDK_KEY_Hangul_SsangDikeud as u32); pub const Hangul_Rieul: Key = Key(ffi::GDK_KEY_Hangul_Rieul as u32); pub const Hangul_RieulKiyeog: Key = Key(ffi::GDK_KEY_Hangul_RieulKiyeog as u32); pub const Hangul_RieulMieum: Key = Key(ffi::GDK_KEY_Hangul_RieulMieum as u32); pub const Hangul_RieulPieub: Key = Key(ffi::GDK_KEY_Hangul_RieulPieub as u32); pub const Hangul_RieulSios: Key = Key(ffi::GDK_KEY_Hangul_RieulSios as u32); pub const Hangul_RieulTieut: Key = Key(ffi::GDK_KEY_Hangul_RieulTieut as u32); pub const Hangul_RieulPhieuf: Key = Key(ffi::GDK_KEY_Hangul_RieulPhieuf as u32); pub const Hangul_RieulHieuh: Key = Key(ffi::GDK_KEY_Hangul_RieulHieuh as u32); pub const Hangul_Mieum: Key = Key(ffi::GDK_KEY_Hangul_Mieum as u32); pub const Hangul_Pieub: Key = Key(ffi::GDK_KEY_Hangul_Pieub as u32); pub const Hangul_SsangPieub: Key = Key(ffi::GDK_KEY_Hangul_SsangPieub as u32); pub const Hangul_PieubSios: Key = Key(ffi::GDK_KEY_Hangul_PieubSios as u32); pub const Hangul_Sios: Key = Key(ffi::GDK_KEY_Hangul_Sios as u32); pub const Hangul_SsangSios: Key = Key(ffi::GDK_KEY_Hangul_SsangSios as u32); pub const Hangul_Ieung: Key = Key(ffi::GDK_KEY_Hangul_Ieung as u32); pub const Hangul_Jieuj: Key = Key(ffi::GDK_KEY_Hangul_Jieuj as u32); pub const Hangul_SsangJieuj: Key = Key(ffi::GDK_KEY_Hangul_SsangJieuj as u32); pub const Hangul_Cieuc: Key = Key(ffi::GDK_KEY_Hangul_Cieuc as u32); pub const Hangul_Khieuq: Key = Key(ffi::GDK_KEY_Hangul_Khieuq as u32); pub const Hangul_Tieut: Key = Key(ffi::GDK_KEY_Hangul_Tieut as u32); pub const Hangul_Phieuf: Key = Key(ffi::GDK_KEY_Hangul_Phieuf as u32); pub const Hangul_Hieuh: Key = Key(ffi::GDK_KEY_Hangul_Hieuh as u32); pub const Hangul_A: Key = Key(ffi::GDK_KEY_Hangul_A as u32); pub const Hangul_AE: Key = Key(ffi::GDK_KEY_Hangul_AE as u32); pub const Hangul_YA: Key = Key(ffi::GDK_KEY_Hangul_YA as u32); pub const Hangul_YAE: Key = Key(ffi::GDK_KEY_Hangul_YAE as u32); pub const Hangul_EO: Key = Key(ffi::GDK_KEY_Hangul_EO as u32); pub const Hangul_E: Key = Key(ffi::GDK_KEY_Hangul_E as u32); pub const Hangul_YEO: Key = Key(ffi::GDK_KEY_Hangul_YEO as u32); pub const Hangul_YE: Key = Key(ffi::GDK_KEY_Hangul_YE as u32); pub const Hangul_O: Key = Key(ffi::GDK_KEY_Hangul_O as u32); pub const Hangul_WA: Key = Key(ffi::GDK_KEY_Hangul_WA as u32); pub const Hangul_WAE: Key = Key(ffi::GDK_KEY_Hangul_WAE as u32); pub const Hangul_OE: Key = Key(ffi::GDK_KEY_Hangul_OE as u32); pub const Hangul_YO: Key = Key(ffi::GDK_KEY_Hangul_YO as u32); pub const Hangul_U: Key = Key(ffi::GDK_KEY_Hangul_U as u32); pub const Hangul_WEO: Key = Key(ffi::GDK_KEY_Hangul_WEO as u32); pub const Hangul_WE: Key = Key(ffi::GDK_KEY_Hangul_WE as u32); pub const Hangul_WI: Key = Key(ffi::GDK_KEY_Hangul_WI as u32); pub const Hangul_YU: Key = Key(ffi::GDK_KEY_Hangul_YU as u32); pub const Hangul_EU: Key = Key(ffi::GDK_KEY_Hangul_EU as u32); pub const Hangul_YI: Key = Key(ffi::GDK_KEY_Hangul_YI as u32); pub const Hangul_I: Key = Key(ffi::GDK_KEY_Hangul_I as u32); pub const Hangul_J_Kiyeog: Key = Key(ffi::GDK_KEY_Hangul_J_Kiyeog as u32); pub const Hangul_J_SsangKiyeog: Key = Key(ffi::GDK_KEY_Hangul_J_SsangKiyeog as u32); pub const Hangul_J_KiyeogSios: Key = Key(ffi::GDK_KEY_Hangul_J_KiyeogSios as u32); pub const Hangul_J_Nieun: Key = Key(ffi::GDK_KEY_Hangul_J_Nieun as u32); pub const Hangul_J_NieunJieuj: Key = Key(ffi::GDK_KEY_Hangul_J_NieunJieuj as u32); pub const Hangul_J_NieunHieuh: Key = Key(ffi::GDK_KEY_Hangul_J_NieunHieuh as u32); pub const Hangul_J_Dikeud: Key = Key(ffi::GDK_KEY_Hangul_J_Dikeud as u32); pub const Hangul_J_Rieul: Key = Key(ffi::GDK_KEY_Hangul_J_Rieul as u32); pub const Hangul_J_RieulKiyeog: Key = Key(ffi::GDK_KEY_Hangul_J_RieulKiyeog as u32); pub const Hangul_J_RieulMieum: Key = Key(ffi::GDK_KEY_Hangul_J_RieulMieum as u32); pub const Hangul_J_RieulPieub: Key = Key(ffi::GDK_KEY_Hangul_J_RieulPieub as u32); pub const Hangul_J_RieulSios: Key = Key(ffi::GDK_KEY_Hangul_J_RieulSios as u32); pub const Hangul_J_RieulTieut: Key = Key(ffi::GDK_KEY_Hangul_J_RieulTieut as u32); pub const Hangul_J_RieulPhieuf: Key = Key(ffi::GDK_KEY_Hangul_J_RieulPhieuf as u32); pub const Hangul_J_RieulHieuh: Key = Key(ffi::GDK_KEY_Hangul_J_RieulHieuh as u32); pub const Hangul_J_Mieum: Key = Key(ffi::GDK_KEY_Hangul_J_Mieum as u32); pub const Hangul_J_Pieub: Key = Key(ffi::GDK_KEY_Hangul_J_Pieub as u32); pub const Hangul_J_PieubSios: Key = Key(ffi::GDK_KEY_Hangul_J_PieubSios as u32); pub const Hangul_J_Sios: Key = Key(ffi::GDK_KEY_Hangul_J_Sios as u32); pub const Hangul_J_SsangSios: Key = Key(ffi::GDK_KEY_Hangul_J_SsangSios as u32); pub const Hangul_J_Ieung: Key = Key(ffi::GDK_KEY_Hangul_J_Ieung as u32); pub const Hangul_J_Jieuj: Key = Key(ffi::GDK_KEY_Hangul_J_Jieuj as u32); pub const Hangul_J_Cieuc: Key = Key(ffi::GDK_KEY_Hangul_J_Cieuc as u32); pub const Hangul_J_Khieuq: Key = Key(ffi::GDK_KEY_Hangul_J_Khieuq as u32); pub const Hangul_J_Tieut: Key = Key(ffi::GDK_KEY_Hangul_J_Tieut as u32); pub const Hangul_J_Phieuf: Key = Key(ffi::GDK_KEY_Hangul_J_Phieuf as u32); pub const Hangul_J_Hieuh: Key = Key(ffi::GDK_KEY_Hangul_J_Hieuh as u32); pub const Hangul_RieulYeorinHieuh: Key = Key(ffi::GDK_KEY_Hangul_RieulYeorinHieuh as u32); pub const Hangul_SunkyeongeumMieum: Key = Key(ffi::GDK_KEY_Hangul_SunkyeongeumMieum as u32); pub const Hangul_SunkyeongeumPieub: Key = Key(ffi::GDK_KEY_Hangul_SunkyeongeumPieub as u32); pub const Hangul_PanSios: Key = Key(ffi::GDK_KEY_Hangul_PanSios as u32); pub const Hangul_KkogjiDalrinIeung: Key = Key(ffi::GDK_KEY_Hangul_KkogjiDalrinIeung as u32); pub const Hangul_SunkyeongeumPhieuf: Key = Key(ffi::GDK_KEY_Hangul_SunkyeongeumPhieuf as u32); pub const Hangul_YeorinHieuh: Key = Key(ffi::GDK_KEY_Hangul_YeorinHieuh as u32); pub const Hangul_AraeA: Key = Key(ffi::GDK_KEY_Hangul_AraeA as u32); pub const Hangul_AraeAE: Key = Key(ffi::GDK_KEY_Hangul_AraeAE as u32); pub const Hangul_J_PanSios: Key = Key(ffi::GDK_KEY_Hangul_J_PanSios as u32); pub const Hangul_J_KkogjiDalrinIeung: Key = Key(ffi::GDK_KEY_Hangul_J_KkogjiDalrinIeung as u32); pub const Hangul_J_YeorinHieuh: Key = Key(ffi::GDK_KEY_Hangul_J_YeorinHieuh as u32); pub const Korean_Won: Key = Key(ffi::GDK_KEY_Korean_Won as u32); pub const Armenian_ligature_ew: Key = Key(ffi::GDK_KEY_Armenian_ligature_ew as u32); pub const Armenian_full_stop: Key = Key(ffi::GDK_KEY_Armenian_full_stop as u32); pub const Armenian_verjaket: Key = Key(ffi::GDK_KEY_Armenian_verjaket as u32); pub const Armenian_separation_mark: Key = Key(ffi::GDK_KEY_Armenian_separation_mark as u32); pub const Armenian_but: Key = Key(ffi::GDK_KEY_Armenian_but as u32); pub const Armenian_hyphen: Key = Key(ffi::GDK_KEY_Armenian_hyphen as u32); pub const Armenian_yentamna: Key = Key(ffi::GDK_KEY_Armenian_yentamna as u32); pub const Armenian_exclam: Key = Key(ffi::GDK_KEY_Armenian_exclam as u32); pub const Armenian_amanak: Key = Key(ffi::GDK_KEY_Armenian_amanak as u32); pub const Armenian_accent: Key = Key(ffi::GDK_KEY_Armenian_accent as u32); pub const Armenian_shesht: Key = Key(ffi::GDK_KEY_Armenian_shesht as u32); pub const Armenian_question: Key = Key(ffi::GDK_KEY_Armenian_question as u32); pub const Armenian_paruyk: Key = Key(ffi::GDK_KEY_Armenian_paruyk as u32); pub const Armenian_AYB: Key = Key(ffi::GDK_KEY_Armenian_AYB as u32); pub const Armenian_ayb: Key = Key(ffi::GDK_KEY_Armenian_ayb as u32); pub const Armenian_BEN: Key = Key(ffi::GDK_KEY_Armenian_BEN as u32); pub const Armenian_ben: Key = Key(ffi::GDK_KEY_Armenian_ben as u32); pub const Armenian_GIM: Key = Key(ffi::GDK_KEY_Armenian_GIM as u32); pub const Armenian_gim: Key = Key(ffi::GDK_KEY_Armenian_gim as u32); pub const Armenian_DA: Key = Key(ffi::GDK_KEY_Armenian_DA as u32); pub const Armenian_da: Key = Key(ffi::GDK_KEY_Armenian_da as u32); pub const Armenian_YECH: Key = Key(ffi::GDK_KEY_Armenian_YECH as u32); pub const Armenian_yech: Key = Key(ffi::GDK_KEY_Armenian_yech as u32); pub const Armenian_ZA: Key = Key(ffi::GDK_KEY_Armenian_ZA as u32); pub const Armenian_za: Key = Key(ffi::GDK_KEY_Armenian_za as u32); pub const Armenian_E: Key = Key(ffi::GDK_KEY_Armenian_E as u32); pub const Armenian_e: Key = Key(ffi::GDK_KEY_Armenian_e as u32); pub const Armenian_AT: Key = Key(ffi::GDK_KEY_Armenian_AT as u32); pub const Armenian_at: Key = Key(ffi::GDK_KEY_Armenian_at as u32); pub const Armenian_TO: Key = Key(ffi::GDK_KEY_Armenian_TO as u32); pub const Armenian_to: Key = Key(ffi::GDK_KEY_Armenian_to as u32); pub const Armenian_ZHE: Key = Key(ffi::GDK_KEY_Armenian_ZHE as u32); pub const Armenian_zhe: Key = Key(ffi::GDK_KEY_Armenian_zhe as u32); pub const Armenian_INI: Key = Key(ffi::GDK_KEY_Armenian_INI as u32); pub const Armenian_ini: Key = Key(ffi::GDK_KEY_Armenian_ini as u32); pub const Armenian_LYUN: Key = Key(ffi::GDK_KEY_Armenian_LYUN as u32); pub const Armenian_lyun: Key = Key(ffi::GDK_KEY_Armenian_lyun as u32); pub const Armenian_KHE: Key = Key(ffi::GDK_KEY_Armenian_KHE as u32); pub const Armenian_khe: Key = Key(ffi::GDK_KEY_Armenian_khe as u32); pub const Armenian_TSA: Key = Key(ffi::GDK_KEY_Armenian_TSA as u32); pub const Armenian_tsa: Key = Key(ffi::GDK_KEY_Armenian_tsa as u32); pub const Armenian_KEN: Key = Key(ffi::GDK_KEY_Armenian_KEN as u32); pub const Armenian_ken: Key = Key(ffi::GDK_KEY_Armenian_ken as u32); pub const Armenian_HO: Key = Key(ffi::GDK_KEY_Armenian_HO as u32); pub const Armenian_ho: Key = Key(ffi::GDK_KEY_Armenian_ho as u32); pub const Armenian_DZA: Key = Key(ffi::GDK_KEY_Armenian_DZA as u32); pub const Armenian_dza: Key = Key(ffi::GDK_KEY_Armenian_dza as u32); pub const Armenian_GHAT: Key = Key(ffi::GDK_KEY_Armenian_GHAT as u32); pub const Armenian_ghat: Key = Key(ffi::GDK_KEY_Armenian_ghat as u32); pub const Armenian_TCHE: Key = Key(ffi::GDK_KEY_Armenian_TCHE as u32); pub const Armenian_tche: Key = Key(ffi::GDK_KEY_Armenian_tche as u32); pub const Armenian_MEN: Key = Key(ffi::GDK_KEY_Armenian_MEN as u32); pub const Armenian_men: Key = Key(ffi::GDK_KEY_Armenian_men as u32); pub const Armenian_HI: Key = Key(ffi::GDK_KEY_Armenian_HI as u32); pub const Armenian_hi: Key = Key(ffi::GDK_KEY_Armenian_hi as u32); pub const Armenian_NU: Key = Key(ffi::GDK_KEY_Armenian_NU as u32); pub const Armenian_nu: Key = Key(ffi::GDK_KEY_Armenian_nu as u32); pub const Armenian_SHA: Key = Key(ffi::GDK_KEY_Armenian_SHA as u32); pub const Armenian_sha: Key = Key(ffi::GDK_KEY_Armenian_sha as u32); pub const Armenian_VO: Key = Key(ffi::GDK_KEY_Armenian_VO as u32); pub const Armenian_vo: Key = Key(ffi::GDK_KEY_Armenian_vo as u32); pub const Armenian_CHA: Key = Key(ffi::GDK_KEY_Armenian_CHA as u32); pub const Armenian_cha: Key = Key(ffi::GDK_KEY_Armenian_cha as u32); pub const Armenian_PE: Key = Key(ffi::GDK_KEY_Armenian_PE as u32); pub const Armenian_pe: Key = Key(ffi::GDK_KEY_Armenian_pe as u32); pub const Armenian_JE: Key = Key(ffi::GDK_KEY_Armenian_JE as u32); pub const Armenian_je: Key = Key(ffi::GDK_KEY_Armenian_je as u32); pub const Armenian_RA: Key = Key(ffi::GDK_KEY_Armenian_RA as u32); pub const Armenian_ra: Key = Key(ffi::GDK_KEY_Armenian_ra as u32); pub const Armenian_SE: Key = Key(ffi::GDK_KEY_Armenian_SE as u32); pub const Armenian_se: Key = Key(ffi::GDK_KEY_Armenian_se as u32); pub const Armenian_VEV: Key = Key(ffi::GDK_KEY_Armenian_VEV as u32); pub const Armenian_vev: Key = Key(ffi::GDK_KEY_Armenian_vev as u32); pub const Armenian_TYUN: Key = Key(ffi::GDK_KEY_Armenian_TYUN as u32); pub const Armenian_tyun: Key = Key(ffi::GDK_KEY_Armenian_tyun as u32); pub const Armenian_RE: Key = Key(ffi::GDK_KEY_Armenian_RE as u32); pub const Armenian_re: Key = Key(ffi::GDK_KEY_Armenian_re as u32); pub const Armenian_TSO: Key = Key(ffi::GDK_KEY_Armenian_TSO as u32); pub const Armenian_tso: Key = Key(ffi::GDK_KEY_Armenian_tso as u32); pub const Armenian_VYUN: Key = Key(ffi::GDK_KEY_Armenian_VYUN as u32); pub const Armenian_vyun: Key = Key(ffi::GDK_KEY_Armenian_vyun as u32); pub const Armenian_PYUR: Key = Key(ffi::GDK_KEY_Armenian_PYUR as u32); pub const Armenian_pyur: Key = Key(ffi::GDK_KEY_Armenian_pyur as u32); pub const Armenian_KE: Key = Key(ffi::GDK_KEY_Armenian_KE as u32); pub const Armenian_ke: Key = Key(ffi::GDK_KEY_Armenian_ke as u32); pub const Armenian_O: Key = Key(ffi::GDK_KEY_Armenian_O as u32); pub const Armenian_o: Key = Key(ffi::GDK_KEY_Armenian_o as u32); pub const Armenian_FE: Key = Key(ffi::GDK_KEY_Armenian_FE as u32); pub const Armenian_fe: Key = Key(ffi::GDK_KEY_Armenian_fe as u32); pub const Armenian_apostrophe: Key = Key(ffi::GDK_KEY_Armenian_apostrophe as u32); pub const Georgian_an: Key = Key(ffi::GDK_KEY_Georgian_an as u32); pub const Georgian_ban: Key = Key(ffi::GDK_KEY_Georgian_ban as u32); pub const Georgian_gan: Key = Key(ffi::GDK_KEY_Georgian_gan as u32); pub const Georgian_don: Key = Key(ffi::GDK_KEY_Georgian_don as u32); pub const Georgian_en: Key = Key(ffi::GDK_KEY_Georgian_en as u32); pub const Georgian_vin: Key = Key(ffi::GDK_KEY_Georgian_vin as u32); pub const Georgian_zen: Key = Key(ffi::GDK_KEY_Georgian_zen as u32); pub const Georgian_tan: Key = Key(ffi::GDK_KEY_Georgian_tan as u32); pub const Georgian_in: Key = Key(ffi::GDK_KEY_Georgian_in as u32); pub const Georgian_kan: Key = Key(ffi::GDK_KEY_Georgian_kan as u32); pub const Georgian_las: Key = Key(ffi::GDK_KEY_Georgian_las as u32); pub const Georgian_man: Key = Key(ffi::GDK_KEY_Georgian_man as u32); pub const Georgian_nar: Key = Key(ffi::GDK_KEY_Georgian_nar as u32); pub const Georgian_on: Key = Key(ffi::GDK_KEY_Georgian_on as u32); pub const Georgian_par: Key = Key(ffi::GDK_KEY_Georgian_par as u32); pub const Georgian_zhar: Key = Key(ffi::GDK_KEY_Georgian_zhar as u32); pub const Georgian_rae: Key = Key(ffi::GDK_KEY_Georgian_rae as u32); pub const Georgian_san: Key = Key(ffi::GDK_KEY_Georgian_san as u32); pub const Georgian_tar: Key = Key(ffi::GDK_KEY_Georgian_tar as u32); pub const Georgian_un: Key = Key(ffi::GDK_KEY_Georgian_un as u32); pub const Georgian_phar: Key = Key(ffi::GDK_KEY_Georgian_phar as u32); pub const Georgian_khar: Key = Key(ffi::GDK_KEY_Georgian_khar as u32); pub const Georgian_ghan: Key = Key(ffi::GDK_KEY_Georgian_ghan as u32); pub const Georgian_qar: Key = Key(ffi::GDK_KEY_Georgian_qar as u32); pub const Georgian_shin: Key = Key(ffi::GDK_KEY_Georgian_shin as u32); pub const Georgian_chin: Key = Key(ffi::GDK_KEY_Georgian_chin as u32); pub const Georgian_can: Key = Key(ffi::GDK_KEY_Georgian_can as u32); pub const Georgian_jil: Key = Key(ffi::GDK_KEY_Georgian_jil as u32); pub const Georgian_cil: Key = Key(ffi::GDK_KEY_Georgian_cil as u32); pub const Georgian_char: Key = Key(ffi::GDK_KEY_Georgian_char as u32); pub const Georgian_xan: Key = Key(ffi::GDK_KEY_Georgian_xan as u32); pub const Georgian_jhan: Key = Key(ffi::GDK_KEY_Georgian_jhan as u32); pub const Georgian_hae: Key = Key(ffi::GDK_KEY_Georgian_hae as u32); pub const Georgian_he: Key = Key(ffi::GDK_KEY_Georgian_he as u32); pub const Georgian_hie: Key = Key(ffi::GDK_KEY_Georgian_hie as u32); pub const Georgian_we: Key = Key(ffi::GDK_KEY_Georgian_we as u32); pub const Georgian_har: Key = Key(ffi::GDK_KEY_Georgian_har as u32); pub const Georgian_hoe: Key = Key(ffi::GDK_KEY_Georgian_hoe as u32); pub const Georgian_fi: Key = Key(ffi::GDK_KEY_Georgian_fi as u32); pub const Xabovedot: Key = Key(ffi::GDK_KEY_Xabovedot as u32); pub const Ibreve: Key = Key(ffi::GDK_KEY_Ibreve as u32); pub const Zstroke: Key = Key(ffi::GDK_KEY_Zstroke as u32); pub const Gcaron: Key = Key(ffi::GDK_KEY_Gcaron as u32); pub const Ocaron: Key = Key(ffi::GDK_KEY_Ocaron as u32); pub const Obarred: Key = Key(ffi::GDK_KEY_Obarred as u32); pub const xabovedot: Key = Key(ffi::GDK_KEY_xabovedot as u32); pub const ibreve: Key = Key(ffi::GDK_KEY_ibreve as u32); pub const zstroke: Key = Key(ffi::GDK_KEY_zstroke as u32); pub const gcaron: Key = Key(ffi::GDK_KEY_gcaron as u32); pub const ocaron: Key = Key(ffi::GDK_KEY_ocaron as u32); pub const obarred: Key = Key(ffi::GDK_KEY_obarred as u32); pub const SCHWA: Key = Key(ffi::GDK_KEY_SCHWA as u32); pub const schwa: Key = Key(ffi::GDK_KEY_schwa as u32); pub const EZH: Key = Key(ffi::GDK_KEY_EZH as u32); pub const ezh: Key = Key(ffi::GDK_KEY_ezh as u32); pub const Lbelowdot: Key = Key(ffi::GDK_KEY_Lbelowdot as u32); pub const lbelowdot: Key = Key(ffi::GDK_KEY_lbelowdot as u32); pub const Abelowdot: Key = Key(ffi::GDK_KEY_Abelowdot as u32); pub const abelowdot: Key = Key(ffi::GDK_KEY_abelowdot as u32); pub const Ahook: Key = Key(ffi::GDK_KEY_Ahook as u32); pub const ahook: Key = Key(ffi::GDK_KEY_ahook as u32); pub const Acircumflexacute: Key = Key(ffi::GDK_KEY_Acircumflexacute as u32); pub const acircumflexacute: Key = Key(ffi::GDK_KEY_acircumflexacute as u32); pub const Acircumflexgrave: Key = Key(ffi::GDK_KEY_Acircumflexgrave as u32); pub const acircumflexgrave: Key = Key(ffi::GDK_KEY_acircumflexgrave as u32); pub const Acircumflexhook: Key = Key(ffi::GDK_KEY_Acircumflexhook as u32); pub const acircumflexhook: Key = Key(ffi::GDK_KEY_acircumflexhook as u32); pub const Acircumflextilde: Key = Key(ffi::GDK_KEY_Acircumflextilde as u32); pub const acircumflextilde: Key = Key(ffi::GDK_KEY_acircumflextilde as u32); pub const Acircumflexbelowdot: Key = Key(ffi::GDK_KEY_Acircumflexbelowdot as u32); pub const acircumflexbelowdot: Key = Key(ffi::GDK_KEY_acircumflexbelowdot as u32); pub const Abreveacute: Key = Key(ffi::GDK_KEY_Abreveacute as u32); pub const abreveacute: Key = Key(ffi::GDK_KEY_abreveacute as u32); pub const Abrevegrave: Key = Key(ffi::GDK_KEY_Abrevegrave as u32); pub const abrevegrave: Key = Key(ffi::GDK_KEY_abrevegrave as u32); pub const Abrevehook: Key = Key(ffi::GDK_KEY_Abrevehook as u32); pub const abrevehook: Key = Key(ffi::GDK_KEY_abrevehook as u32); pub const Abrevetilde: Key = Key(ffi::GDK_KEY_Abrevetilde as u32); pub const abrevetilde: Key = Key(ffi::GDK_KEY_abrevetilde as u32); pub const Abrevebelowdot: Key = Key(ffi::GDK_KEY_Abrevebelowdot as u32); pub const abrevebelowdot: Key = Key(ffi::GDK_KEY_abrevebelowdot as u32); pub const Ebelowdot: Key = Key(ffi::GDK_KEY_Ebelowdot as u32); pub const ebelowdot: Key = Key(ffi::GDK_KEY_ebelowdot as u32); pub const Ehook: Key = Key(ffi::GDK_KEY_Ehook as u32); pub const ehook: Key = Key(ffi::GDK_KEY_ehook as u32); pub const Etilde: Key = Key(ffi::GDK_KEY_Etilde as u32); pub const etilde: Key = Key(ffi::GDK_KEY_etilde as u32); pub const Ecircumflexacute: Key = Key(ffi::GDK_KEY_Ecircumflexacute as u32); pub const ecircumflexacute: Key = Key(ffi::GDK_KEY_ecircumflexacute as u32); pub const Ecircumflexgrave: Key = Key(ffi::GDK_KEY_Ecircumflexgrave as u32); pub const ecircumflexgrave: Key = Key(ffi::GDK_KEY_ecircumflexgrave as u32); pub const Ecircumflexhook: Key = Key(ffi::GDK_KEY_Ecircumflexhook as u32); pub const ecircumflexhook: Key = Key(ffi::GDK_KEY_ecircumflexhook as u32); pub const Ecircumflextilde: Key = Key(ffi::GDK_KEY_Ecircumflextilde as u32); pub const ecircumflextilde: Key = Key(ffi::GDK_KEY_ecircumflextilde as u32); pub const Ecircumflexbelowdot: Key = Key(ffi::GDK_KEY_Ecircumflexbelowdot as u32); pub const ecircumflexbelowdot: Key = Key(ffi::GDK_KEY_ecircumflexbelowdot as u32); pub const Ihook: Key = Key(ffi::GDK_KEY_Ihook as u32); pub const ihook: Key = Key(ffi::GDK_KEY_ihook as u32); pub const Ibelowdot: Key = Key(ffi::GDK_KEY_Ibelowdot as u32); pub const ibelowdot: Key = Key(ffi::GDK_KEY_ibelowdot as u32); pub const Obelowdot: Key = Key(ffi::GDK_KEY_Obelowdot as u32); pub const obelowdot: Key = Key(ffi::GDK_KEY_obelowdot as u32); pub const Ohook: Key = Key(ffi::GDK_KEY_Ohook as u32); pub const ohook: Key = Key(ffi::GDK_KEY_ohook as u32); pub const Ocircumflexacute: Key = Key(ffi::GDK_KEY_Ocircumflexacute as u32); pub const ocircumflexacute: Key = Key(ffi::GDK_KEY_ocircumflexacute as u32); pub const Ocircumflexgrave: Key = Key(ffi::GDK_KEY_Ocircumflexgrave as u32); pub const ocircumflexgrave: Key = Key(ffi::GDK_KEY_ocircumflexgrave as u32); pub const Ocircumflexhook: Key = Key(ffi::GDK_KEY_Ocircumflexhook as u32); pub const ocircumflexhook: Key = Key(ffi::GDK_KEY_ocircumflexhook as u32); pub const Ocircumflextilde: Key = Key(ffi::GDK_KEY_Ocircumflextilde as u32); pub const ocircumflextilde: Key = Key(ffi::GDK_KEY_ocircumflextilde as u32); pub const Ocircumflexbelowdot: Key = Key(ffi::GDK_KEY_Ocircumflexbelowdot as u32); pub const ocircumflexbelowdot: Key = Key(ffi::GDK_KEY_ocircumflexbelowdot as u32); pub const Ohornacute: Key = Key(ffi::GDK_KEY_Ohornacute as u32); pub const ohornacute: Key = Key(ffi::GDK_KEY_ohornacute as u32); pub const Ohorngrave: Key = Key(ffi::GDK_KEY_Ohorngrave as u32); pub const ohorngrave: Key = Key(ffi::GDK_KEY_ohorngrave as u32); pub const Ohornhook: Key = Key(ffi::GDK_KEY_Ohornhook as u32); pub const ohornhook: Key = Key(ffi::GDK_KEY_ohornhook as u32); pub const Ohorntilde: Key = Key(ffi::GDK_KEY_Ohorntilde as u32); pub const ohorntilde: Key = Key(ffi::GDK_KEY_ohorntilde as u32); pub const Ohornbelowdot: Key = Key(ffi::GDK_KEY_Ohornbelowdot as u32); pub const ohornbelowdot: Key = Key(ffi::GDK_KEY_ohornbelowdot as u32); pub const Ubelowdot: Key = Key(ffi::GDK_KEY_Ubelowdot as u32); pub const ubelowdot: Key = Key(ffi::GDK_KEY_ubelowdot as u32); pub const Uhook: Key = Key(ffi::GDK_KEY_Uhook as u32); pub const uhook: Key = Key(ffi::GDK_KEY_uhook as u32); pub const Uhornacute: Key = Key(ffi::GDK_KEY_Uhornacute as u32); pub const uhornacute: Key = Key(ffi::GDK_KEY_uhornacute as u32); pub const Uhorngrave: Key = Key(ffi::GDK_KEY_Uhorngrave as u32); pub const uhorngrave: Key = Key(ffi::GDK_KEY_uhorngrave as u32); pub const Uhornhook: Key = Key(ffi::GDK_KEY_Uhornhook as u32); pub const uhornhook: Key = Key(ffi::GDK_KEY_uhornhook as u32); pub const Uhorntilde: Key = Key(ffi::GDK_KEY_Uhorntilde as u32); pub const uhorntilde: Key = Key(ffi::GDK_KEY_uhorntilde as u32); pub const Uhornbelowdot: Key = Key(ffi::GDK_KEY_Uhornbelowdot as u32); pub const uhornbelowdot: Key = Key(ffi::GDK_KEY_uhornbelowdot as u32); pub const Ybelowdot: Key = Key(ffi::GDK_KEY_Ybelowdot as u32); pub const ybelowdot: Key = Key(ffi::GDK_KEY_ybelowdot as u32); pub const Yhook: Key = Key(ffi::GDK_KEY_Yhook as u32); pub const yhook: Key = Key(ffi::GDK_KEY_yhook as u32); pub const Ytilde: Key = Key(ffi::GDK_KEY_Ytilde as u32); pub const ytilde: Key = Key(ffi::GDK_KEY_ytilde as u32); pub const Ohorn: Key = Key(ffi::GDK_KEY_Ohorn as u32); pub const ohorn: Key = Key(ffi::GDK_KEY_ohorn as u32); pub const Uhorn: Key = Key(ffi::GDK_KEY_Uhorn as u32); pub const uhorn: Key = Key(ffi::GDK_KEY_uhorn as u32); pub const EcuSign: Key = Key(ffi::GDK_KEY_EcuSign as u32); pub const ColonSign: Key = Key(ffi::GDK_KEY_ColonSign as u32); pub const CruzeiroSign: Key = Key(ffi::GDK_KEY_CruzeiroSign as u32); pub const FFrancSign: Key = Key(ffi::GDK_KEY_FFrancSign as u32); pub const LiraSign: Key = Key(ffi::GDK_KEY_LiraSign as u32); pub const MillSign: Key = Key(ffi::GDK_KEY_MillSign as u32); pub const NairaSign: Key = Key(ffi::GDK_KEY_NairaSign as u32); pub const PesetaSign: Key = Key(ffi::GDK_KEY_PesetaSign as u32); pub const RupeeSign: Key = Key(ffi::GDK_KEY_RupeeSign as u32); pub const WonSign: Key = Key(ffi::GDK_KEY_WonSign as u32); pub const NewSheqelSign: Key = Key(ffi::GDK_KEY_NewSheqelSign as u32); pub const DongSign: Key = Key(ffi::GDK_KEY_DongSign as u32); pub const EuroSign: Key = Key(ffi::GDK_KEY_EuroSign as u32); pub const zerosuperior: Key = Key(ffi::GDK_KEY_zerosuperior as u32); pub const foursuperior: Key = Key(ffi::GDK_KEY_foursuperior as u32); pub const fivesuperior: Key = Key(ffi::GDK_KEY_fivesuperior as u32); pub const sixsuperior: Key = Key(ffi::GDK_KEY_sixsuperior as u32); pub const sevensuperior: Key = Key(ffi::GDK_KEY_sevensuperior as u32); pub const eightsuperior: Key = Key(ffi::GDK_KEY_eightsuperior as u32); pub const ninesuperior: Key = Key(ffi::GDK_KEY_ninesuperior as u32); pub const zerosubscript: Key = Key(ffi::GDK_KEY_zerosubscript as u32); pub const onesubscript: Key = Key(ffi::GDK_KEY_onesubscript as u32); pub const twosubscript: Key = Key(ffi::GDK_KEY_twosubscript as u32); pub const threesubscript: Key = Key(ffi::GDK_KEY_threesubscript as u32); pub const foursubscript: Key = Key(ffi::GDK_KEY_foursubscript as u32); pub const fivesubscript: Key = Key(ffi::GDK_KEY_fivesubscript as u32); pub const sixsubscript: Key = Key(ffi::GDK_KEY_sixsubscript as u32); pub const sevensubscript: Key = Key(ffi::GDK_KEY_sevensubscript as u32); pub const eightsubscript: Key = Key(ffi::GDK_KEY_eightsubscript as u32); pub const ninesubscript: Key = Key(ffi::GDK_KEY_ninesubscript as u32); pub const partdifferential: Key = Key(ffi::GDK_KEY_partdifferential as u32); pub const emptyset: Key = Key(ffi::GDK_KEY_emptyset as u32); pub const elementof: Key = Key(ffi::GDK_KEY_elementof as u32); pub const notelementof: Key = Key(ffi::GDK_KEY_notelementof as u32); pub const containsas: Key = Key(ffi::GDK_KEY_containsas as u32); pub const squareroot: Key = Key(ffi::GDK_KEY_squareroot as u32); pub const cuberoot: Key = Key(ffi::GDK_KEY_cuberoot as u32); pub const fourthroot: Key = Key(ffi::GDK_KEY_fourthroot as u32); pub const dintegral: Key = Key(ffi::GDK_KEY_dintegral as u32); pub const tintegral: Key = Key(ffi::GDK_KEY_tintegral as u32); pub const because: Key = Key(ffi::GDK_KEY_because as u32); pub const approxeq: Key = Key(ffi::GDK_KEY_approxeq as u32); pub const notapproxeq: Key = Key(ffi::GDK_KEY_notapproxeq as u32); pub const notidentical: Key = Key(ffi::GDK_KEY_notidentical as u32); pub const stricteq: Key = Key(ffi::GDK_KEY_stricteq as u32); pub const braille_dot_1: Key = Key(ffi::GDK_KEY_braille_dot_1 as u32); pub const braille_dot_2: Key = Key(ffi::GDK_KEY_braille_dot_2 as u32); pub const braille_dot_3: Key = Key(ffi::GDK_KEY_braille_dot_3 as u32); pub const braille_dot_4: Key = Key(ffi::GDK_KEY_braille_dot_4 as u32); pub const braille_dot_5: Key = Key(ffi::GDK_KEY_braille_dot_5 as u32); pub const braille_dot_6: Key = Key(ffi::GDK_KEY_braille_dot_6 as u32); pub const braille_dot_7: Key = Key(ffi::GDK_KEY_braille_dot_7 as u32); pub const braille_dot_8: Key = Key(ffi::GDK_KEY_braille_dot_8 as u32); pub const braille_dot_9: Key = Key(ffi::GDK_KEY_braille_dot_9 as u32); pub const braille_dot_10: Key = Key(ffi::GDK_KEY_braille_dot_10 as u32); pub const braille_blank: Key = Key(ffi::GDK_KEY_braille_blank as u32); pub const braille_dots_1: Key = Key(ffi::GDK_KEY_braille_dots_1 as u32); pub const braille_dots_2: Key = Key(ffi::GDK_KEY_braille_dots_2 as u32); pub const braille_dots_12: Key = Key(ffi::GDK_KEY_braille_dots_12 as u32); pub const braille_dots_3: Key = Key(ffi::GDK_KEY_braille_dots_3 as u32); pub const braille_dots_13: Key = Key(ffi::GDK_KEY_braille_dots_13 as u32); pub const braille_dots_23: Key = Key(ffi::GDK_KEY_braille_dots_23 as u32); pub const braille_dots_123: Key = Key(ffi::GDK_KEY_braille_dots_123 as u32); pub const braille_dots_4: Key = Key(ffi::GDK_KEY_braille_dots_4 as u32); pub const braille_dots_14: Key = Key(ffi::GDK_KEY_braille_dots_14 as u32); pub const braille_dots_24: Key = Key(ffi::GDK_KEY_braille_dots_24 as u32); pub const braille_dots_124: Key = Key(ffi::GDK_KEY_braille_dots_124 as u32); pub const braille_dots_34: Key = Key(ffi::GDK_KEY_braille_dots_34 as u32); pub const braille_dots_134: Key = Key(ffi::GDK_KEY_braille_dots_134 as u32); pub const braille_dots_234: Key = Key(ffi::GDK_KEY_braille_dots_234 as u32); pub const braille_dots_1234: Key = Key(ffi::GDK_KEY_braille_dots_1234 as u32); pub const braille_dots_5: Key = Key(ffi::GDK_KEY_braille_dots_5 as u32); pub const braille_dots_15: Key = Key(ffi::GDK_KEY_braille_dots_15 as u32); pub const braille_dots_25: Key = Key(ffi::GDK_KEY_braille_dots_25 as u32); pub const braille_dots_125: Key = Key(ffi::GDK_KEY_braille_dots_125 as u32); pub const braille_dots_35: Key = Key(ffi::GDK_KEY_braille_dots_35 as u32); pub const braille_dots_135: Key = Key(ffi::GDK_KEY_braille_dots_135 as u32); pub const braille_dots_235: Key = Key(ffi::GDK_KEY_braille_dots_235 as u32); pub const braille_dots_1235: Key = Key(ffi::GDK_KEY_braille_dots_1235 as u32); pub const braille_dots_45: Key = Key(ffi::GDK_KEY_braille_dots_45 as u32); pub const braille_dots_145: Key = Key(ffi::GDK_KEY_braille_dots_145 as u32); pub const braille_dots_245: Key = Key(ffi::GDK_KEY_braille_dots_245 as u32); pub const braille_dots_1245: Key = Key(ffi::GDK_KEY_braille_dots_1245 as u32); pub const braille_dots_345: Key = Key(ffi::GDK_KEY_braille_dots_345 as u32); pub const braille_dots_1345: Key = Key(ffi::GDK_KEY_braille_dots_1345 as u32); pub const braille_dots_2345: Key = Key(ffi::GDK_KEY_braille_dots_2345 as u32); pub const braille_dots_12345: Key = Key(ffi::GDK_KEY_braille_dots_12345 as u32); pub const braille_dots_6: Key = Key(ffi::GDK_KEY_braille_dots_6 as u32); pub const braille_dots_16: Key = Key(ffi::GDK_KEY_braille_dots_16 as u32); pub const braille_dots_26: Key = Key(ffi::GDK_KEY_braille_dots_26 as u32); pub const braille_dots_126: Key = Key(ffi::GDK_KEY_braille_dots_126 as u32); pub const braille_dots_36: Key = Key(ffi::GDK_KEY_braille_dots_36 as u32); pub const braille_dots_136: Key = Key(ffi::GDK_KEY_braille_dots_136 as u32); pub const braille_dots_236: Key = Key(ffi::GDK_KEY_braille_dots_236 as u32); pub const braille_dots_1236: Key = Key(ffi::GDK_KEY_braille_dots_1236 as u32); pub const braille_dots_46: Key = Key(ffi::GDK_KEY_braille_dots_46 as u32); pub const braille_dots_146: Key = Key(ffi::GDK_KEY_braille_dots_146 as u32); pub const braille_dots_246: Key = Key(ffi::GDK_KEY_braille_dots_246 as u32); pub const braille_dots_1246: Key = Key(ffi::GDK_KEY_braille_dots_1246 as u32); pub const braille_dots_346: Key = Key(ffi::GDK_KEY_braille_dots_346 as u32); pub const braille_dots_1346: Key = Key(ffi::GDK_KEY_braille_dots_1346 as u32); pub const braille_dots_2346: Key = Key(ffi::GDK_KEY_braille_dots_2346 as u32); pub const braille_dots_12346: Key = Key(ffi::GDK_KEY_braille_dots_12346 as u32); pub const braille_dots_56: Key = Key(ffi::GDK_KEY_braille_dots_56 as u32); pub const braille_dots_156: Key = Key(ffi::GDK_KEY_braille_dots_156 as u32); pub const braille_dots_256: Key = Key(ffi::GDK_KEY_braille_dots_256 as u32); pub const braille_dots_1256: Key = Key(ffi::GDK_KEY_braille_dots_1256 as u32); pub const braille_dots_356: Key = Key(ffi::GDK_KEY_braille_dots_356 as u32); pub const braille_dots_1356: Key = Key(ffi::GDK_KEY_braille_dots_1356 as u32); pub const braille_dots_2356: Key = Key(ffi::GDK_KEY_braille_dots_2356 as u32); pub const braille_dots_12356: Key = Key(ffi::GDK_KEY_braille_dots_12356 as u32); pub const braille_dots_456: Key = Key(ffi::GDK_KEY_braille_dots_456 as u32); pub const braille_dots_1456: Key = Key(ffi::GDK_KEY_braille_dots_1456 as u32); pub const braille_dots_2456: Key = Key(ffi::GDK_KEY_braille_dots_2456 as u32); pub const braille_dots_12456: Key = Key(ffi::GDK_KEY_braille_dots_12456 as u32); pub const braille_dots_3456: Key = Key(ffi::GDK_KEY_braille_dots_3456 as u32); pub const braille_dots_13456: Key = Key(ffi::GDK_KEY_braille_dots_13456 as u32); pub const braille_dots_23456: Key = Key(ffi::GDK_KEY_braille_dots_23456 as u32); pub const braille_dots_123456: Key = Key(ffi::GDK_KEY_braille_dots_123456 as u32); pub const braille_dots_7: Key = Key(ffi::GDK_KEY_braille_dots_7 as u32); pub const braille_dots_17: Key = Key(ffi::GDK_KEY_braille_dots_17 as u32); pub const braille_dots_27: Key = Key(ffi::GDK_KEY_braille_dots_27 as u32); pub const braille_dots_127: Key = Key(ffi::GDK_KEY_braille_dots_127 as u32); pub const braille_dots_37: Key = Key(ffi::GDK_KEY_braille_dots_37 as u32); pub const braille_dots_137: Key = Key(ffi::GDK_KEY_braille_dots_137 as u32); pub const braille_dots_237: Key = Key(ffi::GDK_KEY_braille_dots_237 as u32); pub const braille_dots_1237: Key = Key(ffi::GDK_KEY_braille_dots_1237 as u32); pub const braille_dots_47: Key = Key(ffi::GDK_KEY_braille_dots_47 as u32); pub const braille_dots_147: Key = Key(ffi::GDK_KEY_braille_dots_147 as u32); pub const braille_dots_247: Key = Key(ffi::GDK_KEY_braille_dots_247 as u32); pub const braille_dots_1247: Key = Key(ffi::GDK_KEY_braille_dots_1247 as u32); pub const braille_dots_347: Key = Key(ffi::GDK_KEY_braille_dots_347 as u32); pub const braille_dots_1347: Key = Key(ffi::GDK_KEY_braille_dots_1347 as u32); pub const braille_dots_2347: Key = Key(ffi::GDK_KEY_braille_dots_2347 as u32); pub const braille_dots_12347: Key = Key(ffi::GDK_KEY_braille_dots_12347 as u32); pub const braille_dots_57: Key = Key(ffi::GDK_KEY_braille_dots_57 as u32); pub const braille_dots_157: Key = Key(ffi::GDK_KEY_braille_dots_157 as u32); pub const braille_dots_257: Key = Key(ffi::GDK_KEY_braille_dots_257 as u32); pub const braille_dots_1257: Key = Key(ffi::GDK_KEY_braille_dots_1257 as u32); pub const braille_dots_357: Key = Key(ffi::GDK_KEY_braille_dots_357 as u32); pub const braille_dots_1357: Key = Key(ffi::GDK_KEY_braille_dots_1357 as u32); pub const braille_dots_2357: Key = Key(ffi::GDK_KEY_braille_dots_2357 as u32); pub const braille_dots_12357: Key = Key(ffi::GDK_KEY_braille_dots_12357 as u32); pub const braille_dots_457: Key = Key(ffi::GDK_KEY_braille_dots_457 as u32); pub const braille_dots_1457: Key = Key(ffi::GDK_KEY_braille_dots_1457 as u32); pub const braille_dots_2457: Key = Key(ffi::GDK_KEY_braille_dots_2457 as u32); pub const braille_dots_12457: Key = Key(ffi::GDK_KEY_braille_dots_12457 as u32); pub const braille_dots_3457: Key = Key(ffi::GDK_KEY_braille_dots_3457 as u32); pub const braille_dots_13457: Key = Key(ffi::GDK_KEY_braille_dots_13457 as u32); pub const braille_dots_23457: Key = Key(ffi::GDK_KEY_braille_dots_23457 as u32); pub const braille_dots_123457: Key = Key(ffi::GDK_KEY_braille_dots_123457 as u32); pub const braille_dots_67: Key = Key(ffi::GDK_KEY_braille_dots_67 as u32); pub const braille_dots_167: Key = Key(ffi::GDK_KEY_braille_dots_167 as u32); pub const braille_dots_267: Key = Key(ffi::GDK_KEY_braille_dots_267 as u32); pub const braille_dots_1267: Key = Key(ffi::GDK_KEY_braille_dots_1267 as u32); pub const braille_dots_367: Key = Key(ffi::GDK_KEY_braille_dots_367 as u32); pub const braille_dots_1367: Key = Key(ffi::GDK_KEY_braille_dots_1367 as u32); pub const braille_dots_2367: Key = Key(ffi::GDK_KEY_braille_dots_2367 as u32); pub const braille_dots_12367: Key = Key(ffi::GDK_KEY_braille_dots_12367 as u32); pub const braille_dots_467: Key = Key(ffi::GDK_KEY_braille_dots_467 as u32); pub const braille_dots_1467: Key = Key(ffi::GDK_KEY_braille_dots_1467 as u32); pub const braille_dots_2467: Key = Key(ffi::GDK_KEY_braille_dots_2467 as u32); pub const braille_dots_12467: Key = Key(ffi::GDK_KEY_braille_dots_12467 as u32); pub const braille_dots_3467: Key = Key(ffi::GDK_KEY_braille_dots_3467 as u32); pub const braille_dots_13467: Key = Key(ffi::GDK_KEY_braille_dots_13467 as u32); pub const braille_dots_23467: Key = Key(ffi::GDK_KEY_braille_dots_23467 as u32); pub const braille_dots_123467: Key = Key(ffi::GDK_KEY_braille_dots_123467 as u32); pub const braille_dots_567: Key = Key(ffi::GDK_KEY_braille_dots_567 as u32); pub const braille_dots_1567: Key = Key(ffi::GDK_KEY_braille_dots_1567 as u32); pub const braille_dots_2567: Key = Key(ffi::GDK_KEY_braille_dots_2567 as u32); pub const braille_dots_12567: Key = Key(ffi::GDK_KEY_braille_dots_12567 as u32); pub const braille_dots_3567: Key = Key(ffi::GDK_KEY_braille_dots_3567 as u32); pub const braille_dots_13567: Key = Key(ffi::GDK_KEY_braille_dots_13567 as u32); pub const braille_dots_23567: Key = Key(ffi::GDK_KEY_braille_dots_23567 as u32); pub const braille_dots_123567: Key = Key(ffi::GDK_KEY_braille_dots_123567 as u32); pub const braille_dots_4567: Key = Key(ffi::GDK_KEY_braille_dots_4567 as u32); pub const braille_dots_14567: Key = Key(ffi::GDK_KEY_braille_dots_14567 as u32); pub const braille_dots_24567: Key = Key(ffi::GDK_KEY_braille_dots_24567 as u32); pub const braille_dots_124567: Key = Key(ffi::GDK_KEY_braille_dots_124567 as u32); pub const braille_dots_34567: Key = Key(ffi::GDK_KEY_braille_dots_34567 as u32); pub const braille_dots_134567: Key = Key(ffi::GDK_KEY_braille_dots_134567 as u32); pub const braille_dots_234567: Key = Key(ffi::GDK_KEY_braille_dots_234567 as u32); pub const braille_dots_1234567: Key = Key(ffi::GDK_KEY_braille_dots_1234567 as u32); pub const braille_dots_8: Key = Key(ffi::GDK_KEY_braille_dots_8 as u32); pub const braille_dots_18: Key = Key(ffi::GDK_KEY_braille_dots_18 as u32); pub const braille_dots_28: Key = Key(ffi::GDK_KEY_braille_dots_28 as u32); pub const braille_dots_128: Key = Key(ffi::GDK_KEY_braille_dots_128 as u32); pub const braille_dots_38: Key = Key(ffi::GDK_KEY_braille_dots_38 as u32); pub const braille_dots_138: Key = Key(ffi::GDK_KEY_braille_dots_138 as u32); pub const braille_dots_238: Key = Key(ffi::GDK_KEY_braille_dots_238 as u32); pub const braille_dots_1238: Key = Key(ffi::GDK_KEY_braille_dots_1238 as u32); pub const braille_dots_48: Key = Key(ffi::GDK_KEY_braille_dots_48 as u32); pub const braille_dots_148: Key = Key(ffi::GDK_KEY_braille_dots_148 as u32); pub const braille_dots_248: Key = Key(ffi::GDK_KEY_braille_dots_248 as u32); pub const braille_dots_1248: Key = Key(ffi::GDK_KEY_braille_dots_1248 as u32); pub const braille_dots_348: Key = Key(ffi::GDK_KEY_braille_dots_348 as u32); pub const braille_dots_1348: Key = Key(ffi::GDK_KEY_braille_dots_1348 as u32); pub const braille_dots_2348: Key = Key(ffi::GDK_KEY_braille_dots_2348 as u32); pub const braille_dots_12348: Key = Key(ffi::GDK_KEY_braille_dots_12348 as u32); pub const braille_dots_58: Key = Key(ffi::GDK_KEY_braille_dots_58 as u32); pub const braille_dots_158: Key = Key(ffi::GDK_KEY_braille_dots_158 as u32); pub const braille_dots_258: Key = Key(ffi::GDK_KEY_braille_dots_258 as u32); pub const braille_dots_1258: Key = Key(ffi::GDK_KEY_braille_dots_1258 as u32); pub const braille_dots_358: Key = Key(ffi::GDK_KEY_braille_dots_358 as u32); pub const braille_dots_1358: Key = Key(ffi::GDK_KEY_braille_dots_1358 as u32); pub const braille_dots_2358: Key = Key(ffi::GDK_KEY_braille_dots_2358 as u32); pub const braille_dots_12358: Key = Key(ffi::GDK_KEY_braille_dots_12358 as u32); pub const braille_dots_458: Key = Key(ffi::GDK_KEY_braille_dots_458 as u32); pub const braille_dots_1458: Key = Key(ffi::GDK_KEY_braille_dots_1458 as u32); pub const braille_dots_2458: Key = Key(ffi::GDK_KEY_braille_dots_2458 as u32); pub const braille_dots_12458: Key = Key(ffi::GDK_KEY_braille_dots_12458 as u32); pub const braille_dots_3458: Key = Key(ffi::GDK_KEY_braille_dots_3458 as u32); pub const braille_dots_13458: Key = Key(ffi::GDK_KEY_braille_dots_13458 as u32); pub const braille_dots_23458: Key = Key(ffi::GDK_KEY_braille_dots_23458 as u32); pub const braille_dots_123458: Key = Key(ffi::GDK_KEY_braille_dots_123458 as u32); pub const braille_dots_68: Key = Key(ffi::GDK_KEY_braille_dots_68 as u32); pub const braille_dots_168: Key = Key(ffi::GDK_KEY_braille_dots_168 as u32); pub const braille_dots_268: Key = Key(ffi::GDK_KEY_braille_dots_268 as u32); pub const braille_dots_1268: Key = Key(ffi::GDK_KEY_braille_dots_1268 as u32); pub const braille_dots_368: Key = Key(ffi::GDK_KEY_braille_dots_368 as u32); pub const braille_dots_1368: Key = Key(ffi::GDK_KEY_braille_dots_1368 as u32); pub const braille_dots_2368: Key = Key(ffi::GDK_KEY_braille_dots_2368 as u32); pub const braille_dots_12368: Key = Key(ffi::GDK_KEY_braille_dots_12368 as u32); pub const braille_dots_468: Key = Key(ffi::GDK_KEY_braille_dots_468 as u32); pub const braille_dots_1468: Key = Key(ffi::GDK_KEY_braille_dots_1468 as u32); pub const braille_dots_2468: Key = Key(ffi::GDK_KEY_braille_dots_2468 as u32); pub const braille_dots_12468: Key = Key(ffi::GDK_KEY_braille_dots_12468 as u32); pub const braille_dots_3468: Key = Key(ffi::GDK_KEY_braille_dots_3468 as u32); pub const braille_dots_13468: Key = Key(ffi::GDK_KEY_braille_dots_13468 as u32); pub const braille_dots_23468: Key = Key(ffi::GDK_KEY_braille_dots_23468 as u32); pub const braille_dots_123468: Key = Key(ffi::GDK_KEY_braille_dots_123468 as u32); pub const braille_dots_568: Key = Key(ffi::GDK_KEY_braille_dots_568 as u32); pub const braille_dots_1568: Key = Key(ffi::GDK_KEY_braille_dots_1568 as u32); pub const braille_dots_2568: Key = Key(ffi::GDK_KEY_braille_dots_2568 as u32); pub const braille_dots_12568: Key = Key(ffi::GDK_KEY_braille_dots_12568 as u32); pub const braille_dots_3568: Key = Key(ffi::GDK_KEY_braille_dots_3568 as u32); pub const braille_dots_13568: Key = Key(ffi::GDK_KEY_braille_dots_13568 as u32); pub const braille_dots_23568: Key = Key(ffi::GDK_KEY_braille_dots_23568 as u32); pub const braille_dots_123568: Key = Key(ffi::GDK_KEY_braille_dots_123568 as u32); pub const braille_dots_4568: Key = Key(ffi::GDK_KEY_braille_dots_4568 as u32); pub const braille_dots_14568: Key = Key(ffi::GDK_KEY_braille_dots_14568 as u32); pub const braille_dots_24568: Key = Key(ffi::GDK_KEY_braille_dots_24568 as u32); pub const braille_dots_124568: Key = Key(ffi::GDK_KEY_braille_dots_124568 as u32); pub const braille_dots_34568: Key = Key(ffi::GDK_KEY_braille_dots_34568 as u32); pub const braille_dots_134568: Key = Key(ffi::GDK_KEY_braille_dots_134568 as u32); pub const braille_dots_234568: Key = Key(ffi::GDK_KEY_braille_dots_234568 as u32); pub const braille_dots_1234568: Key = Key(ffi::GDK_KEY_braille_dots_1234568 as u32); pub const braille_dots_78: Key = Key(ffi::GDK_KEY_braille_dots_78 as u32); pub const braille_dots_178: Key = Key(ffi::GDK_KEY_braille_dots_178 as u32); pub const braille_dots_278: Key = Key(ffi::GDK_KEY_braille_dots_278 as u32); pub const braille_dots_1278: Key = Key(ffi::GDK_KEY_braille_dots_1278 as u32); pub const braille_dots_378: Key = Key(ffi::GDK_KEY_braille_dots_378 as u32); pub const braille_dots_1378: Key = Key(ffi::GDK_KEY_braille_dots_1378 as u32); pub const braille_dots_2378: Key = Key(ffi::GDK_KEY_braille_dots_2378 as u32); pub const braille_dots_12378: Key = Key(ffi::GDK_KEY_braille_dots_12378 as u32); pub const braille_dots_478: Key = Key(ffi::GDK_KEY_braille_dots_478 as u32); pub const braille_dots_1478: Key = Key(ffi::GDK_KEY_braille_dots_1478 as u32); pub const braille_dots_2478: Key = Key(ffi::GDK_KEY_braille_dots_2478 as u32); pub const braille_dots_12478: Key = Key(ffi::GDK_KEY_braille_dots_12478 as u32); pub const braille_dots_3478: Key = Key(ffi::GDK_KEY_braille_dots_3478 as u32); pub const braille_dots_13478: Key = Key(ffi::GDK_KEY_braille_dots_13478 as u32); pub const braille_dots_23478: Key = Key(ffi::GDK_KEY_braille_dots_23478 as u32); pub const braille_dots_123478: Key = Key(ffi::GDK_KEY_braille_dots_123478 as u32); pub const braille_dots_578: Key = Key(ffi::GDK_KEY_braille_dots_578 as u32); pub const braille_dots_1578: Key = Key(ffi::GDK_KEY_braille_dots_1578 as u32); pub const braille_dots_2578: Key = Key(ffi::GDK_KEY_braille_dots_2578 as u32); pub const braille_dots_12578: Key = Key(ffi::GDK_KEY_braille_dots_12578 as u32); pub const braille_dots_3578: Key = Key(ffi::GDK_KEY_braille_dots_3578 as u32); pub const braille_dots_13578: Key = Key(ffi::GDK_KEY_braille_dots_13578 as u32); pub const braille_dots_23578: Key = Key(ffi::GDK_KEY_braille_dots_23578 as u32); pub const braille_dots_123578: Key = Key(ffi::GDK_KEY_braille_dots_123578 as u32); pub const braille_dots_4578: Key = Key(ffi::GDK_KEY_braille_dots_4578 as u32); pub const braille_dots_14578: Key = Key(ffi::GDK_KEY_braille_dots_14578 as u32); pub const braille_dots_24578: Key = Key(ffi::GDK_KEY_braille_dots_24578 as u32); pub const braille_dots_124578: Key = Key(ffi::GDK_KEY_braille_dots_124578 as u32); pub const braille_dots_34578: Key = Key(ffi::GDK_KEY_braille_dots_34578 as u32); pub const braille_dots_134578: Key = Key(ffi::GDK_KEY_braille_dots_134578 as u32); pub const braille_dots_234578: Key = Key(ffi::GDK_KEY_braille_dots_234578 as u32); pub const braille_dots_1234578: Key = Key(ffi::GDK_KEY_braille_dots_1234578 as u32); pub const braille_dots_678: Key = Key(ffi::GDK_KEY_braille_dots_678 as u32); pub const braille_dots_1678: Key = Key(ffi::GDK_KEY_braille_dots_1678 as u32); pub const braille_dots_2678: Key = Key(ffi::GDK_KEY_braille_dots_2678 as u32); pub const braille_dots_12678: Key = Key(ffi::GDK_KEY_braille_dots_12678 as u32); pub const braille_dots_3678: Key = Key(ffi::GDK_KEY_braille_dots_3678 as u32); pub const braille_dots_13678: Key = Key(ffi::GDK_KEY_braille_dots_13678 as u32); pub const braille_dots_23678: Key = Key(ffi::GDK_KEY_braille_dots_23678 as u32); pub const braille_dots_123678: Key = Key(ffi::GDK_KEY_braille_dots_123678 as u32); pub const braille_dots_4678: Key = Key(ffi::GDK_KEY_braille_dots_4678 as u32); pub const braille_dots_14678: Key = Key(ffi::GDK_KEY_braille_dots_14678 as u32); pub const braille_dots_24678: Key = Key(ffi::GDK_KEY_braille_dots_24678 as u32); pub const braille_dots_124678: Key = Key(ffi::GDK_KEY_braille_dots_124678 as u32); pub const braille_dots_34678: Key = Key(ffi::GDK_KEY_braille_dots_34678 as u32); pub const braille_dots_134678: Key = Key(ffi::GDK_KEY_braille_dots_134678 as u32); pub const braille_dots_234678: Key = Key(ffi::GDK_KEY_braille_dots_234678 as u32); pub const braille_dots_1234678: Key = Key(ffi::GDK_KEY_braille_dots_1234678 as u32); pub const braille_dots_5678: Key = Key(ffi::GDK_KEY_braille_dots_5678 as u32); pub const braille_dots_15678: Key = Key(ffi::GDK_KEY_braille_dots_15678 as u32); pub const braille_dots_25678: Key = Key(ffi::GDK_KEY_braille_dots_25678 as u32); pub const braille_dots_125678: Key = Key(ffi::GDK_KEY_braille_dots_125678 as u32); pub const braille_dots_35678: Key = Key(ffi::GDK_KEY_braille_dots_35678 as u32); pub const braille_dots_135678: Key = Key(ffi::GDK_KEY_braille_dots_135678 as u32); pub const braille_dots_235678: Key = Key(ffi::GDK_KEY_braille_dots_235678 as u32); pub const braille_dots_1235678: Key = Key(ffi::GDK_KEY_braille_dots_1235678 as u32); pub const braille_dots_45678: Key = Key(ffi::GDK_KEY_braille_dots_45678 as u32); pub const braille_dots_145678: Key = Key(ffi::GDK_KEY_braille_dots_145678 as u32); pub const braille_dots_245678: Key = Key(ffi::GDK_KEY_braille_dots_245678 as u32); pub const braille_dots_1245678: Key = Key(ffi::GDK_KEY_braille_dots_1245678 as u32); pub const braille_dots_345678: Key = Key(ffi::GDK_KEY_braille_dots_345678 as u32); pub const braille_dots_1345678: Key = Key(ffi::GDK_KEY_braille_dots_1345678 as u32); pub const braille_dots_2345678: Key = Key(ffi::GDK_KEY_braille_dots_2345678 as u32); pub const braille_dots_12345678: Key = Key(ffi::GDK_KEY_braille_dots_12345678 as u32); pub const Sinh_ng: Key = Key(ffi::GDK_KEY_Sinh_ng as u32); pub const Sinh_h2: Key = Key(ffi::GDK_KEY_Sinh_h2 as u32); pub const Sinh_a: Key = Key(ffi::GDK_KEY_Sinh_a as u32); pub const Sinh_aa: Key = Key(ffi::GDK_KEY_Sinh_aa as u32); pub const Sinh_ae: Key = Key(ffi::GDK_KEY_Sinh_ae as u32); pub const Sinh_aee: Key = Key(ffi::GDK_KEY_Sinh_aee as u32); pub const Sinh_i: Key = Key(ffi::GDK_KEY_Sinh_i as u32); pub const Sinh_ii: Key = Key(ffi::GDK_KEY_Sinh_ii as u32); pub const Sinh_u: Key = Key(ffi::GDK_KEY_Sinh_u as u32); pub const Sinh_uu: Key = Key(ffi::GDK_KEY_Sinh_uu as u32); pub const Sinh_ri: Key = Key(ffi::GDK_KEY_Sinh_ri as u32); pub const Sinh_rii: Key = Key(ffi::GDK_KEY_Sinh_rii as u32); pub const Sinh_lu: Key = Key(ffi::GDK_KEY_Sinh_lu as u32); pub const Sinh_luu: Key = Key(ffi::GDK_KEY_Sinh_luu as u32); pub const Sinh_e: Key = Key(ffi::GDK_KEY_Sinh_e as u32); pub const Sinh_ee: Key = Key(ffi::GDK_KEY_Sinh_ee as u32); pub const Sinh_ai: Key = Key(ffi::GDK_KEY_Sinh_ai as u32); pub const Sinh_o: Key = Key(ffi::GDK_KEY_Sinh_o as u32); pub const Sinh_oo: Key = Key(ffi::GDK_KEY_Sinh_oo as u32); pub const Sinh_au: Key = Key(ffi::GDK_KEY_Sinh_au as u32); pub const Sinh_ka: Key = Key(ffi::GDK_KEY_Sinh_ka as u32); pub const Sinh_kha: Key = Key(ffi::GDK_KEY_Sinh_kha as u32); pub const Sinh_ga: Key = Key(ffi::GDK_KEY_Sinh_ga as u32); pub const Sinh_gha: Key = Key(ffi::GDK_KEY_Sinh_gha as u32); pub const Sinh_ng2: Key = Key(ffi::GDK_KEY_Sinh_ng2 as u32); pub const Sinh_nga: Key = Key(ffi::GDK_KEY_Sinh_nga as u32); pub const Sinh_ca: Key = Key(ffi::GDK_KEY_Sinh_ca as u32); pub const Sinh_cha: Key = Key(ffi::GDK_KEY_Sinh_cha as u32); pub const Sinh_ja: Key = Key(ffi::GDK_KEY_Sinh_ja as u32); pub const Sinh_jha: Key = Key(ffi::GDK_KEY_Sinh_jha as u32); pub const Sinh_nya: Key = Key(ffi::GDK_KEY_Sinh_nya as u32); pub const Sinh_jnya: Key = Key(ffi::GDK_KEY_Sinh_jnya as u32); pub const Sinh_nja: Key = Key(ffi::GDK_KEY_Sinh_nja as u32); pub const Sinh_tta: Key = Key(ffi::GDK_KEY_Sinh_tta as u32); pub const Sinh_ttha: Key = Key(ffi::GDK_KEY_Sinh_ttha as u32); pub const Sinh_dda: Key = Key(ffi::GDK_KEY_Sinh_dda as u32); pub const Sinh_ddha: Key = Key(ffi::GDK_KEY_Sinh_ddha as u32); pub const Sinh_nna: Key = Key(ffi::GDK_KEY_Sinh_nna as u32); pub const Sinh_ndda: Key = Key(ffi::GDK_KEY_Sinh_ndda as u32); pub const Sinh_tha: Key = Key(ffi::GDK_KEY_Sinh_tha as u32); pub const Sinh_thha: Key = Key(ffi::GDK_KEY_Sinh_thha as u32); pub const Sinh_dha: Key = Key(ffi::GDK_KEY_Sinh_dha as u32); pub const Sinh_dhha: Key = Key(ffi::GDK_KEY_Sinh_dhha as u32); pub const Sinh_na: Key = Key(ffi::GDK_KEY_Sinh_na as u32); pub const Sinh_ndha: Key = Key(ffi::GDK_KEY_Sinh_ndha as u32); pub const Sinh_pa: Key = Key(ffi::GDK_KEY_Sinh_pa as u32); pub const Sinh_pha: Key = Key(ffi::GDK_KEY_Sinh_pha as u32); pub const Sinh_ba: Key = Key(ffi::GDK_KEY_Sinh_ba as u32); pub const Sinh_bha: Key = Key(ffi::GDK_KEY_Sinh_bha as u32); pub const Sinh_ma: Key = Key(ffi::GDK_KEY_Sinh_ma as u32); pub const Sinh_mba: Key = Key(ffi::GDK_KEY_Sinh_mba as u32); pub const Sinh_ya: Key = Key(ffi::GDK_KEY_Sinh_ya as u32); pub const Sinh_ra: Key = Key(ffi::GDK_KEY_Sinh_ra as u32); pub const Sinh_la: Key = Key(ffi::GDK_KEY_Sinh_la as u32); pub const Sinh_va: Key = Key(ffi::GDK_KEY_Sinh_va as u32); pub const Sinh_sha: Key = Key(ffi::GDK_KEY_Sinh_sha as u32); pub const Sinh_ssha: Key = Key(ffi::GDK_KEY_Sinh_ssha as u32); pub const Sinh_sa: Key = Key(ffi::GDK_KEY_Sinh_sa as u32); pub const Sinh_ha: Key = Key(ffi::GDK_KEY_Sinh_ha as u32); pub const Sinh_lla: Key = Key(ffi::GDK_KEY_Sinh_lla as u32); pub const Sinh_fa: Key = Key(ffi::GDK_KEY_Sinh_fa as u32); pub const Sinh_al: Key = Key(ffi::GDK_KEY_Sinh_al as u32); pub const Sinh_aa2: Key = Key(ffi::GDK_KEY_Sinh_aa2 as u32); pub const Sinh_ae2: Key = Key(ffi::GDK_KEY_Sinh_ae2 as u32); pub const Sinh_aee2: Key = Key(ffi::GDK_KEY_Sinh_aee2 as u32); pub const Sinh_i2: Key = Key(ffi::GDK_KEY_Sinh_i2 as u32); pub const Sinh_ii2: Key = Key(ffi::GDK_KEY_Sinh_ii2 as u32); pub const Sinh_u2: Key = Key(ffi::GDK_KEY_Sinh_u2 as u32); pub const Sinh_uu2: Key = Key(ffi::GDK_KEY_Sinh_uu2 as u32); pub const Sinh_ru2: Key = Key(ffi::GDK_KEY_Sinh_ru2 as u32); pub const Sinh_e2: Key = Key(ffi::GDK_KEY_Sinh_e2 as u32); pub const Sinh_ee2: Key = Key(ffi::GDK_KEY_Sinh_ee2 as u32); pub const Sinh_ai2: Key = Key(ffi::GDK_KEY_Sinh_ai2 as u32); pub const Sinh_o2: Key = Key(ffi::GDK_KEY_Sinh_o2 as u32); pub const Sinh_oo2: Key = Key(ffi::GDK_KEY_Sinh_oo2 as u32); pub const Sinh_au2: Key = Key(ffi::GDK_KEY_Sinh_au2 as u32); pub const Sinh_lu2: Key = Key(ffi::GDK_KEY_Sinh_lu2 as u32); pub const Sinh_ruu2: Key = Key(ffi::GDK_KEY_Sinh_ruu2 as u32); pub const Sinh_luu2: Key = Key(ffi::GDK_KEY_Sinh_luu2 as u32); pub const Sinh_kunddaliya: Key = Key(ffi::GDK_KEY_Sinh_kunddaliya as u32); pub const ModeLock: Key = Key(ffi::GDK_KEY_ModeLock as u32); pub const MonBrightnessUp: Key = Key(ffi::GDK_KEY_MonBrightnessUp as u32); pub const MonBrightnessDown: Key = Key(ffi::GDK_KEY_MonBrightnessDown as u32); pub const KbdLightOnOff: Key = Key(ffi::GDK_KEY_KbdLightOnOff as u32); pub const KbdBrightnessUp: Key = Key(ffi::GDK_KEY_KbdBrightnessUp as u32); pub const KbdBrightnessDown: Key = Key(ffi::GDK_KEY_KbdBrightnessDown as u32); pub const Standby: Key = Key(ffi::GDK_KEY_Standby as u32); pub const AudioLowerVolume: Key = Key(ffi::GDK_KEY_AudioLowerVolume as u32); pub const AudioMute: Key = Key(ffi::GDK_KEY_AudioMute as u32); pub const AudioRaiseVolume: Key = Key(ffi::GDK_KEY_AudioRaiseVolume as u32); pub const AudioPlay: Key = Key(ffi::GDK_KEY_AudioPlay as u32); pub const AudioStop: Key = Key(ffi::GDK_KEY_AudioStop as u32); pub const AudioPrev: Key = Key(ffi::GDK_KEY_AudioPrev as u32); pub const AudioNext: Key = Key(ffi::GDK_KEY_AudioNext as u32); pub const HomePage: Key = Key(ffi::GDK_KEY_HomePage as u32); pub const Mail: Key = Key(ffi::GDK_KEY_Mail as u32); pub const Start: Key = Key(ffi::GDK_KEY_Start as u32); pub const Search: Key = Key(ffi::GDK_KEY_Search as u32); pub const AudioRecord: Key = Key(ffi::GDK_KEY_AudioRecord as u32); pub const Calculator: Key = Key(ffi::GDK_KEY_Calculator as u32); pub const Memo: Key = Key(ffi::GDK_KEY_Memo as u32); pub const ToDoList: Key = Key(ffi::GDK_KEY_ToDoList as u32); pub const Calendar: Key = Key(ffi::GDK_KEY_Calendar as u32); pub const PowerDown: Key = Key(ffi::GDK_KEY_PowerDown as u32); pub const ContrastAdjust: Key = Key(ffi::GDK_KEY_ContrastAdjust as u32); pub const RockerUp: Key = Key(ffi::GDK_KEY_RockerUp as u32); pub const RockerDown: Key = Key(ffi::GDK_KEY_RockerDown as u32); pub const RockerEnter: Key = Key(ffi::GDK_KEY_RockerEnter as u32); pub const Back: Key = Key(ffi::GDK_KEY_Back as u32); pub const Forward: Key = Key(ffi::GDK_KEY_Forward as u32); pub const Stop: Key = Key(ffi::GDK_KEY_Stop as u32); pub const Refresh: Key = Key(ffi::GDK_KEY_Refresh as u32); pub const PowerOff: Key = Key(ffi::GDK_KEY_PowerOff as u32); pub const WakeUp: Key = Key(ffi::GDK_KEY_WakeUp as u32); pub const Eject: Key = Key(ffi::GDK_KEY_Eject as u32); pub const ScreenSaver: Key = Key(ffi::GDK_KEY_ScreenSaver as u32); pub const WWW: Key = Key(ffi::GDK_KEY_WWW as u32); pub const Sleep: Key = Key(ffi::GDK_KEY_Sleep as u32); pub const Favorites: Key = Key(ffi::GDK_KEY_Favorites as u32); pub const AudioPause: Key = Key(ffi::GDK_KEY_AudioPause as u32); pub const AudioMedia: Key = Key(ffi::GDK_KEY_AudioMedia as u32); pub const MyComputer: Key = Key(ffi::GDK_KEY_MyComputer as u32); pub const VendorHome: Key = Key(ffi::GDK_KEY_VendorHome as u32); pub const LightBulb: Key = Key(ffi::GDK_KEY_LightBulb as u32); pub const Shop: Key = Key(ffi::GDK_KEY_Shop as u32); pub const History: Key = Key(ffi::GDK_KEY_History as u32); pub const OpenURL: Key = Key(ffi::GDK_KEY_OpenURL as u32); pub const AddFavorite: Key = Key(ffi::GDK_KEY_AddFavorite as u32); pub const HotLinks: Key = Key(ffi::GDK_KEY_HotLinks as u32); pub const BrightnessAdjust: Key = Key(ffi::GDK_KEY_BrightnessAdjust as u32); pub const Finance: Key = Key(ffi::GDK_KEY_Finance as u32); pub const Community: Key = Key(ffi::GDK_KEY_Community as u32); pub const AudioRewind: Key = Key(ffi::GDK_KEY_AudioRewind as u32); pub const BackForward: Key = Key(ffi::GDK_KEY_BackForward as u32); pub const Launch0: Key = Key(ffi::GDK_KEY_Launch0 as u32); pub const Launch1: Key = Key(ffi::GDK_KEY_Launch1 as u32); pub const Launch2: Key = Key(ffi::GDK_KEY_Launch2 as u32); pub const Launch3: Key = Key(ffi::GDK_KEY_Launch3 as u32); pub const Launch4: Key = Key(ffi::GDK_KEY_Launch4 as u32); pub const Launch5: Key = Key(ffi::GDK_KEY_Launch5 as u32); pub const Launch6: Key = Key(ffi::GDK_KEY_Launch6 as u32); pub const Launch7: Key = Key(ffi::GDK_KEY_Launch7 as u32); pub const Launch8: Key = Key(ffi::GDK_KEY_Launch8 as u32); pub const Launch9: Key = Key(ffi::GDK_KEY_Launch9 as u32); pub const LaunchA: Key = Key(ffi::GDK_KEY_LaunchA as u32); pub const LaunchB: Key = Key(ffi::GDK_KEY_LaunchB as u32); pub const LaunchC: Key = Key(ffi::GDK_KEY_LaunchC as u32); pub const LaunchD: Key = Key(ffi::GDK_KEY_LaunchD as u32); pub const LaunchE: Key = Key(ffi::GDK_KEY_LaunchE as u32); pub const LaunchF: Key = Key(ffi::GDK_KEY_LaunchF as u32); pub const ApplicationLeft: Key = Key(ffi::GDK_KEY_ApplicationLeft as u32); pub const ApplicationRight: Key = Key(ffi::GDK_KEY_ApplicationRight as u32); pub const Book: Key = Key(ffi::GDK_KEY_Book as u32); pub const CD: Key = Key(ffi::GDK_KEY_CD as u32); pub const WindowClear: Key = Key(ffi::GDK_KEY_WindowClear as u32); pub const Close: Key = Key(ffi::GDK_KEY_Close as u32); pub const Copy: Key = Key(ffi::GDK_KEY_Copy as u32); pub const Cut: Key = Key(ffi::GDK_KEY_Cut as u32); pub const Display: Key = Key(ffi::GDK_KEY_Display as u32); pub const DOS: Key = Key(ffi::GDK_KEY_DOS as u32); pub const Documents: Key = Key(ffi::GDK_KEY_Documents as u32); pub const Excel: Key = Key(ffi::GDK_KEY_Excel as u32); pub const Explorer: Key = Key(ffi::GDK_KEY_Explorer as u32); pub const Game: Key = Key(ffi::GDK_KEY_Game as u32); pub const Go: Key = Key(ffi::GDK_KEY_Go as u32); pub const iTouch: Key = Key(ffi::GDK_KEY_iTouch as u32); pub const LogOff: Key = Key(ffi::GDK_KEY_LogOff as u32); pub const Market: Key = Key(ffi::GDK_KEY_Market as u32); pub const Meeting: Key = Key(ffi::GDK_KEY_Meeting as u32); pub const MenuKB: Key = Key(ffi::GDK_KEY_MenuKB as u32); pub const MenuPB: Key = Key(ffi::GDK_KEY_MenuPB as u32); pub const MySites: Key = Key(ffi::GDK_KEY_MySites as u32); pub const New: Key = Key(ffi::GDK_KEY_New as u32); pub const News: Key = Key(ffi::GDK_KEY_News as u32); pub const OfficeHome: Key = Key(ffi::GDK_KEY_OfficeHome as u32); pub const Open: Key = Key(ffi::GDK_KEY_Open as u32); pub const Option: Key = Key(ffi::GDK_KEY_Option as u32); pub const Paste: Key = Key(ffi::GDK_KEY_Paste as u32); pub const Phone: Key = Key(ffi::GDK_KEY_Phone as u32); pub const Reply: Key = Key(ffi::GDK_KEY_Reply as u32); pub const Reload: Key = Key(ffi::GDK_KEY_Reload as u32); pub const RotateWindows: Key = Key(ffi::GDK_KEY_RotateWindows as u32); pub const RotationPB: Key = Key(ffi::GDK_KEY_RotationPB as u32); pub const RotationKB: Key = Key(ffi::GDK_KEY_RotationKB as u32); pub const Save: Key = Key(ffi::GDK_KEY_Save as u32); pub const ScrollUp: Key = Key(ffi::GDK_KEY_ScrollUp as u32); pub const ScrollDown: Key = Key(ffi::GDK_KEY_ScrollDown as u32); pub const ScrollClick: Key = Key(ffi::GDK_KEY_ScrollClick as u32); pub const Send: Key = Key(ffi::GDK_KEY_Send as u32); pub const Spell: Key = Key(ffi::GDK_KEY_Spell as u32); pub const SplitScreen: Key = Key(ffi::GDK_KEY_SplitScreen as u32); pub const Support: Key = Key(ffi::GDK_KEY_Support as u32); pub const TaskPane: Key = Key(ffi::GDK_KEY_TaskPane as u32); pub const Terminal: Key = Key(ffi::GDK_KEY_Terminal as u32); pub const Tools: Key = Key(ffi::GDK_KEY_Tools as u32); pub const Travel: Key = Key(ffi::GDK_KEY_Travel as u32); pub const UserPB: Key = Key(ffi::GDK_KEY_UserPB as u32); pub const User1KB: Key = Key(ffi::GDK_KEY_User1KB as u32); pub const User2KB: Key = Key(ffi::GDK_KEY_User2KB as u32); pub const Video: Key = Key(ffi::GDK_KEY_Video as u32); pub const WheelButton: Key = Key(ffi::GDK_KEY_WheelButton as u32); pub const Word: Key = Key(ffi::GDK_KEY_Word as u32); pub const Xfer: Key = Key(ffi::GDK_KEY_Xfer as u32); pub const ZoomIn: Key = Key(ffi::GDK_KEY_ZoomIn as u32); pub const ZoomOut: Key = Key(ffi::GDK_KEY_ZoomOut as u32); pub const Away: Key = Key(ffi::GDK_KEY_Away as u32); pub const Messenger: Key = Key(ffi::GDK_KEY_Messenger as u32); pub const WebCam: Key = Key(ffi::GDK_KEY_WebCam as u32); pub const MailForward: Key = Key(ffi::GDK_KEY_MailForward as u32); pub const Pictures: Key = Key(ffi::GDK_KEY_Pictures as u32); pub const Music: Key = Key(ffi::GDK_KEY_Music as u32); pub const Battery: Key = Key(ffi::GDK_KEY_Battery as u32); pub const Bluetooth: Key = Key(ffi::GDK_KEY_Bluetooth as u32); pub const WLAN: Key = Key(ffi::GDK_KEY_WLAN as u32); pub const UWB: Key = Key(ffi::GDK_KEY_UWB as u32); pub const AudioForward: Key = Key(ffi::GDK_KEY_AudioForward as u32); pub const AudioRepeat: Key = Key(ffi::GDK_KEY_AudioRepeat as u32); pub const AudioRandomPlay: Key = Key(ffi::GDK_KEY_AudioRandomPlay as u32); pub const Subtitle: Key = Key(ffi::GDK_KEY_Subtitle as u32); pub const AudioCycleTrack: Key = Key(ffi::GDK_KEY_AudioCycleTrack as u32); pub const CycleAngle: Key = Key(ffi::GDK_KEY_CycleAngle as u32); pub const FrameBack: Key = Key(ffi::GDK_KEY_FrameBack as u32); pub const FrameForward: Key = Key(ffi::GDK_KEY_FrameForward as u32); pub const Time: Key = Key(ffi::GDK_KEY_Time as u32); pub const SelectButton: Key = Key(ffi::GDK_KEY_SelectButton as u32); pub const View: Key = Key(ffi::GDK_KEY_View as u32); pub const TopMenu: Key = Key(ffi::GDK_KEY_TopMenu as u32); pub const Red: Key = Key(ffi::GDK_KEY_Red as u32); pub const Green: Key = Key(ffi::GDK_KEY_Green as u32); pub const Yellow: Key = Key(ffi::GDK_KEY_Yellow as u32); pub const Blue: Key = Key(ffi::GDK_KEY_Blue as u32); pub const Suspend: Key = Key(ffi::GDK_KEY_Suspend as u32); pub const Hibernate: Key = Key(ffi::GDK_KEY_Hibernate as u32); pub const TouchpadToggle: Key = Key(ffi::GDK_KEY_TouchpadToggle as u32); pub const TouchpadOn: Key = Key(ffi::GDK_KEY_TouchpadOn as u32); pub const TouchpadOff: Key = Key(ffi::GDK_KEY_TouchpadOff as u32); pub const AudioMicMute: Key = Key(ffi::GDK_KEY_AudioMicMute as u32); pub const Switch_VT_1: Key = Key(ffi::GDK_KEY_Switch_VT_1 as u32); pub const Switch_VT_2: Key = Key(ffi::GDK_KEY_Switch_VT_2 as u32); pub const Switch_VT_3: Key = Key(ffi::GDK_KEY_Switch_VT_3 as u32); pub const Switch_VT_4: Key = Key(ffi::GDK_KEY_Switch_VT_4 as u32); pub const Switch_VT_5: Key = Key(ffi::GDK_KEY_Switch_VT_5 as u32); pub const Switch_VT_6: Key = Key(ffi::GDK_KEY_Switch_VT_6 as u32); pub const Switch_VT_7: Key = Key(ffi::GDK_KEY_Switch_VT_7 as u32); pub const Switch_VT_8: Key = Key(ffi::GDK_KEY_Switch_VT_8 as u32); pub const Switch_VT_9: Key = Key(ffi::GDK_KEY_Switch_VT_9 as u32); pub const Switch_VT_10: Key = Key(ffi::GDK_KEY_Switch_VT_10 as u32); pub const Switch_VT_11: Key = Key(ffi::GDK_KEY_Switch_VT_11 as u32); pub const Switch_VT_12: Key = Key(ffi::GDK_KEY_Switch_VT_12 as u32); pub const Ungrab: Key = Key(ffi::GDK_KEY_Ungrab as u32); pub const ClearGrab: Key = Key(ffi::GDK_KEY_ClearGrab as u32); pub const Next_VMode: Key = Key(ffi::GDK_KEY_Next_VMode as u32); pub const Prev_VMode: Key = Key(ffi::GDK_KEY_Prev_VMode as u32); pub const LogWindowTree: Key = Key(ffi::GDK_KEY_LogWindowTree as u32); pub const LogGrabInfo: Key = Key(ffi::GDK_KEY_LogGrabInfo as u32); } gdk-0.14.3/src/lib.rs000064400000000000000000000112600072674642500124110ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #![cfg_attr(feature = "dox", feature(doc_cfg))] #![allow(clippy::missing_safety_doc)] #![allow(clippy::upper_case_acronyms)] #![allow(clippy::wrong_self_convention)] //! # Rust GDK 3 bindings //! //! This library contains safe Rust bindings for [GDK 3](https://developer.gnome.org/gdk3/). //! It is a part of [gtk-rs](https://gtk-rs.org/). //! //! GDK 3.18 is the lowest supported version for the underlying library. pub use cairo; pub use ffi; pub use gdk_pixbuf; pub use gio; pub use glib; pub use pango; #[macro_use] mod rt; #[macro_use] mod event; #[allow(clippy::type_complexity)] #[allow(unused_imports)] mod auto; pub mod prelude; pub use self::auto::functions::*; pub use crate::auto::*; 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; mod event_touchpad_pinch; mod event_touchpad_swipe; mod event_visibility; mod event_window_state; mod frame_clock; mod frame_timings; mod functions; mod geometry; mod keymap; mod keymap_key; pub mod keys; mod rectangle; mod rgba; mod screen; mod time_coord; mod visual; mod window; pub use ffi::GdkColor as Color; pub use self::rt::{init, set_initialized}; pub use crate::atom::Atom; pub use crate::atom::NONE as ATOM_NONE; pub use crate::atom::SELECTION_CLIPBOARD; pub use crate::atom::SELECTION_PRIMARY; pub use crate::atom::SELECTION_SECONDARY; pub use crate::atom::SELECTION_TYPE_ATOM; pub use crate::atom::SELECTION_TYPE_BITMAP; pub use crate::atom::SELECTION_TYPE_COLORMAP; pub use crate::atom::SELECTION_TYPE_DRAWABLE; pub use crate::atom::SELECTION_TYPE_INTEGER; pub use crate::atom::SELECTION_TYPE_PIXMAP; pub use crate::atom::SELECTION_TYPE_STRING; pub use crate::atom::SELECTION_TYPE_WINDOW; pub use crate::atom::TARGET_BITMAP; pub use crate::atom::TARGET_COLORMAP; pub use crate::atom::TARGET_DRAWABLE; pub use crate::atom::TARGET_PIXMAP; pub use crate::atom::TARGET_STRING; pub use crate::change_data::ChangeData; pub use crate::event::{Event, FromEvent}; pub use crate::event_button::EventButton; pub use crate::event_configure::EventConfigure; pub use crate::event_crossing::EventCrossing; pub use crate::event_dnd::EventDND; pub use crate::event_expose::EventExpose; pub use crate::event_focus::EventFocus; pub use crate::event_grab_broken::EventGrabBroken; pub use crate::event_key::EventKey; pub use crate::event_motion::EventMotion; pub use crate::event_owner_change::EventOwnerChange; pub use crate::event_property::EventProperty; pub use crate::event_proximity::EventProximity; pub use crate::event_scroll::EventScroll; pub use crate::event_selection::EventSelection; pub use crate::event_setting::EventSetting; pub use crate::event_touch::EventTouch; pub use crate::event_visibility::EventVisibility; pub use crate::event_window_state::EventWindowState; pub use crate::functions::*; pub use crate::geometry::Geometry; pub use crate::keymap_key::KeymapKey; pub use crate::rectangle::Rectangle; pub use crate::rgba::{RgbaParseError, RGBA}; pub use crate::time_coord::TimeCoord; pub use crate::window::WindowAttr; #[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_touchpad_pinch::EventTouchpadPinch; pub use event_touchpad_swipe::EventTouchpadSwipe; #[allow(non_camel_case_types)] pub type key = i32; /// The primary button. This is typically the left mouse button, or the right button in a left-handed setup. pub const BUTTON_PRIMARY: u32 = ffi::GDK_BUTTON_PRIMARY as u32; /// The middle button. pub const BUTTON_MIDDLE: u32 = ffi::GDK_BUTTON_MIDDLE as u32; /// The secondary button. This is typically the right mouse button, or the left button in a left-handed setup. pub const BUTTON_SECONDARY: u32 = ffi::GDK_BUTTON_SECONDARY as u32; // Used as the return value for stopping the propagation of an event handler. pub const EVENT_STOP: u32 = ffi::GDK_EVENT_STOP as u32; // Used as the return value for continuing the propagation of an event handler. pub const EVENT_PROPAGATE: u32 = ffi::GDK_EVENT_PROPAGATE as u32; gdk-0.14.3/src/prelude.rs000064400000000000000000000006750072674642500133130ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. //! Traits intended for blanket imports. pub use crate::auto::traits::*; pub use crate::cairo_interaction::{GdkContextExt, GdkPixbufExt, GdkSurfaceExt}; pub use crate::window::WindowExtManual; #[doc(hidden)] pub use gdk_pixbuf::prelude::*; #[doc(hidden)] pub use gio::prelude::*; #[doc(hidden)] pub use glib::prelude::*; #[doc(hidden)] pub use pango::prelude::*; gdk-0.14.3/src/rectangle.rs000064400000000000000000000122570072674642500136160ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use cairo::RectangleInt; use glib::translate::*; use glib::StaticType; use std::convert::{AsRef, From}; use std::mem; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[repr(C)] #[doc(alias = "GdkRectangle")] pub struct Rectangle { pub x: i32, pub y: i32, pub width: i32, pub height: i32, } impl Rectangle { #[doc(alias = "gdk_rectangle_intersect")] 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 } } } #[doc(alias = "gdk_rectangle_union")] 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::zeroed() } } #[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) -> glib::translate::Borrowed { glib::translate::Borrowed::new(*(ptr as *const Rectangle)) } } #[doc(hidden)] impl FromGlibPtrBorrow<*mut ffi::GdkRectangle> for Rectangle { unsafe fn from_glib_borrow(ptr: *mut ffi::GdkRectangle) -> glib::translate::Borrowed { glib::translate::Borrowed::new(*(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 { &*(self as *const _ as *const _) } } } impl From for Rectangle { fn from(r: RectangleInt) -> Rectangle { skip_assert_initialized!(); unsafe { *(&r as *const _ as *const _) } } } impl glib::StaticType for Rectangle { fn static_type() -> glib::types::Type { skip_assert_initialized!(); unsafe { from_glib(ffi::gdk_rectangle_get_type()) } } } impl glib::value::ValueType for Rectangle { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for Rectangle { type Checker = glib::value::GenericValueTypeOrNoneChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); let ptr = glib::gobject_ffi::g_value_get_boxed(value.to_glib_none().0); assert!(!ptr.is_null()); from_glib_none(ptr as *mut ffi::GdkRectangle) } } impl glib::value::ToValue for Rectangle { fn to_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, self.to_glib_none().0 as *mut _, ); value } } fn value_type(&self) -> glib::Type { Rectangle::static_type() } } impl glib::value::ToValueOptional for Rectangle { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, s.to_glib_none().0 as *mut _, ); } value } } gdk-0.14.3/src/rgba.rs000064400000000000000000000135170072674642500125650ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::ffi::gconstpointer; use glib::translate::*; use glib::StaticType; use std::fmt; use std::hash::{Hash, Hasher}; use std::mem; use std::str::FromStr; #[derive(Debug)] pub struct RgbaParseError; #[derive(Clone, Copy, Debug)] #[repr(C)] #[doc(alias = "GdkRGBA")] 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 { #[doc(alias = "gdk_rgba_hash")] 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 { #[doc(alias = "gdk_rgba_equal")] 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::zeroed() } } #[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) -> glib::translate::Borrowed { glib::translate::Borrowed::new(*(ptr as *const RGBA)) } } #[doc(hidden)] impl FromGlibPtrBorrow<*mut ffi::GdkRGBA> for RGBA { unsafe fn from_glib_borrow(ptr: *mut ffi::GdkRGBA) -> glib::translate::Borrowed { glib::translate::Borrowed::new(*(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 glib::value::ValueType for RGBA { type Type = Self; } unsafe impl<'a> glib::value::FromValue<'a> for RGBA { type Checker = glib::value::GenericValueTypeOrNoneChecker; unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); let ptr = glib::gobject_ffi::g_value_get_boxed(value.to_glib_none().0); assert!(!ptr.is_null()); from_glib_none(ptr as *mut ffi::GdkRGBA) } } impl glib::value::ToValue for RGBA { fn to_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, self.to_glib_none().0 as *mut _, ); value } } fn value_type(&self) -> glib::Type { RGBA::static_type() } } impl glib::value::ToValueOptional for RGBA { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, s.to_glib_none().0 as *mut _, ); } value } } gdk-0.14.3/src/rt.rs000064400000000000000000000041430072674642500122720ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. //! General — Library initialization and miscellaneous functions use std::cell::Cell; use std::ptr; use std::sync::atomic::{AtomicBool, Ordering}; thread_local! { static IS_MAIN_THREAD: Cell = Cell::new(false) } static INITIALIZED: AtomicBool = AtomicBool::new(false); /// Asserts that this is the main thread and either `gdk::init` or `gtk::init` has been called. macro_rules! assert_initialized_main_thread { () => { if !crate::rt::is_initialized_main_thread() { if crate::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 crate::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)); } #[doc(alias = "gdk_init")] pub fn init() { assert_not_initialized!(); unsafe { ffi::gdk_init(ptr::null_mut(), ptr::null_mut()); set_initialized(); } } gdk-0.14.3/src/screen.rs000064400000000000000000000017520072674642500131270ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::Screen; use glib::translate::*; impl Screen { #[doc(alias = "gdk_screen_get_font_options")] #[doc(alias = "get_font_options")] pub fn font_options(&self) -> Option { unsafe { from_glib_none(mut_override(ffi::gdk_screen_get_font_options( self.to_glib_none().0, ))) } } #[doc(alias = "gdk_screen_get_setting")] #[doc(alias = "get_setting")] pub fn 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 { Some(value) } else { None } } } } gdk-0.14.3/src/time_coord.rs000064400000000000000000000070020072674642500137660ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use glib::translate::*; use std::mem; #[derive(Clone)] #[repr(C)] #[doc(alias = "GdkTimeCoord")] pub struct TimeCoord { pub time: u32, pub axes: [f64; ffi::GDK_MAX_TIMECOORD_AXES as usize], } #[doc(hidden)] impl Uninitialized for TimeCoord { #[inline] unsafe fn uninitialized() -> Self { mem::zeroed() } } #[doc(hidden)] impl<'a> ToGlibPtr<'a, *const ffi::GdkTimeCoord> for TimeCoord { type Storage = &'a Self; #[inline] fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GdkTimeCoord, Self> { let ptr: *const TimeCoord = &*self; Stash(ptr as *const ffi::GdkTimeCoord, self) } } #[doc(hidden)] impl<'a> ToGlibPtrMut<'a, *mut ffi::GdkTimeCoord> for TimeCoord { type Storage = &'a mut Self; #[inline] fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GdkTimeCoord, Self> { let ptr: *mut TimeCoord = &mut *self; StashMut(ptr as *mut ffi::GdkTimeCoord, self) } } #[doc(hidden)] impl FromGlibPtrNone<*const ffi::GdkTimeCoord> for TimeCoord { unsafe fn from_glib_none(ptr: *const ffi::GdkTimeCoord) -> Self { (*(ptr as *const TimeCoord)).clone() } } #[doc(hidden)] impl FromGlibPtrNone<*mut ffi::GdkTimeCoord> for TimeCoord { unsafe fn from_glib_none(ptr: *mut ffi::GdkTimeCoord) -> Self { (*(ptr as *mut TimeCoord)).clone() } } #[doc(hidden)] impl FromGlibPtrBorrow<*const ffi::GdkTimeCoord> for TimeCoord { unsafe fn from_glib_borrow(ptr: *const ffi::GdkTimeCoord) -> glib::translate::Borrowed { glib::translate::Borrowed::new((*(ptr as *const TimeCoord)).clone()) } } #[doc(hidden)] impl FromGlibPtrBorrow<*mut ffi::GdkTimeCoord> for TimeCoord { unsafe fn from_glib_borrow(ptr: *mut ffi::GdkTimeCoord) -> glib::translate::Borrowed { glib::translate::Borrowed::new((*(ptr as *mut TimeCoord)).clone()) } } #[doc(hidden)] impl FromGlibPtrFull<*mut ffi::GdkTimeCoord> for TimeCoord { unsafe fn from_glib_full(ptr: *mut ffi::GdkTimeCoord) -> Self { let time_coord = (*(ptr as *mut TimeCoord)).clone(); glib::ffi::g_free(ptr as *mut _); time_coord } } #[doc(hidden)] impl FromGlibPtrFull<*const ffi::GdkTimeCoord> for TimeCoord { unsafe fn from_glib_full(ptr: *const ffi::GdkTimeCoord) -> Self { let time_coord = (*(ptr as *const TimeCoord)).clone(); glib::ffi::g_free(ptr as *mut _); time_coord } } impl FromGlibContainerAsVec for TimeCoord { unsafe fn from_glib_none_num_as_vec(ptr: *mut ffi::GdkTimeCoord, 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((*(ptr.add(i) as *mut TimeCoord)).clone()); } res } unsafe fn from_glib_container_num_as_vec(ptr: *mut ffi::GdkTimeCoord, 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::GdkTimeCoord, 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((*(ptr.add(i) as *mut TimeCoord)).clone()); } glib::ffi::g_free(ptr as *mut _); res } } gdk-0.14.3/src/visual.rs000064400000000000000000000007720072674642500131540ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::Visual; use std::ptr; use std::slice; impl Visual { #[doc(alias = "gdk_query_depths")] 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)) } } } gdk-0.14.3/src/window.rs000064400000000000000000000203500072674642500131520ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. use crate::Cursor; use crate::EventMask; use crate::Visual; use crate::Window; use cairo::{self, Surface}; use glib::object::IsA; use glib::translate::*; use libc::{c_char, c_int}; use std::ptr; use crate::{WindowType, WindowTypeHint, WindowWindowClass}; pub struct WindowAttr { pub title: Option, pub event_mask: EventMask, 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() -> Self { skip_assert_initialized!(); Self { title: None, event_mask: EventMask::empty(), 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 { #[doc(alias = "get_mask")] fn 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 } } #[allow(clippy::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.bits() as i32, x: self.x.unwrap_or(0), y: self.y.unwrap_or(0), width: self.width, height: self.height, wclass: self.wclass.into_glib(), visual: visual.0, window_type: self.window_type.into_glib(), cursor: cursor.0, wmclass_name: ptr::null_mut(), wmclass_class: ptr::null_mut(), override_redirect: self.override_redirect.into_glib(), type_hint: self.type_hint.unwrap_or(WindowTypeHint::Normal).into_glib(), }); Stash(&mut *attrs, (attrs, visual, cursor, title)) } } impl Window { #[doc(alias = "gdk_window_new")] 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.mask() as c_int, )) } } #[doc(alias = "gdk_window_create_similar_surface")] 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, )) } } #[doc(alias = "gdk_window_create_similar_image_surface")] pub fn create_similar_image_surface( &self, format: cairo::Format, width: i32, height: i32, scale: i32, ) -> Option { unsafe { from_glib_full(ffi::gdk_window_create_similar_image_surface( self.to_glib_none().0, format.into(), width, height, scale, )) } } } pub trait WindowExtManual: 'static { #[doc(alias = "gdk_window_set_user_data")] unsafe fn set_user_data(&self, user_data: &mut T); #[allow(clippy::mut_from_ref)] #[doc(alias = "gdk_window_get_user_data")] #[doc(alias = "get_user_data")] unsafe fn user_data(&self) -> &mut T; #[doc(alias = "gdk_get_default_root_window")] #[doc(alias = "get_default_root_window")] fn default_root_window() -> Window; #[doc(alias = "gdk_offscreen_window_set_embedder")] fn offscreen_window_set_embedder(&self, embedder: &Window); #[doc(alias = "gdk_offscreen_window_get_embedder")] fn offscreen_window_get_embedder(&self) -> Option; #[doc(alias = "gdk_offscreen_window_get_surface")] fn offscreen_window_get_surface(&self) -> Option; #[doc(alias = "gdk_pixbuf_get_from_window")] #[doc(alias = "get_pixbuf")] fn pixbuf(&self, src_x: i32, src_y: i32, width: i32, height: i32) -> Option; #[doc(alias = "gdk_window_get_background_pattern")] #[doc(alias = "get_background_pattern")] fn background_pattern(&self) -> Option; #[doc(alias = "gdk_window_set_background_pattern")] 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 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 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 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 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.to_raw_none() } else { ::std::ptr::null_mut() }; ffi::gdk_window_set_background_pattern(self.as_ref().to_glib_none().0, ptr); } } } gdk-0.14.3/tests/check_event.rs000064400000000000000000000006260072674642500145000ustar 00000000000000#[test] fn check_event() { gdk::init(); let base_ev = gdk::Event::new(gdk::EventType::KeyPress); let mut ev: gdk::EventKey = base_ev.downcast().unwrap(); ev.as_mut().keyval = *gdk::keys::constants::A; let keyval_unicode = ev.keyval().to_unicode(); assert_eq!(keyval_unicode, Some('A')); let keyval_name = ev.keyval().name(); assert_eq!(keyval_name, Some("A".into())); } gdk-0.14.3/tests/check_gir.rs000064400000000000000000000003640072674642500141370ustar 00000000000000// Take a look at the license at the top of the repository in the LICENSE file. #[test] fn check_gir_file() { let res = gir_format_check::check_gir_file("Gir.toml"); println!("{}", res.to_string()); assert_eq!(res.nb_errors, 0); }