aboutsummaryrefslogtreecommitdiff
path: root/include/rootston/seat.h
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-11-17 23:29:47 +0100
committeremersion <contact@emersion.fr>2017-11-17 23:29:47 +0100
commit27937add762bb2594828ac678859bfdde4275f1e (patch)
treeaa9813fd534d019a5e967ffad31d153d30ae7fa1 /include/rootston/seat.h
parent3e3209cba22c9a5a562acc5e543946408a36e2f4 (diff)
parentbf5640db128b930b38ebca2b1d8a79e028ad9f39 (diff)
Merge branch 'master' into laggy-move-resize
Diffstat (limited to 'include/rootston/seat.h')
-rw-r--r--include/rootston/seat.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/include/rootston/seat.h b/include/rootston/seat.h
new file mode 100644
index 00000000..bef515a4
--- /dev/null
+++ b/include/rootston/seat.h
@@ -0,0 +1,88 @@
+#ifndef _ROOTSTON_SEAT_H
+#define _ROOTSTON_SEAT_H
+#include <wayland-server.h>
+#include "rootston/input.h"
+#include "rootston/keyboard.h"
+
+struct roots_drag_icon {
+ struct wlr_surface *surface;
+ struct wl_list link; // roots_seat::drag_icons
+ bool mapped;
+
+ int32_t sx;
+ int32_t sy;
+
+ struct wl_listener surface_destroy;
+ struct wl_listener surface_commit;
+};
+
+struct roots_seat {
+ struct roots_input *input;
+ struct wlr_seat *seat;
+ struct roots_cursor *cursor;
+ struct wl_list link;
+ struct wl_list drag_icons;
+
+ struct roots_view *focus;
+
+ struct wl_list keyboards;
+ struct wl_list pointers;
+ struct wl_list touch;
+ struct wl_list tablet_tools;
+};
+
+struct roots_pointer {
+ struct roots_seat *seat;
+ struct wlr_input_device *device;
+ struct wl_list link;
+};
+
+struct roots_touch {
+ struct roots_seat *seat;
+ struct wlr_input_device *device;
+ struct wl_list link;
+};
+
+struct roots_touch_point {
+ struct roots_touch *device;
+ int32_t slot;
+ double x, y;
+ struct wl_list link;
+};
+
+struct roots_tablet_tool {
+ struct roots_seat *seat;
+ struct wlr_input_device *device;
+ struct wl_listener axis;
+ struct wl_listener proximity;
+ struct wl_listener tip;
+ struct wl_listener button;
+ struct wl_list link;
+};
+
+struct roots_seat *roots_seat_create(struct roots_input *input, char *name);
+
+void roots_seat_destroy(struct roots_seat *seat);
+
+void roots_seat_add_device(struct roots_seat *seat,
+ struct wlr_input_device *device);
+
+void roots_seat_remove_device(struct roots_seat *seat,
+ struct wlr_input_device *device);
+
+void roots_seat_configure_cursor(struct roots_seat *seat);
+
+void roots_seat_configure_xcursor(struct roots_seat *seat);
+
+bool roots_seat_has_meta_pressed(struct roots_seat *seat);
+
+void roots_seat_focus_view(struct roots_seat *seat, struct roots_view *view);
+
+void roots_seat_begin_move(struct roots_seat *seat, struct roots_view *view);
+
+void roots_seat_begin_resize(struct roots_seat *seat, struct roots_view *view,
+ uint32_t edges);
+
+void roots_seat_begin_rotate(struct roots_seat *seat, struct roots_view *view);
+
+#endif