From 28081b76891ddbbb825dee6c202037d78aa8f164 Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Sun, 17 Jan 2016 02:53:37 -0800 Subject: libinput --- include/config.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/config.h') diff --git a/include/config.h b/include/config.h index e6a85b29..c2b67aa6 100644 --- a/include/config.h +++ b/include/config.h @@ -1,7 +1,9 @@ #ifndef _SWAY_CONFIG_H #define _SWAY_CONFIG_H +#include #include +#include #include #include #include "wayland-desktop-shell-server-protocol.h" @@ -45,6 +47,25 @@ struct sway_mode { list_t *bindings; }; +/** + * libinput options for input devices + */ +struct input_config { + char *identifier; + int click_method; + int drag_lock; + int dwt; + int middle_emulation; + int natural_scroll; + float pointer_accel; + int scroll_method; + int send_events; + int tap; + + bool capturable; + struct wlc_geometry region; +}; + /** * Size and position configuration for a particular output. * @@ -136,6 +157,7 @@ struct sway_config { list_t *cmd_queue; list_t *workspace_outputs; list_t *output_configs; + list_t *input_configs; list_t *criteria; list_t *active_bar_modifiers; struct sway_mode *current_mode; @@ -172,6 +194,12 @@ bool read_config(FILE *file, bool is_active); * Does variable replacement for a string based on the config's currently loaded variables. */ char *do_var_replacement(char *str); + +int input_identifier_cmp(const void *item, const void *data); +void merge_input_config(struct input_config *dst, struct input_config *src); +void apply_input_config(struct input_config *ic, struct libinput_device *dev); +void free_input_config(struct input_config *ic); + int output_name_cmp(const void *item, const void *data); void merge_output_config(struct output_config *dst, struct output_config *src); /** Sets up a WLC output handle based on a given output_config. -- cgit v1.2.3-54-g00ecf