diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-11 02:30:18 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-11 02:30:18 -0400 |
| commit | f43ec9b27ebe37b799709985f5587e29ec8ef88b (patch) | |
| tree | cfae61b2e1ffc3658bdf67450666f5f0c89b2b92 /keyboard.c | |
| parent | ba3a68a4f73f6653b1e1b095abc08234dedc504d (diff) | |
refactor to .h files
Diffstat (limited to 'keyboard.c')
| -rw-r--r-- | keyboard.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,10 +1,16 @@ -#include <assert.h> #include <sys/mman.h> #include <unistd.h> -#include <wayland-client-protocol.h> #include <locale.h> + #include "state.h" +struct wl_keyboard_listener keyboard_listener; + +void setup_keyboard(client_state* state) { + state->keyboard = wl_seat_get_keyboard(state->seat); + wl_keyboard_add_listener(state->keyboard, &keyboard_listener, state); +} + void wl_keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, uint32_t format, int32_t fd, uint32_t size) { client_state* state = data; |
