32 #include <linux/input.h> 37 #include <sys/timerfd.h> 39 #include <wayland-client.h> 42 static inline int min(
int n1,
int n2)
44 return n1 < n2 ? n1 : n2;
56 if (surface == window->wl.decorations.top.surface)
61 if (surface == window->wl.decorations.left.surface)
66 if (surface == window->wl.decorations.right.surface)
71 if (surface == window->wl.decorations.bottom.surface)
76 window = window->
next;
84 struct wl_surface* surface,
101 window->wl.decorations.
focus = focus;
102 _glfw.wl.serial = serial;
114 struct wl_surface* surface)
123 _glfw.wl.serial = serial;
133 struct wl_surface* surface =
_glfw.wl.cursorSurface;
134 struct wl_cursor_theme* theme =
_glfw.wl.cursorTheme;
137 if (window->wl.
scale > 1 &&
_glfw.wl.cursorThemeHiDPI)
142 theme =
_glfw.wl.cursorThemeHiDPI;
149 "Wayland: Standard cursor not found");
153 image = cursor->
images[0];
161 wl_pointer_set_cursor(
_glfw.wl.pointer,
_glfw.wl.serial,
165 wl_surface_set_buffer_scale(surface, scale);
166 wl_surface_attach(surface, buffer, 0, 0);
167 wl_surface_damage(surface, 0, 0,
169 wl_surface_commit(surface);
179 const char* cursorName;
188 window->wl.cursorPosX = wl_fixed_to_double(sx);
189 window->wl.cursorPosY = wl_fixed_to_double(sy);
192 switch (window->wl.decorations.
focus)
196 wl_fixed_to_double(sx),
197 wl_fixed_to_double(sy));
201 cursorName =
"n-resize";
203 cursorName =
"left_ptr";
207 cursorName =
"nw-resize";
209 cursorName =
"w-resize";
213 cursorName =
"ne-resize";
215 cursorName =
"e-resize";
219 cursorName =
"sw-resize";
221 cursorName =
"se-resize";
223 cursorName =
"s-resize";
242 uint32_t edges = WL_SHELL_SURFACE_RESIZE_NONE;
246 if (button == BTN_LEFT)
248 switch (window->wl.decorations.
focus)
254 edges = WL_SHELL_SURFACE_RESIZE_TOP;
257 if (window->wl.xdg.toplevel)
258 xdg_toplevel_move(window->wl.xdg.toplevel,
_glfw.wl.seat, serial);
260 wl_shell_surface_move(window->wl.shellSurface,
_glfw.wl.seat, serial);
265 edges = WL_SHELL_SURFACE_RESIZE_TOP_LEFT;
267 edges = WL_SHELL_SURFACE_RESIZE_LEFT;
271 edges = WL_SHELL_SURFACE_RESIZE_TOP_RIGHT;
273 edges = WL_SHELL_SURFACE_RESIZE_RIGHT;
277 edges = WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT;
279 edges = WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT;
281 edges = WL_SHELL_SURFACE_RESIZE_BOTTOM;
286 if (edges != WL_SHELL_SURFACE_RESIZE_NONE)
288 if (window->wl.xdg.toplevel)
289 xdg_toplevel_resize(window->wl.xdg.toplevel,
_glfw.wl.seat,
292 wl_shell_surface_resize(window->wl.shellSurface,
_glfw.wl.seat,
296 else if (button == BTN_RIGHT)
298 if (window->wl.decorations.
focus !=
mainWindow && window->wl.xdg.toplevel)
300 xdg_toplevel_show_window_menu(window->wl.xdg.toplevel,
301 _glfw.wl.seat, serial,
302 window->wl.cursorPosX,
303 window->wl.cursorPosY);
312 _glfw.wl.serial = serial;
316 glfwButton = button - BTN_LEFT;
320 state == WL_POINTER_BUTTON_STATE_PRESSED
323 _glfw.wl.xkb.modifiers);
333 double x = 0.0,
y = 0.0;
337 const double scrollFactor = 1.0 / 10.0;
342 assert(axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL ||
343 axis == WL_POINTER_AXIS_VERTICAL_SCROLL);
345 if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL)
346 x = wl_fixed_to_double(value) * scrollFactor;
347 else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL)
348 y = wl_fixed_to_double(value) * scrollFactor;
362 struct wl_keyboard* keyboard,
367 struct xkb_keymap* keymap;
368 struct xkb_state*
state;
370 #ifdef HAVE_XKBCOMMON_COMPOSE_H 371 struct xkb_compose_table* composeTable;
372 struct xkb_compose_state* composeState;
378 if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1)
384 mapStr = mmap(
NULL, size, PROT_READ, MAP_SHARED, fd, 0);
385 if (mapStr == MAP_FAILED) {
392 XKB_KEYMAP_FORMAT_TEXT_V1,
394 munmap(mapStr, size);
400 "Wayland: Failed to compile keymap");
408 "Wayland: Failed to create XKB state");
414 locale = getenv(
"LC_ALL");
416 locale = getenv(
"LC_CTYPE");
418 locale = getenv(
"LANG");
422 #ifdef HAVE_XKBCOMMON_COMPOSE_H 424 xkb_compose_table_new_from_locale(
_glfw.wl.xkb.
context, locale,
425 XKB_COMPOSE_COMPILE_NO_FLAGS);
429 xkb_compose_state_new(composeTable, XKB_COMPOSE_STATE_NO_FLAGS);
430 xkb_compose_table_unref(composeTable);
432 _glfw.wl.xkb.composeState = composeState;
435 "Wayland: Failed to create XKB compose state");
440 "Wayland: Failed to create XKB compose table");
446 _glfw.wl.xkb.keymap = keymap;
449 _glfw.wl.xkb.controlMask =
451 _glfw.wl.xkb.altMask =
453 _glfw.wl.xkb.shiftMask =
455 _glfw.wl.xkb.superMask =
457 _glfw.wl.xkb.capsLockMask =
459 _glfw.wl.xkb.numLockMask =
464 struct wl_keyboard* keyboard,
466 struct wl_surface* surface,
467 struct wl_array*
keys)
481 _glfw.wl.serial = serial;
487 struct wl_keyboard* keyboard,
489 struct wl_surface* surface)
496 _glfw.wl.serial = serial;
503 if (key <
sizeof(
_glfw.wl.keycodes) /
sizeof(
_glfw.wl.keycodes[0]))
509 #ifdef HAVE_XKBCOMMON_COMPOSE_H 510 static xkb_keysym_t composeSymbol(xkb_keysym_t sym)
512 if (sym == XKB_KEY_NoSymbol || !
_glfw.wl.xkb.composeState)
514 if (xkb_compose_state_feed(
_glfw.wl.xkb.composeState, sym)
515 != XKB_COMPOSE_FEED_ACCEPTED)
517 switch (xkb_compose_state_get_status(
_glfw.wl.xkb.composeState))
519 case XKB_COMPOSE_COMPOSED:
520 return xkb_compose_state_get_one_sym(
_glfw.wl.xkb.composeState);
521 case XKB_COMPOSE_COMPOSING:
522 case XKB_COMPOSE_CANCELLED:
523 return XKB_KEY_NoSymbol;
524 case XKB_COMPOSE_NOTHING:
535 const xkb_keysym_t *syms;
543 #ifdef HAVE_XKBCOMMON_COMPOSE_H 544 sym = composeSymbol(syms[0]);
551 const int mods =
_glfw.wl.xkb.modifiers;
561 struct wl_keyboard* keyboard,
571 struct itimerspec timer = {};
577 action = state == WL_KEYBOARD_KEY_STATE_PRESSED
580 _glfw.wl.serial = serial;
582 _glfw.wl.xkb.modifiers);
588 if (shouldRepeat &&
_glfw.wl.keyboardRepeatRate > 0)
590 _glfw.wl.keyboardLastKey = keyCode;
591 _glfw.wl.keyboardLastScancode =
key;
592 timer.it_interval.tv_sec =
_glfw.wl.keyboardRepeatRate / 1000;
593 timer.it_interval.tv_nsec = (
_glfw.wl.keyboardRepeatRate % 1000) * 1000000;
594 timer.it_value.tv_sec =
_glfw.wl.keyboardRepeatDelay / 1000;
595 timer.it_value.tv_nsec = (
_glfw.wl.keyboardRepeatDelay % 1000) * 1000000;
598 timerfd_settime(
_glfw.wl.timerfd, 0, &timer,
NULL);
602 struct wl_keyboard* keyboard,
610 unsigned int modifiers = 0;
612 _glfw.wl.serial = serial;
614 if (!
_glfw.wl.xkb.keymap)
626 XKB_STATE_MODS_DEPRESSED |
627 XKB_STATE_LAYOUT_DEPRESSED |
628 XKB_STATE_MODS_LATCHED |
629 XKB_STATE_LAYOUT_LATCHED);
630 if (mask &
_glfw.wl.xkb.controlMask)
632 if (mask &
_glfw.wl.xkb.altMask)
634 if (mask &
_glfw.wl.xkb.shiftMask)
636 if (mask &
_glfw.wl.xkb.superMask)
638 if (mask &
_glfw.wl.xkb.capsLockMask)
640 if (mask &
_glfw.wl.xkb.numLockMask)
642 _glfw.wl.xkb.modifiers = modifiers;
645 #ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 646 static void keyboardHandleRepeatInfo(
void*
data,
647 struct wl_keyboard* keyboard,
651 if (keyboard !=
_glfw.wl.keyboard)
655 _glfw.wl.keyboardRepeatDelay = delay;
665 #ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 666 keyboardHandleRepeatInfo,
671 struct wl_seat* seat,
672 enum wl_seat_capability caps)
674 if ((caps & WL_SEAT_CAPABILITY_POINTER) && !
_glfw.wl.pointer)
676 _glfw.wl.pointer = wl_seat_get_pointer(seat);
679 else if (!(caps & WL_SEAT_CAPABILITY_POINTER) &&
_glfw.wl.pointer)
681 wl_pointer_destroy(
_glfw.wl.pointer);
685 if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !
_glfw.wl.keyboard)
687 _glfw.wl.keyboard = wl_seat_get_keyboard(seat);
690 else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) &&
_glfw.wl.keyboard)
692 wl_keyboard_destroy(
_glfw.wl.keyboard);
698 struct wl_seat* seat,
709 struct wl_data_offer* dataOffer,
710 const char* mimeType)
719 struct wl_data_device* dataDevice,
720 struct wl_data_offer*
id)
722 if (
_glfw.wl.dataOffer)
723 wl_data_offer_destroy(
_glfw.wl.dataOffer);
730 struct wl_data_device* dataDevice,
732 struct wl_surface *surface,
735 struct wl_data_offer *
id)
740 struct wl_data_device* dataDevice)
745 struct wl_data_device* dataDevice,
753 struct wl_data_device* dataDevice)
758 struct wl_data_device* dataDevice,
759 struct wl_data_offer*
id)
773 struct xdg_wm_base* wmBase,
776 xdg_wm_base_pong(wmBase, serial);
784 struct wl_registry* registry,
786 const char* interface,
789 if (strcmp(interface,
"wl_compositor") == 0)
791 _glfw.wl.compositorVersion =
min(3, version);
792 _glfw.wl.compositor =
793 wl_registry_bind(registry, name, &wl_compositor_interface,
794 _glfw.wl.compositorVersion);
796 else if (strcmp(interface,
"wl_subcompositor") == 0)
798 _glfw.wl.subcompositor =
799 wl_registry_bind(registry, name, &wl_subcompositor_interface, 1);
801 else if (strcmp(interface,
"wl_shm") == 0)
804 wl_registry_bind(registry, name, &wl_shm_interface, 1);
806 else if (strcmp(interface,
"wl_shell") == 0)
809 wl_registry_bind(registry, name, &wl_shell_interface, 1);
811 else if (strcmp(interface,
"wl_output") == 0)
815 else if (strcmp(interface,
"wl_seat") == 0)
819 _glfw.wl.seatVersion =
min(4, version);
821 wl_registry_bind(registry, name, &wl_seat_interface,
822 _glfw.wl.seatVersion);
826 else if (strcmp(interface,
"wl_data_device_manager") == 0)
828 if (!
_glfw.wl.dataDeviceManager)
830 _glfw.wl.dataDeviceManager =
831 wl_registry_bind(registry, name,
832 &wl_data_device_manager_interface, 1);
835 else if (strcmp(interface,
"xdg_wm_base") == 0)
838 wl_registry_bind(registry, name, &xdg_wm_base_interface, 1);
841 else if (strcmp(interface,
"zxdg_decoration_manager_v1") == 0)
843 _glfw.wl.decorationManager =
844 wl_registry_bind(registry, name,
845 &zxdg_decoration_manager_v1_interface,
848 else if (strcmp(interface,
"wp_viewporter") == 0)
850 _glfw.wl.viewporter =
851 wl_registry_bind(registry, name, &wp_viewporter_interface, 1);
853 else if (strcmp(interface,
"zwp_relative_pointer_manager_v1") == 0)
855 _glfw.wl.relativePointerManager =
856 wl_registry_bind(registry, name,
857 &zwp_relative_pointer_manager_v1_interface,
860 else if (strcmp(interface,
"zwp_pointer_constraints_v1") == 0)
862 _glfw.wl.pointerConstraints =
863 wl_registry_bind(registry, name,
864 &zwp_pointer_constraints_v1_interface,
867 else if (strcmp(interface,
"zwp_idle_inhibit_manager_v1") == 0)
869 _glfw.wl.idleInhibitManager =
870 wl_registry_bind(registry, name,
871 &zwp_idle_inhibit_manager_v1_interface,
877 struct wl_registry *registry,
886 if (monitor->wl.
name == name)
906 memset(
_glfw.wl.keycodes, -1,
sizeof(
_glfw.wl.keycodes));
907 memset(
_glfw.wl.scancodes, -1,
sizeof(
_glfw.wl.scancodes));
1027 for (scancode = 0; scancode < 256; scancode++)
1029 if (
_glfw.wl.keycodes[scancode] > 0)
1030 _glfw.wl.scancodes[
_glfw.wl.keycodes[scancode]] = scancode;
1041 const char *cursorTheme;
1042 const char *cursorSizeStr;
1043 char *cursorSizeEnd;
1044 long cursorSizeLong;
1051 "Wayland: Failed to open libwayland-cursor");
1068 "Wayland: Failed to open libwayland-egl");
1083 "Wayland: Failed to open libxkbcommon");
1110 #ifdef HAVE_XKBCOMMON_COMPOSE_H 1111 _glfw.wl.xkb.compose_table_new_from_locale = (PFN_xkb_compose_table_new_from_locale)
1113 _glfw.wl.xkb.compose_table_unref = (PFN_xkb_compose_table_unref)
1115 _glfw.wl.xkb.compose_state_new = (PFN_xkb_compose_state_new)
1117 _glfw.wl.xkb.compose_state_unref = (PFN_xkb_compose_state_unref)
1119 _glfw.wl.xkb.compose_state_feed = (PFN_xkb_compose_state_feed)
1121 _glfw.wl.xkb.compose_state_get_status = (PFN_xkb_compose_state_get_status)
1123 _glfw.wl.xkb.compose_state_get_one_sym = (PFN_xkb_compose_state_get_one_sym)
1127 _glfw.wl.display = wl_display_connect(
NULL);
1128 if (!
_glfw.wl.display)
1131 "Wayland: Failed to connect to display");
1135 _glfw.wl.registry = wl_display_get_registry(
_glfw.wl.display);
1144 "Wayland: Failed to initialize xkb context");
1149 wl_display_roundtrip(
_glfw.wl.display);
1152 wl_display_roundtrip(
_glfw.wl.display);
1161 _glfw.wl.timerfd = -1;
1162 if (
_glfw.wl.seatVersion >= 4)
1163 _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
1167 cursorTheme = getenv(
"XCURSOR_THEME");
1168 cursorSizeStr = getenv(
"XCURSOR_SIZE");
1173 cursorSizeLong = strtol(cursorSizeStr, &cursorSizeEnd, 10);
1174 if (!*cursorSizeEnd && !errno && cursorSizeLong > 0 && cursorSizeLong <= INT_MAX)
1175 cursorSize = (int)cursorSizeLong;
1177 _glfw.wl.cursorTheme =
1179 if (!
_glfw.wl.cursorTheme)
1182 "Wayland: Unable to load default cursor theme");
1186 _glfw.wl.cursorThemeHiDPI =
1188 _glfw.wl.cursorSurface =
1189 wl_compositor_create_surface(
_glfw.wl.compositor);
1190 _glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
1193 if (
_glfw.wl.seat &&
_glfw.wl.dataDeviceManager)
1195 _glfw.wl.dataDevice =
1196 wl_data_device_manager_get_data_device(
_glfw.wl.dataDeviceManager,
1199 _glfw.wl.clipboardString = malloc(4096);
1200 if (!
_glfw.wl.clipboardString)
1203 "Wayland: Unable to allocate clipboard memory");
1206 _glfw.wl.clipboardSize = 4096;
1224 #ifdef HAVE_XKBCOMMON_COMPOSE_H 1225 if (
_glfw.wl.xkb.composeState)
1226 xkb_compose_state_unref(
_glfw.wl.xkb.composeState);
1228 if (
_glfw.wl.xkb.keymap)
1230 if (
_glfw.wl.xkb.state)
1240 if (
_glfw.wl.cursorTheme)
1242 if (
_glfw.wl.cursorThemeHiDPI)
1250 if (
_glfw.wl.cursorSurface)
1251 wl_surface_destroy(
_glfw.wl.cursorSurface);
1252 if (
_glfw.wl.subcompositor)
1253 wl_subcompositor_destroy(
_glfw.wl.subcompositor);
1254 if (
_glfw.wl.compositor)
1255 wl_compositor_destroy(
_glfw.wl.compositor);
1257 wl_shm_destroy(
_glfw.wl.shm);
1259 wl_shell_destroy(
_glfw.wl.shell);
1260 if (
_glfw.wl.viewporter)
1261 wp_viewporter_destroy(
_glfw.wl.viewporter);
1262 if (
_glfw.wl.decorationManager)
1263 zxdg_decoration_manager_v1_destroy(
_glfw.wl.decorationManager);
1264 if (
_glfw.wl.wmBase)
1265 xdg_wm_base_destroy(
_glfw.wl.wmBase);
1266 if (
_glfw.wl.dataSource)
1267 wl_data_source_destroy(
_glfw.wl.dataSource);
1268 if (
_glfw.wl.dataDevice)
1269 wl_data_device_destroy(
_glfw.wl.dataDevice);
1270 if (
_glfw.wl.dataOffer)
1271 wl_data_offer_destroy(
_glfw.wl.dataOffer);
1272 if (
_glfw.wl.dataDeviceManager)
1273 wl_data_device_manager_destroy(
_glfw.wl.dataDeviceManager);
1274 if (
_glfw.wl.pointer)
1275 wl_pointer_destroy(
_glfw.wl.pointer);
1276 if (
_glfw.wl.keyboard)
1277 wl_keyboard_destroy(
_glfw.wl.keyboard);
1279 wl_seat_destroy(
_glfw.wl.seat);
1280 if (
_glfw.wl.relativePointerManager)
1281 zwp_relative_pointer_manager_v1_destroy(
_glfw.wl.relativePointerManager);
1282 if (
_glfw.wl.pointerConstraints)
1283 zwp_pointer_constraints_v1_destroy(
_glfw.wl.pointerConstraints);
1284 if (
_glfw.wl.idleInhibitManager)
1285 zwp_idle_inhibit_manager_v1_destroy(
_glfw.wl.idleInhibitManager);
1286 if (
_glfw.wl.registry)
1287 wl_registry_destroy(
_glfw.wl.registry);
1288 if (
_glfw.wl.display)
1290 wl_display_flush(
_glfw.wl.display);
1291 wl_display_disconnect(
_glfw.wl.display);
1294 if (
_glfw.wl.timerfd >= 0)
1295 close(
_glfw.wl.timerfd);
1296 if (
_glfw.wl.cursorTimerfd >= 0)
1297 close(
_glfw.wl.cursorTimerfd);
1299 if (
_glfw.wl.clipboardString)
1300 free(
_glfw.wl.clipboardString);
1301 if (
_glfw.wl.clipboardSendString)
1302 free(
_glfw.wl.clipboardSendString);
1308 #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) 1314 #if defined(_GLFW_BUILD_DLL) #define GLFW_KEY_SCROLL_LOCK
static const struct wl_registry_listener registryListener
static void dataDeviceHandleMotion(void *data, struct wl_data_device *dataDevice, uint32_t time, wl_fixed_t x, wl_fixed_t y)
static void dataDeviceHandleDrop(void *data, struct wl_data_device *dataDevice)
#define GLFW_KEY_RIGHT_CONTROL
static const struct wl_data_device_listener dataDeviceListener
static const struct xdg_wm_base_listener wmBaseListener
#define GLFW_KEY_KP_DIVIDE
GLenum GLsizei const void * pointer
#define GLFW_MOD_CONTROL
If this bit is set one or more Control keys were held down.
GLuint const GLchar * name
GLFWwindowcontentscalefun scale
static void wmBaseHandlePing(void *data, struct xdg_wm_base *wmBase, uint32_t serial)
static void keyboardHandleEnter(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface, struct wl_array *keys)
#define _GLFW_VERSION_NUMBER
static GLFWbool inputChar(_GLFWwindow *window, uint32_t key)
#define GLFW_KEY_SEMICOLON
static void keyboardHandleLeave(void *data, struct wl_keyboard *keyboard, uint32_t serial, struct wl_surface *surface)
static void keyboardHandleModifiers(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t modsDepressed, uint32_t modsLatched, uint32_t modsLocked, uint32_t group)
static void keyboardHandleKey(void *data, struct wl_keyboard *keyboard, uint32_t serial, uint32_t time, uint32_t key, uint32_t state)
GLenum GLenum GLenum GLenum GLenum scale
static GLFWwindow * window
void _glfwPlatformTerminate(void)
#define GLFW_KEY_GRAVE_ACCENT
void _glfwInitTimerPOSIX(void)
static void registryHandleGlobalRemove(void *data, struct wl_registry *registry, uint32_t name)
#define GLFW_KEY_LEFT_SHIFT
void _glfwAddOutputWayland(uint32_t name, uint32_t version)
struct wl_cursor_image ** images
static void seatHandleCapabilities(void *data, struct wl_seat *seat, enum wl_seat_capability caps)
static void pointerHandleButton(void *data, struct wl_pointer *pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state)
#define GLFW_KEY_PAGE_DOWN
#define GLFW_KEY_LEFT_BRACKET
_GLFWwindow * windowListHead
static int toGLFWKeyCode(uint32_t key)
#define GLFW_KEY_BACKSPACE
GLenum GLenum GLsizei void * image
static _GLFWwindow * findWindowFromDecorationSurface(struct wl_surface *surface, int *which)
static void dataOfferHandleOffer(void *data, struct wl_data_offer *dataOffer, const char *mimeType)
static void pointerHandleMotion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx, wl_fixed_t sy)
#define GLFW_CURSOR_DISABLED
static const struct wl_seat_listener seatListener
#define GLFW_DISCONNECTED
#define GLFW_KEY_KP_DECIMAL
int _glfwPlatformInit(void)
#define GLFW_KEY_RIGHT_SUPER
static void dataDeviceHandleEnter(void *data, struct wl_data_device *dataDevice, uint32_t serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *id)
const char * _glfwPlatformGetVersionString(void)
#define GLFW_PLATFORM_ERROR
A platform-specific error occurred that does not match any of the more specific categories.
void _glfwInputWindowFocus(_GLFWwindow *window, GLFWbool focused)
#define GLFW_MOD_SUPER
If this bit is set one or more Super keys were held down.
static void registryHandleGlobal(void *data, struct wl_registry *registry, uint32_t name, const char *interface, uint32_t version)
static const struct wl_data_offer_listener dataOfferListener
static void seatHandleName(void *data, struct wl_seat *seat, const char *name)
#define GLFW_MOD_SHIFT
If this bit is set one or more Shift keys were held down.
#define GLFW_KEY_CAPS_LOCK
static void dataDeviceHandleDataOffer(void *data, struct wl_data_device *dataDevice, struct wl_data_offer *id)
#define GLFW_KEY_KP_MULTIPLY
void _glfwTerminateEGL(void)
#define GLFW_KEY_NUM_LOCK
static void pointerHandleAxis(void *data, struct wl_pointer *pointer, uint32_t time, uint32_t axis, wl_fixed_t value)
GLint GLint GLsizei GLint GLenum format
struct _GLFWwindow * next
static void pointerHandleLeave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface)
void _glfwInputError(int code, const char *format,...)
void _glfwInputMonitor(_GLFWmonitor *monitor, int action, int placement)
long _glfwKeySym2Unicode(unsigned int keysym)
#define GLFW_MOD_ALT
If this bit is set one or more Alt keys were held down.
#define GLFW_MOD_CAPS_LOCK
If this bit is set the Caps Lock key is enabled.
#define GLFW_KEY_RIGHT_BRACKET
static void keyboardHandleKeymap(void *data, struct wl_keyboard *keyboard, uint32_t format, int fd, uint32_t size)
static const struct wl_keyboard_listener keyboardListener
#define GLFW_KEY_KP_ENTER
#define GLFW_KEY_KP_SUBTRACT
static void pointerHandleEnter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t sx, wl_fixed_t sy)
static void createKeyTables(void)
#define GLFW_KEY_RIGHT_ALT
#define GLFW_KEY_PRINT_SCREEN
#define GLFW_KEY_LEFT_CONTROL
void _glfwTerminateJoysticksLinux(void)
static int min(int n1, int n2)
#define GLFW_KEY_KP_EQUAL
static void dataDeviceHandleLeave(void *data, struct wl_data_device *dataDevice)
#define GLFW_KEY_LEFT_ALT
static void setCursor(_GLFWwindow *window, const char *name)
#define GLFW_KEY_RIGHT_SHIFT
GLFWbool _glfwInitJoysticksLinux(void)
#define GLFW_KEY_BACKSLASH
#define GLFW_KEY_APOSTROPHE
void _glfwPlatformSetCursor(_GLFWwindow *window, _GLFWcursor *cursor)
#define GLFW_KEY_LEFT_SUPER
#define GLFW_MOD_NUM_LOCK
If this bit is set the Num Lock key is enabled.
static void dataDeviceHandleSelection(void *data, struct wl_data_device *dataDevice, struct wl_data_offer *id)
static const struct wl_pointer_listener pointerListener