#include "utils.h"
/* We don't carry any prototypes for these functions, as we #define them
+<<<<<<< HEAD
* to their newer versions so people link against those. */
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_new_from_names(struct xkb_context *context,
+ const struct xkb_rule_names *names,
+ enum xkb_keymap_compile_flags flags)
+{
+ return xkb_keymap_new_from_names(context, names, flags);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_new_from_file(struct xkb_context *context, FILE *file,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ return xkb_keymap_new_from_file(context, file, format, flags);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_new_from_string(struct xkb_context *context, const char *string,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags)
+{
+ return xkb_keymap_new_from_string(context, string, format, flags);
+}
+
+XKB_EXPORT char *
+xkb_map_get_as_string(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_get_as_string(keymap);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_map_ref(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_ref(keymap);
+}
+
+XKB_EXPORT void
+xkb_map_unref(struct xkb_keymap *keymap)
+{
+ xkb_keymap_unref(keymap);
+}
+
+XKB_EXPORT xkb_mod_index_t
+xkb_map_num_mods(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_num_mods(keymap);
+}
+
+XKB_EXPORT const char *
+xkb_map_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx)
+{
+ return xkb_keymap_mod_get_name(keymap, idx);
+}
+
+XKB_EXPORT xkb_mod_index_t
+xkb_map_mod_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ return xkb_keymap_mod_get_index(keymap, name);
+}
+
+XKB_EXPORT bool
+xkb_key_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_index_t idx)
+{
+ return xkb_state_mod_index_is_consumed(state, kc, idx);
+}
+
+XKB_EXPORT xkb_mod_mask_t
+xkb_key_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_mask_t mask)
+{
+ return xkb_state_mod_mask_remove_consumed(state, kc, mask);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_map_num_groups(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_num_layouts(keymap);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_key_num_groups(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ return xkb_keymap_num_layouts_for_key(keymap, kc);
+}
+
+XKB_EXPORT const char *
+xkb_map_group_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx)
+{
+ return xkb_keymap_layout_get_name(keymap, idx);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_map_group_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ return xkb_keymap_layout_get_index(keymap, name);
+}
+
+XKB_EXPORT xkb_led_index_t
+xkb_map_num_leds(struct xkb_keymap *keymap)
+{
+ return xkb_keymap_num_leds(keymap);
+}
+
+XKB_EXPORT const char *
+xkb_map_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx)
+{
+ return xkb_keymap_led_get_name(keymap, idx);
+}
+
+XKB_EXPORT xkb_led_index_t
+xkb_map_led_get_index(struct xkb_keymap *keymap, const char *name)
+{
+ return xkb_keymap_led_get_index(keymap, name);
+}
+
+XKB_EXPORT bool
+xkb_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc)
+{
+ return xkb_keymap_key_repeats(keymap, kc);
+}
+
+XKB_EXPORT int
+xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t kc,
+ const xkb_keysym_t **syms_out)
+{
+ return xkb_state_key_get_syms(state, kc, syms_out);
+}
+
+XKB_EXPORT bool
+xkb_state_group_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type)
+{
+ return xkb_state_layout_name_is_active(state, name, type);
+}
+
+XKB_EXPORT bool
+xkb_state_group_index_is_active(struct xkb_state *state, xkb_layout_index_t idx,
+ enum xkb_state_component type)
+{
+ return xkb_state_layout_index_is_active(state, idx, type);
+}
+
+XKB_EXPORT xkb_layout_index_t
+xkb_state_serialize_group(struct xkb_state *state,
+ enum xkb_state_component type)
+{
+ return xkb_state_serialize_layout(state, type);
+}
+
+XKB_EXPORT struct xkb_keymap *
+xkb_state_get_map(struct xkb_state *state)
+{
+ return xkb_state_get_keymap(state);
+}
}
XKB_EXPORT struct xkb_keymap *
-xkb_map_ref(struct xkb_keymap *keymap)
+xkb_keymap_ref(struct xkb_keymap *keymap)
{
keymap->refcnt++;
return keymap;
}
XKB_EXPORT void
-xkb_map_unref(struct xkb_keymap *keymap)
+xkb_keymap_unref(struct xkb_keymap *keymap)
{
unsigned int i;
struct xkb_key *key;
* Returns the total number of modifiers active in the keymap.
*/
XKB_EXPORT xkb_mod_index_t
-xkb_map_num_mods(struct xkb_keymap *keymap)
+xkb_keymap_num_mods(struct xkb_keymap *keymap)
{
xkb_mod_index_t i;
* Return the name for a given modifier.
*/
XKB_EXPORT const char *
-xkb_map_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx)
+xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx)
{
const char *name;
* Returns the index for a named modifier.
*/
XKB_EXPORT xkb_mod_index_t
-xkb_map_mod_get_index(struct xkb_keymap *keymap, const char *name)
+xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name)
{
xkb_mod_index_t i;
xkb_atom_t atom;
/**
* Return the total number of active groups in the keymap.
*/
-XKB_EXPORT xkb_group_index_t
-xkb_map_num_groups(struct xkb_keymap *keymap)
+XKB_EXPORT xkb_layout_index_t
+xkb_keymap_num_layouts(struct xkb_keymap *keymap)
{
return keymap->num_groups;
}
* Returns the name for a given group.
*/
XKB_EXPORT const char *
-xkb_map_group_get_name(struct xkb_keymap *keymap, xkb_group_index_t idx)
+xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx)
{
- if (idx >= xkb_map_num_groups(keymap))
+ if (idx >= xkb_keymap_num_layouts(keymap))
return NULL;
return xkb_atom_text(keymap->ctx, keymap->group_names[idx]);
}
/**
- * Returns the index for a named group.
+ * Returns the index for a named layout.
*/
-XKB_EXPORT xkb_group_index_t
-xkb_map_group_get_index(struct xkb_keymap *keymap, const char *name)
+XKB_EXPORT xkb_layout_index_t
+xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name)
{
- xkb_group_index_t num_groups = xkb_map_num_groups(keymap);
+ xkb_layout_index_t num_groups = xkb_keymap_num_layouts(keymap);
xkb_atom_t atom = xkb_atom_lookup(keymap->ctx, name);
- xkb_group_index_t i;
+ xkb_layout_index_t i;
if (atom == XKB_ATOM_NONE)
return XKB_GROUP_INVALID;
}
/**
- * Returns the number of groups active for a particular key.
+ * Returns the number of layouts active for a particular key.
*/
-XKB_EXPORT xkb_group_index_t
-xkb_key_num_groups(struct xkb_keymap *keymap, xkb_keycode_t kc)
+XKB_EXPORT xkb_layout_index_t
+xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t kc)
{
const struct xkb_key *key = XkbKey(keymap, kc);
if (!key)
* Return the total number of active LEDs in the keymap.
*/
XKB_EXPORT xkb_led_index_t
-xkb_map_num_leds(struct xkb_keymap *keymap)
+xkb_keymap_num_leds(struct xkb_keymap *keymap)
{
xkb_led_index_t ret = 0;
xkb_led_index_t i;
* Returns the name for a given group.
*/
XKB_EXPORT const char *
-xkb_map_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx)
+xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx)
{
if (idx >= xkb_map_num_leds(keymap))
return NULL;
* Returns the index for a named group.
*/
XKB_EXPORT xkb_group_index_t
-xkb_map_led_get_index(struct xkb_keymap *keymap, const char *name)
+xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name)
{
xkb_led_index_t num_leds = xkb_map_num_leds(keymap);
xkb_atom_t atom = xkb_atom_lookup(keymap->ctx, name);
* number of symbols pointed to in syms_out.
*/
XKB_EXPORT int
-xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t kc,
- const xkb_keysym_t **syms_out)
+xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t kc,
+ const xkb_keysym_t **syms_out)
{
struct xkb_keymap *keymap = xkb_state_get_map(state);
xkb_group_index_t group;
* Simple boolean specifying whether or not the key should repeat.
*/
XKB_EXPORT int
-xkb_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc)
+xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc)
{
const struct xkb_key *key = XkbKey(keymap, kc);
if (!key)
* from gtk+.
*/
XKB_EXPORT int
-xkb_key_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t kc,
- xkb_mod_index_t idx)
+xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_index_t idx)
{
const struct xkb_key *key = XkbKey(xkb_state_get_map(state), kc);
if (!key)
* consumed by the type handling.
*/
XKB_EXPORT xkb_mod_mask_t
-xkb_key_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t kc,
- xkb_mod_mask_t mask)
+xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t kc,
+ xkb_mod_mask_t mask)
{
const struct xkb_key *key = XkbKey(xkb_state_get_map(state), kc);
if (!key)
char name[XKB_KEY_NAME_LENGTH];
enum xkb_explicit_components explicit;
- xkb_group_mask_t explicit_groups;
+ xkb_layout_mask_t explicit_groups;
unsigned char modmap;
xkb_mod_mask_t vmodmap;
unsigned kt_index[XKB_NUM_GROUPS];
- xkb_group_index_t num_groups;
+ xkb_layout_index_t num_groups;
/* How many levels the largest group has. */
xkb_level_index_t width;
enum xkb_range_exceed_type out_of_range_group_action;
- xkb_group_index_t out_of_range_group_number;
+ xkb_layout_index_t out_of_range_group_number;
/* per level/group index into 'syms' */
int *sym_index;
struct xkb_context *ctx;
int refcnt;
- enum xkb_map_compile_flags flags;
+ enum xkb_keymap_compile_flags flags;
unsigned int enabled_ctrls;
xkb_atom_t vmod_names[XKB_NUM_VIRTUAL_MODS];
/* Number of groups in the key with the most groups. */
- xkb_group_index_t num_groups;
+ xkb_layout_index_t num_groups;
xkb_atom_t group_names[XKB_NUM_GROUPS];
struct xkb_indicator_map indicators[XKB_NUM_INDICATORS];
static inline struct xkb_key_type *
XkbKeyType(struct xkb_keymap *keymap, const struct xkb_key *key,
- xkb_group_index_t group)
+ xkb_layout_index_t layout)
{
- return &keymap->types[key->kt_index[group]];
+ return &keymap->types[key->kt_index[layout]];
}
static inline xkb_level_index_t
XkbKeyGroupWidth(struct xkb_keymap *keymap, const struct xkb_key *key,
- xkb_group_index_t group)
+ xkb_layout_index_t layout)
{
- return XkbKeyType(keymap, key, group)->num_levels;
+ return XkbKeyType(keymap, key, layout)->num_levels;
}
static inline unsigned int
-XkbKeyNumSyms(const struct xkb_key *key, xkb_group_index_t group,
+XkbKeyNumSyms(const struct xkb_key *key, xkb_layout_index_t layout,
xkb_level_index_t level)
{
- return key->num_syms[group * key->width + level];
+ return key->num_syms[layout * key->width + level];
}
static inline const xkb_keysym_t *
-XkbKeySymEntry(const struct xkb_key *key, xkb_group_index_t group,
+XkbKeySymEntry(const struct xkb_key *key, xkb_layout_index_t layout,
xkb_level_index_t level)
{
- return &key->syms[key->sym_index[group * key->width + level]];
+ return &key->syms[key->sym_index[layout * key->width + level]];
}
static inline const union xkb_action *
-XkbKeyActionEntry(const struct xkb_key *key, xkb_group_index_t group,
+XkbKeyActionEntry(const struct xkb_key *key, xkb_layout_index_t layout,
xkb_level_index_t level)
{
- return &key->actions[key->width * group + level];
+ return &key->actions[key->width * layout + level];
}
struct xkb_keymap *
xkb_map_new(struct xkb_context *ctx);
-xkb_group_index_t
+xkb_layout_index_t
xkb_key_get_group(struct xkb_state *state, const struct xkb_key *key);
xkb_level_index_t
xkb_key_get_level(struct xkb_state *state, const struct xkb_key *key,
- xkb_group_index_t group);
+ xkb_layout_index_t layout);
int
xkb_key_get_syms_by_level(struct xkb_keymap *keymap,
const struct xkb_key *key,
- xkb_group_index_t group, xkb_level_index_t level,
+ xkb_layout_index_t layout, xkb_level_index_t level,
const xkb_keysym_t **syms_out);
#endif
#ifndef _XKBCOMMON_COMPAT_H
#define _XKBCOMMON_COMPAT_H
+/**
+ * Renamed keymap API.
+ */
+#define xkb_group_index_t xkb_layout_index_t
+#define xkb_group_mask_t xkb_layout_mask_t
+#define xkb_map_compile_flags xkb_keymap_compile_flags
+#define XKB_GROUP_INVALID XKB_LAYOUT_INVALID
+
+#define xkb_map_new_from_names(context, names, flags) \
+ xkb_keymap_new_from_names(context, names, flags)
+#define xkb_map_new_from_file(context, file, format, flags) \
+ xkb_keymap_new_from_file(context, file, format, flags)
+#define xkb_map_new_from_string(context, string, format, flags) \
+ xkb_keymap_new_from_string(context, string, format, flags)
+#define xkb_map_get_as_string(keymap) xkb_keymap_get_as_string(keymap)
+#define xkb_map_ref(keymap) xkb_keymap_ref(keymap)
+#define xkb_map_unref(keymap) xkb_keymap_unref(keymap)
+
+#define xkb_map_num_mods(keymap) xkb_keymap_num_mods(keymap)
+#define xkb_map_mod_get_name(keymap, idx) xkb_keymap_mod_get_name(keymap, idx)
+#define xkb_map_mod_get_index(keymap, str) xkb_keymap_mod_get_index(keymap, str)
+#define xkb_key_mod_index_is_consumed(state, key, mod) \
+ xkb_state_mod_index_is_consumed(state, key, mod)
+#define xkb_key_mod_mask_remove_consumed(state, key, modmask) \
+ xkb_state_mod_mask_remove_consumed(state, key, modmask)
+
+#define xkb_map_num_groups(keymap) xkb_keymap_num_layouts(keymap)
+#define xkb_key_num_groups(keymap, key) \
+ xkb_keymap_num_layouts_for_key(keymap, key)
+#define xkb_map_group_get_name(keymap, idx) \
+ xkb_keymap_layout_get_name(keymap, idx)
+#define xkb_map_group_get_index(keymap, str) \
+ xkb_keymap_layout_get_index(keymap, str)
+
+#define xkb_map_num_leds(keymap) xkb_keymap_num_leds(keymap)
+#define xkb_map_led_get_name(keymap, idx) xkb_keymap_led_get_name(keymap, idx)
+#define xkb_map_led_get_index(keymap, str) \
+ xkb_keymap_led_get_index(keymap, str)
+
+#define xkb_key_repeats(keymap, key) xkb_keymap_key_repeats(keymap, key)
+
+#define xkb_key_get_syms(state, key, syms_out) \
+ xkb_state_key_get_syms(state, key, syms_out)
+
+#define xkb_state_group_name_is_active(state, name, type) \
+ xkb_state_layout_name_is_active(state, name, type)
+#define xkb_state_group_index_is_active(state, idx, type) \
+ xkb_state_layout_index_is_active(state, idx, type)
+
+#define xkb_state_serialize_group(state, component) \
+ xkb_state_serialize_layout(state, component)
+
+#define xkb_state_get_map(state) xkb_state_get_keymap(state)
+
#endif
typedef uint32_t xkb_keysym_t;
typedef uint32_t xkb_mod_index_t;
typedef uint32_t xkb_mod_mask_t;
-typedef uint32_t xkb_group_index_t;
-typedef uint32_t xkb_group_mask_t;
+typedef uint32_t xkb_layout_index_t;
+typedef uint32_t xkb_layout_mask_t;
typedef uint32_t xkb_led_index_t;
+typedef uint32_t xkb_led_mask_t;
#define XKB_MOD_INVALID (0xffffffff)
-#define XKB_GROUP_INVALID (0xffffffff)
+#define XKB_LAYOUT_INVALID (0xffffffff)
#define XKB_KEYCODE_INVALID (0xffffffff)
#define XKB_LED_INVALID (0xffffffff)
* @{
*/
-enum xkb_map_compile_flags {
+enum xkb_keymap_compile_flags {
/** Apparently you can't have empty enums. What a drag. */
XKB_MAP_COMPILE_PLACEHOLDER = 0,
};
* keymaps.
*/
struct xkb_keymap *
-xkb_map_new_from_names(struct xkb_context *context,
- const struct xkb_rule_names *names,
- enum xkb_map_compile_flags flags);
+xkb_keymap_new_from_names(struct xkb_context *context,
+ const struct xkb_rule_names *names,
+ enum xkb_keymap_compile_flags flags);
enum xkb_keymap_format {
/** The current/classic XKB text format, as generated by xkbcomp -xkb. */
* file.
*/
struct xkb_keymap *
-xkb_map_new_from_file(struct xkb_context *context, FILE *file,
- enum xkb_keymap_format format,
- enum xkb_map_compile_flags flags);
+xkb_keymap_new_from_file(struct xkb_context *context, FILE *file,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags);
/**
* Creates an XKB keymap from a full text XKB keymap serialized into one
* enormous string.
*/
struct xkb_keymap *
-xkb_map_new_from_string(struct xkb_context *context, const char *string,
- enum xkb_keymap_format format,
- enum xkb_map_compile_flags flags);
+xkb_keymap_new_from_string(struct xkb_context *context, const char *string,
+ enum xkb_keymap_format format,
+ enum xkb_keymap_compile_flags flags);
/**
* Returns the compiled XKB map as a string which can later be fed back into
* xkb_map_new_from_string to return the exact same keymap.
*/
char *
-xkb_map_get_as_string(struct xkb_keymap *keymap);
+xkb_keymap_get_as_string(struct xkb_keymap *keymap);
/**
* Takes a new reference on a keymap.
*/
struct xkb_keymap *
-xkb_map_ref(struct xkb_keymap *keymap);
+xkb_keymap_ref(struct xkb_keymap *keymap);
/**
* Releases a reference on a keymap.
*/
void
-xkb_map_unref(struct xkb_keymap *keymap);
+xkb_keymap_unref(struct xkb_keymap *keymap);
/** @} */
* Returns the number of modifiers active in the keymap.
*/
xkb_mod_index_t
-xkb_map_num_mods(struct xkb_keymap *keymap);
+xkb_keymap_num_mods(struct xkb_keymap *keymap);
/**
* Returns the name of the modifier specified by 'idx', or NULL if invalid.
*/
const char *
-xkb_map_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx);
+xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx);
/**
* Returns the index of the modifier specified by 'name', or XKB_MOD_INVALID.
*/
xkb_mod_index_t
-xkb_map_mod_get_index(struct xkb_keymap *keymap, const char *name);
+xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name);
/**
* Returns the number of groups active in the keymap.
*/
-xkb_group_index_t
-xkb_map_num_groups(struct xkb_keymap *keymap);
+xkb_layout_index_t
+xkb_keymap_num_layouts(struct xkb_keymap *keymap);
/**
* Returns the name of the group specified by 'idx', or NULL if invalid.
*/
const char *
-xkb_map_group_get_name(struct xkb_keymap *keymap, xkb_group_index_t idx);
+xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx);
/**
- * Returns the index of the group specified by 'name', or XKB_GROUP_INVALID.
+ * Returns the index of the layout specified by 'name', or XKB_LAYOUT_INVALID.
*/
-xkb_group_index_t
-xkb_map_group_get_index(struct xkb_keymap *keymap, const char *name);
+xkb_layout_index_t
+xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name);
/**
- * Returns the number of groups active for the specified key.
+ * Returns the number of layouts active for the specified key.
*/
-xkb_group_index_t
-xkb_key_num_groups(struct xkb_keymap *keymap, xkb_keycode_t key);
+xkb_layout_index_t
+xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t key);
/**
* Returns 1 if the key should repeat, or 0 otherwise.
*/
int
-xkb_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key);
+xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key);
/**
* Returns the number of LEDs in the given map.
*/
xkb_led_index_t
-xkb_map_num_leds(struct xkb_keymap *keymap);
+xkb_keymap_num_leds(struct xkb_keymap *keymap);
/**
* Returns the name of the LED specified by 'idx', or NULL if invalid.
*/
const char *
-xkb_map_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx);
+xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx);
/**
* Returns the index of the LED specified by 'name', or XKB_LED_INVALID.
*/
xkb_led_index_t
-xkb_map_led_get_index(struct xkb_keymap *keymap, const char *name);
+xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name);
/** @} */
* if you plan to use it beyond the lifetime of the state.
*/
struct xkb_keymap *
-xkb_state_get_map(struct xkb_state *state);
+xkb_state_get_keymap(struct xkb_state *state);
enum xkb_key_direction {
XKB_KEY_UP,
* return value being the number of symbols in *syms_out. If the return
* value is 0, *syms_out will be set to NULL, as there are no symbols produced
* by this event.
- *
- * This should be called before xkb_state_update_key.
*/
int
-xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
- const xkb_keysym_t **syms_out);
+xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
+ const xkb_keysym_t **syms_out);
/**
* Modifier and group types for state objects. This enum is bitmaskable,
void
xkb_state_update_mask(struct xkb_state *state, xkb_mod_mask_t base_mods,
xkb_mod_mask_t latched_mods, xkb_mod_mask_t locked_mods,
- xkb_group_index_t base_group,
- xkb_group_index_t latched_group,
- xkb_group_index_t locked_group);
+ xkb_layout_index_t base_group,
+ xkb_layout_index_t latched_group,
+ xkb_layout_index_t locked_group);
/**
* The counterpart to xkb_state_update_mask, to be used on the server side
* The group equivalent of xkb_state_serialize_mods: please see its
* documentation.
*/
-xkb_group_index_t
-xkb_state_serialize_group(struct xkb_state *state,
- enum xkb_state_component component);
+xkb_layout_index_t
+xkb_state_serialize_layout(struct xkb_state *state,
+ enum xkb_state_component component);
/**
* Returns 1 if the modifier specified by 'name' is active in the manner
* Returns 0 otherwise.
*/
int
-xkb_key_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t key,
- xkb_mod_index_t idx);
+xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t key,
+ xkb_mod_index_t idx);
/**
* Takes the given modifier mask, and removes all modifiers which are
* for that particular key.
*/
xkb_mod_mask_t
-xkb_key_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t key,
- xkb_mod_mask_t mask);
+xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t key,
+ xkb_mod_mask_t mask);
/**
* Returns 1 if the group specified by 'name' is active in the manner
* exist in the current map.
*/
int
-xkb_state_group_name_is_active(struct xkb_state *state, const char *name,
- enum xkb_state_component type);
+xkb_state_layout_name_is_active(struct xkb_state *state, const char *name,
+ enum xkb_state_component type);
/**
* Returns 1 if the group specified by 'idx' is active in the manner
* exist in the current map.
*/
int
-xkb_state_group_index_is_active(struct xkb_state *state,
- xkb_group_index_t idx,
- enum xkb_state_component type);
+xkb_state_layout_index_is_active(struct xkb_state *state,
+ xkb_layout_index_t idx,
+ enum xkb_state_component type);
/**
* Returns 1 if the LED specified by 'name' is active, 0 if it is unset, or