diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-12 08:29:37 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-12 08:29:37 -0500 |
commit | 163edc5a900fda58e006ed30e14ae10cc4aa13b3 (patch) | |
tree | a43e355091da4545bf9f16c63accb7d853170195 /include/sway/input/input-manager.h | |
parent | input config (diff) | |
download | sway-163edc5a900fda58e006ed30e14ae10cc4aa13b3.tar.gz sway-163edc5a900fda58e006ed30e14ae10cc4aa13b3.tar.zst sway-163edc5a900fda58e006ed30e14ae10cc4aa13b3.zip |
sway input device
Diffstat (limited to 'include/sway/input/input-manager.h')
-rw-r--r-- | include/sway/input/input-manager.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h index 78bc161f..7d7c463f 100644 --- a/include/sway/input/input-manager.h +++ b/include/sway/input/input-manager.h | |||
@@ -7,21 +7,40 @@ | |||
7 | 7 | ||
8 | extern struct input_config *current_input_config; | 8 | extern struct input_config *current_input_config; |
9 | 9 | ||
10 | /** | ||
11 | * The global singleton input manager | ||
12 | * TODO: make me not a global | ||
13 | */ | ||
14 | extern struct sway_input_manager *input_manager; | ||
15 | |||
16 | struct sway_input_device { | ||
17 | char *identifier; | ||
18 | struct wlr_input_device *wlr_device; | ||
19 | struct input_config *config; | ||
20 | struct sway_keyboard *keyboard; // managed by the seat | ||
21 | struct wl_list link; | ||
22 | }; | ||
23 | |||
10 | struct sway_input_manager { | 24 | struct sway_input_manager { |
11 | struct wl_listener input_add; | 25 | struct wl_listener input_add; |
12 | struct wl_listener input_remove; | 26 | struct wl_listener input_remove; |
13 | struct sway_server *server; | 27 | struct sway_server *server; |
14 | list_t *seats; | 28 | struct wl_list devices; |
29 | struct wl_list seats; | ||
15 | }; | 30 | }; |
16 | 31 | ||
17 | struct input_config *new_input_config(const char* identifier); | ||
18 | |||
19 | char* libinput_dev_unique_id(struct libinput_device *dev); | ||
20 | |||
21 | struct sway_input_manager *sway_input_manager_create( | 32 | struct sway_input_manager *sway_input_manager_create( |
22 | struct sway_server *server); | 33 | struct sway_server *server); |
23 | 34 | ||
24 | bool sway_input_manager_swayc_has_focus(struct sway_input_manager *input, | 35 | bool sway_input_manager_has_focus(struct sway_input_manager *input, |
25 | swayc_t *container); | 36 | swayc_t *container); |
26 | 37 | ||
38 | void sway_input_manager_set_focus(struct sway_input_manager *input, | ||
39 | swayc_t *container); | ||
40 | |||
41 | void sway_input_manager_configure_xcursor(struct sway_input_manager *input); | ||
42 | |||
43 | void sway_input_manager_apply_config(struct sway_input_manager *input, | ||
44 | struct input_config *config); | ||
45 | |||
27 | #endif | 46 | #endif |