diff options
Diffstat (limited to 'include/sway/input')
-rw-r--r-- | include/sway/input/cursor.h | 26 | ||||
-rw-r--r-- | include/sway/input/input-manager.h | 22 | ||||
-rw-r--r-- | include/sway/input/seat.h | 21 |
3 files changed, 69 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h new file mode 100644 index 00000000..91421964 --- /dev/null +++ b/include/sway/input/cursor.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _SWAY_CURSOR_H | ||
2 | #define _SWAY_CURSOR_H | ||
3 | |||
4 | #include "sway/input/seat.h" | ||
5 | |||
6 | struct sway_cursor { | ||
7 | struct wlr_cursor *cursor; | ||
8 | |||
9 | struct wl_listener motion; | ||
10 | struct wl_listener motion_absolute; | ||
11 | struct wl_listener button; | ||
12 | struct wl_listener axis; | ||
13 | |||
14 | struct wl_listener touch_down; | ||
15 | struct wl_listener touch_up; | ||
16 | struct wl_listener touch_motion; | ||
17 | |||
18 | struct wl_listener tool_axis; | ||
19 | struct wl_listener tool_tip; | ||
20 | |||
21 | struct wl_listener request_set_cursor; | ||
22 | }; | ||
23 | |||
24 | struct sway_cursor *sway_cursor_create(struct sway_seat *seat); | ||
25 | |||
26 | #endif | ||
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h new file mode 100644 index 00000000..5dc75ba7 --- /dev/null +++ b/include/sway/input/input-manager.h | |||
@@ -0,0 +1,22 @@ | |||
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 | struct sway_input_manager { | ||
9 | struct wl_listener input_add; | ||
10 | struct wl_listener input_remove; | ||
11 | struct sway_server *server; | ||
12 | list_t *seats; | ||
13 | }; | ||
14 | |||
15 | struct input_config *new_input_config(const char* identifier); | ||
16 | |||
17 | char* libinput_dev_unique_id(struct libinput_device *dev); | ||
18 | |||
19 | struct sway_input_manager *sway_input_manager_create( | ||
20 | struct sway_server *server); | ||
21 | |||
22 | #endif | ||
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h new file mode 100644 index 00000000..a84b7efd --- /dev/null +++ b/include/sway/input/seat.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef _SWAY_SEAT_H | ||
2 | #define _SWAY_SEAT_H | ||
3 | |||
4 | #include <wlr/types/wlr_seat.h> | ||
5 | #include "sway/input/input-manager.h" | ||
6 | |||
7 | struct sway_seat { | ||
8 | struct wlr_seat *seat; | ||
9 | struct sway_cursor *cursor; | ||
10 | }; | ||
11 | |||
12 | struct sway_seat *sway_seat_create(struct wl_display *display, | ||
13 | const char *seat_name); | ||
14 | |||
15 | void sway_seat_add_device(struct sway_seat *seat, | ||
16 | struct wlr_input_device *device); | ||
17 | |||
18 | void sway_seat_remove_device(struct sway_seat *seat, | ||
19 | struct wlr_input_device *device); | ||
20 | |||
21 | #endif | ||