aboutsummaryrefslogtreecommitdiff
path: root/wayland.h
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-17 20:33:22 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-17 20:33:22 +0200
commit7659dfc2894518f124557ba1f2ae493c6c041782 (patch)
treeb45ec5105f6a72ff1a36599dbc0f0957c62809e6 /wayland.h
parent4b6ef5f586004c085c6aed3b614161f6e5ab5d3f (diff)
add clipboard support
Diffstat (limited to 'wayland.h')
-rw-r--r--wayland.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/wayland.h b/wayland.h
index b12cd00..97c608a 100644
--- a/wayland.h
+++ b/wayland.h
@@ -9,12 +9,12 @@
#include "xdg-shell-client-protocol.h"
typedef enum {
- KEY_MOD_NONE = 0,
- KEY_MOD_CTRL = 1,
- KEY_MOD_ALT = 2,
- KEY_MOD_SHIFT = 4,
- KEY_MOD_LOGO = 8,
- KEY_MOD_ANY = 16
+ KEY_MOD_NONE = 1 << 0,
+ KEY_MOD_CTRL = 1 << 1,
+ KEY_MOD_ALT = 1 << 2,
+ KEY_MOD_SHIFT = 1 << 3,
+ KEY_MOD_LOGO = 1 << 4,
+ KEY_MOD_ANY = 1 << 5
} ModMask;
@@ -29,6 +29,13 @@ typedef struct {
typedef struct {
+ uint32_t k;
+ uint32_t mask;
+ void (*func)();
+} Shortcut;
+
+
+typedef struct {
struct wl_display *display;
struct wl_registry *registry;
struct wl_shm *shm;
@@ -68,6 +75,11 @@ typedef struct {
uint32_t tclick;
} buttons;
} pointer;
+ struct {
+ struct wl_data_device_manager *data_device_manager;
+ struct wl_data_device *data_device;
+ uint32_t keyboard_enter_serial;
+ } clipboard;
} Client;
int allocate_shm_file(size_t size);