diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-07 22:51:18 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-07 22:51:18 +0200 |
| commit | 77d32cb5e492d68f871516c171d192d755e7c4c6 (patch) | |
| tree | 3ecbc6124e71e386a508f855972a50a466dd8b7a /wayland.h | |
| parent | 63288c4d50dea63a5a403b86762cf66c9db35325 (diff) | |
add keyboard support
Diffstat (limited to 'wayland.h')
| -rw-r--r-- | wayland.h | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -1,17 +1,39 @@ #ifndef WAYLAND_H #define WAYLAND_H +#include <xkbcommon/xkbcommon.h> #include <wayland-client.h> #include "xdg-shell-client-protocol.h" -struct client_state { + +typedef struct { struct wl_display *display; struct wl_registry *registry; struct wl_shm *shm; struct wl_compositor *compositor; struct xdg_wm_base *wm_base; struct wl_seat *seat; -}; + struct { + struct xkb_state *state; + struct xkb_keymap *keymap; + struct xkb_context *context; + struct wl_keyboard *keyboard; + struct { + uint32_t state; + uint32_t sym; + struct { + uint32_t ctrl; + uint32_t alt; + uint32_t shift; + } mods; + } event; + struct { + int timer; + int delay; + int period; + } repeat; + } kb; +} Client; int allocate_shm_file(size_t size); |