github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/tests/raylib/external/glfw/src/wl_platform.h (about) 1 //======================================================================== 2 // GLFW 3.4 Wayland - www.glfw.org 3 //------------------------------------------------------------------------ 4 // Copyright (c) 2014 Jonas Ã…dahl <jadahl@gmail.com> 5 // 6 // This software is provided 'as-is', without any express or implied 7 // warranty. In no event will the authors be held liable for any damages 8 // arising from the use of this software. 9 // 10 // Permission is granted to anyone to use this software for any purpose, 11 // including commercial applications, and to alter it and redistribute it 12 // freely, subject to the following restrictions: 13 // 14 // 1. The origin of this software must not be misrepresented; you must not 15 // claim that you wrote the original software. If you use this software 16 // in a product, an acknowledgment in the product documentation would 17 // be appreciated but is not required. 18 // 19 // 2. Altered source versions must be plainly marked as such, and must not 20 // be misrepresented as being the original software. 21 // 22 // 3. This notice may not be removed or altered from any source 23 // distribution. 24 // 25 //======================================================================== 26 27 #include <wayland-client-core.h> 28 #include <xkbcommon/xkbcommon.h> 29 #include <xkbcommon/xkbcommon-compose.h> 30 31 typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; 32 33 typedef struct VkWaylandSurfaceCreateInfoKHR 34 { 35 VkStructureType sType; 36 const void* pNext; 37 VkWaylandSurfaceCreateFlagsKHR flags; 38 struct wl_display* display; 39 struct wl_surface* surface; 40 } VkWaylandSurfaceCreateInfoKHR; 41 42 typedef VkResult (APIENTRY *PFN_vkCreateWaylandSurfaceKHR)(VkInstance,const VkWaylandSurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*); 43 typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice,uint32_t,struct wl_display*); 44 45 #include "xkb_unicode.h" 46 #include "posix_poll.h" 47 48 typedef int (* PFN_wl_display_flush)(struct wl_display* display); 49 typedef void (* PFN_wl_display_cancel_read)(struct wl_display* display); 50 typedef int (* PFN_wl_display_dispatch_pending)(struct wl_display* display); 51 typedef int (* PFN_wl_display_read_events)(struct wl_display* display); 52 typedef struct wl_display* (* PFN_wl_display_connect)(const char*); 53 typedef void (* PFN_wl_display_disconnect)(struct wl_display*); 54 typedef int (* PFN_wl_display_roundtrip)(struct wl_display*); 55 typedef int (* PFN_wl_display_get_fd)(struct wl_display*); 56 typedef int (* PFN_wl_display_prepare_read)(struct wl_display*); 57 typedef void (* PFN_wl_proxy_marshal)(struct wl_proxy*,uint32_t,...); 58 typedef int (* PFN_wl_proxy_add_listener)(struct wl_proxy*,void(**)(void),void*); 59 typedef void (* PFN_wl_proxy_destroy)(struct wl_proxy*); 60 typedef struct wl_proxy* (* PFN_wl_proxy_marshal_constructor)(struct wl_proxy*,uint32_t,const struct wl_interface*,...); 61 typedef struct wl_proxy* (* PFN_wl_proxy_marshal_constructor_versioned)(struct wl_proxy*,uint32_t,const struct wl_interface*,uint32_t,...); 62 typedef void* (* PFN_wl_proxy_get_user_data)(struct wl_proxy*); 63 typedef void (* PFN_wl_proxy_set_user_data)(struct wl_proxy*,void*); 64 typedef uint32_t (* PFN_wl_proxy_get_version)(struct wl_proxy*); 65 typedef struct wl_proxy* (* PFN_wl_proxy_marshal_flags)(struct wl_proxy*,uint32_t,const struct wl_interface*,uint32_t,uint32_t,...); 66 #define wl_display_flush _glfw.wl.client.display_flush 67 #define wl_display_cancel_read _glfw.wl.client.display_cancel_read 68 #define wl_display_dispatch_pending _glfw.wl.client.display_dispatch_pending 69 #define wl_display_read_events _glfw.wl.client.display_read_events 70 #define wl_display_disconnect _glfw.wl.client.display_disconnect 71 #define wl_display_roundtrip _glfw.wl.client.display_roundtrip 72 #define wl_display_get_fd _glfw.wl.client.display_get_fd 73 #define wl_display_prepare_read _glfw.wl.client.display_prepare_read 74 #define wl_proxy_marshal _glfw.wl.client.proxy_marshal 75 #define wl_proxy_add_listener _glfw.wl.client.proxy_add_listener 76 #define wl_proxy_destroy _glfw.wl.client.proxy_destroy 77 #define wl_proxy_marshal_constructor _glfw.wl.client.proxy_marshal_constructor 78 #define wl_proxy_marshal_constructor_versioned _glfw.wl.client.proxy_marshal_constructor_versioned 79 #define wl_proxy_get_user_data _glfw.wl.client.proxy_get_user_data 80 #define wl_proxy_set_user_data _glfw.wl.client.proxy_set_user_data 81 #define wl_proxy_get_version _glfw.wl.client.proxy_get_version 82 #define wl_proxy_marshal_flags _glfw.wl.client.proxy_marshal_flags 83 84 struct wl_shm; 85 86 #define wl_display_interface _glfw_wl_display_interface 87 #define wl_subcompositor_interface _glfw_wl_subcompositor_interface 88 #define wl_compositor_interface _glfw_wl_compositor_interface 89 #define wl_shm_interface _glfw_wl_shm_interface 90 #define wl_data_device_manager_interface _glfw_wl_data_device_manager_interface 91 #define wl_shell_interface _glfw_wl_shell_interface 92 #define wl_buffer_interface _glfw_wl_buffer_interface 93 #define wl_callback_interface _glfw_wl_callback_interface 94 #define wl_data_device_interface _glfw_wl_data_device_interface 95 #define wl_data_offer_interface _glfw_wl_data_offer_interface 96 #define wl_data_source_interface _glfw_wl_data_source_interface 97 #define wl_keyboard_interface _glfw_wl_keyboard_interface 98 #define wl_output_interface _glfw_wl_output_interface 99 #define wl_pointer_interface _glfw_wl_pointer_interface 100 #define wl_region_interface _glfw_wl_region_interface 101 #define wl_registry_interface _glfw_wl_registry_interface 102 #define wl_seat_interface _glfw_wl_seat_interface 103 #define wl_shell_surface_interface _glfw_wl_shell_surface_interface 104 #define wl_shm_pool_interface _glfw_wl_shm_pool_interface 105 #define wl_subsurface_interface _glfw_wl_subsurface_interface 106 #define wl_surface_interface _glfw_wl_surface_interface 107 #define wl_touch_interface _glfw_wl_touch_interface 108 #define zwp_idle_inhibitor_v1_interface _glfw_zwp_idle_inhibitor_v1_interface 109 #define zwp_idle_inhibit_manager_v1_interface _glfw_zwp_idle_inhibit_manager_v1_interface 110 #define zwp_confined_pointer_v1_interface _glfw_zwp_confined_pointer_v1_interface 111 #define zwp_locked_pointer_v1_interface _glfw_zwp_locked_pointer_v1_interface 112 #define zwp_pointer_constraints_v1_interface _glfw_zwp_pointer_constraints_v1_interface 113 #define zwp_relative_pointer_v1_interface _glfw_zwp_relative_pointer_v1_interface 114 #define zwp_relative_pointer_manager_v1_interface _glfw_zwp_relative_pointer_manager_v1_interface 115 #define wp_viewport_interface _glfw_wp_viewport_interface 116 #define wp_viewporter_interface _glfw_wp_viewporter_interface 117 #define xdg_toplevel_interface _glfw_xdg_toplevel_interface 118 #define zxdg_toplevel_decoration_v1_interface _glfw_zxdg_toplevel_decoration_v1_interface 119 #define zxdg_decoration_manager_v1_interface _glfw_zxdg_decoration_manager_v1_interface 120 #define xdg_popup_interface _glfw_xdg_popup_interface 121 #define xdg_positioner_interface _glfw_xdg_positioner_interface 122 #define xdg_surface_interface _glfw_xdg_surface_interface 123 #define xdg_toplevel_interface _glfw_xdg_toplevel_interface 124 #define xdg_wm_base_interface _glfw_xdg_wm_base_interface 125 126 #define GLFW_WAYLAND_WINDOW_STATE _GLFWwindowWayland wl; 127 #define GLFW_WAYLAND_LIBRARY_WINDOW_STATE _GLFWlibraryWayland wl; 128 #define GLFW_WAYLAND_MONITOR_STATE _GLFWmonitorWayland wl; 129 #define GLFW_WAYLAND_CURSOR_STATE _GLFWcursorWayland wl; 130 131 struct wl_cursor_image { 132 uint32_t width; 133 uint32_t height; 134 uint32_t hotspot_x; 135 uint32_t hotspot_y; 136 uint32_t delay; 137 }; 138 struct wl_cursor { 139 unsigned int image_count; 140 struct wl_cursor_image** images; 141 char* name; 142 }; 143 typedef struct wl_cursor_theme* (* PFN_wl_cursor_theme_load)(const char*, int, struct wl_shm*); 144 typedef void (* PFN_wl_cursor_theme_destroy)(struct wl_cursor_theme*); 145 typedef struct wl_cursor* (* PFN_wl_cursor_theme_get_cursor)(struct wl_cursor_theme*, const char*); 146 typedef struct wl_buffer* (* PFN_wl_cursor_image_get_buffer)(struct wl_cursor_image*); 147 #define wl_cursor_theme_load _glfw.wl.cursor.theme_load 148 #define wl_cursor_theme_destroy _glfw.wl.cursor.theme_destroy 149 #define wl_cursor_theme_get_cursor _glfw.wl.cursor.theme_get_cursor 150 #define wl_cursor_image_get_buffer _glfw.wl.cursor.image_get_buffer 151 152 typedef struct wl_egl_window* (* PFN_wl_egl_window_create)(struct wl_surface*, int, int); 153 typedef void (* PFN_wl_egl_window_destroy)(struct wl_egl_window*); 154 typedef void (* PFN_wl_egl_window_resize)(struct wl_egl_window*, int, int, int, int); 155 #define wl_egl_window_create _glfw.wl.egl.window_create 156 #define wl_egl_window_destroy _glfw.wl.egl.window_destroy 157 #define wl_egl_window_resize _glfw.wl.egl.window_resize 158 159 typedef struct xkb_context* (* PFN_xkb_context_new)(enum xkb_context_flags); 160 typedef void (* PFN_xkb_context_unref)(struct xkb_context*); 161 typedef struct xkb_keymap* (* PFN_xkb_keymap_new_from_string)(struct xkb_context*, const char*, enum xkb_keymap_format, enum xkb_keymap_compile_flags); 162 typedef void (* PFN_xkb_keymap_unref)(struct xkb_keymap*); 163 typedef xkb_mod_index_t (* PFN_xkb_keymap_mod_get_index)(struct xkb_keymap*, const char*); 164 typedef int (* PFN_xkb_keymap_key_repeats)(struct xkb_keymap*, xkb_keycode_t); 165 typedef int (* PFN_xkb_keymap_key_get_syms_by_level)(struct xkb_keymap*,xkb_keycode_t,xkb_layout_index_t,xkb_level_index_t,const xkb_keysym_t**); 166 typedef struct xkb_state* (* PFN_xkb_state_new)(struct xkb_keymap*); 167 typedef void (* PFN_xkb_state_unref)(struct xkb_state*); 168 typedef int (* PFN_xkb_state_key_get_syms)(struct xkb_state*, xkb_keycode_t, const xkb_keysym_t**); 169 typedef enum xkb_state_component (* PFN_xkb_state_update_mask)(struct xkb_state*, xkb_mod_mask_t, xkb_mod_mask_t, xkb_mod_mask_t, xkb_layout_index_t, xkb_layout_index_t, xkb_layout_index_t); 170 typedef xkb_layout_index_t (* PFN_xkb_state_key_get_layout)(struct xkb_state*,xkb_keycode_t); 171 typedef int (* PFN_xkb_state_mod_index_is_active)(struct xkb_state*,xkb_mod_index_t,enum xkb_state_component); 172 #define xkb_context_new _glfw.wl.xkb.context_new 173 #define xkb_context_unref _glfw.wl.xkb.context_unref 174 #define xkb_keymap_new_from_string _glfw.wl.xkb.keymap_new_from_string 175 #define xkb_keymap_unref _glfw.wl.xkb.keymap_unref 176 #define xkb_keymap_mod_get_index _glfw.wl.xkb.keymap_mod_get_index 177 #define xkb_keymap_key_repeats _glfw.wl.xkb.keymap_key_repeats 178 #define xkb_keymap_key_get_syms_by_level _glfw.wl.xkb.keymap_key_get_syms_by_level 179 #define xkb_state_new _glfw.wl.xkb.state_new 180 #define xkb_state_unref _glfw.wl.xkb.state_unref 181 #define xkb_state_key_get_syms _glfw.wl.xkb.state_key_get_syms 182 #define xkb_state_update_mask _glfw.wl.xkb.state_update_mask 183 #define xkb_state_key_get_layout _glfw.wl.xkb.state_key_get_layout 184 #define xkb_state_mod_index_is_active _glfw.wl.xkb.state_mod_index_is_active 185 186 typedef struct xkb_compose_table* (* PFN_xkb_compose_table_new_from_locale)(struct xkb_context*, const char*, enum xkb_compose_compile_flags); 187 typedef void (* PFN_xkb_compose_table_unref)(struct xkb_compose_table*); 188 typedef struct xkb_compose_state* (* PFN_xkb_compose_state_new)(struct xkb_compose_table*, enum xkb_compose_state_flags); 189 typedef void (* PFN_xkb_compose_state_unref)(struct xkb_compose_state*); 190 typedef enum xkb_compose_feed_result (* PFN_xkb_compose_state_feed)(struct xkb_compose_state*, xkb_keysym_t); 191 typedef enum xkb_compose_status (* PFN_xkb_compose_state_get_status)(struct xkb_compose_state*); 192 typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_state*); 193 #define xkb_compose_table_new_from_locale _glfw.wl.xkb.compose_table_new_from_locale 194 #define xkb_compose_table_unref _glfw.wl.xkb.compose_table_unref 195 #define xkb_compose_state_new _glfw.wl.xkb.compose_state_new 196 #define xkb_compose_state_unref _glfw.wl.xkb.compose_state_unref 197 #define xkb_compose_state_feed _glfw.wl.xkb.compose_state_feed 198 #define xkb_compose_state_get_status _glfw.wl.xkb.compose_state_get_status 199 #define xkb_compose_state_get_one_sym _glfw.wl.xkb.compose_state_get_one_sym 200 201 typedef enum _GLFWdecorationSideWayland 202 { 203 mainWindow, 204 topDecoration, 205 leftDecoration, 206 rightDecoration, 207 bottomDecoration, 208 } _GLFWdecorationSideWayland; 209 210 typedef struct _GLFWdecorationWayland 211 { 212 struct wl_surface* surface; 213 struct wl_subsurface* subsurface; 214 struct wp_viewport* viewport; 215 } _GLFWdecorationWayland; 216 217 typedef struct _GLFWofferWayland 218 { 219 struct wl_data_offer* offer; 220 GLFWbool text_plain_utf8; 221 GLFWbool text_uri_list; 222 } _GLFWofferWayland; 223 224 // Wayland-specific per-window data 225 // 226 typedef struct _GLFWwindowWayland 227 { 228 int width, height; 229 GLFWbool visible; 230 GLFWbool maximized; 231 GLFWbool activated; 232 GLFWbool fullscreen; 233 GLFWbool hovered; 234 GLFWbool transparent; 235 struct wl_surface* surface; 236 struct wl_callback* callback; 237 238 struct { 239 struct wl_egl_window* window; 240 } egl; 241 242 struct { 243 int width, height; 244 GLFWbool maximized; 245 GLFWbool iconified; 246 GLFWbool activated; 247 GLFWbool fullscreen; 248 } pending; 249 250 struct { 251 struct xdg_surface* surface; 252 struct xdg_toplevel* toplevel; 253 struct zxdg_toplevel_decoration_v1* decoration; 254 uint32_t decorationMode; 255 } xdg; 256 257 _GLFWcursor* currentCursor; 258 double cursorPosX, cursorPosY; 259 260 char* title; 261 char* appId; 262 263 // We need to track the monitors the window spans on to calculate the 264 // optimal scaling factor. 265 int scale; 266 _GLFWmonitor** monitors; 267 int monitorsCount; 268 int monitorsSize; 269 270 struct zwp_relative_pointer_v1* relativePointer; 271 struct zwp_locked_pointer_v1* lockedPointer; 272 struct zwp_confined_pointer_v1* confinedPointer; 273 274 struct zwp_idle_inhibitor_v1* idleInhibitor; 275 276 struct { 277 struct wl_buffer* buffer; 278 _GLFWdecorationWayland top, left, right, bottom; 279 _GLFWdecorationSideWayland focus; 280 } decorations; 281 } _GLFWwindowWayland; 282 283 // Wayland-specific global data 284 // 285 typedef struct _GLFWlibraryWayland 286 { 287 struct wl_display* display; 288 struct wl_registry* registry; 289 struct wl_compositor* compositor; 290 struct wl_subcompositor* subcompositor; 291 struct wl_shm* shm; 292 struct wl_seat* seat; 293 struct wl_pointer* pointer; 294 struct wl_keyboard* keyboard; 295 struct wl_data_device_manager* dataDeviceManager; 296 struct wl_data_device* dataDevice; 297 struct xdg_wm_base* wmBase; 298 struct zxdg_decoration_manager_v1* decorationManager; 299 struct wp_viewporter* viewporter; 300 struct zwp_relative_pointer_manager_v1* relativePointerManager; 301 struct zwp_pointer_constraints_v1* pointerConstraints; 302 struct zwp_idle_inhibit_manager_v1* idleInhibitManager; 303 304 _GLFWofferWayland* offers; 305 unsigned int offerCount; 306 307 struct wl_data_offer* selectionOffer; 308 struct wl_data_source* selectionSource; 309 310 struct wl_data_offer* dragOffer; 311 _GLFWwindow* dragFocus; 312 uint32_t dragSerial; 313 314 int compositorVersion; 315 int seatVersion; 316 317 struct wl_cursor_theme* cursorTheme; 318 struct wl_cursor_theme* cursorThemeHiDPI; 319 struct wl_surface* cursorSurface; 320 const char* cursorPreviousName; 321 int cursorTimerfd; 322 uint32_t serial; 323 uint32_t pointerEnterSerial; 324 325 int keyRepeatTimerfd; 326 int32_t keyRepeatRate; 327 int32_t keyRepeatDelay; 328 int keyRepeatScancode; 329 330 char* clipboardString; 331 short int keycodes[256]; 332 short int scancodes[GLFW_KEY_LAST + 1]; 333 char keynames[GLFW_KEY_LAST + 1][5]; 334 335 struct { 336 void* handle; 337 struct xkb_context* context; 338 struct xkb_keymap* keymap; 339 struct xkb_state* state; 340 341 struct xkb_compose_state* composeState; 342 343 xkb_mod_index_t controlIndex; 344 xkb_mod_index_t altIndex; 345 xkb_mod_index_t shiftIndex; 346 xkb_mod_index_t superIndex; 347 xkb_mod_index_t capsLockIndex; 348 xkb_mod_index_t numLockIndex; 349 unsigned int modifiers; 350 351 PFN_xkb_context_new context_new; 352 PFN_xkb_context_unref context_unref; 353 PFN_xkb_keymap_new_from_string keymap_new_from_string; 354 PFN_xkb_keymap_unref keymap_unref; 355 PFN_xkb_keymap_mod_get_index keymap_mod_get_index; 356 PFN_xkb_keymap_key_repeats keymap_key_repeats; 357 PFN_xkb_keymap_key_get_syms_by_level keymap_key_get_syms_by_level; 358 PFN_xkb_state_new state_new; 359 PFN_xkb_state_unref state_unref; 360 PFN_xkb_state_key_get_syms state_key_get_syms; 361 PFN_xkb_state_update_mask state_update_mask; 362 PFN_xkb_state_key_get_layout state_key_get_layout; 363 PFN_xkb_state_mod_index_is_active state_mod_index_is_active; 364 365 PFN_xkb_compose_table_new_from_locale compose_table_new_from_locale; 366 PFN_xkb_compose_table_unref compose_table_unref; 367 PFN_xkb_compose_state_new compose_state_new; 368 PFN_xkb_compose_state_unref compose_state_unref; 369 PFN_xkb_compose_state_feed compose_state_feed; 370 PFN_xkb_compose_state_get_status compose_state_get_status; 371 PFN_xkb_compose_state_get_one_sym compose_state_get_one_sym; 372 } xkb; 373 374 _GLFWwindow* pointerFocus; 375 _GLFWwindow* keyboardFocus; 376 377 struct { 378 void* handle; 379 PFN_wl_display_flush display_flush; 380 PFN_wl_display_cancel_read display_cancel_read; 381 PFN_wl_display_dispatch_pending display_dispatch_pending; 382 PFN_wl_display_read_events display_read_events; 383 PFN_wl_display_disconnect display_disconnect; 384 PFN_wl_display_roundtrip display_roundtrip; 385 PFN_wl_display_get_fd display_get_fd; 386 PFN_wl_display_prepare_read display_prepare_read; 387 PFN_wl_proxy_marshal proxy_marshal; 388 PFN_wl_proxy_add_listener proxy_add_listener; 389 PFN_wl_proxy_destroy proxy_destroy; 390 PFN_wl_proxy_marshal_constructor proxy_marshal_constructor; 391 PFN_wl_proxy_marshal_constructor_versioned proxy_marshal_constructor_versioned; 392 PFN_wl_proxy_get_user_data proxy_get_user_data; 393 PFN_wl_proxy_set_user_data proxy_set_user_data; 394 PFN_wl_proxy_get_version proxy_get_version; 395 PFN_wl_proxy_marshal_flags proxy_marshal_flags; 396 } client; 397 398 struct { 399 void* handle; 400 401 PFN_wl_cursor_theme_load theme_load; 402 PFN_wl_cursor_theme_destroy theme_destroy; 403 PFN_wl_cursor_theme_get_cursor theme_get_cursor; 404 PFN_wl_cursor_image_get_buffer image_get_buffer; 405 } cursor; 406 407 struct { 408 void* handle; 409 410 PFN_wl_egl_window_create window_create; 411 PFN_wl_egl_window_destroy window_destroy; 412 PFN_wl_egl_window_resize window_resize; 413 } egl; 414 } _GLFWlibraryWayland; 415 416 // Wayland-specific per-monitor data 417 // 418 typedef struct _GLFWmonitorWayland 419 { 420 struct wl_output* output; 421 uint32_t name; 422 int currentMode; 423 424 int x; 425 int y; 426 int scale; 427 } _GLFWmonitorWayland; 428 429 // Wayland-specific per-cursor data 430 // 431 typedef struct _GLFWcursorWayland 432 { 433 struct wl_cursor* cursor; 434 struct wl_cursor* cursorHiDPI; 435 struct wl_buffer* buffer; 436 int width, height; 437 int xhot, yhot; 438 int currentImage; 439 } _GLFWcursorWayland; 440 441 GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform); 442 int _glfwInitWayland(void); 443 void _glfwTerminateWayland(void); 444 445 GLFWbool _glfwCreateWindowWayland(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig); 446 void _glfwDestroyWindowWayland(_GLFWwindow* window); 447 void _glfwSetWindowTitleWayland(_GLFWwindow* window, const char* title); 448 void _glfwSetWindowIconWayland(_GLFWwindow* window, int count, const GLFWimage* images); 449 void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos); 450 void _glfwSetWindowPosWayland(_GLFWwindow* window, int xpos, int ypos); 451 void _glfwGetWindowSizeWayland(_GLFWwindow* window, int* width, int* height); 452 void _glfwSetWindowSizeWayland(_GLFWwindow* window, int width, int height); 453 void _glfwSetWindowSizeLimitsWayland(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); 454 void _glfwSetWindowAspectRatioWayland(_GLFWwindow* window, int numer, int denom); 455 void _glfwGetFramebufferSizeWayland(_GLFWwindow* window, int* width, int* height); 456 void _glfwGetWindowFrameSizeWayland(_GLFWwindow* window, int* left, int* top, int* right, int* bottom); 457 void _glfwGetWindowContentScaleWayland(_GLFWwindow* window, float* xscale, float* yscale); 458 void _glfwIconifyWindowWayland(_GLFWwindow* window); 459 void _glfwRestoreWindowWayland(_GLFWwindow* window); 460 void _glfwMaximizeWindowWayland(_GLFWwindow* window); 461 void _glfwShowWindowWayland(_GLFWwindow* window); 462 void _glfwHideWindowWayland(_GLFWwindow* window); 463 void _glfwRequestWindowAttentionWayland(_GLFWwindow* window); 464 void _glfwFocusWindowWayland(_GLFWwindow* window); 465 void _glfwSetWindowMonitorWayland(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); 466 GLFWbool _glfwWindowFocusedWayland(_GLFWwindow* window); 467 GLFWbool _glfwWindowIconifiedWayland(_GLFWwindow* window); 468 GLFWbool _glfwWindowVisibleWayland(_GLFWwindow* window); 469 GLFWbool _glfwWindowMaximizedWayland(_GLFWwindow* window); 470 GLFWbool _glfwWindowHoveredWayland(_GLFWwindow* window); 471 GLFWbool _glfwFramebufferTransparentWayland(_GLFWwindow* window); 472 void _glfwSetWindowResizableWayland(_GLFWwindow* window, GLFWbool enabled); 473 void _glfwSetWindowDecoratedWayland(_GLFWwindow* window, GLFWbool enabled); 474 void _glfwSetWindowFloatingWayland(_GLFWwindow* window, GLFWbool enabled); 475 float _glfwGetWindowOpacityWayland(_GLFWwindow* window); 476 void _glfwSetWindowOpacityWayland(_GLFWwindow* window, float opacity); 477 void _glfwSetWindowMousePassthroughWayland(_GLFWwindow* window, GLFWbool enabled); 478 479 void _glfwSetRawMouseMotionWayland(_GLFWwindow* window, GLFWbool enabled); 480 GLFWbool _glfwRawMouseMotionSupportedWayland(void); 481 482 void _glfwPollEventsWayland(void); 483 void _glfwWaitEventsWayland(void); 484 void _glfwWaitEventsTimeoutWayland(double timeout); 485 void _glfwPostEmptyEventWayland(void); 486 487 void _glfwGetCursorPosWayland(_GLFWwindow* window, double* xpos, double* ypos); 488 void _glfwSetCursorPosWayland(_GLFWwindow* window, double xpos, double ypos); 489 void _glfwSetCursorModeWayland(_GLFWwindow* window, int mode); 490 const char* _glfwGetScancodeNameWayland(int scancode); 491 int _glfwGetKeyScancodeWayland(int key); 492 GLFWbool _glfwCreateCursorWayland(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot); 493 GLFWbool _glfwCreateStandardCursorWayland(_GLFWcursor* cursor, int shape); 494 void _glfwDestroyCursorWayland(_GLFWcursor* cursor); 495 void _glfwSetCursorWayland(_GLFWwindow* window, _GLFWcursor* cursor); 496 void _glfwSetClipboardStringWayland(const char* string); 497 const char* _glfwGetClipboardStringWayland(void); 498 499 EGLenum _glfwGetEGLPlatformWayland(EGLint** attribs); 500 EGLNativeDisplayType _glfwGetEGLNativeDisplayWayland(void); 501 EGLNativeWindowType _glfwGetEGLNativeWindowWayland(_GLFWwindow* window); 502 503 void _glfwGetRequiredInstanceExtensionsWayland(char** extensions); 504 GLFWbool _glfwGetPhysicalDevicePresentationSupportWayland(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); 505 VkResult _glfwCreateWindowSurfaceWayland(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); 506 507 void _glfwFreeMonitorWayland(_GLFWmonitor* monitor); 508 void _glfwGetMonitorPosWayland(_GLFWmonitor* monitor, int* xpos, int* ypos); 509 void _glfwGetMonitorContentScaleWayland(_GLFWmonitor* monitor, float* xscale, float* yscale); 510 void _glfwGetMonitorWorkareaWayland(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height); 511 GLFWvidmode* _glfwGetVideoModesWayland(_GLFWmonitor* monitor, int* count); 512 void _glfwGetVideoModeWayland(_GLFWmonitor* monitor, GLFWvidmode* mode); 513 GLFWbool _glfwGetGammaRampWayland(_GLFWmonitor* monitor, GLFWgammaramp* ramp); 514 void _glfwSetGammaRampWayland(_GLFWmonitor* monitor, const GLFWgammaramp* ramp); 515 516 void _glfwAddOutputWayland(uint32_t name, uint32_t version); 517 void _glfwUpdateContentScaleWayland(_GLFWwindow* window); 518 519 void _glfwAddSeatListenerWayland(struct wl_seat* seat); 520 void _glfwAddDataDeviceListenerWayland(struct wl_data_device* device); 521