1 /* 2 * Copyright (C) 2009 Intel Corp. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library 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 GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * Author: Emmanuele Bassi <ebassi@linux.intel.com> 18 */ 19 20 #ifndef META_KEYMAP_X11_H 21 #define META_KEYMAP_X11_H 22 23 #include <glib-object.h> 24 #include <pango/pango.h> 25 26 #include "clutter/clutter.h" 27 28 G_BEGIN_DECLS 29 30 #define META_TYPE_KEYMAP_X11 (meta_keymap_x11_get_type ()) 31 G_DECLARE_FINAL_TYPE (MetaKeymapX11, meta_keymap_x11, 32 META, KEYMAP_X11, ClutterKeymap) 33 34 int meta_keymap_x11_get_key_group (MetaKeymapX11 *keymap, 35 ClutterModifierType state); 36 int meta_keymap_x11_translate_key_state (MetaKeymapX11 *keymap, 37 guint hardware_keycode, 38 ClutterModifierType *modifier_state_p, 39 ClutterModifierType *mods_p); 40 gboolean meta_keymap_x11_get_is_modifier (MetaKeymapX11 *keymap, 41 int keycode); 42 43 gboolean meta_keymap_x11_keycode_for_keyval (MetaKeymapX11 *keymap_x11, 44 guint keyval, 45 guint *keycode_out, 46 guint *level_out); 47 void meta_keymap_x11_latch_modifiers (MetaKeymapX11 *keymap_x11, 48 uint32_t level, 49 gboolean enable); 50 gboolean meta_keymap_x11_reserve_keycode (MetaKeymapX11 *keymap_x11, 51 guint keyval, 52 guint *keycode_out); 53 void meta_keymap_x11_release_keycode_if_needed (MetaKeymapX11 *keymap_x11, 54 guint keycode); 55 56 gboolean meta_keymap_x11_handle_event (MetaKeymapX11 *keymap_x11, 57 XEvent *xevent); 58 59 G_END_DECLS 60 61 #endif /* META_KEYMAP_X11_H */ 62