diff options
Diffstat (limited to 'include/sway/input')
-rw-r--r-- | include/sway/input/input-manager.h | 23 | ||||
-rw-r--r-- | include/sway/input/seat.h | 28 |
2 files changed, 27 insertions, 24 deletions
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h index c6c73dba..8e39a4a7 100644 --- a/include/sway/input/input-manager.h +++ b/include/sway/input/input-manager.h | |||
@@ -14,7 +14,6 @@ extern struct sway_input_manager *input_manager; | |||
14 | struct sway_input_device { | 14 | struct sway_input_device { |
15 | char *identifier; | 15 | char *identifier; |
16 | struct wlr_input_device *wlr_device; | 16 | struct wlr_input_device *wlr_device; |
17 | struct input_config *config; | ||
18 | struct wl_list link; | 17 | struct wl_list link; |
19 | struct wl_listener device_destroy; | 18 | struct wl_listener device_destroy; |
20 | }; | 19 | }; |
@@ -27,30 +26,34 @@ struct sway_input_manager { | |||
27 | struct wl_listener new_input; | 26 | struct wl_listener new_input; |
28 | }; | 27 | }; |
29 | 28 | ||
30 | struct sway_input_manager *sway_input_manager_create( | 29 | struct sway_input_manager *input_manager_create(struct sway_server *server); |
31 | struct sway_server *server); | ||
32 | 30 | ||
33 | bool sway_input_manager_has_focus(struct sway_input_manager *input, | 31 | bool input_manager_has_focus(struct sway_input_manager *input, |
34 | struct sway_container *container); | 32 | struct sway_container *container); |
35 | 33 | ||
36 | void sway_input_manager_set_focus(struct sway_input_manager *input, | 34 | void input_manager_set_focus(struct sway_input_manager *input, |
37 | struct sway_container *container); | 35 | struct sway_container *container); |
38 | 36 | ||
39 | void sway_input_manager_configure_xcursor(struct sway_input_manager *input); | 37 | void input_manager_configure_xcursor(struct sway_input_manager *input); |
40 | 38 | ||
41 | void sway_input_manager_apply_input_config(struct sway_input_manager *input, | 39 | void input_manager_apply_input_config(struct sway_input_manager *input, |
42 | struct input_config *input_config); | 40 | struct input_config *input_config); |
43 | 41 | ||
44 | void sway_input_manager_apply_seat_config(struct sway_input_manager *input, | 42 | void input_manager_apply_seat_config(struct sway_input_manager *input, |
45 | struct seat_config *seat_config); | 43 | struct seat_config *seat_config); |
46 | 44 | ||
47 | struct sway_seat *sway_input_manager_get_default_seat( | 45 | struct sway_seat *input_manager_get_default_seat( |
48 | struct sway_input_manager *input); | 46 | struct sway_input_manager *input); |
49 | 47 | ||
50 | struct sway_seat *input_manager_get_seat(struct sway_input_manager *input, | 48 | struct sway_seat *input_manager_get_seat(struct sway_input_manager *input, |
51 | const char *seat_name); | 49 | const char *seat_name); |
52 | 50 | ||
53 | /** Gets the last seat the user interacted with */ | 51 | /** |
52 | * Gets the last seat the user interacted with | ||
53 | */ | ||
54 | struct sway_seat *input_manager_current_seat(struct sway_input_manager *input); | 54 | struct sway_seat *input_manager_current_seat(struct sway_input_manager *input); |
55 | 55 | ||
56 | struct input_config *input_device_get_config(struct sway_input_device *device); | ||
57 | |||
58 | |||
56 | #endif | 59 | #endif |
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 31210a5a..5c3c2c4f 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -8,7 +8,6 @@ struct sway_seat_device { | |||
8 | struct sway_seat *sway_seat; | 8 | struct sway_seat *sway_seat; |
9 | struct sway_input_device *input_device; | 9 | struct sway_input_device *input_device; |
10 | struct sway_keyboard *keyboard; | 10 | struct sway_keyboard *keyboard; |
11 | struct seat_attachment_config *attachment_config; | ||
12 | struct wl_list link; // sway_seat::devices | 11 | struct wl_list link; // sway_seat::devices |
13 | }; | 12 | }; |
14 | 13 | ||
@@ -23,7 +22,6 @@ struct sway_seat_container { | |||
23 | 22 | ||
24 | struct sway_seat { | 23 | struct sway_seat { |
25 | struct wlr_seat *wlr_seat; | 24 | struct wlr_seat *wlr_seat; |
26 | struct seat_config *config; | ||
27 | struct sway_cursor *cursor; | 25 | struct sway_cursor *cursor; |
28 | struct sway_input_manager *input; | 26 | struct sway_input_manager *input; |
29 | 27 | ||
@@ -38,28 +36,28 @@ struct sway_seat { | |||
38 | struct wl_list link; // input_manager::seats | 36 | struct wl_list link; // input_manager::seats |
39 | }; | 37 | }; |
40 | 38 | ||
41 | struct sway_seat *sway_seat_create(struct sway_input_manager *input, | 39 | struct sway_seat *seat_create(struct sway_input_manager *input, |
42 | const char *seat_name); | 40 | const char *seat_name); |
43 | 41 | ||
44 | void sway_seat_destroy(struct sway_seat *seat); | 42 | void seat_destroy(struct sway_seat *seat); |
45 | 43 | ||
46 | void sway_seat_add_device(struct sway_seat *seat, | 44 | void seat_add_device(struct sway_seat *seat, |
47 | struct sway_input_device *device); | 45 | struct sway_input_device *device); |
48 | 46 | ||
49 | void sway_seat_configure_device(struct sway_seat *seat, | 47 | void seat_configure_device(struct sway_seat *seat, |
50 | struct sway_input_device *device); | 48 | struct sway_input_device *device); |
51 | 49 | ||
52 | void sway_seat_remove_device(struct sway_seat *seat, | 50 | void seat_remove_device(struct sway_seat *seat, |
53 | struct sway_input_device *device); | 51 | struct sway_input_device *device); |
54 | 52 | ||
55 | void sway_seat_configure_xcursor(struct sway_seat *seat); | 53 | void seat_configure_xcursor(struct sway_seat *seat); |
56 | 54 | ||
57 | void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *container); | 55 | void seat_set_focus(struct sway_seat *seat, struct sway_container *container); |
58 | 56 | ||
59 | void sway_seat_set_focus_warp(struct sway_seat *seat, | 57 | void seat_set_focus_warp(struct sway_seat *seat, |
60 | struct sway_container *container, bool warp); | 58 | struct sway_container *container, bool warp); |
61 | 59 | ||
62 | struct sway_container *sway_seat_get_focus(struct sway_seat *seat); | 60 | struct sway_container *seat_get_focus(struct sway_seat *seat); |
63 | 61 | ||
64 | /** | 62 | /** |
65 | * Return the last container to be focused for the seat (or the most recently | 63 | * Return the last container to be focused for the seat (or the most recently |
@@ -70,12 +68,14 @@ struct sway_container *sway_seat_get_focus(struct sway_seat *seat); | |||
70 | * is destroyed, or focus moves to a container with children and we need to | 68 | * is destroyed, or focus moves to a container with children and we need to |
71 | * descend into the next leaf in focus order. | 69 | * descend into the next leaf in focus order. |
72 | */ | 70 | */ |
73 | struct sway_container *sway_seat_get_focus_inactive(struct sway_seat *seat, | 71 | struct sway_container *seat_get_focus_inactive(struct sway_seat *seat, |
74 | struct sway_container *container); | 72 | struct sway_container *container); |
75 | 73 | ||
76 | struct sway_container *sway_seat_get_focus_by_type(struct sway_seat *seat, | 74 | struct sway_container *seat_get_focus_by_type(struct sway_seat *seat, |
77 | enum sway_container_type type); | 75 | enum sway_container_type type); |
78 | 76 | ||
79 | void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config); | 77 | void seat_apply_config(struct sway_seat *seat, struct seat_config *seat_config); |
78 | |||
79 | struct seat_config *seat_get_config(struct sway_seat *seat); | ||
80 | 80 | ||
81 | #endif | 81 | #endif |