| 1 | /* |
| 2 | * Copyright 2024 Andrey Kutejko <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 3 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 16 | * |
| 17 | * For more details see the file COPYING. |
| 18 | */ |
| 19 | |
| 20 | pub mod controlsrust-analyzer cargo gnome-robots 50.0.0 controls/controls/; |
| 21 | pub mod editorrust-analyzer cargo gnome-robots 50.0.0 controls/editor/; |
| 22 | |
| 23 | use gtkrust-analyzer cargo gtk4 0.11.1 crate/::gdkrust-analyzer cargo gdk4 0.11.1 crate/; |
| 24 | |
| 25 | pub fn key_from_u32rust-analyzer cargo gnome-robots 50.0.0 controls/key_from_u32().(keyval: u32) -> gdkrust-analyzer cargo gdk4 0.11.1 crate/::Keyrust-analyzer cargo gdk4 0.11.1 keys/Key# { |
| 26 | use gtkrust-analyzer cargo gtk4 0.11.1 crate/::glibrust-analyzer cargo glib 0.22.3 crate/::translaterust-analyzer cargo glib 0.22.3 translate/::FromGlibrust-analyzer cargo glib 0.22.3 translate/FromGlib#; |
| 27 | unsafe { gdkrust-analyzer cargo gdk4 0.11.1 crate/::Keyrust-analyzer cargo gdk4 0.11.1 keys/Key#::from_glibrust-analyzer cargo gdk4 0.11.1 keys/impl#[Key][`FromGlib<u32>`]from_glib().(keyval) } |
| 28 | } |
| 29 | |
| 30 | pub fn key_from_i32rust-analyzer cargo gnome-robots 50.0.0 controls/key_from_i32().(keyval: i32) -> gdkrust-analyzer cargo gdk4 0.11.1 crate/::Keyrust-analyzer cargo gdk4 0.11.1 keys/Key# { |
| 31 | key_from_u32rust-analyzer cargo gnome-robots 50.0.0 controls/key_from_u32().(keyval as u32) |
| 32 | } |
| 33 | |
| 34 | pub fn key_into_i32rust-analyzer cargo gnome-robots 50.0.0 controls/key_into_i32().(keyval: gdkrust-analyzer cargo gdk4 0.11.1 crate/::Keyrust-analyzer cargo gdk4 0.11.1 keys/Key#) -> i32 { |
| 35 | use gtkrust-analyzer cargo gtk4 0.11.1 crate/::glibrust-analyzer cargo glib 0.22.3 crate/::translaterust-analyzer cargo glib 0.22.3 translate/::IntoGlibrust-analyzer cargo glib 0.22.3 translate/IntoGlib#; |
| 36 | keyval.into_glibrust-analyzer cargo gdk4 0.11.1 keys/impl#[Key][IntoGlib]into_glib().() as i32 |
| 37 | } |