diff options
Diffstat (limited to 'include/sway/config.h')
-rw-r--r-- | include/sway/config.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 2e24c3ae..05678c33 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <xkbcommon/xkbcommon.h> | 10 | #include <xkbcommon/xkbcommon.h> |
11 | #include <xf86drmMode.h> | 11 | #include <xf86drmMode.h> |
12 | #include "../include/config.h" | 12 | #include "../include/config.h" |
13 | #include "gesture.h" | ||
13 | #include "list.h" | 14 | #include "list.h" |
14 | #include "swaynag.h" | 15 | #include "swaynag.h" |
15 | #include "tree/container.h" | 16 | #include "tree/container.h" |
@@ -32,7 +33,8 @@ enum binding_input_type { | |||
32 | BINDING_KEYSYM, | 33 | BINDING_KEYSYM, |
33 | BINDING_MOUSECODE, | 34 | BINDING_MOUSECODE, |
34 | BINDING_MOUSESYM, | 35 | BINDING_MOUSESYM, |
35 | BINDING_SWITCH | 36 | BINDING_SWITCH, // dummy, only used to call seat_execute_command |
37 | BINDING_GESTURE // dummy, only used to call seat_execute_command | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | enum binding_flags { | 40 | enum binding_flags { |
@@ -45,6 +47,7 @@ enum binding_flags { | |||
45 | BINDING_RELOAD = 1 << 6, // switch only; (re)trigger binding on reload | 47 | BINDING_RELOAD = 1 << 6, // switch only; (re)trigger binding on reload |
46 | BINDING_INHIBITED = 1 << 7, // keyboard only: ignore shortcut inhibitor | 48 | BINDING_INHIBITED = 1 << 7, // keyboard only: ignore shortcut inhibitor |
47 | BINDING_NOREPEAT = 1 << 8, // keyboard only; do not trigger when repeating a held key | 49 | BINDING_NOREPEAT = 1 << 8, // keyboard only; do not trigger when repeating a held key |
50 | BINDING_EXACT = 1 << 9, // gesture only; only trigger on exact match | ||
48 | }; | 51 | }; |
49 | 52 | ||
50 | /** | 53 | /** |
@@ -79,6 +82,16 @@ struct sway_switch_binding { | |||
79 | }; | 82 | }; |
80 | 83 | ||
81 | /** | 84 | /** |
85 | * A gesture binding and an associated command. | ||
86 | */ | ||
87 | struct sway_gesture_binding { | ||
88 | char *input; | ||
89 | uint32_t flags; | ||
90 | struct gesture gesture; | ||
91 | char *command; | ||
92 | }; | ||
93 | |||
94 | /** | ||
82 | * Focus on window activation. | 95 | * Focus on window activation. |
83 | */ | 96 | */ |
84 | enum sway_fowa { | 97 | enum sway_fowa { |
@@ -97,6 +110,7 @@ struct sway_mode { | |||
97 | list_t *keycode_bindings; | 110 | list_t *keycode_bindings; |
98 | list_t *mouse_bindings; | 111 | list_t *mouse_bindings; |
99 | list_t *switch_bindings; | 112 | list_t *switch_bindings; |
113 | list_t *gesture_bindings; | ||
100 | bool pango; | 114 | bool pango; |
101 | }; | 115 | }; |
102 | 116 | ||
@@ -689,6 +703,8 @@ void free_sway_binding(struct sway_binding *sb); | |||
689 | 703 | ||
690 | void free_switch_binding(struct sway_switch_binding *binding); | 704 | void free_switch_binding(struct sway_switch_binding *binding); |
691 | 705 | ||
706 | void free_gesture_binding(struct sway_gesture_binding *binding); | ||
707 | |||
692 | void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding); | 708 | void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding); |
693 | 709 | ||
694 | void load_swaybar(struct bar_config *bar); | 710 | void load_swaybar(struct bar_config *bar); |