Lines Matching refs:wl

114         _glfw.wl.compositor =
120 _glfw.wl.subcompositor =
125 _glfw.wl.shm =
134 if (!_glfw.wl.seat)
136 _glfw.wl.seat =
139 _glfwAddSeatListenerWayland(_glfw.wl.seat);
141 if (wl_seat_get_version(_glfw.wl.seat) >=
144 _glfw.wl.keyRepeatTimerfd =
151 if (!_glfw.wl.dataDeviceManager)
153 _glfw.wl.dataDeviceManager =
160 _glfw.wl.wmBase =
162 xdg_wm_base_add_listener(_glfw.wl.wmBase, &wmBaseListener, NULL);
166 _glfw.wl.decorationManager =
173 _glfw.wl.viewporter =
178 _glfw.wl.relativePointerManager =
185 _glfw.wl.pointerConstraints =
192 _glfw.wl.idleInhibitManager =
199 _glfw.wl.activationManager =
206 _glfw.wl.fractionalScaleManager =
220 if (monitor->wl.name == name)
253 _glfw.wl.libdecor.ready = GLFW_TRUE;
255 assert(_glfw.wl.libdecor.callback == callback);
256 wl_callback_destroy(_glfw.wl.libdecor.callback);
257 _glfw.wl.libdecor.callback = NULL;
269 memset(_glfw.wl.keycodes, -1, sizeof(_glfw.wl.keycodes));
270 memset(_glfw.wl.scancodes, -1, sizeof(_glfw.wl.scancodes));
272 _glfw.wl.keycodes[KEY_GRAVE] = GLFW_KEY_GRAVE_ACCENT;
273 _glfw.wl.keycodes[KEY_1] = GLFW_KEY_1;
274 _glfw.wl.keycodes[KEY_2] = GLFW_KEY_2;
275 _glfw.wl.keycodes[KEY_3] = GLFW_KEY_3;
276 _glfw.wl.keycodes[KEY_4] = GLFW_KEY_4;
277 _glfw.wl.keycodes[KEY_5] = GLFW_KEY_5;
278 _glfw.wl.keycodes[KEY_6] = GLFW_KEY_6;
279 _glfw.wl.keycodes[KEY_7] = GLFW_KEY_7;
280 _glfw.wl.keycodes[KEY_8] = GLFW_KEY_8;
281 _glfw.wl.keycodes[KEY_9] = GLFW_KEY_9;
282 _glfw.wl.keycodes[KEY_0] = GLFW_KEY_0;
283 _glfw.wl.keycodes[KEY_SPACE] = GLFW_KEY_SPACE;
284 _glfw.wl.keycodes[KEY_MINUS] = GLFW_KEY_MINUS;
285 _glfw.wl.keycodes[KEY_EQUAL] = GLFW_KEY_EQUAL;
286 _glfw.wl.keycodes[KEY_Q] = GLFW_KEY_Q;
287 _glfw.wl.keycodes[KEY_W] = GLFW_KEY_W;
288 _glfw.wl.keycodes[KEY_E] = GLFW_KEY_E;
289 _glfw.wl.keycodes[KEY_R] = GLFW_KEY_R;
290 _glfw.wl.keycodes[KEY_T] = GLFW_KEY_T;
291 _glfw.wl.keycodes[KEY_Y] = GLFW_KEY_Y;
292 _glfw.wl.keycodes[KEY_U] = GLFW_KEY_U;
293 _glfw.wl.keycodes[KEY_I] = GLFW_KEY_I;
294 _glfw.wl.keycodes[KEY_O] = GLFW_KEY_O;
295 _glfw.wl.keycodes[KEY_P] = GLFW_KEY_P;
296 _glfw.wl.keycodes[KEY_LEFTBRACE] = GLFW_KEY_LEFT_BRACKET;
297 _glfw.wl.keycodes[KEY_RIGHTBRACE] = GLFW_KEY_RIGHT_BRACKET;
298 _glfw.wl.keycodes[KEY_A] = GLFW_KEY_A;
299 _glfw.wl.keycodes[KEY_S] = GLFW_KEY_S;
300 _glfw.wl.keycodes[KEY_D] = GLFW_KEY_D;
301 _glfw.wl.keycodes[KEY_F] = GLFW_KEY_F;
302 _glfw.wl.keycodes[KEY_G] = GLFW_KEY_G;
303 _glfw.wl.keycodes[KEY_H] = GLFW_KEY_H;
304 _glfw.wl.keycodes[KEY_J] = GLFW_KEY_J;
305 _glfw.wl.keycodes[KEY_K] = GLFW_KEY_K;
306 _glfw.wl.keycodes[KEY_L] = GLFW_KEY_L;
307 _glfw.wl.keycodes[KEY_SEMICOLON] = GLFW_KEY_SEMICOLON;
308 _glfw.wl.keycodes[KEY_APOSTROPHE] = GLFW_KEY_APOSTROPHE;
309 _glfw.wl.keycodes[KEY_Z] = GLFW_KEY_Z;
310 _glfw.wl.keycodes[KEY_X] = GLFW_KEY_X;
311 _glfw.wl.keycodes[KEY_C] = GLFW_KEY_C;
312 _glfw.wl.keycodes[KEY_V] = GLFW_KEY_V;
313 _glfw.wl.keycodes[KEY_B] = GLFW_KEY_B;
314 _glfw.wl.keycodes[KEY_N] = GLFW_KEY_N;
315 _glfw.wl.keycodes[KEY_M] = GLFW_KEY_M;
316 _glfw.wl.keycodes[KEY_COMMA] = GLFW_KEY_COMMA;
317 _glfw.wl.keycodes[KEY_DOT] = GLFW_KEY_PERIOD;
318 _glfw.wl.keycodes[KEY_SLASH] = GLFW_KEY_SLASH;
319 _glfw.wl.keycodes[KEY_BACKSLASH] = GLFW_KEY_BACKSLASH;
320 _glfw.wl.keycodes[KEY_ESC] = GLFW_KEY_ESCAPE;
321 _glfw.wl.keycodes[KEY_TAB] = GLFW_KEY_TAB;
322 _glfw.wl.keycodes[KEY_LEFTSHIFT] = GLFW_KEY_LEFT_SHIFT;
323 _glfw.wl.keycodes[KEY_RIGHTSHIFT] = GLFW_KEY_RIGHT_SHIFT;
324 _glfw.wl.keycodes[KEY_LEFTCTRL] = GLFW_KEY_LEFT_CONTROL;
325 _glfw.wl.keycodes[KEY_RIGHTCTRL] = GLFW_KEY_RIGHT_CONTROL;
326 _glfw.wl.keycodes[KEY_LEFTALT] = GLFW_KEY_LEFT_ALT;
327 _glfw.wl.keycodes[KEY_RIGHTALT] = GLFW_KEY_RIGHT_ALT;
328 _glfw.wl.keycodes[KEY_LEFTMETA] = GLFW_KEY_LEFT_SUPER;
329 _glfw.wl.keycodes[KEY_RIGHTMETA] = GLFW_KEY_RIGHT_SUPER;
330 _glfw.wl.keycodes[KEY_COMPOSE] = GLFW_KEY_MENU;
331 _glfw.wl.keycodes[KEY_NUMLOCK] = GLFW_KEY_NUM_LOCK;
332 _glfw.wl.keycodes[KEY_CAPSLOCK] = GLFW_KEY_CAPS_LOCK;
333 _glfw.wl.keycodes[KEY_PRINT] = GLFW_KEY_PRINT_SCREEN;
334 _glfw.wl.keycodes[KEY_SCROLLLOCK] = GLFW_KEY_SCROLL_LOCK;
335 _glfw.wl.keycodes[KEY_PAUSE] = GLFW_KEY_PAUSE;
336 _glfw.wl.keycodes[KEY_DELETE] = GLFW_KEY_DELETE;
337 _glfw.wl.keycodes[KEY_BACKSPACE] = GLFW_KEY_BACKSPACE;
338 _glfw.wl.keycodes[KEY_ENTER] = GLFW_KEY_ENTER;
339 _glfw.wl.keycodes[KEY_HOME] = GLFW_KEY_HOME;
340 _glfw.wl.keycodes[KEY_END] = GLFW_KEY_END;
341 _glfw.wl.keycodes[KEY_PAGEUP] = GLFW_KEY_PAGE_UP;
342 _glfw.wl.keycodes[KEY_PAGEDOWN] = GLFW_KEY_PAGE_DOWN;
343 _glfw.wl.keycodes[KEY_INSERT] = GLFW_KEY_INSERT;
344 _glfw.wl.keycodes[KEY_LEFT] = GLFW_KEY_LEFT;
345 _glfw.wl.keycodes[KEY_RIGHT] = GLFW_KEY_RIGHT;
346 _glfw.wl.keycodes[KEY_DOWN] = GLFW_KEY_DOWN;
347 _glfw.wl.keycodes[KEY_UP] = GLFW_KEY_UP;
348 _glfw.wl.keycodes[KEY_F1] = GLFW_KEY_F1;
349 _glfw.wl.keycodes[KEY_F2] = GLFW_KEY_F2;
350 _glfw.wl.keycodes[KEY_F3] = GLFW_KEY_F3;
351 _glfw.wl.keycodes[KEY_F4] = GLFW_KEY_F4;
352 _glfw.wl.keycodes[KEY_F5] = GLFW_KEY_F5;
353 _glfw.wl.keycodes[KEY_F6] = GLFW_KEY_F6;
354 _glfw.wl.keycodes[KEY_F7] = GLFW_KEY_F7;
355 _glfw.wl.keycodes[KEY_F8] = GLFW_KEY_F8;
356 _glfw.wl.keycodes[KEY_F9] = GLFW_KEY_F9;
357 _glfw.wl.keycodes[KEY_F10] = GLFW_KEY_F10;
358 _glfw.wl.keycodes[KEY_F11] = GLFW_KEY_F11;
359 _glfw.wl.keycodes[KEY_F12] = GLFW_KEY_F12;
360 _glfw.wl.keycodes[KEY_F13] = GLFW_KEY_F13;
361 _glfw.wl.keycodes[KEY_F14] = GLFW_KEY_F14;
362 _glfw.wl.keycodes[KEY_F15] = GLFW_KEY_F15;
363 _glfw.wl.keycodes[KEY_F16] = GLFW_KEY_F16;
364 _glfw.wl.keycodes[KEY_F17] = GLFW_KEY_F17;
365 _glfw.wl.keycodes[KEY_F18] = GLFW_KEY_F18;
366 _glfw.wl.keycodes[KEY_F19] = GLFW_KEY_F19;
367 _glfw.wl.keycodes[KEY_F20] = GLFW_KEY_F20;
368 _glfw.wl.keycodes[KEY_F21] = GLFW_KEY_F21;
369 _glfw.wl.keycodes[KEY_F22] = GLFW_KEY_F22;
370 _glfw.wl.keycodes[KEY_F23] = GLFW_KEY_F23;
371 _glfw.wl.keycodes[KEY_F24] = GLFW_KEY_F24;
372 _glfw.wl.keycodes[KEY_KPSLASH] = GLFW_KEY_KP_DIVIDE;
373 _glfw.wl.keycodes[KEY_KPASTERISK] = GLFW_KEY_KP_MULTIPLY;
374 _glfw.wl.keycodes[KEY_KPMINUS] = GLFW_KEY_KP_SUBTRACT;
375 _glfw.wl.keycodes[KEY_KPPLUS] = GLFW_KEY_KP_ADD;
376 _glfw.wl.keycodes[KEY_KP0] = GLFW_KEY_KP_0;
377 _glfw.wl.keycodes[KEY_KP1] = GLFW_KEY_KP_1;
378 _glfw.wl.keycodes[KEY_KP2] = GLFW_KEY_KP_2;
379 _glfw.wl.keycodes[KEY_KP3] = GLFW_KEY_KP_3;
380 _glfw.wl.keycodes[KEY_KP4] = GLFW_KEY_KP_4;
381 _glfw.wl.keycodes[KEY_KP5] = GLFW_KEY_KP_5;
382 _glfw.wl.keycodes[KEY_KP6] = GLFW_KEY_KP_6;
383 _glfw.wl.keycodes[KEY_KP7] = GLFW_KEY_KP_7;
384 _glfw.wl.keycodes[KEY_KP8] = GLFW_KEY_KP_8;
385 _glfw.wl.keycodes[KEY_KP9] = GLFW_KEY_KP_9;
386 _glfw.wl.keycodes[KEY_KPDOT] = GLFW_KEY_KP_DECIMAL;
387 _glfw.wl.keycodes[KEY_KPEQUAL] = GLFW_KEY_KP_EQUAL;
388 _glfw.wl.keycodes[KEY_KPENTER] = GLFW_KEY_KP_ENTER;
389 _glfw.wl.keycodes[KEY_102ND] = GLFW_KEY_WORLD_2;
393 if (_glfw.wl.keycodes[scancode] > 0)
394 _glfw.wl.scancodes[_glfw.wl.keycodes[scancode]] = scancode;
413 _glfw.wl.cursorTheme = wl_cursor_theme_load(themeName, cursorSize, _glfw.wl.shm);
414 if (!_glfw.wl.cursorTheme)
422 _glfw.wl.cursorThemeHiDPI =
423 wl_cursor_theme_load(themeName, cursorSize * 2, _glfw.wl.shm);
425 _glfw.wl.cursorSurface = wl_compositor_create_surface(_glfw.wl.compositor);
426 _glfw.wl.cursorTimerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
557 _glfw.wl.display = display;
558 _glfw.wl.client.handle = module;
567 _glfw.wl.keyRepeatTimerfd = -1;
568 _glfw.wl.cursorTimerfd = -1;
570 _glfw.wl.tag = glfwGetVersionString();
572 _glfw.wl.client.display_flush = (PFN_wl_display_flush)
573 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_flush");
574 _glfw.wl.client.display_cancel_read = (PFN_wl_display_cancel_read)
575 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_cancel_read");
576 _glfw.wl.client.display_dispatch_pending = (PFN_wl_display_dispatch_pending)
577 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_dispatch_pending");
578 _glfw.wl.client.display_read_events = (PFN_wl_display_read_events)
579 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_read_events");
580 _glfw.wl.client.display_disconnect = (PFN_wl_display_disconnect)
581 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_disconnect");
582 _glfw.wl.client.display_roundtrip = (PFN_wl_display_roundtrip)
583 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_roundtrip");
584 _glfw.wl.client.display_get_fd = (PFN_wl_display_get_fd)
585 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_get_fd");
586 _glfw.wl.client.display_prepare_read = (PFN_wl_display_prepare_read)
587 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_display_prepare_read");
588 _glfw.wl.client.proxy_marshal = (PFN_wl_proxy_marshal)
589 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_marshal");
590 _glfw.wl.client.proxy_add_listener = (PFN_wl_proxy_add_listener)
591 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_add_listener");
592 _glfw.wl.client.proxy_destroy = (PFN_wl_proxy_destroy)
593 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_destroy");
594 _glfw.wl.client.proxy_marshal_constructor = (PFN_wl_proxy_marshal_constructor)
595 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_marshal_constructor");
596 _glfw.wl.client.proxy_marshal_constructor_versioned = (PFN_wl_proxy_marshal_constructor_versioned)
597 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_marshal_constructor_versioned");
598 _glfw.wl.client.proxy_get_user_data = (PFN_wl_proxy_get_user_data)
599 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_get_user_data");
600 _glfw.wl.client.proxy_set_user_data = (PFN_wl_proxy_set_user_data)
601 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_set_user_data");
602 _glfw.wl.client.proxy_get_tag = (PFN_wl_proxy_get_tag)
603 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_get_tag");
604 _glfw.wl.client.proxy_set_tag = (PFN_wl_proxy_set_tag)
605 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_set_tag");
606 _glfw.wl.client.proxy_get_version = (PFN_wl_proxy_get_version)
607 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_get_version");
608 _glfw.wl.client.proxy_marshal_flags = (PFN_wl_proxy_marshal_flags)
609 _glfwPlatformGetModuleSymbol(_glfw.wl.client.handle, "wl_proxy_marshal_flags");
611 if (!_glfw.wl.client.display_flush ||
612 !_glfw.wl.client.display_cancel_read ||
613 !_glfw.wl.client.display_dispatch_pending ||
614 !_glfw.wl.client.display_read_events ||
615 !_glfw.wl.client.display_disconnect ||
616 !_glfw.wl.client.display_roundtrip ||
617 !_glfw.wl.client.display_get_fd ||
618 !_glfw.wl.client.display_prepare_read ||
619 !_glfw.wl.client.proxy_marshal ||
620 !_glfw.wl.client.proxy_add_listener ||
621 !_glfw.wl.client.proxy_destroy ||
622 !_glfw.wl.client.proxy_marshal_constructor ||
623 !_glfw.wl.client.proxy_marshal_constructor_versioned ||
624 !_glfw.wl.client.proxy_get_user_data ||
625 !_glfw.wl.client.proxy_set_user_data ||
626 !_glfw.wl.client.proxy_get_tag ||
627 !_glfw.wl.client.proxy_set_tag)
634 _glfw.wl.cursor.handle = _glfwPlatformLoadModule("libwayland-cursor.so.0");
635 if (!_glfw.wl.cursor.handle)
642 _glfw.wl.cursor.theme_load = (PFN_wl_cursor_theme_load)
643 _glfwPlatformGetModuleSymbol(_glfw.wl.cursor.handle, "wl_cursor_theme_load");
644 _glfw.wl.cursor.theme_destroy = (PFN_wl_cursor_theme_destroy)
645 _glfwPlatformGetModuleSymbol(_glfw.wl.cursor.handle, "wl_cursor_theme_destroy");
646 _glfw.wl.cursor.theme_get_cursor = (PFN_wl_cursor_theme_get_cursor)
647 _glfwPlatformGetModuleSymbol(_glfw.wl.cursor.handle, "wl_cursor_theme_get_cursor");
648 _glfw.wl.cursor.image_get_buffer = (PFN_wl_cursor_image_get_buffer)
649 _glfwPlatformGetModuleSymbol(_glfw.wl.cursor.handle, "wl_cursor_image_get_buffer");
651 _glfw.wl.egl.handle = _glfwPlatformLoadModule("libwayland-egl.so.1");
652 if (!_glfw.wl.egl.handle)
659 _glfw.wl.egl.window_create = (PFN_wl_egl_window_create)
660 _glfwPlatformGetModuleSymbol(_glfw.wl.egl.handle, "wl_egl_window_create");
661 _glfw.wl.egl.window_destroy = (PFN_wl_egl_window_destroy)
662 _glfwPlatformGetModuleSymbol(_glfw.wl.egl.handle, "wl_egl_window_destroy");
663 _glfw.wl.egl.window_resize = (PFN_wl_egl_window_resize)
664 _glfwPlatformGetModuleSymbol(_glfw.wl.egl.handle, "wl_egl_window_resize");
666 _glfw.wl.xkb.handle = _glfwPlatformLoadModule("libxkbcommon.so.0");
667 if (!_glfw.wl.xkb.handle)
674 _glfw.wl.xkb.context_new = (PFN_xkb_context_new)
675 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_context_new");
676 _glfw.wl.xkb.context_unref = (PFN_xkb_context_unref)
677 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_context_unref");
678 _glfw.wl.xkb.keymap_new_from_string = (PFN_xkb_keymap_new_from_string)
679 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_keymap_new_from_string");
680 _glfw.wl.xkb.keymap_unref = (PFN_xkb_keymap_unref)
681 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_keymap_unref");
682 _glfw.wl.xkb.keymap_mod_get_index = (PFN_xkb_keymap_mod_get_index)
683 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_keymap_mod_get_index");
684 _glfw.wl.xkb.keymap_key_repeats = (PFN_xkb_keymap_key_repeats)
685 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_keymap_key_repeats");
686 _glfw.wl.xkb.keymap_key_get_syms_by_level = (PFN_xkb_keymap_key_get_syms_by_level)
687 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_keymap_key_get_syms_by_level");
688 _glfw.wl.xkb.state_new = (PFN_xkb_state_new)
689 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_state_new");
690 _glfw.wl.xkb.state_unref = (PFN_xkb_state_unref)
691 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_state_unref");
692 _glfw.wl.xkb.state_key_get_syms = (PFN_xkb_state_key_get_syms)
693 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_state_key_get_syms");
694 _glfw.wl.xkb.state_update_mask = (PFN_xkb_state_update_mask)
695 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_state_update_mask");
696 _glfw.wl.xkb.state_key_get_layout = (PFN_xkb_state_key_get_layout)
697 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_state_key_get_layout");
698 _glfw.wl.xkb.state_mod_index_is_active = (PFN_xkb_state_mod_index_is_active)
699 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_state_mod_index_is_active");
700 _glfw.wl.xkb.compose_table_new_from_locale = (PFN_xkb_compose_table_new_from_locale)
701 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_table_new_from_locale");
702 _glfw.wl.xkb.compose_table_unref = (PFN_xkb_compose_table_unref)
703 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_table_unref");
704 _glfw.wl.xkb.compose_state_new = (PFN_xkb_compose_state_new)
705 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_state_new");
706 _glfw.wl.xkb.compose_state_unref = (PFN_xkb_compose_state_unref)
707 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_state_unref");
708 _glfw.wl.xkb.compose_state_feed = (PFN_xkb_compose_state_feed)
709 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_state_feed");
710 _glfw.wl.xkb.compose_state_get_status = (PFN_xkb_compose_state_get_status)
711 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_state_get_status");
712 _glfw.wl.xkb.compose_state_get_one_sym = (PFN_xkb_compose_state_get_one_sym)
713 _glfwPlatformGetModuleSymbol(_glfw.wl.xkb.handle, "xkb_compose_state_get_one_sym");
715 if (!_glfw.wl.xkb.context_new ||
716 !_glfw.wl.xkb.context_unref ||
717 !_glfw.wl.xkb.keymap_new_from_string ||
718 !_glfw.wl.xkb.keymap_unref ||
719 !_glfw.wl.xkb.keymap_mod_get_index ||
720 !_glfw.wl.xkb.keymap_key_repeats ||
721 !_glfw.wl.xkb.keymap_key_get_syms_by_level ||
722 !_glfw.wl.xkb.state_new ||
723 !_glfw.wl.xkb.state_unref ||
724 !_glfw.wl.xkb.state_key_get_syms ||
725 !_glfw.wl.xkb.state_update_mask ||
726 !_glfw.wl.xkb.state_key_get_layout ||
727 !_glfw.wl.xkb.state_mod_index_is_active ||
728 !_glfw.wl.xkb.compose_table_new_from_locale ||
729 !_glfw.wl.xkb.compose_table_unref ||
730 !_glfw.wl.xkb.compose_state_new ||
731 !_glfw.wl.xkb.compose_state_unref ||
732 !_glfw.wl.xkb.compose_state_feed ||
733 !_glfw.wl.xkb.compose_state_get_status ||
734 !_glfw.wl.xkb.compose_state_get_one_sym)
741 if (_glfw.hints.init.wl.libdecorMode == GLFW_WAYLAND_PREFER_LIBDECOR)
742 _glfw.wl.libdecor.handle = _glfwPlatformLoadModule("libdecor-0.so.0");
744 if (_glfw.wl.libdecor.handle)
746 _glfw.wl.libdecor.libdecor_new_ = (PFN_libdecor_new)
747 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_new");
748 _glfw.wl.libdecor.libdecor_unref_ = (PFN_libdecor_unref)
749 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_unref");
750 _glfw.wl.libdecor.libdecor_get_fd_ = (PFN_libdecor_get_fd)
751 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_get_fd");
752 _glfw.wl.libdecor.libdecor_dispatch_ = (PFN_libdecor_dispatch)
753 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_dispatch");
754 _glfw.wl.libdecor.libdecor_decorate_ = (PFN_libdecor_decorate)
755 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_decorate");
756 _glfw.wl.libdecor.libdecor_frame_unref_ = (PFN_libdecor_frame_unref)
757 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_unref");
758 _glfw.wl.libdecor.libdecor_frame_set_app_id_ = (PFN_libdecor_frame_set_app_id)
759 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_app_id");
760 _glfw.wl.libdecor.libdecor_frame_set_title_ = (PFN_libdecor_frame_set_title)
761 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_title");
762 _glfw.wl.libdecor.libdecor_frame_set_minimized_ = (PFN_libdecor_frame_set_minimized)
763 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_minimized");
764 _glfw.wl.libdecor.libdecor_frame_set_fullscreen_ = (PFN_libdecor_frame_set_fullscreen)
765 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_fullscreen");
766 _glfw.wl.libdecor.libdecor_frame_unset_fullscreen_ = (PFN_libdecor_frame_unset_fullscreen)
767 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_unset_fullscreen");
768 _glfw.wl.libdecor.libdecor_frame_map_ = (PFN_libdecor_frame_map)
769 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_map");
770 _glfw.wl.libdecor.libdecor_frame_commit_ = (PFN_libdecor_frame_commit)
771 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_commit");
772 _glfw.wl.libdecor.libdecor_frame_set_min_content_size_ = (PFN_libdecor_frame_set_min_content_size)
773 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_min_content_size");
774 _glfw.wl.libdecor.libdecor_frame_set_max_content_size_ = (PFN_libdecor_frame_set_max_content_size)
775 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_max_content_size");
776 _glfw.wl.libdecor.libdecor_frame_set_maximized_ = (PFN_libdecor_frame_set_maximized)
777 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_maximized");
778 _glfw.wl.libdecor.libdecor_frame_unset_maximized_ = (PFN_libdecor_frame_unset_maximized)
779 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_unset_maximized");
780 _glfw.wl.libdecor.libdecor_frame_set_capabilities_ = (PFN_libdecor_frame_set_capabilities)
781 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_capabilities");
782 _glfw.wl.libdecor.libdecor_frame_unset_capabilities_ = (PFN_libdecor_frame_unset_capabilities)
783 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_unset_capabilities");
784 _glfw.wl.libdecor.libdecor_frame_set_visibility_ = (PFN_libdecor_frame_set_visibility)
785 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_set_visibility");
786 _glfw.wl.libdecor.libdecor_frame_get_xdg_toplevel_ = (PFN_libdecor_frame_get_xdg_toplevel)
787 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_frame_get_xdg_toplevel");
788 _glfw.wl.libdecor.libdecor_configuration_get_content_size_ = (PFN_libdecor_configuration_get_content_size)
789 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_configuration_get_content_size");
790 _glfw.wl.libdecor.libdecor_configuration_get_window_state_ = (PFN_libdecor_configuration_get_window_state)
791 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_configuration_get_window_state");
792 _glfw.wl.libdecor.libdecor_state_new_ = (PFN_libdecor_state_new)
793 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_state_new");
794 _glfw.wl.libdecor.libdecor_state_free_ = (PFN_libdecor_state_free)
795 _glfwPlatformGetModuleSymbol(_glfw.wl.libdecor.handle, "libdecor_state_free");
797 if (!_glfw.wl.libdecor.libdecor_new_ ||
798 !_glfw.wl.libdecor.libdecor_unref_ ||
799 !_glfw.wl.libdecor.libdecor_get_fd_ ||
800 !_glfw.wl.libdecor.libdecor_dispatch_ ||
801 !_glfw.wl.libdecor.libdecor_decorate_ ||
802 !_glfw.wl.libdecor.libdecor_frame_unref_ ||
803 !_glfw.wl.libdecor.libdecor_frame_set_app_id_ ||
804 !_glfw.wl.libdecor.libdecor_frame_set_title_ ||
805 !_glfw.wl.libdecor.libdecor_frame_set_minimized_ ||
806 !_glfw.wl.libdecor.libdecor_frame_set_fullscreen_ ||
807 !_glfw.wl.libdecor.libdecor_frame_unset_fullscreen_ ||
808 !_glfw.wl.libdecor.libdecor_frame_map_ ||
809 !_glfw.wl.libdecor.libdecor_frame_commit_ ||
810 !_glfw.wl.libdecor.libdecor_frame_set_min_content_size_ ||
811 !_glfw.wl.libdecor.libdecor_frame_set_max_content_size_ ||
812 !_glfw.wl.libdecor.libdecor_frame_set_maximized_ ||
813 !_glfw.wl.libdecor.libdecor_frame_unset_maximized_ ||
814 !_glfw.wl.libdecor.libdecor_frame_set_capabilities_ ||
815 !_glfw.wl.libdecor.libdecor_frame_unset_capabilities_ ||
816 !_glfw.wl.libdecor.libdecor_frame_set_visibility_ ||
817 !_glfw.wl.libdecor.libdecor_frame_get_xdg_toplevel_ ||
818 !_glfw.wl.libdecor.libdecor_configuration_get_content_size_ ||
819 !_glfw.wl.libdecor.libdecor_configuration_get_window_state_ ||
820 !_glfw.wl.libdecor.libdecor_state_new_ ||
821 !_glfw.wl.libdecor.libdecor_state_free_)
823 _glfwPlatformFreeModule(_glfw.wl.libdecor.handle);
824 memset(&_glfw.wl.libdecor, 0, sizeof(_glfw.wl.libdecor));
828 _glfw.wl.registry = wl_display_get_registry(_glfw.wl.display);
829 wl_registry_add_listener(_glfw.wl.registry, &registryListener, NULL);
833 _glfw.wl.xkb.context = xkb_context_new(0);
834 if (!_glfw.wl.xkb.context)
842 wl_display_roundtrip(_glfw.wl.display);
845 wl_display_roundtrip(_glfw.wl.display);
847 if (_glfw.wl.libdecor.handle)
849 _glfw.wl.libdecor.context = libdecor_new(_glfw.wl.display, &libdecorInterface);
850 if (_glfw.wl.libdecor.context)
853 libdecor_dispatch(_glfw.wl.libdecor.context, 0);
856 _glfw.wl.libdecor.callback = wl_display_sync(_glfw.wl.display);
857 wl_callback_add_listener(_glfw.wl.libdecor.callback,
863 if (!_glfw.wl.wmBase)
870 if (!_glfw.wl.shm)
880 if (_glfw.wl.seat && _glfw.wl.dataDeviceManager)
882 _glfw.wl.dataDevice =
883 wl_data_device_manager_get_data_device(_glfw.wl.dataDeviceManager,
884 _glfw.wl.seat);
885 _glfwAddDataDeviceListenerWayland(_glfw.wl.dataDevice);
896 if (_glfw.wl.libdecor.context)
900 while (!_glfw.wl.libdecor.ready)
903 libdecor_unref(_glfw.wl.libdecor.context);
906 if (_glfw.wl.libdecor.handle)
908 _glfwPlatformFreeModule(_glfw.wl.libdecor.handle);
909 _glfw.wl.libdecor.handle = NULL;
912 if (_glfw.wl.egl.handle)
914 _glfwPlatformFreeModule(_glfw.wl.egl.handle);
915 _glfw.wl.egl.handle = NULL;
918 if (_glfw.wl.xkb.composeState)
919 xkb_compose_state_unref(_glfw.wl.xkb.composeState);
920 if (_glfw.wl.xkb.keymap)
921 xkb_keymap_unref(_glfw.wl.xkb.keymap);
922 if (_glfw.wl.xkb.state)
923 xkb_state_unref(_glfw.wl.xkb.state);
924 if (_glfw.wl.xkb.context)
925 xkb_context_unref(_glfw.wl.xkb.context);
926 if (_glfw.wl.xkb.handle)
928 _glfwPlatformFreeModule(_glfw.wl.xkb.handle);
929 _glfw.wl.xkb.handle = NULL;
932 if (_glfw.wl.cursorTheme)
933 wl_cursor_theme_destroy(_glfw.wl.cursorTheme);
934 if (_glfw.wl.cursorThemeHiDPI)
935 wl_cursor_theme_destroy(_glfw.wl.cursorThemeHiDPI);
936 if (_glfw.wl.cursor.handle)
938 _glfwPlatformFreeModule(_glfw.wl.cursor.handle);
939 _glfw.wl.cursor.handle = NULL;
942 for (unsigned int i = 0; i < _glfw.wl.offerCount; i++)
943 wl_data_offer_destroy(_glfw.wl.offers[i].offer);
945 _glfw_free(_glfw.wl.offers);
947 if (_glfw.wl.cursorSurface)
948 wl_surface_destroy(_glfw.wl.cursorSurface);
949 if (_glfw.wl.subcompositor)
950 wl_subcompositor_destroy(_glfw.wl.subcompositor);
951 if (_glfw.wl.compositor)
952 wl_compositor_destroy(_glfw.wl.compositor);
953 if (_glfw.wl.shm)
954 wl_shm_destroy(_glfw.wl.shm);
955 if (_glfw.wl.viewporter)
956 wp_viewporter_destroy(_glfw.wl.viewporter);
957 if (_glfw.wl.decorationManager)
958 zxdg_decoration_manager_v1_destroy(_glfw.wl.decorationManager);
959 if (_glfw.wl.wmBase)
960 xdg_wm_base_destroy(_glfw.wl.wmBase);
961 if (_glfw.wl.selectionOffer)
962 wl_data_offer_destroy(_glfw.wl.selectionOffer);
963 if (_glfw.wl.dragOffer)
964 wl_data_offer_destroy(_glfw.wl.dragOffer);
965 if (_glfw.wl.selectionSource)
966 wl_data_source_destroy(_glfw.wl.selectionSource);
967 if (_glfw.wl.dataDevice)
968 wl_data_device_destroy(_glfw.wl.dataDevice);
969 if (_glfw.wl.dataDeviceManager)
970 wl_data_device_manager_destroy(_glfw.wl.dataDeviceManager);
971 if (_glfw.wl.pointer)
972 wl_pointer_destroy(_glfw.wl.pointer);
973 if (_glfw.wl.keyboard)
974 wl_keyboard_destroy(_glfw.wl.keyboard);
975 if (_glfw.wl.seat)
976 wl_seat_destroy(_glfw.wl.seat);
977 if (_glfw.wl.relativePointerManager)
978 zwp_relative_pointer_manager_v1_destroy(_glfw.wl.relativePointerManager);
979 if (_glfw.wl.pointerConstraints)
980 zwp_pointer_constraints_v1_destroy(_glfw.wl.pointerConstraints);
981 if (_glfw.wl.idleInhibitManager)
982 zwp_idle_inhibit_manager_v1_destroy(_glfw.wl.idleInhibitManager);
983 if (_glfw.wl.activationManager)
984 xdg_activation_v1_destroy(_glfw.wl.activationManager);
985 if (_glfw.wl.fractionalScaleManager)
986 wp_fractional_scale_manager_v1_destroy(_glfw.wl.fractionalScaleManager);
987 if (_glfw.wl.registry)
988 wl_registry_destroy(_glfw.wl.registry);
989 if (_glfw.wl.display)
991 wl_display_flush(_glfw.wl.display);
992 wl_display_disconnect(_glfw.wl.display);
995 if (_glfw.wl.keyRepeatTimerfd >= 0)
996 close(_glfw.wl.keyRepeatTimerfd);
997 if (_glfw.wl.cursorTimerfd >= 0)
998 close(_glfw.wl.cursorTimerfd);
1000 _glfw_free(_glfw.wl.clipboardString);