diff options
Diffstat (limited to 'include/sway/input/input-manager.h')
-rw-r--r-- | include/sway/input/input-manager.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h new file mode 100644 index 00000000..cdcffab6 --- /dev/null +++ b/include/sway/input/input-manager.h | |||
@@ -0,0 +1,49 @@ | |||
1 | #ifndef _SWAY_INPUT_MANAGER_H | ||
2 | #define _SWAY_INPUT_MANAGER_H | ||
3 | #include <libinput.h> | ||
4 | #include "sway/server.h" | ||
5 | #include "sway/config.h" | ||
6 | #include "list.h" | ||
7 | |||
8 | extern struct input_config *current_input_config; | ||
9 | extern struct seat_config *current_seat_config; | ||
10 | |||
11 | /** | ||
12 | * The global singleton input manager | ||
13 | * TODO: make me not a global | ||
14 | */ | ||
15 | extern struct sway_input_manager *input_manager; | ||
16 | |||
17 | struct sway_input_device { | ||
18 | char *identifier; | ||
19 | struct wlr_input_device *wlr_device; | ||
20 | struct input_config *config; | ||
21 | struct wl_list link; | ||
22 | }; | ||
23 | |||
24 | struct sway_input_manager { | ||
25 | struct wl_listener input_add; | ||
26 | struct wl_listener input_remove; | ||
27 | struct sway_server *server; | ||
28 | struct wl_list devices; | ||
29 | struct wl_list seats; | ||
30 | }; | ||
31 | |||
32 | struct sway_input_manager *sway_input_manager_create( | ||
33 | struct sway_server *server); | ||
34 | |||
35 | bool sway_input_manager_has_focus(struct sway_input_manager *input, | ||
36 | swayc_t *container); | ||
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_input_config(struct sway_input_manager *input, | ||
44 | struct input_config *input_config); | ||
45 | |||
46 | void sway_input_manager_apply_seat_config(struct sway_input_manager *input, | ||
47 | struct seat_config *seat_config); | ||
48 | |||
49 | #endif | ||