diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-11-03 09:01:34 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-11-04 09:23:57 -0400 |
commit | 5354fe8729b8c52f8f3ff63f23f932c49bf8c880 (patch) | |
tree | 31b9c35b26329961e269724ede16cb1981ce0fb9 /include/rootston | |
parent | 9bd0f47efd9a0c851d1715f3b9427b5f51b6d8a3 (diff) |
move keyboard to seat
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/input.h | 1 | ||||
-rw-r--r-- | include/rootston/keyboard.h | 15 | ||||
-rw-r--r-- | include/rootston/seat.h | 26 |
3 files changed, 38 insertions, 4 deletions
diff --git a/include/rootston/input.h b/include/rootston/input.h index 6d07de43..7b1358f8 100644 --- a/include/rootston/input.h +++ b/include/rootston/input.h @@ -67,6 +67,7 @@ struct roots_input { struct wl_list pointers; struct wl_list touch; struct wl_list tablet_tools; + struct wl_list seats; struct wl_listener input_add; struct wl_listener input_remove; diff --git a/include/rootston/keyboard.h b/include/rootston/keyboard.h index f4acc0aa..cb639ba1 100644 --- a/include/rootston/keyboard.h +++ b/include/rootston/keyboard.h @@ -8,21 +8,28 @@ struct roots_keyboard { struct roots_input *input; + struct roots_seat *seat; struct wlr_input_device *device; - struct wl_listener key; - struct wl_listener modifiers; + struct wl_list seat_link; + // XXX temporary struct wl_list link; + struct wl_listener keyboard_key; + struct wl_listener keyboard_modifiers; + xkb_keysym_t pressed_keysyms[ROOTS_KEYBOARD_PRESSED_KEYSYMS_CAP]; }; struct roots_keyboard *roots_keyboard_create(struct wlr_input_device *device, struct roots_input *input); -void roots_keyboard_destroy(struct wlr_input_device *device, struct roots_input *input); + +void roots_keyboard_destroy(struct wlr_input_device *device, + struct roots_input *input); void roots_keyboard_handle_key(struct roots_keyboard *keyboard, struct wlr_event_keyboard_key *event); -void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard); +void roots_keyboard_handle_modifiers(struct roots_keyboard *r_keyboard, + struct wlr_event_keyboard_modifiers *event); #endif diff --git a/include/rootston/seat.h b/include/rootston/seat.h new file mode 100644 index 00000000..f6db63cc --- /dev/null +++ b/include/rootston/seat.h @@ -0,0 +1,26 @@ +#ifndef _ROOTSTON_SEAT_H +#define _ROOTSTON_SEAT_H + +#include <wayland-server.h> + +#include "rootston/input.h" +#include "rootston/keyboard.h" + +struct roots_seat { + struct roots_input *input; + struct wlr_seat *seat; + struct wl_list keyboards; + struct wl_list link; +}; + +struct roots_seat *roots_seat_create(struct roots_input *input, char *name); + +void roots_seat_destroy(struct roots_seat *seat); + +void roots_seat_add_keyboard(struct roots_seat *seat, + struct roots_keyboard *keyboard); + +void roots_seat_remove_keyboard(struct roots_seat *seat, + struct roots_keyboard *keyboard); + +#endif |