27 #include <wayland-client.h> 28 #include <xkbcommon/xkbcommon.h> 29 #ifdef HAVE_XKBCOMMON_COMPOSE_H 30 #include <xkbcommon/xkbcommon-compose.h> 59 #include "wayland-xdg-shell-client-protocol.h" 60 #include "wayland-xdg-decoration-client-protocol.h" 61 #include "wayland-viewporter-client-protocol.h" 62 #include "wayland-relative-pointer-unstable-v1-client-protocol.h" 63 #include "wayland-pointer-constraints-unstable-v1-client-protocol.h" 64 #include "wayland-idle-inhibit-unstable-v1-client-protocol.h" 66 #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) 67 #define _glfw_dlclose(handle) dlclose(handle) 68 #define _glfw_dlsym(handle, name) dlsym(handle, name) 70 #define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->wl.native) 71 #define _GLFW_EGL_NATIVE_DISPLAY ((EGLNativeDisplayType) _glfw.wl.display) 73 #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWayland wl 74 #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWayland wl 75 #define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorWayland wl 76 #define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorWayland wl 78 #define _GLFW_PLATFORM_CONTEXT_STATE 79 #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE 93 typedef struct wl_cursor_theme* (* PFN_wl_cursor_theme_load)(
const char*, int,
struct wl_shm*);
95 typedef struct wl_cursor* (* PFN_wl_cursor_theme_get_cursor)(
struct wl_cursor_theme*,
const char*);
96 typedef struct wl_buffer* (* PFN_wl_cursor_image_get_buffer)(
struct wl_cursor_image*);
97 #define wl_cursor_theme_load _glfw.wl.cursor.theme_load 98 #define wl_cursor_theme_destroy _glfw.wl.cursor.theme_destroy 99 #define wl_cursor_theme_get_cursor _glfw.wl.cursor.theme_get_cursor 100 #define wl_cursor_image_get_buffer _glfw.wl.cursor.image_get_buffer 102 typedef struct wl_egl_window* (* PFN_wl_egl_window_create)(
struct wl_surface*, int, int);
105 #define wl_egl_window_create _glfw.wl.egl.window_create 106 #define wl_egl_window_destroy _glfw.wl.egl.window_destroy 107 #define wl_egl_window_resize _glfw.wl.egl.window_resize 109 typedef struct xkb_context* (* PFN_xkb_context_new)(
enum xkb_context_flags);
111 typedef struct xkb_keymap* (* PFN_xkb_keymap_new_from_string)(
struct xkb_context*,
const char*,
enum xkb_keymap_format,
enum xkb_keymap_compile_flags);
115 typedef struct xkb_state* (* PFN_xkb_state_new)(
struct xkb_keymap*);
118 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);
120 #define xkb_context_new _glfw.wl.xkb.context_new 121 #define xkb_context_unref _glfw.wl.xkb.context_unref 122 #define xkb_keymap_new_from_string _glfw.wl.xkb.keymap_new_from_string 123 #define xkb_keymap_unref _glfw.wl.xkb.keymap_unref 124 #define xkb_keymap_mod_get_index _glfw.wl.xkb.keymap_mod_get_index 125 #define xkb_keymap_key_repeats _glfw.wl.xkb.keymap_key_repeats 126 #define xkb_state_new _glfw.wl.xkb.state_new 127 #define xkb_state_unref _glfw.wl.xkb.state_unref 128 #define xkb_state_key_get_syms _glfw.wl.xkb.state_key_get_syms 129 #define xkb_state_update_mask _glfw.wl.xkb.state_update_mask 130 #define xkb_state_serialize_mods _glfw.wl.xkb.state_serialize_mods 132 #ifdef HAVE_XKBCOMMON_COMPOSE_H 133 typedef struct xkb_compose_table* (* PFN_xkb_compose_table_new_from_locale)(
struct xkb_context*,
const char*,
enum xkb_compose_compile_flags);
134 typedef void (* PFN_xkb_compose_table_unref)(
struct xkb_compose_table*);
135 typedef struct xkb_compose_state* (* PFN_xkb_compose_state_new)(
struct xkb_compose_table*,
enum xkb_compose_state_flags);
136 typedef void (* PFN_xkb_compose_state_unref)(
struct xkb_compose_state*);
137 typedef enum xkb_compose_feed_result (* PFN_xkb_compose_state_feed)(
struct xkb_compose_state*, xkb_keysym_t);
138 typedef enum xkb_compose_status (* PFN_xkb_compose_state_get_status)(
struct xkb_compose_state*);
139 typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(
struct xkb_compose_state*);
140 #define xkb_compose_table_new_from_locale _glfw.wl.xkb.compose_table_new_from_locale 141 #define xkb_compose_table_unref _glfw.wl.xkb.compose_table_unref 142 #define xkb_compose_state_new _glfw.wl.xkb.compose_state_new 143 #define xkb_compose_state_unref _glfw.wl.xkb.compose_state_unref 144 #define xkb_compose_state_feed _glfw.wl.xkb.compose_state_feed 145 #define xkb_compose_state_get_status _glfw.wl.xkb.compose_state_get_status 146 #define xkb_compose_state_get_one_sym _glfw.wl.xkb.compose_state_get_one_sym 149 #define _GLFW_DECORATION_WIDTH 4 150 #define _GLFW_DECORATION_TOP 24 151 #define _GLFW_DECORATION_VERTICAL (_GLFW_DECORATION_TOP + _GLFW_DECORATION_WIDTH) 152 #define _GLFW_DECORATION_HORIZONTAL (2 * _GLFW_DECORATION_WIDTH) 265 short int keycodes[256];
274 #ifdef HAVE_XKBCOMMON_COMPOSE_H 275 struct xkb_compose_state* composeState;
298 #ifdef HAVE_XKBCOMMON_COMPOSE_H 299 PFN_xkb_compose_table_new_from_locale compose_table_new_from_locale;
300 PFN_xkb_compose_table_unref compose_table_unref;
301 PFN_xkb_compose_state_new compose_state_new;
302 PFN_xkb_compose_state_unref compose_state_unref;
303 PFN_xkb_compose_state_feed compose_state_feed;
304 PFN_xkb_compose_state_get_status compose_state_get_status;
305 PFN_xkb_compose_state_get_one_sym compose_state_get_one_sym;
struct wl_data_source * dataSource
VkWaylandSurfaceCreateFlagsKHR flags
struct wl_buffer * buffer
struct zxdg_toplevel_decoration_v1 * decoration
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
GLuint const GLchar * name
struct zwp_idle_inhibitor_v1 * idleInhibitor
int32_t keyboardRepeatRate
xkb_mod_mask_t controlMask
struct wl_display * display
_GLFWcursor * currentCursor
struct zwp_locked_pointer_v1 * lockedPointer
struct zwp_relative_pointer_v1 * relativePointer
struct wl_keyboard * keyboard
GLuint64 GLenum void * handle
PFN_wl_cursor_theme_load theme_load
struct wl_surface * surface
_GLFWwindow * pointerFocus
struct wl_cursor_image ** images
struct wl_compositor * compositor
PFN_xkb_state_key_get_syms state_key_get_syms
PFN_xkb_keymap_unref keymap_unref
PFN_xkb_context_unref context_unref
char * clipboardSendString
struct zxdg_decoration_manager_v1 * decorationManager
struct zwp_idle_inhibit_manager_v1 * idleInhibitManager
struct wl_subsurface * subsurface
struct wl_cursor_theme * cursorTheme
struct wl_surface * surface
struct wp_viewporter * viewporter
PFN_wl_egl_window_create window_create
PFN_wl_cursor_theme_get_cursor theme_get_cursor
struct wl_output * output
struct wl_shell_surface * shellSurface
struct wl_data_device * dataDevice
struct xkb_context * context
int32_t keyboardRepeatDelay
struct wl_data_device_manager * dataDeviceManager
struct xdg_toplevel * toplevel
GLint GLsizei GLsizei height
xkb_mod_mask_t numLockMask
struct wl_pointer * pointer
struct wp_viewport * viewport
struct wl_registry * registry
PFN_xkb_state_serialize_mods state_serialize_mods
struct wl_cursor * cursor
struct xkb_keymap * keymap
struct wl_subcompositor * subcompositor
struct wl_egl_window * native
PFN_wl_egl_window_resize window_resize
_GLFWdecorationWayland top
PFN_xkb_state_update_mask state_update_mask
PFN_wl_cursor_theme_destroy theme_destroy
PFN_xkb_context_new context_new
PFN_xkb_keymap_key_repeats keymap_key_repeats
struct wl_cursor_theme * cursorThemeHiDPI
struct wl_surface * cursorSurface
PFN_wl_cursor_image_get_buffer image_get_buffer
struct xdg_wm_base * wmBase
struct wl_cursor * cursorHiDPI
PFN_wl_egl_window_destroy window_destroy
struct xdg_surface * surface
PFN_xkb_keymap_new_from_string keymap_new_from_string
xkb_mod_mask_t capsLockMask
PFN_xkb_keymap_mod_get_index keymap_mod_get_index
struct wl_display * display
struct wl_buffer * buffer
struct wl_callback * callback
PFN_xkb_state_new state_new
struct zwp_pointer_constraints_v1 * pointerConstraints
struct wl_surface * surface
PFN_xkb_state_unref state_unref
_GLFWwindow * keyboardFocus
struct wl_data_offer * dataOffer
struct zwp_relative_pointer_manager_v1 * relativePointerManager