Move GdkKeymapKey to gdktypes.h

We are going to use this type in a different header.
This commit is contained in:
Matthias Clasen 2020-04-05 11:02:21 -04:00
parent 416ec580dc
commit 31fb5c287a
2 changed files with 27 additions and 27 deletions

View File

@ -35,33 +35,6 @@
G_BEGIN_DECLS
typedef struct _GdkKeymapKey GdkKeymapKey;
/**
* GdkKeymapKey:
* @keycode: the hardware keycode. This is an identifying number for a
* physical key.
* @group: indicates movement in a horizontal direction. Usually groups are used
* for two different languages. In group 0, a key might have two English
* characters, and in group 1 it might have two Hebrew characters. The Hebrew
* characters will be printed on the key next to the English characters.
* @level: indicates which symbol on the key will be used, in a vertical direction.
* So on a standard US keyboard, the key with the number 1 on it also has the
* exclamation point ("!") character on it. The level indicates whether to use
* the 1 or the ! symbol. The letter keys are considered to have a lowercase
* letter at level 0, and an uppercase letter at level 1, though only the
* uppercase letter is printed.
*
* A #GdkKeymapKey is a hardware key that can be mapped to a keyval.
*/
struct _GdkKeymapKey
{
guint keycode;
gint group;
gint level;
};
#define GDK_TYPE_KEYMAP (gdk_keymap_get_type ())
#define GDK_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_KEYMAP, GdkKeymap))
#define GDK_IS_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_KEYMAP))

View File

@ -622,6 +622,33 @@ typedef enum
return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
G_GNUC_END_IGNORE_DEPRECATIONS
typedef struct _GdkKeymapKey GdkKeymapKey;
/**
* GdkKeymapKey:
* @keycode: the hardware keycode. This is an identifying number for a
* physical key.
* @group: indicates movement in a horizontal direction. Usually groups are used
* for two different languages. In group 0, a key might have two English
* characters, and in group 1 it might have two Hebrew characters. The Hebrew
* characters will be printed on the key next to the English characters.
* @level: indicates which symbol on the key will be used, in a vertical direction.
* So on a standard US keyboard, the key with the number 1 on it also has the
* exclamation point ("!") character on it. The level indicates whether to use
* the 1 or the ! symbol. The letter keys are considered to have a lowercase
* letter at level 0, and an uppercase letter at level 1, though only the
* uppercase letter is printed.
*
* A #GdkKeymapKey is a hardware key that can be mapped to a keyval.
*/
struct _GdkKeymapKey
{
guint keycode;
gint group;
gint level;
};
G_END_DECLS
#endif /* __GDK_TYPES_H__ */