aboutsummaryrefslogtreecommitdiff
path: root/include/sway/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 9d2e1bf9..032f4196 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -21,14 +21,28 @@ struct sway_variable {
char *value;
};
+
+enum binding_input_type {
+ BINDING_KEYCODE,
+ BINDING_KEYSYM,
+ BINDING_MOUSE,
+};
+
+enum binding_flags {
+ BINDING_RELEASE=1,
+ BINDING_LOCKED=2, // keyboard only
+ BINDING_BORDER=4, // mouse only; trigger on container border
+ BINDING_CONTENTS=8, // mouse only; trigger on container contents
+ BINDING_TITLEBAR=16 // mouse only; trigger on container titlebar
+};
+
/**
* A key binding and an associated command.
*/
struct sway_binding {
+ enum binding_input_type type;
int order;
- bool release;
- bool locked;
- bool bindcode;
+ uint32_t flags;
list_t *keys; // sorted in ascending order
uint32_t modifiers;
char *command;
@@ -49,6 +63,7 @@ struct sway_mode {
char *name;
list_t *keysym_bindings;
list_t *keycode_bindings;
+ list_t *mouse_bindings;
bool pango;
};
@@ -471,6 +486,8 @@ void free_sway_binding(struct sway_binding *sb);
struct sway_binding *sway_binding_dup(struct sway_binding *sb);
+void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding);
+
void load_swaybars();
void invoke_swaybar(struct bar_config *bar);