1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2010 Red Hat, Inc
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
18#ifndef __GDK_KEYS_PRIVATE_H__
19#define __GDK_KEYS_PRIVATE_H__
20
21#include "gdkkeys.h"
22
23G_BEGIN_DECLS
24
25#define GDK_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_KEYMAP, GdkKeymapClass))
26#define GDK_IS_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_KEYMAP))
27#define GDK_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_KEYMAP, GdkKeymapClass))
28
29typedef struct _GdkKeymapClass GdkKeymapClass;
30
31struct _GdkKeymapClass
32{
33 GObjectClass parent_class;
34
35 PangoDirection (* get_direction) (GdkKeymap *keymap);
36 gboolean (* have_bidi_layouts) (GdkKeymap *keymap);
37 gboolean (* get_caps_lock_state) (GdkKeymap *keymap);
38 gboolean (* get_num_lock_state) (GdkKeymap *keymap);
39 gboolean (* get_scroll_lock_state) (GdkKeymap *keymap);
40 gboolean (* get_entries_for_keyval) (GdkKeymap *keymap,
41 guint keyval,
42 GdkKeymapKey **keys,
43 gint *n_keys);
44 gboolean (* get_entries_for_keycode) (GdkKeymap *keymap,
45 guint hardware_keycode,
46 GdkKeymapKey **keys,
47 guint **keyvals,
48 gint *n_entries);
49 guint (* lookup_key) (GdkKeymap *keymap,
50 const GdkKeymapKey *key);
51 gboolean (* translate_keyboard_state) (GdkKeymap *keymap,
52 guint hardware_keycode,
53 GdkModifierType state,
54 gint group,
55 guint *keyval,
56 gint *effective_group,
57 gint *level,
58 GdkModifierType *consumed_modifiers);
59 void (* add_virtual_modifiers) (GdkKeymap *keymap,
60 GdkModifierType *state);
61 gboolean (* map_virtual_modifiers) (GdkKeymap *keymap,
62 GdkModifierType *state);
63 GdkModifierType (*get_modifier_mask) (GdkKeymap *keymap,
64 GdkModifierIntent intent);
65 guint (* get_modifier_state) (GdkKeymap *keymap);
66
67
68 /* Signals */
69 void (*direction_changed) (GdkKeymap *keymap);
70 void (*keys_changed) (GdkKeymap *keymap);
71 void (*state_changed) (GdkKeymap *keymap);
72};
73
74struct _GdkKeymap
75{
76 GObject parent_instance;
77 GdkDisplay *display;
78};
79
80G_END_DECLS
81
82#endif
83