aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-11 15:02:21 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-11 15:38:03 +0000
commit703aeecb9547fa386c0780d991910793d101d870 (patch)
tree713a254f537b516b97b8731d1c7a737b2ecc6b8e /terminal.h
parentselection: add selection_from_primary() API (stub for now) (diff)
selection: add support for pasting *from* primary
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/terminal.h b/terminal.h
index 4d73f998..9af18d7e 100644
--- a/terminal.h
+++ b/terminal.h
@@ -8,9 +8,11 @@
#include <cairo.h>
#include <wayland-client.h>
+#include <primary-selection-unstable-v1.h>
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-keysyms.h>
+
#include "tllist.h"
#define likely(c) __builtin_expect(!!(c), 1)
@@ -25,6 +27,8 @@ struct wayland {
struct wl_seat *seat;
struct wl_data_device_manager *data_device_manager;
struct wl_data_device *data_device;
+ struct zwp_primary_selection_device_manager_v1 *primary_selection_device_manager;
+ struct zwp_primary_selection_device_v1 *primary_selection_device;
struct wl_keyboard *keyboard;
struct {
struct wl_pointer *pointer;
@@ -193,6 +197,13 @@ struct clipboard {
uint32_t serial;
};
+struct primary {
+ struct zwp_primary_selection_source_v1 *data_source;
+ struct zwp_primary_selection_offer_v1 *data_offer;
+ char *text;
+ uint32_t serial;
+};
+
struct terminal {
pid_t slave;
int ptmx;
@@ -240,8 +251,8 @@ struct terminal {
struct {
struct coord start;
struct coord end;
- struct clipboard primary;
struct clipboard clipboard;
+ struct primary primary;
} selection;
struct grid normal;