};
/**
- * Legacy names for the components of an XKB keymap, also known as KcCGST.
- * This is only used in deprecated entrypoints which might be removed or
- * shuffled off to a support library.
- */
-struct xkb_component_names {
- char *keymap;
- char *keycodes;
- char *types;
- char *compat;
- char *symbols;
-};
-
-/**
* Opaque context object; may only be created, accessed, manipulated and
* destroyed through the xkb_ctx_*() API.
*/
#endif
/*
- * Canonicalises component names by prepending the relevant component from
- * 'old' to the one in 'names' when the latter has a leading '+' or '|', and
- * by replacing a '%' with the relevant component, e.g.:
- *
- * names old output
- * ------------------------------------------
- * +bar foo foo+bar
- * |quux baz baz|quux
- * foo+%|baz bar foo+bar|baz
- *
- * If a component in names needs to be modified, the existing value will be
- * free()d, and a new one allocated with malloc().
- */
-void
-xkb_canonicalise_components(struct xkb_component_names *names,
- const struct xkb_component_names *old);
-
-/*
* Returns the name for a keysym as a string; will return unknown Unicode
* codepoints as "Ua1b2", and other unknown keysyms as "0xabcd1234".
*/
const struct xkb_rule_names *names,
enum xkb_map_compile_flags flags);
-/**
- * Deprecated entrypoint for legacy users who need to be able to compile
- * XKB keymaps by KcCGST (Keycodes + Compat + Geometry + Symbols + Types)
- * names.
- *
- * You should not use this unless you are the X server. This entrypoint
- * may well disappear in future releases. Please, please, don't use it.
- *
- * Geometry will be ignored since xkbcommon does not support it in any way.
- */
-struct xkb_keymap *
-xkb_map_new_from_kccgst(struct xkb_ctx *ctx,
- const struct xkb_component_names *kccgst,
- enum xkb_map_compile_flags flags);
-
enum xkb_keymap_format {
/** The current/classic XKB text format, as generated by xkbcomp -xkb. */
XKB_KEYMAP_FORMAT_TEXT_V1 = 1,
#define XkmKeymapOptional ((XkmTypesMask|XkmGeometryMask)&(~XkmKeymapRequired))
#define XkmKeymapLegal (XkmKeymapRequired|XkmKeymapOptional)
+/**
+ * Legacy names for the components of an XKB keymap, also known as KcCGST.
+ */
+struct xkb_component_names {
+ char *keymap;
+ char *keycodes;
+ char *types;
+ char *compat;
+ char *symbols;
+};
+
struct xkb_any_action {
uint8_t type;
uint8_t data[7];
unsigned int group, unsigned int level,
const xkb_keysym_t **syms_out);
+/*
+ * Canonicalises component names by prepending the relevant component from
+ * 'old' to the one in 'names' when the latter has a leading '+' or '|', and
+ * by replacing a '%' with the relevant component, e.g.:
+ *
+ * names old output
+ * ------------------------------------------
+ * +bar foo foo+bar
+ * |quux baz baz|quux
+ * foo+%|baz bar foo+bar|baz
+ *
+ * If a component in names needs to be modified, the existing value will be
+ * free()d, and a new one allocated with malloc().
+ */
+void
+xkb_canonicalise_components(struct xkb_component_names *names,
+ const struct xkb_component_names *old);
+
+/**
+ * Deprecated entrypoint for legacy users who need to be able to compile
+ * XKB keymaps by KcCGST (Keycodes + Compat + Geometry + Symbols + Types)
+ * names.
+ *
+ * You should not use this unless you are the X server. This entrypoint
+ * may well disappear in future releases. Please, please, don't use it.
+ *
+ * Geometry will be ignored since xkbcommon does not support it in any way.
+ */
+struct xkb_keymap *
+xkb_map_new_from_kccgst(struct xkb_ctx *ctx,
+ const struct xkb_component_names *kccgst,
+ enum xkb_map_compile_flags flags);
+
extern int
xkb_ctx_take_file_id(struct xkb_ctx *ctx);