diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-10-27 16:07:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-10-27 16:10:32 +0000 |
| commit | c9455d5f211616ce3750e58a472e1b5a4251b8be (patch) | |
| tree | a45ba347973aac6852098f3db09719bbd50d1d16 /wayland.h | |
| parent | kbd: break out XKB kbd struct to a separate file (diff) | |
kbd: move into wayland
Diffstat (limited to 'wayland.h')
| -rw-r--r-- | wayland.h | 38 |
1 files changed, 34 insertions, 4 deletions
@@ -5,6 +5,7 @@ #include <wayland-client.h> #include <primary-selection-unstable-v1.h> +#include <xkbcommon/xkbcommon.h> #include "tllist.h" @@ -27,6 +28,33 @@ struct monitor { float refresh; }; +struct kbd { + struct xkb_context *xkb; + struct xkb_keymap *xkb_keymap; + struct xkb_state *xkb_state; + struct xkb_compose_table *xkb_compose_table; + struct xkb_compose_state *xkb_compose_state; + struct { + int fd; + + bool dont_re_repeat; + int32_t delay; + int32_t rate; + uint32_t key; + } repeat; + + xkb_mod_index_t mod_shift; + xkb_mod_index_t mod_alt; + xkb_mod_index_t mod_ctrl; + xkb_mod_index_t mod_meta; + + /* Enabled modifiers */ + bool shift; + bool alt; + bool ctrl; + bool meta; +}; + struct wl_clipboard { struct wl_data_source *data_source; struct wl_data_offer *data_offer; @@ -70,12 +98,18 @@ struct wayland { struct wl_keyboard *keyboard; struct zxdg_output_manager_v1 *xdg_output_manager; + /* Keyboard */ + struct kbd kbd; + /* Clipboard */ struct wl_data_device_manager *data_device_manager; struct wl_data_device *data_device; struct zwp_primary_selection_device_manager_v1 *primary_selection_device_manager; struct zwp_primary_selection_device_v1 *primary_selection_device; + struct wl_clipboard clipboard; + struct wl_primary primary; + /* Cursor */ struct { struct wl_pointer *pointer; @@ -88,10 +122,6 @@ struct wayland { char *theme_name; } pointer; - /* Clipboard */ - struct wl_clipboard clipboard; - struct wl_primary primary; - bool have_argb8888; tll(struct monitor) monitors; /* All available outputs */ }; |
