aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/types/wlr_data_device.h32
-rw-r--r--include/types/wlr_seat.h20
-rw-r--r--include/wlr/types/wlr_seat.h3
3 files changed, 52 insertions, 3 deletions
diff --git a/include/types/wlr_data_device.h b/include/types/wlr_data_device.h
new file mode 100644
index 00000000..4aa53dc0
--- /dev/null
+++ b/include/types/wlr_data_device.h
@@ -0,0 +1,32 @@
+#ifndef TYPES_WLR_DATA_DEVICE_H
+#define TYPES_WLR_DATA_DEVICE_H
+
+#include <wayland-server.h>
+
+#define DATA_DEVICE_ALL_ACTIONS (WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY | \
+ WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE | \
+ WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK)
+
+struct wlr_client_data_source {
+ struct wlr_data_source source;
+ struct wlr_data_source_impl impl;
+ struct wl_resource *resource;
+};
+
+struct wlr_data_offer *data_offer_create(struct wl_client *client,
+ struct wlr_data_source *source, uint32_t version);
+void data_offer_update_action(struct wlr_data_offer *offer);
+
+struct wlr_client_data_source *client_data_source_create(
+ struct wl_client *client, uint32_t version, uint32_t id);
+struct wlr_client_data_source *client_data_source_from_resource(
+ struct wl_resource *resource);
+struct wlr_data_offer *data_source_send_offer(struct wlr_data_source *source,
+ struct wlr_seat_client *target);
+void data_source_notify_finish(struct wlr_data_source *source);
+
+bool seat_client_start_drag(struct wlr_seat_client *client,
+ struct wlr_data_source *source, struct wlr_surface *icon_surface,
+ struct wlr_surface *origin, uint32_t serial);
+
+#endif
diff --git a/include/types/wlr_seat.h b/include/types/wlr_seat.h
new file mode 100644
index 00000000..b76525ec
--- /dev/null
+++ b/include/types/wlr_seat.h
@@ -0,0 +1,20 @@
+#ifndef TYPES_WLR_SEAT_H
+#define TYPES_WLR_SEAT_H
+
+#include <wayland-server.h>
+#include <wlr/types/wlr_seat.h>
+
+const struct wlr_pointer_grab_interface default_pointer_grab_impl;
+const struct wlr_keyboard_grab_interface default_keyboard_grab_impl;
+const struct wlr_touch_grab_interface default_touch_grab_impl;
+
+void seat_client_create_pointer(struct wlr_seat_client *seat_client,
+ uint32_t version, uint32_t id);
+
+void seat_client_create_keyboard(struct wlr_seat_client *seat_client,
+ uint32_t version, uint32_t id);
+
+void seat_client_create_touch(struct wlr_seat_client *seat_client,
+ uint32_t version, uint32_t id);
+
+#endif
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index ff907f97..e1fa27bb 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -42,7 +42,6 @@ struct wlr_touch_point {
struct wl_listener surface_destroy;
struct wl_listener focus_surface_destroy;
- struct wl_listener resource_destroy;
struct {
struct wl_signal destroy;
@@ -138,7 +137,6 @@ struct wlr_seat_pointer_state {
uint32_t grab_time;
struct wl_listener surface_destroy;
- struct wl_listener resource_destroy;
};
// TODO: May be useful to be able to simulate keyboard input events
@@ -154,7 +152,6 @@ struct wlr_seat_keyboard_state {
struct wl_listener keyboard_repeat_info;
struct wl_listener surface_destroy;
- struct wl_listener resource_destroy;
struct wlr_seat_keyboard_grab *grab;
struct wlr_seat_keyboard_grab *default_grab;