mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-06 07:15:30 -04:00
wayland: unify key- and mouse-binding structs
This commit is contained in:
parent
d04bc6ab10
commit
dcd79065c8
5 changed files with 47 additions and 37 deletions
30
wayland.h
30
wayland.h
|
|
@ -101,24 +101,28 @@ enum bind_action_url {
|
|||
typedef tll(xkb_keycode_t) xkb_keycode_list_t;
|
||||
|
||||
struct key_binding {
|
||||
xkb_mod_mask_t mods;
|
||||
xkb_keysym_t sym;
|
||||
xkb_keycode_list_t key_codes;
|
||||
enum config_key_binding_type type;
|
||||
|
||||
int action; /* enum bind_action_* */
|
||||
char **pipe_argv;
|
||||
|
||||
xkb_mod_mask_t mods;
|
||||
|
||||
union {
|
||||
struct {
|
||||
xkb_keysym_t sym;
|
||||
xkb_keycode_list_t key_codes;
|
||||
} k;
|
||||
|
||||
struct {
|
||||
uint32_t button;
|
||||
int count;
|
||||
} m;
|
||||
};
|
||||
|
||||
};
|
||||
typedef tll(struct key_binding) key_binding_list_t;
|
||||
|
||||
struct mouse_binding {
|
||||
enum bind_action_normal action;
|
||||
xkb_mod_mask_t mods;
|
||||
uint32_t button;
|
||||
int count;
|
||||
char **pipe_argv;
|
||||
};
|
||||
typedef tll(struct mouse_binding) mouse_binding_list_t;
|
||||
|
||||
/* Mime-types we support when dealing with data offers (e.g. copy-paste, or DnD) */
|
||||
enum data_offer_mime_type {
|
||||
DATA_OFFER_MIME_UNSET,
|
||||
|
|
@ -254,7 +258,7 @@ struct seat {
|
|||
double aggregated[2];
|
||||
bool have_discrete;
|
||||
|
||||
mouse_binding_list_t bindings;
|
||||
key_binding_list_t bindings;
|
||||
} mouse;
|
||||
|
||||
/* Clipboard */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue