This commit is contained in:
Samuel Grahn 2019-04-25 18:00:57 +00:00 committed by GitHub
commit 50fbc3b9db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 653 additions and 5 deletions

View file

@ -134,6 +134,7 @@ sway_cmd cmd_force_display_urgency_hint;
sway_cmd cmd_force_focus_wrapping;
sway_cmd cmd_fullscreen;
sway_cmd cmd_gaps;
sway_cmd cmd_gesture;
sway_cmd cmd_hide_edge_borders;
sway_cmd cmd_include;
sway_cmd cmd_inhibit_idle;
@ -184,6 +185,7 @@ sway_cmd cmd_titlebar_padding;
sway_cmd cmd_unbindcode;
sway_cmd cmd_unbindswitch;
sway_cmd cmd_unbindsym;
sway_cmd cmd_touch;
sway_cmd cmd_unmark;
sway_cmd cmd_urgent;
sway_cmd cmd_workspace;
@ -278,6 +280,18 @@ sway_cmd seat_cmd_fallback;
sway_cmd seat_cmd_hide_cursor;
sway_cmd seat_cmd_pointer_constraint;
sway_cmd touch_cmd_gesture;
sway_cmd touch_cmd_binding;
sway_cmd touch_cmd_target;
sway_cmd touch_gesture_cmd_touch;
sway_cmd touch_gesture_cmd_threshold;
sway_cmd touch_gesture_cmd_target;
sway_cmd touch_gesture_cmd_swipe;
sway_cmd touch_gesture_cmd_pinch;
sway_cmd touch_gesture_cmd_rotate;
sway_cmd touch_gesture_cmd_delay;
sway_cmd cmd_ipc_cmd;
sway_cmd cmd_ipc_events;
sway_cmd cmd_ipc_event_cmd;

View file

@ -91,6 +91,7 @@ struct sway_mode {
list_t *keycode_bindings;
list_t *mouse_bindings;
list_t *switch_bindings;
list_t *gesture_bindings;
bool pango;
};
@ -100,6 +101,17 @@ struct input_config_mapped_from_region {
bool mm;
};
struct gesture_config {
char *identifier;
struct libtouch_gesture *gesture;
char *command;
};
struct gesture_target_config {
char *identifier;
struct libtouch_target *target;
};
/**
* options for input devices
*/
@ -420,6 +432,8 @@ struct sway_config {
list_t *output_configs;
list_t *input_configs;
list_t *input_type_configs;
list_t *gesture_configs;
list_t *gesture_target_configs;
list_t *seat_configs;
list_t *criteria;
list_t *no_focus;
@ -508,6 +522,7 @@ struct sway_config {
list_t *feature_policies;
list_t *ipc_policies;
struct libtouch_engine *gesture_engine;
// Context for command handlers
struct {
struct input_config *input_config;
@ -517,6 +532,10 @@ struct sway_config {
struct sway_node *node;
struct sway_container *container;
struct sway_workspace *workspace;
struct gesture_config *current_gesture;
struct libtouch_action *current_gesture_action;
bool using_criteria;
struct {
int argc;
@ -641,6 +660,20 @@ void free_bar_binding(struct bar_binding *binding);
void free_workspace_config(struct workspace_config *wsc);
int gesture_identifier_cmp(const void *item, const void *data);
int gesture_libtouch_cmp(const void *item, const void *data);
int gesture_target_identifier_cmp(const void *item, const void *data);
struct gesture_config *get_gesture_config(const char *identifier);
struct gesture_config *new_gesture_config(const char *identifier);
struct gesture_target_config *get_gesture_target_config(const char* identifier);
struct gesture_target_config *create_gesture_target_config(const char* identifier);
/**
* Updates the value of config->font_height based on the max title height
* reported by each container. If recalculate is true, the containers will

View file

@ -36,6 +36,7 @@ struct sway_cursor {
struct wl_listener axis;
struct wl_listener frame;
struct libtouch_progress_tracker *gesture_tracker;
struct wl_listener touch_down;
struct wl_listener touch_up;
struct wl_listener touch_motion;