22 #include "../../SDL_internal.h"
24 #if SDL_VIDEO_DRIVER_WAYLAND
29 #include "../../core/unix/SDL_poll.h"
30 #include "../../events/SDL_sysevents.h"
31 #include "../../events/SDL_events_c.h"
32 #include "../../events/scancodes_xfree86.h"
45 #ifdef SDL_INPUT_LINUXEV
46 #include <linux/input.h>
48 #define BTN_LEFT (0x110)
49 #define BTN_RIGHT (0x111)
50 #define BTN_MIDDLE (0x112)
51 #define BTN_SIDE (0x113)
52 #define BTN_EXTRA (0x114)
54 #include <sys/select.h>
58 #include <xkbcommon/xkbcommon.h>
70 } SDL_WaylandKeyboardRepeat;
72 struct SDL_WaylandInput {
76 struct wl_touch *touch;
77 struct wl_keyboard *keyboard;
79 struct zwp_relative_pointer_v1 *relative_pointer;
80 struct zwp_confined_pointer_v1 *confined_pointer;
93 struct xkb_keymap *keymap;
94 struct xkb_state *
state;
104 } pointer_curr_axis_info;
106 SDL_WaylandKeyboardRepeat keyboard_repeat;
109 struct SDL_WaylandTouchPoint {
115 struct SDL_WaylandTouchPoint* prev;
116 struct SDL_WaylandTouchPoint* next;
119 struct SDL_WaylandTouchPointList {
120 struct SDL_WaylandTouchPoint*
head;
121 struct SDL_WaylandTouchPoint*
tail;
124 static struct SDL_WaylandTouchPointList touch_points = {
NULL,
NULL};
129 struct SDL_WaylandTouchPoint* tp =
SDL_malloc(
sizeof(
struct SDL_WaylandTouchPoint));
136 if (touch_points.tail) {
137 touch_points.tail->next = tp;
138 tp->prev = touch_points.tail;
140 touch_points.head = tp;
144 touch_points.tail = tp;
151 struct SDL_WaylandTouchPoint* tp = touch_points.head;
166 struct SDL_WaylandTouchPoint* tp = touch_points.head;
175 tp->prev->next = tp->next;
177 touch_points.head = tp->next;
181 tp->next->prev = tp->prev;
183 touch_points.tail = tp->prev;
187 struct SDL_WaylandTouchPoint *next = tp->next;
197 static struct wl_surface*
200 struct SDL_WaylandTouchPoint* tp = touch_points.head;
215 keyboard_repeat_handle(SDL_WaylandKeyboardRepeat* repeat_info,
uint32_t now)
217 if (!repeat_info->is_key_down || !repeat_info->is_initialized) {
220 while (repeat_info->next_repeat_ms <= now) {
224 if (repeat_info->text[0]) {
227 repeat_info->next_repeat_ms += 1000 / repeat_info->repeat_rate;
232 keyboard_repeat_clear(SDL_WaylandKeyboardRepeat* repeat_info) {
233 if (!repeat_info->is_initialized) {
240 keyboard_repeat_set(SDL_WaylandKeyboardRepeat* repeat_info,
242 if (!repeat_info->is_initialized) {
245 repeat_info->is_key_down =
SDL_TRUE;
246 repeat_info->next_repeat_ms =
SDL_GetTicks() + repeat_info->repeat_delay;
247 repeat_info->scancode = scancode;
251 repeat_info->text[0] =
'\0';
259 struct SDL_WaylandInput *
input =
d->input;
262 WAYLAND_wl_display_flush(
d->display);
266 keyboard_repeat_handle(&
input->keyboard_repeat, now);
270 err = WAYLAND_wl_display_dispatch(
d->display);
272 err = WAYLAND_wl_display_dispatch_pending(
d->display);
274 if (err == -1 && !
d->display_disconnected) {
278 d->display_disconnected = 1;
286 pointer_handle_motion(
void *
data,
struct wl_pointer *
pointer,
293 if (
input->pointer_focus) {
294 const int sx = wl_fixed_to_int(sx_w);
295 const int sy = wl_fixed_to_int(sy_w);
301 pointer_handle_enter(
void *
data,
struct wl_pointer *
pointer,
303 wl_fixed_t sx_w, wl_fixed_t sy_w)
327 pointer_handle_motion(
data,
pointer, serial, sx_w, sy_w);
332 pointer_handle_leave(
void *
data,
struct wl_pointer *
pointer,
337 if (
input->pointer_focus) {
344 ProcessHitTest(
struct SDL_WaylandInput *
input,
uint32_t serial)
353 static const uint32_t directions_wl[] = {
362 const uint32_t *directions_zxdg = directions_wl;
366 if (
input->display->shell.xdg) {
368 }
else if (
input->display->shell.zxdg) {
383 if (
input->display->shell.xdg) {
385 }
else if (
input->display->shell.zxdg) {
400 pointer_handle_button_common(
struct SDL_WaylandInput *
input,
uint32_t serial,
407 if (
input->pointer_focus) {
411 if (ProcessHitTest(
input, serial)) {
448 pointer_handle_axis_common_v1(
struct SDL_WaylandInput *
input,
455 if (
input->pointer_focus) {
459 y = 0 - (float)wl_fixed_to_double(
value);
462 x = 0 - (float)wl_fixed_to_double(
value);
474 pointer_handle_axis_common(
struct SDL_WaylandInput *
input,
SDL_bool discrete,
479 if (
input->pointer_focus) {
486 }
else if(
input->pointer_curr_axis_info.is_y_discrete) {
491 input->pointer_curr_axis_info.y = 0 - (float)wl_fixed_to_double(
value);
498 }
else if(
input->pointer_curr_axis_info.is_x_discrete) {
503 input->pointer_curr_axis_info.x = 0 - (float)wl_fixed_to_double(
value);
510 pointer_handle_axis(
void *
data,
struct wl_pointer *
pointer,
522 pointer_handle_frame(
void *
data,
struct wl_pointer *
pointer)
526 float x =
input->pointer_curr_axis_info.x,
y =
input->pointer_curr_axis_info.y;
529 memset(&
input->pointer_curr_axis_info, 0,
sizeof input->pointer_curr_axis_info);
531 if(
x == 0.0f &&
y == 0.0f)
538 pointer_handle_axis_source(
void *
data,
struct wl_pointer *
pointer,
545 pointer_handle_axis_stop(
void *
data,
struct wl_pointer *
pointer,
552 pointer_handle_axis_discrete(
void *
data,
struct wl_pointer *
pointer,
562 pointer_handle_enter,
563 pointer_handle_leave,
564 pointer_handle_motion,
565 pointer_handle_button,
567 pointer_handle_frame,
568 pointer_handle_axis_source,
569 pointer_handle_axis_stop,
570 pointer_handle_axis_discrete,
574 touch_handler_down(
void *
data,
struct wl_touch *touch,
unsigned int serial,
575 unsigned int timestamp,
struct wl_surface *
surface,
576 int id, wl_fixed_t fx, wl_fixed_t fy)
579 const double dblx = wl_fixed_to_double(fx);
580 const double dbly = wl_fixed_to_double(fy);
590 touch_handler_up(
void *
data,
struct wl_touch *touch,
unsigned int serial,
591 unsigned int timestamp,
int id)
608 touch_handler_motion(
void *
data,
struct wl_touch *touch,
unsigned int timestamp,
609 int id, wl_fixed_t fx, wl_fixed_t fy)
612 const double dblx = wl_fixed_to_double(fx);
613 const double dbly = wl_fixed_to_double(fy);
617 touch_update(
id,
x,
y);
622 touch_handler_frame(
void *
data,
struct wl_touch *touch)
628 touch_handler_cancel(
void *
data,
struct wl_touch *touch)
636 touch_handler_motion,
638 touch_handler_cancel,
644 keyboard_handle_keymap(
void *
data,
struct wl_keyboard *keyboard,
660 map_str = mmap(
NULL,
size, PROT_READ, MAP_SHARED,
fd, 0);
661 if (map_str == MAP_FAILED) {
666 input->xkb.keymap = WAYLAND_xkb_keymap_new_from_string(
input->display->xkb_context,
668 XKB_KEYMAP_FORMAT_TEXT_V1,
670 munmap(map_str,
size);
673 if (!
input->xkb.keymap) {
674 fprintf(stderr,
"failed to compile keymap\n");
678 input->xkb.state = WAYLAND_xkb_state_new(
input->xkb.keymap);
679 if (!
input->xkb.state) {
680 fprintf(stderr,
"failed to create XKB state\n");
681 WAYLAND_xkb_keymap_unref(
input->xkb.keymap);
688 keyboard_handle_enter(
void *
data,
struct wl_keyboard *keyboard,
690 struct wl_array *keys)
710 keyboard_handle_leave(
void *
data,
struct wl_keyboard *keyboard,
720 const xkb_keysym_t *syms;
727 if (WAYLAND_xkb_state_key_get_syms(
input->xkb.state,
key + 8, &syms) != 1) {
731 return WAYLAND_xkb_keysym_to_utf8(syms[0],
text, 8) > 0;
735 keyboard_handle_key(
void *
data,
struct wl_keyboard *keyboard,
759 keyboard_repeat_set(&
input->keyboard_repeat, scancode, has_text,
text);
761 keyboard_repeat_clear(&
input->keyboard_repeat);
766 keyboard_handle_modifiers(
void *
data,
struct wl_keyboard *keyboard,
773 WAYLAND_xkb_state_update_mask(
input->xkb.state, mods_depressed, mods_latched,
774 mods_locked, 0, 0,
group);
778 keyboard_handle_repeat_info(
void *
data,
struct wl_keyboard *wl_keyboard,
783 input->keyboard_repeat.repeat_delay = delay;
788 keyboard_handle_keymap,
789 keyboard_handle_enter,
790 keyboard_handle_leave,
792 keyboard_handle_modifiers,
793 keyboard_handle_repeat_info,
797 seat_handle_capabilities(
void *
data,
struct wl_seat *seat,
804 memset(&
input->pointer_curr_axis_info, 0,
sizeof input->pointer_curr_axis_info);
839 seat_handle_name(
void *
data,
struct wl_seat *wl_seat,
const char *
name)
845 seat_handle_capabilities,
850 data_source_handle_target(
void *
data,
struct wl_data_source *wl_data_source,
851 const char *mime_type)
856 data_source_handle_send(
void *
data,
struct wl_data_source *wl_data_source,
863 data_source_handle_cancelled(
void *
data,
struct wl_data_source *wl_data_source)
869 data_source_handle_dnd_drop_performed(
void *
data,
struct wl_data_source *wl_data_source)
874 data_source_handle_dnd_finished(
void *
data,
struct wl_data_source *wl_data_source)
879 data_source_handle_action(
void *
data,
struct wl_data_source *wl_data_source,
885 data_source_handle_target,
886 data_source_handle_send,
887 data_source_handle_cancelled,
888 data_source_handle_dnd_drop_performed,
889 data_source_handle_dnd_finished,
890 data_source_handle_action,
898 struct wl_data_source *
id =
NULL;
913 data_source =
SDL_calloc(1,
sizeof *data_source);
914 if (data_source ==
NULL) {
918 WAYLAND_wl_list_init(&(data_source->
mimes));
930 data_offer_handle_offer(
void *
data,
struct wl_data_offer *wl_data_offer,
931 const char *mime_type)
938 data_offer_handle_source_actions(
void *
data,
struct wl_data_offer *wl_data_offer,
944 data_offer_handle_actions(
void *
data,
struct wl_data_offer *wl_data_offer,
950 data_offer_handle_offer,
951 data_offer_handle_source_actions,
952 data_offer_handle_actions,
956 data_device_handle_data_offer(
void *
data,
struct wl_data_device *wl_data_device,
957 struct wl_data_offer *
id)
961 data_offer =
SDL_calloc(1,
sizeof *data_offer);
962 if (data_offer ==
NULL) {
967 WAYLAND_wl_list_init(&(data_offer->
mimes));
974 data_device_handle_enter(
void *
data,
struct wl_data_device *wl_data_device,
976 wl_fixed_t
x, wl_fixed_t
y,
struct wl_data_offer *
id)
1001 dnd_action, dnd_action);
1007 data_device_handle_leave(
void *
data,
struct wl_data_device *wl_data_device)
1019 data_device_handle_motion(
void *
data,
struct wl_data_device *wl_data_device,
1025 data_device_handle_drop(
void *
data,
struct wl_data_device *wl_data_device)
1031 const char *current_uri =
NULL;
1032 const char *last_char =
NULL;
1033 char *current_char =
NULL;
1041 current_uri = (
const char *)
buffer;
1043 for (current_char =
buffer; current_char < last_char; ++current_char) {
1044 if (*current_char ==
'\n' || *current_char == 0) {
1045 if (*current_uri != 0 && *current_uri !=
'#') {
1049 current_uri = (
const char *)current_char + 1;
1058 data_device_handle_selection(
void *
data,
struct wl_data_device *wl_data_device,
1059 struct wl_data_offer *
id)
1077 data_device_handle_data_offer,
1078 data_device_handle_enter,
1079 data_device_handle_leave,
1080 data_device_handle_motion,
1081 data_device_handle_drop,
1082 data_device_handle_selection
1088 struct SDL_WaylandInput *
input;
1097 input->sx_w = wl_fixed_from_int(0);
1098 input->sy_w = wl_fixed_from_int(0);
1101 if (
d->data_device_manager !=
NULL) {
1102 data_device =
SDL_calloc(1,
sizeof *data_device);
1103 if (data_device ==
NULL) {
1108 d->data_device_manager,
input->seat
1117 &data_device_listener, data_device);
1118 input->data_device = data_device;
1125 WAYLAND_wl_display_flush(
d->display);
1130 struct SDL_WaylandInput *
input =
d->input;
1137 if (
input->data_device->selection_offer !=
NULL) {
1140 if (
input->data_device->drag_offer !=
NULL) {
1143 if (
input->data_device->data_device !=
NULL) {
1149 if (
input->keyboard)
1163 if (
input->xkb.state)
1164 WAYLAND_xkb_state_unref(
input->xkb.state);
1166 if (
input->xkb.keymap)
1167 WAYLAND_xkb_keymap_unref(
input->xkb.keymap);
1179 return input->data_device;
1185 d->relative_pointer_manager =
1192 if (
d->relative_pointer_manager)
1198 d->pointer_constraints =
1205 if (
d->pointer_constraints)
1210 relative_pointer_handle_relative_motion(
void *
data,
1211 struct zwp_relative_pointer_v1 *
pointer,
1216 wl_fixed_t dx_unaccel_w,
1217 wl_fixed_t dy_unaccel_w)
1227 dx_unaccel = wl_fixed_to_double(dx_unaccel_w);
1228 dy_unaccel = wl_fixed_to_double(dy_unaccel_w);
1231 dx_unaccel +=
input->dx_frac;
1232 dy_unaccel +=
input->dy_frac;
1234 input->dx_frac = modf(dx_unaccel, &dx);
1235 input->dy_frac = modf(dy_unaccel, &dy);
1237 if (
input->pointer_focus &&
d->relative_mouse_mode) {
1243 relative_pointer_handle_relative_motion,
1247 locked_pointer_locked(
void *
data,
1248 struct zwp_locked_pointer_v1 *locked_pointer)
1253 locked_pointer_unlocked(
void *
data,
1254 struct zwp_locked_pointer_v1 *locked_pointer)
1259 locked_pointer_locked,
1260 locked_pointer_unlocked,
1265 struct SDL_WaylandInput *
input)
1269 struct zwp_locked_pointer_v1 *locked_pointer;
1271 if (
w->locked_pointer)
1281 &locked_pointer_listener,
1284 w->locked_pointer = locked_pointer;
1287 static void pointer_confine_destroy(
struct SDL_WaylandInput *
input)
1289 if (
input->confined_pointer) {
1300 struct zwp_relative_pointer_v1 *relative_pointer;
1302 if (!
d->relative_pointer_manager)
1305 if (!
d->pointer_constraints)
1308 if (!
input->pointer)
1313 pointer_confine_destroy(
input);
1315 if (!
input->relative_pointer) {
1318 d->relative_pointer_manager,
1321 &relative_pointer_listener,
1323 input->relative_pointer = relative_pointer;
1329 d->relative_mouse_mode = 1;
1343 if (
w->locked_pointer)
1345 w->locked_pointer =
NULL;
1351 d->relative_mouse_mode = 0;
1353 if (
input->confined_pointer_window)
1360 confined_pointer_confined(
void *
data,
1361 struct zwp_confined_pointer_v1 *confined_pointer)
1366 confined_pointer_unconfined(
void *
data,
1367 struct zwp_confined_pointer_v1 *confined_pointer)
1372 confined_pointer_confined,
1373 confined_pointer_unconfined,
1380 struct zwp_confined_pointer_v1 *confined_pointer;
1382 if (!
d->pointer_constraints)
1385 if (!
input->pointer)
1390 if (
input->confined_pointer)
1397 if (
d->relative_mouse_mode)
1407 &confined_pointer_listener,
1410 input->confined_pointer = confined_pointer;
1416 pointer_confine_destroy(
input);
int SDL_SendClipboardUpdate(void)
int SDL_SendDropFile(SDL_Window *window, const char *file)
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 SDL_AssertionHandler void SDL_SpinLock SDL_atomic_t int int return SDL_atomic_t return void void void return void return int return SDL_AudioSpec SDL_AudioSpec return int int return return int SDL_RWops int SDL_AudioSpec Uint8 ** d
#define SDL_OutOfMemory()
void SDL_SetKeyboardFocus(SDL_Window *window)
int SDL_SendKeyboardText(const char *text)
int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
#define is_initialized(M)
int SDL_SendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button)
void SDL_SetMouseFocus(SDL_Window *window)
int SDL_SendMouseWheel(SDL_Window *window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction)
int SDL_SendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y)
#define SDL_BUTTON_MIDDLE
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLint GLint GLint x
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLsizei const void * pointer
GLboolean GLboolean GLboolean GLboolean a
GLuint const GLchar * name
GLuint GLsizei GLsizei * length
GLsizei const GLfloat * value
GLenum GLenum GLenum input
GLubyte GLubyte GLubyte GLubyte w
int SDL_IOReady(int fd, SDL_bool forWrite, int timeoutMS)
#define SDL_arraysize(array)
SDL_VideoDevice * SDL_GetVideoDevice(void)
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, SDL_bool down, float x, float y, float pressure)
void SDL_DelTouch(SDL_TouchID id)
int SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name)
int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, float x, float y, float pressure)
@ SDL_TOUCH_DEVICE_DIRECT
static SDL_VideoDevice * _this
SDL_HitTestResult
Possible return values from the SDL_HitTest callback.
@ SDL_HITTEST_RESIZE_LEFT
@ SDL_HITTEST_RESIZE_TOPRIGHT
@ SDL_HITTEST_RESIZE_BOTTOM
@ SDL_HITTEST_RESIZE_BOTTOMRIGHT
@ SDL_HITTEST_RESIZE_BOTTOMLEFT
@ SDL_HITTEST_RESIZE_RIGHT
@ SDL_HITTEST_RESIZE_TOPLEFT
void * Wayland_data_offer_receive(SDL_WaylandDataOffer *offer, size_t *length, const char *mime_type, SDL_bool null_terminate)
void Wayland_data_offer_destroy(SDL_WaylandDataOffer *offer)
ssize_t Wayland_data_source_send(SDL_WaylandDataSource *source, const char *mime_type, int fd)
int Wayland_data_device_clear_selection(SDL_WaylandDataDevice *device)
int Wayland_data_offer_add_mime(SDL_WaylandDataOffer *offer, const char *mime_type)
void Wayland_data_source_destroy(SDL_WaylandDataSource *source)
SDL_bool Wayland_data_offer_has_mime(SDL_WaylandDataOffer *offer, const char *mime_type)
SDL_WaylandDataSource * Wayland_data_source_create(_THIS)
int Wayland_data_device_set_serial(SDL_WaylandDataDevice *device, uint32_t serial)
int Wayland_input_lock_pointer(struct SDL_WaylandInput *input)
void Wayland_display_destroy_input(SDL_VideoData *d)
void Wayland_display_add_input(SDL_VideoData *d, uint32_t id, uint32_t version)
void Wayland_display_destroy_relative_pointer_manager(SDL_VideoData *d)
int Wayland_input_confine_pointer(SDL_Window *window, struct SDL_WaylandInput *input)
void Wayland_display_destroy_pointer_constraints(SDL_VideoData *d)
SDL_WaylandDataDevice * Wayland_get_data_device(struct SDL_WaylandInput *input)
void Wayland_display_add_pointer_constraints(SDL_VideoData *d, uint32_t id)
void Wayland_display_add_relative_pointer_manager(SDL_VideoData *d, uint32_t id)
int Wayland_input_unconfine_pointer(struct SDL_WaylandInput *input)
int Wayland_input_unlock_pointer(struct SDL_WaylandInput *input)
void Wayland_PumpEvents(_THIS)
EGLSurface EGLnsecsANDROID time
EGLSurface EGLNativeWindowType * window
static struct wl_data_device * wl_data_device_manager_get_data_device(struct wl_data_device_manager *wl_data_device_manager, struct wl_seat *seat)
static struct wl_data_source * wl_data_device_manager_create_data_source(struct wl_data_device_manager *wl_data_device_manager)
@ WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY
@ WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE
static void wl_data_device_release(struct wl_data_device *wl_data_device)
static int wl_data_device_add_listener(struct wl_data_device *wl_data_device, const struct wl_data_device_listener *listener, void *data)
static void wl_data_device_set_user_data(struct wl_data_device *wl_data_device, void *user_data)
static void wl_data_offer_set_user_data(struct wl_data_offer *wl_data_offer, void *user_data)
static int wl_data_offer_add_listener(struct wl_data_offer *wl_data_offer, const struct wl_data_offer_listener *listener, void *data)
static void wl_data_offer_accept(struct wl_data_offer *wl_data_offer, uint32_t serial, const char *mime_type)
static void * wl_data_offer_get_user_data(struct wl_data_offer *wl_data_offer)
static void wl_data_offer_set_actions(struct wl_data_offer *wl_data_offer, uint32_t dnd_actions, uint32_t preferred_action)
static int wl_data_source_add_listener(struct wl_data_source *wl_data_source, const struct wl_data_source_listener *listener, void *data)
static void wl_data_source_set_user_data(struct wl_data_source *wl_data_source, void *user_data)
static void wl_data_source_destroy(struct wl_data_source *wl_data_source)
static void wl_keyboard_set_user_data(struct wl_keyboard *wl_keyboard, void *user_data)
static void wl_keyboard_destroy(struct wl_keyboard *wl_keyboard)
static int wl_keyboard_add_listener(struct wl_keyboard *wl_keyboard, const struct wl_keyboard_listener *listener, void *data)
@ WL_KEYBOARD_KEY_STATE_PRESSED
@ WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1
static int wl_pointer_add_listener(struct wl_pointer *wl_pointer, const struct wl_pointer_listener *listener, void *data)
static void wl_pointer_set_user_data(struct wl_pointer *wl_pointer, void *user_data)
static void wl_pointer_destroy(struct wl_pointer *wl_pointer)
@ WL_POINTER_AXIS_VERTICAL_SCROLL
@ WL_POINTER_AXIS_HORIZONTAL_SCROLL
static void * wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const struct wl_interface *interface, uint32_t version)
static struct wl_touch * wl_seat_get_touch(struct wl_seat *wl_seat)
static int wl_seat_add_listener(struct wl_seat *wl_seat, const struct wl_seat_listener *listener, void *data)
static void wl_seat_destroy(struct wl_seat *wl_seat)
static struct wl_pointer * wl_seat_get_pointer(struct wl_seat *wl_seat)
static void wl_seat_set_user_data(struct wl_seat *wl_seat, void *user_data)
static struct wl_keyboard * wl_seat_get_keyboard(struct wl_seat *wl_seat)
@ WL_SEAT_CAPABILITY_KEYBOARD
@ WL_SEAT_CAPABILITY_POINTER
@ WL_SEAT_CAPABILITY_TOUCH
static void wl_shell_surface_move(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial)
@ WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT
@ WL_SHELL_SURFACE_RESIZE_BOTTOM
@ WL_SHELL_SURFACE_RESIZE_LEFT
@ WL_SHELL_SURFACE_RESIZE_TOP
@ WL_SHELL_SURFACE_RESIZE_RIGHT
@ WL_SHELL_SURFACE_RESIZE_TOP_RIGHT
@ WL_SHELL_SURFACE_RESIZE_TOP_LEFT
@ WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT
static void * wl_surface_get_user_data(struct wl_surface *wl_surface)
static void wl_touch_destroy(struct wl_touch *wl_touch)
static int wl_touch_add_listener(struct wl_touch *wl_touch, const struct wl_touch_listener *listener, void *data)
static void wl_touch_set_user_data(struct wl_touch *wl_touch, void *user_data)
static void xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, uint32_t edges)
static void xdg_toplevel_move(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial)
static void zwp_confined_pointer_v1_destroy(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
static int zwp_confined_pointer_v1_add_listener(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, const struct zwp_confined_pointer_v1_listener *listener, void *data)
static int zwp_locked_pointer_v1_add_listener(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, const struct zwp_locked_pointer_v1_listener *listener, void *data)
static void zwp_locked_pointer_v1_destroy(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
static struct zwp_locked_pointer_v1 * zwp_pointer_constraints_v1_lock_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
static struct zwp_confined_pointer_v1 * zwp_pointer_constraints_v1_confine_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
static void zwp_pointer_constraints_v1_destroy(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
@ ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT
static struct zwp_relative_pointer_v1 * zwp_relative_pointer_manager_v1_get_relative_pointer(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1, struct wl_pointer *pointer)
static void zwp_relative_pointer_manager_v1_destroy(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
static void zwp_relative_pointer_v1_destroy(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
static int zwp_relative_pointer_v1_add_listener(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1, const struct zwp_relative_pointer_v1_listener *listener, void *data)
static void zxdg_toplevel_v6_resize(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, uint32_t edges)
static void zxdg_toplevel_v6_move(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial)
const struct wl_interface zwp_pointer_constraints_v1_interface
const struct wl_interface zwp_relative_pointer_manager_v1_interface
static const SDL_Scancode xfree86_scancode_table2[]
The structure that defines a point (integer)
struct wl_data_device_manager * data_device_manager
SDL_VideoData * video_data
SDL_WaylandDataOffer * drag_offer
SDL_WaylandDataOffer * selection_offer
struct wl_data_device * data_device
struct wl_data_offer * offer
struct wl_data_source * source
SDL_xdg_shell_surface xdg
struct wl_shell_surface * wl
union SDL_WindowData::@445 shell_surface
SDL_zxdg_shell_surface zxdg
The type used to identify a window.
struct xdg_toplevel * toplevel
union SDL_xdg_shell_surface::@444 roleobj
struct zxdg_toplevel_v6 * toplevel
union SDL_zxdg_shell_surface::@443 roleobj
void(* offer)(void *data, struct wl_data_offer *wl_data_offer, const char *mime_type)
static char text[MAX_TEXT_LENGTH]
const struct wl_interface wl_seat_interface
static uint32_t wl_seat_get_version(struct wl_seat *wl_seat)
static uint32_t wl_data_offer_get_version(struct wl_data_offer *wl_data_offer)