diff options
Diffstat (limited to 'wayland.h')
| -rw-r--r-- | wayland.h | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -2,9 +2,29 @@ #define WAYLAND_H #include <xkbcommon/xkbcommon.h> +#include <xkbcommon/xkbcommon-keysyms.h> #include <wayland-client.h> #include "xdg-shell-client-protocol.h" +typedef enum { + KEY_MOD_NONE = 0, + KEY_MOD_CTRL = 1, + KEY_MOD_ALT = 2, + KEY_MOD_SHIFT = 4, + KEY_MOD_LOGO = 8, + KEY_MOD_ANY = 16 +} ModMask; + + +typedef struct { + uint32_t k; + uint32_t mask; + char *s; + /* three-valued logic variables: 0 indifferent, 1 on, -1 off */ + signed char appkey; /* application keypad */ + signed char appcursor; /* application cursor */ +} Key; + typedef struct { struct wl_display *display; @@ -21,11 +41,7 @@ typedef struct { struct { uint32_t state; uint32_t sym; - struct { - uint32_t ctrl; - uint32_t alt; - uint32_t shift; - } mods; + uint32_t mod; } event; struct { int timer; |