aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-03 10:23:08 +0100
committerGitHub <noreply@github.com>2018-05-03 10:23:08 +0100
commit4b5b02057c442b3cb72b0b163d8dc94c2933fa42 (patch)
tree572886c53147b13664794a9b2d2e006f9721fcd9 /include
parent9a83e8131a0e978c6f8e2e74ecac152042b0f213 (diff)
parent1e563e7ecf2b4e331742b670f36e8ddc3040eb87 (diff)
Merge pull request #937 from emersion/reorder-data-device
data-device: split into multiple files
Diffstat (limited to 'include')
-rw-r--r--include/types/wlr_data_device.h32
1 files changed, 32 insertions, 0 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