mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-28 06:46:38 -04:00
kbd: move into wayland
This commit is contained in:
parent
061bbd7049
commit
c9455d5f21
11 changed files with 141 additions and 155 deletions
38
wayland.h
38
wayland.h
|
|
@ -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 */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue