aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-12 11:41:11 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-15 05:59:52 -0400
commit3892acecac773b825532f84da4671c2a55f5e82a (patch)
tree642dfb4a5335b93c3e1c437d3caa7dccf8263ac3 /include/wlr
parent6a7560fae05147ac5a1ac0dd3474670f1bd6c871 (diff)
wlr-data-device: basic clipboard
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_data_device.h19
-rw-r--r--include/wlr/types/wlr_seat.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h
index 38d1467c..5cb839bd 100644
--- a/include/wlr/types/wlr_data_device.h
+++ b/include/wlr/types/wlr_data_device.h
@@ -9,6 +9,9 @@ struct wlr_data_device_manager {
struct wlr_data_offer {
struct wl_resource *resource;
+ struct wlr_data_source *source;
+
+ struct wl_listener source_destroy;
};
struct wlr_data_source {
@@ -17,6 +20,11 @@ struct wlr_data_source {
struct wlr_seat_handle *seat;
struct wl_array mime_types;
+ bool accepted;
+
+ // TODO
+ //bool actions_set;
+
struct {
struct wl_signal destroy;
} events;
@@ -28,4 +36,15 @@ struct wlr_data_source {
struct wlr_data_device_manager *wlr_data_device_manager_create(
struct wl_display *display);
+/**
+ * Creates a new wl_data_offer if there is a wl_data_source currently set as the
+ * seat selection and sends it to the client for this handle, followed by the
+ * wl_data_device.selection() event.
+ * If there is no current selection, the wl_data_device.selection() event will
+ * carry a NULL wl_data_offer.
+ * If the client does not have a wl_data_device for the seat nothing * will be
+ * done.
+ */
+void wlr_seat_handle_send_selection(struct wlr_seat_handle *handle);
+
#endif
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index c84a1370..88d42112 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -119,6 +119,8 @@ struct wlr_seat {
struct wlr_seat_pointer_state pointer_state;
struct wlr_seat_keyboard_state keyboard_state;
+ struct wl_listener selection_data_source_destroy;
+
struct {
struct wl_signal client_bound;
struct wl_signal client_unbound;