summaryrefslogtreecommitdiffstats
path: root/include/sway/input/cursor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/input/cursor.h')
-rw-r--r--include/sway/input/cursor.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
new file mode 100644
index 00000000..fcd94437
--- /dev/null
+++ b/include/sway/input/cursor.h
@@ -0,0 +1,36 @@
1#ifndef _SWAY_INPUT_CURSOR_H
2#define _SWAY_INPUT_CURSOR_H
3#include <stdint.h>
4#include "sway/input/seat.h"
5
6struct sway_cursor {
7 struct sway_seat *seat;
8 struct wlr_cursor *cursor;
9 struct wlr_xcursor_manager *xcursor_manager;
10
11 struct wl_client *image_client;
12
13 struct wl_listener motion;
14 struct wl_listener motion_absolute;
15 struct wl_listener button;
16 struct wl_listener axis;
17
18 struct wl_listener touch_down;
19 struct wl_listener touch_up;
20 struct wl_listener touch_motion;
21
22 struct wl_listener tool_axis;
23 struct wl_listener tool_tip;
24 struct wl_listener tool_button;
25 uint32_t tool_buttons;
26
27 struct wl_listener request_set_cursor;
28};
29
30void sway_cursor_destroy(struct sway_cursor *cursor);
31struct sway_cursor *sway_cursor_create(struct sway_seat *seat);
32void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time);
33void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec,
34 uint32_t button, enum wlr_button_state state);
35
36#endif