AtlatestRepositorysigil-ui
1/*
2 * The part of libxkbcommon's API that the Wayland surface uses, declared
3 * here so that building sigil-ui needs no xkbcommon headers. The library
4 * itself is loaded with dlopen when a Wayland surface opens; wayland.c holds
5 * one function pointer per entry point below.
6 *
7 * Values match xkbcommon.h and xkbcommon-compose.h (xkbcommon 0.5 and later).
8 */
9#ifndef SIGIL_UI_XKB_H
10#define SIGIL_UI_XKB_H
12#include <stddef.h>
13#include <stdint.h>
15struct xkb_context;
16struct xkb_keymap;
17struct xkb_state;
18struct xkb_compose_table;
19struct xkb_compose_state;
21typedef uint32_t xkb_keycode_t;
22typedef uint32_t xkb_keysym_t;
23typedef uint32_t xkb_mod_mask_t;
24typedef uint32_t xkb_layout_index_t;
26#define XKB_CONTEXT_NO_FLAGS 0
27#define XKB_KEYMAP_FORMAT_TEXT_V1 1
28#define XKB_KEYMAP_COMPILE_NO_FLAGS 0
29#define XKB_STATE_MODS_EFFECTIVE (1 << 3)
30#define XKB_COMPOSE_COMPILE_NO_FLAGS 0
31#define XKB_COMPOSE_STATE_NO_FLAGS 0
33enum xkb_compose_status {
34 XKB_COMPOSE_NOTHING,
35 XKB_COMPOSE_COMPOSING,
36 XKB_COMPOSE_COMPOSED,
37 XKB_COMPOSE_CANCELLED
38};
39enum xkb_compose_feed_result { XKB_COMPOSE_FEED_IGNORED, XKB_COMPOSE_FEED_ACCEPTED };
41#define XKB_MOD_NAME_SHIFT "Shift"
42#define XKB_MOD_NAME_CAPS "Lock"
43#define XKB_MOD_NAME_CTRL "Control"
44#define XKB_MOD_NAME_ALT "Mod1"
45#define XKB_MOD_NAME_NUM "Mod2"
46#define XKB_MOD_NAME_LOGO "Mod4"
48#endif