#ifndef WAYLAND_H #define WAYLAND_H #include #include #include #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 } ModMask; typedef struct { uint32_t k; uint32_t mask; char *s; /* three-valued logic variables: 0 indifferent, 1 on, -1 off */ signed char appkey; /* application keypad */ signed char appcursor; /* application cursor */ } Key; typedef struct { struct wl_display *display; struct wl_registry *registry; struct wl_shm *shm; struct wl_compositor *compositor; struct xdg_wm_base *wm_base; struct wl_seat *seat; struct { struct xkb_state *state; struct xkb_keymap *keymap; struct xkb_context *context; struct wl_keyboard *keyboard; struct { uint32_t state; uint32_t sym; uint32_t mod; } event; struct { int timer; int delay; int period; } repeat; } kb; struct { struct wl_pointer *pointer; struct { uint32_t x; uint32_t y; } position; struct { uint32_t button; uint32_t state; } buttons; } pointer; } Client; int allocate_shm_file(size_t size); #endif