|
|
|
@ -26,7 +26,9 @@ |
|
|
|
|
|
|
|
|
|
#include <wayland-client.h> |
|
|
|
|
#include <xkbcommon/xkbcommon.h> |
|
|
|
|
#ifdef HAVE_XKBCOMMON_COMPOSE_H |
|
|
|
|
#include <xkbcommon/xkbcommon-compose.h> |
|
|
|
|
#endif |
|
|
|
|
#include <dlfcn.h> |
|
|
|
|
|
|
|
|
|
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; |
|
|
|
@ -78,13 +80,6 @@ typedef void (* PFN_xkb_state_unref)(struct xkb_state*); |
|
|
|
|
typedef int (* PFN_xkb_state_key_get_syms)(struct xkb_state*, xkb_keycode_t, const xkb_keysym_t**); |
|
|
|
|
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); |
|
|
|
|
typedef xkb_mod_mask_t (* PFN_xkb_state_serialize_mods)(struct xkb_state*, enum xkb_state_component); |
|
|
|
|
typedef struct xkb_compose_table* (* PFN_xkb_compose_table_new_from_locale)(struct xkb_context*, const char*, enum xkb_compose_compile_flags); |
|
|
|
|
typedef void (* PFN_xkb_compose_table_unref)(struct xkb_compose_table*); |
|
|
|
|
typedef struct xkb_compose_state* (* PFN_xkb_compose_state_new)(struct xkb_compose_table*, enum xkb_compose_state_flags); |
|
|
|
|
typedef void (* PFN_xkb_compose_state_unref)(struct xkb_compose_state*); |
|
|
|
|
typedef enum xkb_compose_feed_result (* PFN_xkb_compose_state_feed)(struct xkb_compose_state*, xkb_keysym_t); |
|
|
|
|
typedef enum xkb_compose_status (* PFN_xkb_compose_state_get_status)(struct xkb_compose_state*); |
|
|
|
|
typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_state*); |
|
|
|
|
#define xkb_context_new _glfw.wl.xkb.context_new |
|
|
|
|
#define xkb_context_unref _glfw.wl.xkb.context_unref |
|
|
|
|
#define xkb_keymap_new_from_string _glfw.wl.xkb.keymap_new_from_string |
|
|
|
@ -95,6 +90,15 @@ typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_st |
|
|
|
|
#define xkb_state_key_get_syms _glfw.wl.xkb.state_key_get_syms |
|
|
|
|
#define xkb_state_update_mask _glfw.wl.xkb.state_update_mask |
|
|
|
|
#define xkb_state_serialize_mods _glfw.wl.xkb.state_serialize_mods |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_XKBCOMMON_COMPOSE_H |
|
|
|
|
typedef struct xkb_compose_table* (* PFN_xkb_compose_table_new_from_locale)(struct xkb_context*, const char*, enum xkb_compose_compile_flags); |
|
|
|
|
typedef void (* PFN_xkb_compose_table_unref)(struct xkb_compose_table*); |
|
|
|
|
typedef struct xkb_compose_state* (* PFN_xkb_compose_state_new)(struct xkb_compose_table*, enum xkb_compose_state_flags); |
|
|
|
|
typedef void (* PFN_xkb_compose_state_unref)(struct xkb_compose_state*); |
|
|
|
|
typedef enum xkb_compose_feed_result (* PFN_xkb_compose_state_feed)(struct xkb_compose_state*, xkb_keysym_t); |
|
|
|
|
typedef enum xkb_compose_status (* PFN_xkb_compose_state_get_status)(struct xkb_compose_state*); |
|
|
|
|
typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_state*); |
|
|
|
|
#define xkb_compose_table_new_from_locale _glfw.wl.xkb.compose_table_new_from_locale |
|
|
|
|
#define xkb_compose_table_unref _glfw.wl.xkb.compose_table_unref |
|
|
|
|
#define xkb_compose_state_new _glfw.wl.xkb.compose_state_new |
|
|
|
@ -102,6 +106,7 @@ typedef xkb_keysym_t (* PFN_xkb_compose_state_get_one_sym)(struct xkb_compose_st |
|
|
|
|
#define xkb_compose_state_feed _glfw.wl.xkb.compose_state_feed |
|
|
|
|
#define xkb_compose_state_get_status _glfw.wl.xkb.compose_state_get_status |
|
|
|
|
#define xkb_compose_state_get_one_sym _glfw.wl.xkb.compose_state_get_one_sym |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Wayland-specific per-window data
|
|
|
|
@ -164,7 +169,11 @@ typedef struct _GLFWlibraryWayland |
|
|
|
|
struct xkb_context* context; |
|
|
|
|
struct xkb_keymap* keymap; |
|
|
|
|
struct xkb_state* state; |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_XKBCOMMON_COMPOSE_H |
|
|
|
|
struct xkb_compose_state* composeState; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
xkb_mod_mask_t controlMask; |
|
|
|
|
xkb_mod_mask_t altMask; |
|
|
|
|
xkb_mod_mask_t shiftMask; |
|
|
|
@ -181,6 +190,8 @@ typedef struct _GLFWlibraryWayland |
|
|
|
|
PFN_xkb_state_key_get_syms state_key_get_syms; |
|
|
|
|
PFN_xkb_state_update_mask state_update_mask; |
|
|
|
|
PFN_xkb_state_serialize_mods state_serialize_mods; |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_XKBCOMMON_COMPOSE_H |
|
|
|
|
PFN_xkb_compose_table_new_from_locale compose_table_new_from_locale; |
|
|
|
|
PFN_xkb_compose_table_unref compose_table_unref; |
|
|
|
|
PFN_xkb_compose_state_new compose_state_new; |
|
|
|
@ -188,6 +199,7 @@ typedef struct _GLFWlibraryWayland |
|
|
|
|
PFN_xkb_compose_state_feed compose_state_feed; |
|
|
|
|
PFN_xkb_compose_state_get_status compose_state_get_status; |
|
|
|
|
PFN_xkb_compose_state_get_one_sym compose_state_get_one_sym; |
|
|
|
|
#endif |
|
|
|
|
} xkb; |
|
|
|
|
|
|
|
|
|
_GLFWwindow* pointerFocus; |
|
|
|
|