diff options
author | Cole Mickens <cole.mickens@gmail.com> | 2016-01-17 02:53:37 -0800 |
---|---|---|
committer | Cole Mickens <cole.mickens@gmail.com> | 2016-01-19 06:51:36 -0800 |
commit | 28081b76891ddbbb825dee6c202037d78aa8f164 (patch) | |
tree | 6b7412f626f5d9f10dba8920a2543dfd3c5a662e /include/config.h | |
parent | Add ffmpeg/imagemagick to depenency list (diff) | |
download | sway-28081b76891ddbbb825dee6c202037d78aa8f164.tar.gz sway-28081b76891ddbbb825dee6c202037d78aa8f164.tar.zst sway-28081b76891ddbbb825dee6c202037d78aa8f164.zip |
libinput
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ | |||
1 | #ifndef _SWAY_CONFIG_H | 1 | #ifndef _SWAY_CONFIG_H |
2 | #define _SWAY_CONFIG_H | 2 | #define _SWAY_CONFIG_H |
3 | 3 | ||
4 | #include <libinput.h> | ||
4 | #include <stdint.h> | 5 | #include <stdint.h> |
6 | #include <wlc/geometry.h> | ||
5 | #include <wlc/wlc.h> | 7 | #include <wlc/wlc.h> |
6 | #include <xkbcommon/xkbcommon.h> | 8 | #include <xkbcommon/xkbcommon.h> |
7 | #include "wayland-desktop-shell-server-protocol.h" | 9 | #include "wayland-desktop-shell-server-protocol.h" |
@@ -46,6 +48,25 @@ struct sway_mode { | |||
46 | }; | 48 | }; |
47 | 49 | ||
48 | /** | 50 | /** |
51 | * libinput options for input devices | ||
52 | */ | ||
53 | struct input_config { | ||
54 | char *identifier; | ||
55 | int click_method; | ||
56 | int drag_lock; | ||
57 | int dwt; | ||
58 | int middle_emulation; | ||
59 | int natural_scroll; | ||
60 | float pointer_accel; | ||
61 | int scroll_method; | ||
62 | int send_events; | ||
63 | int tap; | ||
64 | |||
65 | bool capturable; | ||
66 | struct wlc_geometry region; | ||
67 | }; | ||
68 | |||
69 | /** | ||
49 | * Size and position configuration for a particular output. | 70 | * Size and position configuration for a particular output. |
50 | * | 71 | * |
51 | * This is set via the `output` command. | 72 | * This is set via the `output` command. |
@@ -136,6 +157,7 @@ struct sway_config { | |||
136 | list_t *cmd_queue; | 157 | list_t *cmd_queue; |
137 | list_t *workspace_outputs; | 158 | list_t *workspace_outputs; |
138 | list_t *output_configs; | 159 | list_t *output_configs; |
160 | list_t *input_configs; | ||
139 | list_t *criteria; | 161 | list_t *criteria; |
140 | list_t *active_bar_modifiers; | 162 | list_t *active_bar_modifiers; |
141 | struct sway_mode *current_mode; | 163 | struct sway_mode *current_mode; |
@@ -172,6 +194,12 @@ bool read_config(FILE *file, bool is_active); | |||
172 | * Does variable replacement for a string based on the config's currently loaded variables. | 194 | * Does variable replacement for a string based on the config's currently loaded variables. |
173 | */ | 195 | */ |
174 | char *do_var_replacement(char *str); | 196 | char *do_var_replacement(char *str); |
197 | |||
198 | int input_identifier_cmp(const void *item, const void *data); | ||
199 | void merge_input_config(struct input_config *dst, struct input_config *src); | ||
200 | void apply_input_config(struct input_config *ic, struct libinput_device *dev); | ||
201 | void free_input_config(struct input_config *ic); | ||
202 | |||
175 | int output_name_cmp(const void *item, const void *data); | 203 | int output_name_cmp(const void *item, const void *data); |
176 | void merge_output_config(struct output_config *dst, struct output_config *src); | 204 | void merge_output_config(struct output_config *dst, struct output_config *src); |
177 | /** Sets up a WLC output handle based on a given output_config. | 205 | /** Sets up a WLC output handle based on a given output_config. |