diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-11-07 15:56:11 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-11-07 15:56:11 -0500 |
commit | 09c60924235805d07b7915ba879685545a3442aa (patch) | |
tree | d2fab6464daa8e91b0c79a0fbbc3d8373261a0d2 /include/rootston/cursor.h | |
parent | 2280928bb2859b8a5e71e81b99a396ff7a3f9efa (diff) |
multiseat: somewhat working
Diffstat (limited to 'include/rootston/cursor.h')
-rw-r--r-- | include/rootston/cursor.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h index 8a8d33f2..18d5f720 100644 --- a/include/rootston/cursor.h +++ b/include/rootston/cursor.h @@ -3,10 +3,45 @@ #include "rootston/seat.h" +enum roots_cursor_mode { + ROOTS_CURSOR_PASSTHROUGH = 0, + ROOTS_CURSOR_MOVE = 1, + ROOTS_CURSOR_RESIZE = 2, + ROOTS_CURSOR_ROTATE = 3, +}; + +enum roots_cursor_resize_edge { + ROOTS_CURSOR_RESIZE_EDGE_TOP = 1, + ROOTS_CURSOR_RESIZE_EDGE_BOTTOM = 2, + ROOTS_CURSOR_RESIZE_EDGE_LEFT = 4, + ROOTS_CURSOR_RESIZE_EDGE_RIGHT = 8, +}; + +struct roots_input_event { + uint32_t serial; + struct wlr_cursor *cursor; + struct wlr_input_device *device; +}; + struct roots_cursor { struct roots_seat *seat; struct wlr_cursor *cursor; + enum roots_cursor_mode mode; + + // state from input (review if this is necessary) + struct wlr_xcursor_theme *xcursor_theme; + struct wlr_seat *wl_seat; + struct wl_client *cursor_client; + int offs_x, offs_y; + int view_x, view_y, view_width, view_height; + float view_rotation; + uint32_t resize_edges; + // Ring buffer of input events that could trigger move/resize/rotate + int input_events_idx; + struct wl_list touch_points; + struct roots_input_event input_events[16]; + struct wl_listener motion; struct wl_listener motion_absolute; struct wl_listener button; |