Rename xkb_desc to xkb_keymap

struct xkb_desc was just a hangover from the old XkbDescRec, which isn't
a very descriptive name.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
master
Daniel Stone 2012-04-03 15:14:16 +01:00
parent bc872252f3
commit ef88c7efab
34 changed files with 202 additions and 202 deletions

View File

@ -144,7 +144,7 @@ struct xkb_context;
* Opaque keymap object; may only be created, accessed, manipulated and * Opaque keymap object; may only be created, accessed, manipulated and
* destroyed through the xkb_state_*() API. * destroyed through the xkb_state_*() API.
*/ */
struct xkb_desc; struct xkb_keymap;
/** /**
* Opaque state object; may only be created, accessed, manipulated and * Opaque state object; may only be created, accessed, manipulated and
@ -272,7 +272,7 @@ xkb_context_unref(struct xkb_context *context);
* You should almost certainly be using this and nothing else to create * You should almost certainly be using this and nothing else to create
* keymaps. * keymaps.
*/ */
_X_EXPORT extern struct xkb_desc * _X_EXPORT extern struct xkb_keymap *
xkb_map_new_from_names(struct xkb_context *context, xkb_map_new_from_names(struct xkb_context *context,
const struct xkb_rule_names *names); const struct xkb_rule_names *names);
@ -286,7 +286,7 @@ xkb_map_new_from_names(struct xkb_context *context,
* *
* Geometry will be ignored since xkbcommon does not support it in any way. * Geometry will be ignored since xkbcommon does not support it in any way.
*/ */
_X_EXPORT extern struct xkb_desc * _X_EXPORT extern struct xkb_keymap *
xkb_map_new_from_kccgst(struct xkb_context *context, xkb_map_new_from_kccgst(struct xkb_context *context,
const struct xkb_component_names *kccgst); const struct xkb_component_names *kccgst);
@ -299,7 +299,7 @@ enum xkb_keymap_format {
* Creates an XKB keymap from a full text XKB keymap passed into the * Creates an XKB keymap from a full text XKB keymap passed into the
* file descriptor. * file descriptor.
*/ */
_X_EXPORT extern struct xkb_desc * _X_EXPORT extern struct xkb_keymap *
xkb_map_new_from_fd(struct xkb_context *context, xkb_map_new_from_fd(struct xkb_context *context,
int fd, enum xkb_keymap_format format); int fd, enum xkb_keymap_format format);
@ -307,7 +307,7 @@ xkb_map_new_from_fd(struct xkb_context *context,
* Creates an XKB keymap from a full text XKB keymap serialised into one * Creates an XKB keymap from a full text XKB keymap serialised into one
* enormous string. * enormous string.
*/ */
_X_EXPORT extern struct xkb_desc * _X_EXPORT extern struct xkb_keymap *
xkb_map_new_from_string(struct xkb_context *context, xkb_map_new_from_string(struct xkb_context *context,
const char *string, const char *string,
enum xkb_keymap_format format); enum xkb_keymap_format format);
@ -316,13 +316,13 @@ xkb_map_new_from_string(struct xkb_context *context,
* Takes a new reference on a keymap. * Takes a new reference on a keymap.
*/ */
_X_EXPORT extern void _X_EXPORT extern void
xkb_map_ref(struct xkb_desc *xkb); xkb_map_ref(struct xkb_keymap *xkb);
/** /**
* Releases a reference on a keymap. * Releases a reference on a keymap.
*/ */
_X_EXPORT extern void _X_EXPORT extern void
xkb_map_unref(struct xkb_desc *xkb); xkb_map_unref(struct xkb_keymap *xkb);
/** @} */ /** @} */
@ -338,61 +338,61 @@ xkb_map_unref(struct xkb_desc *xkb);
* Returns the number of modifiers active in the keymap. * Returns the number of modifiers active in the keymap.
*/ */
_X_EXPORT xkb_mod_index_t _X_EXPORT xkb_mod_index_t
xkb_map_num_mods(struct xkb_desc *xkb); xkb_map_num_mods(struct xkb_keymap *xkb);
/** /**
* Returns the name of the modifier specified by 'idx', or NULL if invalid. * Returns the name of the modifier specified by 'idx', or NULL if invalid.
*/ */
_X_EXPORT const char * _X_EXPORT const char *
xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx); xkb_map_mod_get_name(struct xkb_keymap *xkb, xkb_mod_index_t idx);
/** /**
* Returns the index of the modifier specified by 'name', or XKB_MOD_INVALID. * Returns the index of the modifier specified by 'name', or XKB_MOD_INVALID.
*/ */
_X_EXPORT xkb_mod_index_t _X_EXPORT xkb_mod_index_t
xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name); xkb_map_mod_get_index(struct xkb_keymap *xkb, const char *name);
/** /**
* Returns the number of groups active in the keymap. * Returns the number of groups active in the keymap.
*/ */
_X_EXPORT xkb_group_index_t _X_EXPORT xkb_group_index_t
xkb_map_num_groups(struct xkb_desc *xkb); xkb_map_num_groups(struct xkb_keymap *xkb);
/** /**
* Returns the name of the group specified by 'idx', or NULL if invalid. * Returns the name of the group specified by 'idx', or NULL if invalid.
*/ */
_X_EXPORT const char * _X_EXPORT const char *
xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx); xkb_map_group_get_name(struct xkb_keymap *xkb, xkb_group_index_t idx);
/** /**
* Returns the index of the group specified by 'name', or XKB_GROUP_INVALID. * Returns the index of the group specified by 'name', or XKB_GROUP_INVALID.
*/ */
_X_EXPORT xkb_group_index_t _X_EXPORT xkb_group_index_t
xkb_map_group_get_index(struct xkb_desc *xkb, const char *name); xkb_map_group_get_index(struct xkb_keymap *xkb, const char *name);
/** /**
* Returns the number of groups active for the specified key. * Returns the number of groups active for the specified key.
*/ */
_X_EXPORT xkb_group_index_t _X_EXPORT xkb_group_index_t
xkb_key_num_groups(struct xkb_desc *xkb, xkb_keycode_t key); xkb_key_num_groups(struct xkb_keymap *xkb, xkb_keycode_t key);
/** /**
* Returns the number of LEDs in the given map. * Returns the number of LEDs in the given map.
*/ */
_X_EXPORT xkb_led_index_t _X_EXPORT xkb_led_index_t
xkb_map_num_leds(struct xkb_desc *xkb); xkb_map_num_leds(struct xkb_keymap *xkb);
/** /**
* Returns the name of the LED specified by 'idx', or NULL if invalid. * Returns the name of the LED specified by 'idx', or NULL if invalid.
*/ */
_X_EXPORT const char * _X_EXPORT const char *
xkb_map_led_get_name(struct xkb_desc *xkb, xkb_led_index_t idx); xkb_map_led_get_name(struct xkb_keymap *xkb, xkb_led_index_t idx);
/** /**
* Returns the index of the LED specified by 'name', or XKB_LED_INVALID. * Returns the index of the LED specified by 'name', or XKB_LED_INVALID.
*/ */
_X_EXPORT xkb_led_index_t _X_EXPORT xkb_led_index_t
xkb_map_led_get_index(struct xkb_desc *xkb, const char *name); xkb_map_led_get_index(struct xkb_keymap *xkb, const char *name);
/** @} */ /** @} */
@ -409,7 +409,7 @@ xkb_map_led_get_index(struct xkb_desc *xkb, const char *name);
* failure. * failure.
*/ */
_X_EXPORT struct xkb_state * _X_EXPORT struct xkb_state *
xkb_state_new(struct xkb_desc *xkb); xkb_state_new(struct xkb_keymap *xkb);
/** /**
* Adds a reference to a state object, so it will not be freed until unref. * Adds a reference to a state object, so it will not be freed until unref.

View File

@ -391,7 +391,7 @@ struct xkb_controls {
}; };
/* Common keyboard description structure */ /* Common keyboard description structure */
struct xkb_desc { struct xkb_keymap {
struct xkb_context *context; struct xkb_context *context;
unsigned int refcnt; unsigned int refcnt;
@ -456,7 +456,7 @@ struct xkb_state {
int refcnt; int refcnt;
void *filters; void *filters;
int num_filters; int num_filters;
struct xkb_desc *xkb; struct xkb_keymap *xkb;
}; };
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) #define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)

View File

@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XKB.h> #include <X11/extensions/XKB.h>
int int
XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI) XkbcAllocCompatMap(struct xkb_keymap * xkb, unsigned which, unsigned nSI)
{ {
struct xkb_compat_map * compat; struct xkb_compat_map * compat;
struct xkb_sym_interpret *prev_interpret; struct xkb_sym_interpret *prev_interpret;
@ -84,7 +84,7 @@ XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI)
static void static void
XkbcFreeCompatMap(struct xkb_desc * xkb) XkbcFreeCompatMap(struct xkb_keymap * xkb)
{ {
struct xkb_compat_map * compat; struct xkb_compat_map * compat;
@ -99,7 +99,7 @@ XkbcFreeCompatMap(struct xkb_desc * xkb)
} }
int int
XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases) XkbcAllocNames(struct xkb_keymap * xkb, unsigned which, unsigned nTotalAliases)
{ {
struct xkb_names * names; struct xkb_names * names;
@ -163,7 +163,7 @@ XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases)
} }
static void static void
XkbcFreeNames(struct xkb_desc * xkb) XkbcFreeNames(struct xkb_keymap * xkb)
{ {
struct xkb_names * names; struct xkb_names * names;
struct xkb_client_map * map; struct xkb_client_map * map;
@ -201,7 +201,7 @@ XkbcFreeNames(struct xkb_desc * xkb)
} }
int int
XkbcAllocControls(struct xkb_desc * xkb, unsigned which) XkbcAllocControls(struct xkb_keymap * xkb, unsigned which)
{ {
if (!xkb) if (!xkb)
return BadMatch; return BadMatch;
@ -223,7 +223,7 @@ XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
} }
static void static void
XkbcFreeControls(struct xkb_desc * xkb) XkbcFreeControls(struct xkb_keymap * xkb)
{ {
if (xkb && xkb->ctrls) { if (xkb && xkb->ctrls) {
free(xkb->ctrls->per_key_repeat); free(xkb->ctrls->per_key_repeat);
@ -233,7 +233,7 @@ XkbcFreeControls(struct xkb_desc * xkb)
} }
int int
XkbcAllocIndicatorMaps(struct xkb_desc * xkb) XkbcAllocIndicatorMaps(struct xkb_keymap * xkb)
{ {
if (!xkb) if (!xkb)
return BadMatch; return BadMatch;
@ -248,7 +248,7 @@ XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
} }
static void static void
XkbcFreeIndicatorMaps(struct xkb_desc * xkb) XkbcFreeIndicatorMaps(struct xkb_keymap * xkb)
{ {
if (xkb) { if (xkb) {
free(xkb->indicators); free(xkb->indicators);
@ -256,12 +256,12 @@ XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
} }
} }
struct xkb_desc * struct xkb_keymap *
XkbcAllocKeyboard(struct xkb_context *context) XkbcAllocKeyboard(struct xkb_context *context)
{ {
struct xkb_desc *xkb; struct xkb_keymap *xkb;
xkb = uTypedCalloc(1, struct xkb_desc); xkb = uTypedCalloc(1, struct xkb_keymap);
if (!xkb) if (!xkb)
return NULL; return NULL;
@ -273,7 +273,7 @@ XkbcAllocKeyboard(struct xkb_context *context)
} }
void void
XkbcFreeKeyboard(struct xkb_desc * xkb) XkbcFreeKeyboard(struct xkb_keymap * xkb)
{ {
if (!xkb) if (!xkb)
return; return;

View File

@ -30,7 +30,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBcommonint.h" #include "XKBcommonint.h"
int int
XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes) XkbcAllocClientMap(struct xkb_keymap * xkb, unsigned which, unsigned nTotalTypes)
{ {
struct xkb_client_map * map; struct xkb_client_map * map;
@ -101,7 +101,7 @@ XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
} }
int int
XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions) XkbcAllocServerMap(struct xkb_keymap * xkb, unsigned which, unsigned nNewActions)
{ {
unsigned i; unsigned i;
struct xkb_server_map * map; struct xkb_server_map * map;
@ -241,7 +241,7 @@ XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type * into)
} }
Bool Bool
XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key, XkbcResizeKeySyms(struct xkb_keymap * xkb, xkb_keycode_t key,
unsigned int needed) unsigned int needed)
{ {
if (xkb->map->key_sym_map[key].size_syms >= needed) if (xkb->map->key_sym_map[key].size_syms >= needed)
@ -262,7 +262,7 @@ XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key,
} }
union xkb_action * union xkb_action *
XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed) XkbcResizeKeyActions(struct xkb_keymap * xkb, xkb_keycode_t key, uint32_t needed)
{ {
xkb_keycode_t i, nActs; xkb_keycode_t i, nActs;
union xkb_action *newActs; union xkb_action *newActs;
@ -322,7 +322,7 @@ XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed)
} }
void void
XkbcFreeClientMap(struct xkb_desc * xkb) XkbcFreeClientMap(struct xkb_keymap * xkb)
{ {
struct xkb_client_map * map; struct xkb_client_map * map;
struct xkb_key_type * type; struct xkb_key_type * type;
@ -360,7 +360,7 @@ XkbcFreeClientMap(struct xkb_desc * xkb)
} }
void void
XkbcFreeServerMap(struct xkb_desc * xkb) XkbcFreeServerMap(struct xkb_keymap * xkb)
{ {
struct xkb_server_map * map; struct xkb_server_map * map;

View File

@ -62,7 +62,7 @@
* Returns the total number of modifiers active in the keymap. * Returns the total number of modifiers active in the keymap.
*/ */
xkb_mod_index_t xkb_mod_index_t
xkb_map_num_mods(struct xkb_desc *xkb) xkb_map_num_mods(struct xkb_keymap *xkb)
{ {
xkb_mod_index_t i; xkb_mod_index_t i;
@ -79,7 +79,7 @@ xkb_map_num_mods(struct xkb_desc *xkb)
* Return the name for a given modifier. * Return the name for a given modifier.
*/ */
const char * const char *
xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx) xkb_map_mod_get_name(struct xkb_keymap *xkb, xkb_mod_index_t idx)
{ {
if (idx >= xkb_map_num_mods(xkb)) if (idx >= xkb_map_num_mods(xkb))
return NULL; return NULL;
@ -114,7 +114,7 @@ xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx)
* Returns the index for a named modifier. * Returns the index for a named modifier.
*/ */
xkb_mod_index_t xkb_mod_index_t
xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name) xkb_map_mod_get_index(struct xkb_keymap *xkb, const char *name)
{ {
xkb_mod_index_t i; xkb_mod_index_t i;
@ -147,7 +147,7 @@ xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name)
* Return the total number of active groups in the keymap. * Return the total number of active groups in the keymap.
*/ */
xkb_group_index_t xkb_group_index_t
xkb_map_num_groups(struct xkb_desc *xkb) xkb_map_num_groups(struct xkb_keymap *xkb)
{ {
xkb_group_index_t ret = 0; xkb_group_index_t ret = 0;
xkb_group_index_t i; xkb_group_index_t i;
@ -163,7 +163,7 @@ xkb_map_num_groups(struct xkb_desc *xkb)
* Returns the name for a given group. * Returns the name for a given group.
*/ */
const char * const char *
xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx) xkb_map_group_get_name(struct xkb_keymap *xkb, xkb_group_index_t idx)
{ {
if (idx >= xkb_map_num_groups(xkb)) if (idx >= xkb_map_num_groups(xkb))
return NULL; return NULL;
@ -175,7 +175,7 @@ xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx)
* Returns the index for a named group. * Returns the index for a named group.
*/ */
xkb_group_index_t xkb_group_index_t
xkb_map_group_get_index(struct xkb_desc *xkb, const char *name) xkb_map_group_get_index(struct xkb_keymap *xkb, const char *name)
{ {
xkb_group_index_t num_groups = xkb_map_num_groups(xkb); xkb_group_index_t num_groups = xkb_map_num_groups(xkb);
xkb_group_index_t i; xkb_group_index_t i;
@ -192,7 +192,7 @@ xkb_map_group_get_index(struct xkb_desc *xkb, const char *name)
* Returns the number of groups active for a particular key. * Returns the number of groups active for a particular key.
*/ */
xkb_group_index_t xkb_group_index_t
xkb_key_num_groups(struct xkb_desc *xkb, xkb_keycode_t key) xkb_key_num_groups(struct xkb_keymap *xkb, xkb_keycode_t key)
{ {
return XkbKeyNumGroups(xkb, key); return XkbKeyNumGroups(xkb, key);
} }
@ -201,7 +201,7 @@ xkb_key_num_groups(struct xkb_desc *xkb, xkb_keycode_t key)
* Return the total number of active LEDs in the keymap. * Return the total number of active LEDs in the keymap.
*/ */
xkb_led_index_t xkb_led_index_t
xkb_map_num_leds(struct xkb_desc *xkb) xkb_map_num_leds(struct xkb_keymap *xkb)
{ {
xkb_led_index_t ret = 0; xkb_led_index_t ret = 0;
xkb_led_index_t i; xkb_led_index_t i;
@ -219,7 +219,7 @@ xkb_map_num_leds(struct xkb_desc *xkb)
* Returns the name for a given group. * Returns the name for a given group.
*/ */
const char * const char *
xkb_map_led_get_name(struct xkb_desc *xkb, xkb_led_index_t idx) xkb_map_led_get_name(struct xkb_keymap *xkb, xkb_led_index_t idx)
{ {
if (idx >= xkb_map_num_leds(xkb)) if (idx >= xkb_map_num_leds(xkb))
return NULL; return NULL;
@ -231,7 +231,7 @@ xkb_map_led_get_name(struct xkb_desc *xkb, xkb_led_index_t idx)
* Returns the index for a named group. * Returns the index for a named group.
*/ */
xkb_group_index_t xkb_group_index_t
xkb_map_led_get_index(struct xkb_desc *xkb, const char *name) xkb_map_led_get_index(struct xkb_keymap *xkb, const char *name)
{ {
xkb_led_index_t num_leds = xkb_map_num_leds(xkb); xkb_led_index_t num_leds = xkb_map_num_leds(xkb);
xkb_led_index_t i; xkb_led_index_t i;
@ -301,7 +301,7 @@ xkb_key_get_group(struct xkb_state *state, xkb_keycode_t key)
* As below, but takes an explicit group/level rather than state. * As below, but takes an explicit group/level rather than state.
*/ */
unsigned int unsigned int
xkb_key_get_syms_by_level(struct xkb_desc *xkb, xkb_keycode_t key, unsigned int group, xkb_key_get_syms_by_level(struct xkb_keymap *xkb, xkb_keycode_t key, unsigned int group,
unsigned int level, xkb_keysym_t **syms_out) unsigned int level, xkb_keysym_t **syms_out)
{ {
int num_syms; int num_syms;
@ -331,7 +331,7 @@ unsigned int
xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key, xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
xkb_keysym_t **syms_out) xkb_keysym_t **syms_out)
{ {
struct xkb_desc *xkb = state->xkb; struct xkb_keymap *xkb = state->xkb;
int group; int group;
int level; int level;

View File

@ -85,7 +85,7 @@ static struct xkb_key_type canonicalTypes[XkbNumRequiredTypes] = {
}; };
int int
XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod) XkbcInitCanonicalKeyTypes(struct xkb_keymap * xkb, unsigned which, int keypadVMod)
{ {
struct xkb_client_map * map; struct xkb_client_map * map;
struct xkb_key_type *from, *to; struct xkb_key_type *from, *to;
@ -142,7 +142,7 @@ XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod)
} }
Bool Bool
XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask, XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
unsigned *mask_rtrn) unsigned *mask_rtrn)
{ {
int i, bit; int i, bit;

View File

@ -460,7 +460,7 @@ xkb_filter_apply_all(struct xkb_state *state, xkb_keycode_t key,
} }
struct xkb_state * struct xkb_state *
xkb_state_new(struct xkb_desc *xkb) xkb_state_new(struct xkb_keymap *xkb)
{ {
struct xkb_state *ret; struct xkb_state *ret;

View File

@ -56,7 +56,7 @@ tbGetBuffer(unsigned int size)
} }
static const char * static const char *
XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx) XkbcVModIndexText(struct xkb_keymap * xkb, unsigned ndx)
{ {
int len; int len;
char *rtrn; char *rtrn;
@ -84,7 +84,7 @@ XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
} }
const char * const char *
XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask) XkbcVModMaskText(struct xkb_keymap * xkb, unsigned modMask, unsigned mask)
{ {
int i, bit, len, rem; int i, bit, len, rem;
const char *mm = NULL; const char *mm = NULL;

View File

@ -96,7 +96,7 @@ xkb_canonicalise_components(struct xkb_component_names * names,
} }
Bool Bool
XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type, XkbcComputeEffectiveMap(struct xkb_keymap * xkb, struct xkb_key_type * type,
unsigned char *map_rtrn) unsigned char *map_rtrn)
{ {
int i; int i;

View File

@ -32,48 +32,48 @@ authorization from the authors.
#include "XKBcommonint.h" #include "XKBcommonint.h"
extern int extern int
XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI); XkbcAllocCompatMap(struct xkb_keymap * xkb, unsigned which, unsigned nSI);
extern int extern int
XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases); XkbcAllocNames(struct xkb_keymap * xkb, unsigned which, unsigned nTotalAliases);
extern int extern int
XkbcAllocControls(struct xkb_desc * xkb, unsigned which); XkbcAllocControls(struct xkb_keymap * xkb, unsigned which);
extern int extern int
XkbcAllocIndicatorMaps(struct xkb_desc * xkb); XkbcAllocIndicatorMaps(struct xkb_keymap * xkb);
extern struct xkb_desc * extern struct xkb_keymap *
XkbcAllocKeyboard(struct xkb_context *context); XkbcAllocKeyboard(struct xkb_context *context);
extern void extern void
XkbcFreeKeyboard(struct xkb_desc * xkb); XkbcFreeKeyboard(struct xkb_keymap * xkb);
/***====================================================================***/ /***====================================================================***/
extern int extern int
XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes); XkbcAllocClientMap(struct xkb_keymap * xkb, unsigned which, unsigned nTotalTypes);
extern int extern int
XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions); XkbcAllocServerMap(struct xkb_keymap * xkb, unsigned which, unsigned nNewActions);
extern int extern int
XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type *into); XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type *into);
extern Bool extern Bool
XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed); XkbcResizeKeySyms(struct xkb_keymap * xkb, xkb_keycode_t key, uint32_t needed);
extern union xkb_action * extern union xkb_action *
XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed); XkbcResizeKeyActions(struct xkb_keymap * xkb, xkb_keycode_t key, uint32_t needed);
extern void extern void
XkbcFreeClientMap(struct xkb_desc * xkb); XkbcFreeClientMap(struct xkb_keymap * xkb);
extern void extern void
XkbcFreeServerMap(struct xkb_desc * xkb); XkbcFreeServerMap(struct xkb_keymap * xkb);
extern unsigned int extern unsigned int
xkb_key_get_syms_by_level(struct xkb_desc *xkb, xkb_keycode_t key, xkb_key_get_syms_by_level(struct xkb_keymap *xkb, xkb_keycode_t key,
unsigned int group, unsigned int level, unsigned int group, unsigned int level,
xkb_keysym_t **syms_out); xkb_keysym_t **syms_out);

View File

@ -212,7 +212,7 @@ ReportNotFound(unsigned action, unsigned field, const char *what,
} }
static Bool static Bool
HandleNoAction(struct xkb_desc * xkb, HandleNoAction(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -242,7 +242,7 @@ CheckLatchLockFlags(unsigned action,
} }
static Bool static Bool
CheckModifierField(struct xkb_desc * xkb, CheckModifierField(struct xkb_keymap * xkb,
unsigned action, unsigned action,
ExprDef * value, ExprDef * value,
unsigned *flags_inout, unsigned *mods_rtrn) unsigned *flags_inout, unsigned *mods_rtrn)
@ -270,7 +270,7 @@ CheckModifierField(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleSetLatchMods(struct xkb_desc * xkb, HandleSetLatchMods(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -315,7 +315,7 @@ HandleSetLatchMods(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleLockMods(struct xkb_desc * xkb, HandleLockMods(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -371,7 +371,7 @@ CheckGroupField(unsigned action,
} }
static Bool static Bool
HandleSetLatchGroup(struct xkb_desc * xkb, HandleSetLatchGroup(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -416,7 +416,7 @@ HandleSetLatchGroup(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleLockGroup(struct xkb_desc * xkb, HandleLockGroup(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -442,7 +442,7 @@ HandleLockGroup(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleMovePtr(struct xkb_desc * xkb, HandleMovePtr(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -497,7 +497,7 @@ static const LookupEntry lockWhich[] = {
}; };
static Bool static Bool
HandlePtrBtn(struct xkb_desc * xkb, HandlePtrBtn(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -557,7 +557,7 @@ static const LookupEntry ptrDflts[] = {
}; };
static Bool static Bool
HandleSetPtrDflt(struct xkb_desc * xkb, HandleSetPtrDflt(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -629,7 +629,7 @@ static const LookupEntry isoNames[] = {
}; };
static Bool static Bool
HandleISOLock(struct xkb_desc * xkb, HandleISOLock(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -676,7 +676,7 @@ HandleISOLock(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleSwitchScreen(struct xkb_desc * xkb, HandleSwitchScreen(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -751,7 +751,7 @@ const LookupEntry ctrlNames[] = {
}; };
static Bool static Bool
HandleSetLockControls(struct xkb_desc * xkb, HandleSetLockControls(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -782,7 +782,7 @@ static const LookupEntry evNames[] = {
}; };
static Bool static Bool
HandleActionMessage(struct xkb_desc * xkb, HandleActionMessage(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -860,7 +860,7 @@ HandleActionMessage(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleRedirectKey(struct xkb_desc * xkb, HandleRedirectKey(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -912,7 +912,7 @@ HandleRedirectKey(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleDeviceBtn(struct xkb_desc * xkb, HandleDeviceBtn(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -981,7 +981,7 @@ HandleDeviceBtn(struct xkb_desc * xkb,
} }
static Bool static Bool
HandleDeviceValuator(struct xkb_desc * xkb, HandleDeviceValuator(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -996,7 +996,7 @@ HandleDeviceValuator(struct xkb_desc * xkb,
} }
static Bool static Bool
HandlePrivate(struct xkb_desc * xkb, HandlePrivate(struct xkb_keymap * xkb,
struct xkb_any_action * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
@ -1065,7 +1065,7 @@ HandlePrivate(struct xkb_desc * xkb,
return ReportIllegal(PrivateAction, field); return ReportIllegal(PrivateAction, field);
} }
typedef Bool(*actionHandler) (struct xkb_desc * /* xkb */ , typedef Bool(*actionHandler) (struct xkb_keymap * /* xkb */ ,
struct xkb_any_action * /* action */ , struct xkb_any_action * /* action */ ,
unsigned /* field */ , unsigned /* field */ ,
ExprDef * /* array_ndx */ , ExprDef * /* array_ndx */ ,
@ -1119,7 +1119,7 @@ ActionsInit(void);
int int
HandleActionDef(ExprDef * def, HandleActionDef(ExprDef * def,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info) struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info)
{ {
ExprDef *arg; ExprDef *arg;
@ -1226,7 +1226,7 @@ HandleActionDef(ExprDef * def,
/***====================================================================***/ /***====================================================================***/
int int
SetActionField(struct xkb_desc * xkb, SetActionField(struct xkb_keymap * xkb,
char *elem, char *elem,
char *field, char *field,
ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn) ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn)

View File

@ -65,13 +65,13 @@ typedef struct _ActionInfo
} ActionInfo; } ActionInfo;
extern int HandleActionDef(ExprDef * /* def */ , extern int HandleActionDef(ExprDef * /* def */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
struct xkb_any_action * /* action */ , struct xkb_any_action * /* action */ ,
unsigned /* mergeMode */ , unsigned /* mergeMode */ ,
ActionInfo * /* info */ ActionInfo * /* info */
); );
extern int SetActionField(struct xkb_desc * /* xkb */ , extern int SetActionField(struct xkb_keymap * /* xkb */ ,
char * /* elem */ , char * /* elem */ ,
char * /* field */ , char * /* field */ ,
ExprDef * /* index */ , ExprDef * /* index */ ,

View File

@ -151,7 +151,7 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
} }
int int
ApplyAliases(struct xkb_desc * xkb, AliasInfo ** info_in) ApplyAliases(struct xkb_keymap * xkb, AliasInfo ** info_in)
{ {
int i; int i;
struct xkb_key_alias *old, *a; struct xkb_key_alias *old, *a;

View File

@ -48,7 +48,7 @@ extern Bool MergeAliases(AliasInfo ** /* into */ ,
unsigned /* how_merge */ unsigned /* how_merge */
); );
extern int ApplyAliases(struct xkb_desc * /* xkb */ , extern int ApplyAliases(struct xkb_keymap * /* xkb */ ,
AliasInfo ** /* info */ AliasInfo ** /* info */
); );

View File

@ -68,7 +68,7 @@ typedef struct _CompatInfo
LEDInfo *leds; LEDInfo *leds;
VModInfo vmods; VModInfo vmods;
ActionInfo *act; ActionInfo *act;
struct xkb_desc * xkb; struct xkb_keymap * xkb;
} CompatInfo; } CompatInfo;
/***====================================================================***/ /***====================================================================***/
@ -100,7 +100,7 @@ siText(SymInterpInfo * si, CompatInfo * info)
} }
static void static void
InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb) InitCompatInfo(CompatInfo * info, struct xkb_keymap * xkb)
{ {
unsigned int i; unsigned int i;
@ -130,7 +130,7 @@ InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
} }
static void static void
ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb) ClearCompatInfo(CompatInfo * info, struct xkb_keymap * xkb)
{ {
unsigned int i; unsigned int i;
ActionInfo *next; ActionInfo *next;
@ -389,14 +389,14 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
} }
typedef void (*FileHandler) (XkbFile * /* rtrn */ , typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
unsigned /* merge */ , unsigned /* merge */ ,
CompatInfo * /* info */ CompatInfo * /* info */
); );
static Bool static Bool
HandleIncludeCompatMap(IncludeStmt * stmt, HandleIncludeCompatMap(IncludeStmt * stmt,
struct xkb_desc * xkb, CompatInfo * info, FileHandler hndlr) struct xkb_keymap * xkb, CompatInfo * info, FileHandler hndlr)
{ {
unsigned newMerge; unsigned newMerge;
XkbFile *rtrn; XkbFile *rtrn;
@ -496,7 +496,7 @@ static const LookupEntry useModMapValues[] = {
static int static int
SetInterpField(SymInterpInfo * si, SetInterpField(SymInterpInfo * si,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
char *field, char *field,
ExprDef * arrayNdx, ExprDef * value, CompatInfo * info) ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
{ {
@ -583,7 +583,7 @@ SetInterpField(SymInterpInfo * si,
} }
static int static int
HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info) HandleInterpVar(VarDef * stmt, struct xkb_keymap * xkb, CompatInfo * info)
{ {
ExprResult elem, field; ExprResult elem, field;
ExprDef *ndx; ExprDef *ndx;
@ -606,7 +606,7 @@ HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
} }
static int static int
HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si, HandleInterpBody(VarDef * def, struct xkb_keymap * xkb, SymInterpInfo * si,
CompatInfo * info) CompatInfo * info)
{ {
int ok = 1; int ok = 1;
@ -631,7 +631,7 @@ HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
} }
static int static int
HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge, HandleInterpDef(InterpDef * def, struct xkb_keymap * xkb, unsigned merge,
CompatInfo * info) CompatInfo * info)
{ {
unsigned pred, mods; unsigned pred, mods;
@ -672,7 +672,7 @@ HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
static int static int
HandleGroupCompatDef(GroupCompatDef * def, HandleGroupCompatDef(GroupCompatDef * def,
struct xkb_desc * xkb, unsigned merge, CompatInfo * info) struct xkb_keymap * xkb, unsigned merge, CompatInfo * info)
{ {
ExprResult val; ExprResult val;
GroupCompatInfo tmp; GroupCompatInfo tmp;
@ -704,7 +704,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
static void static void
HandleCompatMapFile(XkbFile * file, HandleCompatMapFile(XkbFile * file,
struct xkb_desc * xkb, unsigned merge, CompatInfo * info) struct xkb_keymap * xkb, unsigned merge, CompatInfo * info)
{ {
ParseCommon *stmt; ParseCommon *stmt;
@ -795,7 +795,7 @@ CopyInterps(CompatInfo * info,
} }
Bool Bool
CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge, CompileCompatMap(XkbFile *file, struct xkb_keymap * xkb, unsigned merge,
LEDInfoPtr *unboundLEDs) LEDInfoPtr *unboundLEDs)
{ {
int i; int i;
@ -854,7 +854,7 @@ CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
} }
static uint32_t static uint32_t
VModsToReal(struct xkb_desc *xkb, uint32_t vmodmask) VModsToReal(struct xkb_keymap *xkb, uint32_t vmodmask)
{ {
uint32_t ret = 0; uint32_t ret = 0;
int i; int i;
@ -872,7 +872,7 @@ VModsToReal(struct xkb_desc *xkb, uint32_t vmodmask)
} }
static void static void
UpdateActionMods(struct xkb_desc *xkb, union xkb_action *act, uint32_t rmodmask) UpdateActionMods(struct xkb_keymap *xkb, union xkb_action *act, uint32_t rmodmask)
{ {
switch (act->type) { switch (act->type) {
case XkbSA_SetMods: case XkbSA_SetMods:
@ -900,7 +900,7 @@ UpdateActionMods(struct xkb_desc *xkb, union xkb_action *act, uint32_t rmodmask)
* generic XKB_KEYSYM_NO_SYMBOL match. * generic XKB_KEYSYM_NO_SYMBOL match.
*/ */
static struct xkb_sym_interpret * static struct xkb_sym_interpret *
FindInterpForKey(struct xkb_desc *xkb, xkb_keycode_t key, uint32_t group, uint32_t level) FindInterpForKey(struct xkb_keymap *xkb, xkb_keycode_t key, uint32_t group, uint32_t level)
{ {
struct xkb_sym_interpret *ret = NULL; struct xkb_sym_interpret *ret = NULL;
xkb_keysym_t *syms; xkb_keysym_t *syms;
@ -958,7 +958,7 @@ FindInterpForKey(struct xkb_desc *xkb, xkb_keycode_t key, uint32_t group, uint32
/** /**
*/ */
static Bool static Bool
ApplyInterpsToKey(struct xkb_desc *xkb, xkb_keycode_t key) ApplyInterpsToKey(struct xkb_keymap *xkb, xkb_keycode_t key)
{ {
#define INTERP_SIZE (8 * 4) #define INTERP_SIZE (8 * 4)
struct xkb_sym_interpret *interps[INTERP_SIZE]; struct xkb_sym_interpret *interps[INTERP_SIZE];
@ -1038,7 +1038,7 @@ ApplyInterpsToKey(struct xkb_desc *xkb, xkb_keycode_t key)
* other than Shift actually do something ... * other than Shift actually do something ...
*/ */
Bool Bool
UpdateModifiersFromCompat(struct xkb_desc *xkb) UpdateModifiersFromCompat(struct xkb_keymap *xkb)
{ {
xkb_keycode_t key; xkb_keycode_t key;
int i; int i;

View File

@ -970,7 +970,7 @@ ExprResolveModMask(ExprDef * expr,
int int
ExprResolveVModMask(ExprDef * expr, ExprResolveVModMask(ExprDef * expr,
ExprResult * val_rtrn, ExprResult * val_rtrn,
struct xkb_desc *xkb) struct xkb_keymap *xkb)
{ {
return ExprResolveMaskLookup(expr, val_rtrn, LookupVModMask, xkb); return ExprResolveMaskLookup(expr, val_rtrn, LookupVModMask, xkb);
} }

View File

@ -75,7 +75,7 @@ extern int ExprResolveModMask(ExprDef * /* expr */ ,
extern int ExprResolveVModMask(ExprDef * /* expr */ , extern int ExprResolveVModMask(ExprDef * /* expr */ ,
ExprResult * /* val_rtrn */ , ExprResult * /* val_rtrn */ ,
struct xkb_desc * /* xkb */ struct xkb_keymap * /* xkb */
); );
extern int ExprResolveBoolean(ExprDef * /* expr */ , extern int ExprResolveBoolean(ExprDef * /* expr */ ,

View File

@ -198,7 +198,7 @@ static const LookupEntry groupNames[] = {
int int
SetIndicatorMapField(LEDInfo * led, SetIndicatorMapField(LEDInfo * led,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
char *field, ExprDef * arrayNdx, ExprDef * value) char *field, ExprDef * arrayNdx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -318,7 +318,7 @@ SetIndicatorMapField(LEDInfo * led,
LEDInfo * LEDInfo *
HandleIndicatorMapDef(IndicatorMapDef * def, HandleIndicatorMapDef(IndicatorMapDef * def,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge) LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge)
{ {
LEDInfo led, *rtrn; LEDInfo led, *rtrn;
@ -367,7 +367,7 @@ HandleIndicatorMapDef(IndicatorMapDef * def,
} }
Bool Bool
CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn) CopyIndicatorMapDefs(struct xkb_keymap * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
{ {
LEDInfo *led, *next; LEDInfo *led, *next;
LEDInfo *unbound, *last; LEDInfo *unbound, *last;
@ -437,7 +437,7 @@ CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn
} }
Bool Bool
BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound, BindIndicators(struct xkb_keymap * xkb, Bool force, LEDInfo *unbound,
LEDInfo **unboundRtrn) LEDInfo **unboundRtrn)
{ {
int i; int i;

View File

@ -60,24 +60,24 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ ,
); );
extern int SetIndicatorMapField(LEDInfo * /* led */ , extern int SetIndicatorMapField(LEDInfo * /* led */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
char * /* field */ , char * /* field */ ,
ExprDef * /* arrayNdx */ , ExprDef * /* arrayNdx */ ,
ExprDef * /* value */ ExprDef * /* value */
); );
extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ , extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
LEDInfo * /* dflt */ , LEDInfo * /* dflt */ ,
LEDInfo * /* oldLEDs */ , LEDInfo * /* oldLEDs */ ,
unsigned /* mergeMode */ unsigned /* mergeMode */
); );
extern Bool extern Bool
CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn); CopyIndicatorMapDefs(struct xkb_keymap * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
extern Bool extern Bool
BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound, BindIndicators(struct xkb_keymap * xkb, Bool force, LEDInfo *unbound,
LEDInfo **unboundRtrn); LEDInfo **unboundRtrn);
#endif /* INDICATORS_H */ #endif /* INDICATORS_H */

View File

@ -82,7 +82,7 @@ typedef struct _KeyNamesInfo
} KeyNamesInfo; } KeyNamesInfo;
static void HandleKeycodesFile(XkbFile * file, static void HandleKeycodesFile(XkbFile * file,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
unsigned merge, unsigned merge,
KeyNamesInfo * info); KeyNamesInfo * info);
@ -545,7 +545,7 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
* @param info Struct to store the key info in. * @param info Struct to store the key info in.
*/ */
static Bool static Bool
HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_desc * xkb, KeyNamesInfo * info) HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_keymap * xkb, KeyNamesInfo * info)
{ {
unsigned newMerge; unsigned newMerge;
XkbFile *rtrn; XkbFile *rtrn;
@ -804,7 +804,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
*/ */
static void static void
HandleKeycodesFile(XkbFile * file, HandleKeycodesFile(XkbFile * file,
struct xkb_desc * xkb, unsigned merge, KeyNamesInfo * info) struct xkb_keymap * xkb, unsigned merge, KeyNamesInfo * info)
{ {
ParseCommon *stmt; ParseCommon *stmt;
@ -876,7 +876,7 @@ HandleKeycodesFile(XkbFile * file,
* @return True on success, False otherwise. * @return True on success, False otherwise.
*/ */
Bool Bool
CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge) CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
{ {
KeyNamesInfo info; /* contains all the info after parsing */ KeyNamesInfo info; /* contains all the info after parsing */

View File

@ -38,7 +38,7 @@
* @param file A list of XkbFiles, each denoting one type (e.g. * @param file A list of XkbFiles, each denoting one type (e.g.
* XkmKeyNamesIdx, etc.) * XkmKeyNamesIdx, etc.)
*/ */
struct xkb_desc * struct xkb_keymap *
CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge) CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
{ {
unsigned have; unsigned have;
@ -47,7 +47,7 @@ CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
unsigned mainType; unsigned mainType;
const char *mainName; const char *mainName;
LEDInfo *unbound = NULL, *next; LEDInfo *unbound = NULL, *next;
struct xkb_desc *xkb = XkbcAllocKeyboard(context); struct xkb_keymap *xkb = XkbcAllocKeyboard(context);
struct { struct {
XkbFile *keycodes; XkbFile *keycodes;
XkbFile *types; XkbFile *types;

View File

@ -106,7 +106,7 @@ static xkb_atom_t tok_KEYPAD;
/***====================================================================***/ /***====================================================================***/
static void static void
InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from) InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_keymap * xkb, KeyTypesInfo * from)
{ {
tok_ONE_LEVEL = xkb_intern_atom("ONE_LEVEL"); tok_ONE_LEVEL = xkb_intern_atom("ONE_LEVEL");
tok_TWO_LEVEL = xkb_intern_atom("TWO_LEVEL"); tok_TWO_LEVEL = xkb_intern_atom("TWO_LEVEL");
@ -246,7 +246,7 @@ ReportTypeBadWidth(const char *type, int has, int needs)
} }
static Bool static Bool
AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new) AddKeyType(struct xkb_keymap * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
{ {
KeyTypeInfo *old; KeyTypeInfo *old;
@ -332,7 +332,7 @@ AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
static void static void
MergeIncludedKeyTypes(KeyTypesInfo * into, MergeIncludedKeyTypes(KeyTypesInfo * into,
KeyTypesInfo * from, unsigned merge, struct xkb_desc * xkb) KeyTypesInfo * from, unsigned merge, struct xkb_keymap * xkb)
{ {
KeyTypeInfo *type; KeyTypeInfo *type;
@ -357,14 +357,14 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
} }
typedef void (*FileHandler) (XkbFile * /* file */ , typedef void (*FileHandler) (XkbFile * /* file */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
unsigned /* merge */ , unsigned /* merge */ ,
KeyTypesInfo * /* included */ KeyTypesInfo * /* included */
); );
static Bool static Bool
HandleIncludeKeyTypes(IncludeStmt * stmt, HandleIncludeKeyTypes(IncludeStmt * stmt,
struct xkb_desc * xkb, KeyTypesInfo * info, FileHandler hndlr) struct xkb_keymap * xkb, KeyTypesInfo * info, FileHandler hndlr)
{ {
unsigned newMerge; unsigned newMerge;
XkbFile *rtrn; XkbFile *rtrn;
@ -512,7 +512,7 @@ NextMapEntry(KeyTypeInfo * type)
} }
static Bool static Bool
AddPreserve(struct xkb_desc * xkb, AddPreserve(struct xkb_keymap * xkb,
KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report) KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report)
{ {
PreserveInfo *old; PreserveInfo *old;
@ -584,7 +584,7 @@ AddPreserve(struct xkb_desc * xkb,
* @param report True if a warning is to be printed on. * @param report True if a warning is to be printed on.
*/ */
static Bool static Bool
AddMapEntry(struct xkb_desc * xkb, AddMapEntry(struct xkb_keymap * xkb,
KeyTypeInfo * type, KeyTypeInfo * type,
struct xkb_kt_map_entry * new, Bool clobber, Bool report) struct xkb_kt_map_entry * new, Bool clobber, Bool report)
{ {
@ -638,7 +638,7 @@ AddMapEntry(struct xkb_desc * xkb,
static Bool static Bool
SetMapEntry(KeyTypeInfo * type, SetMapEntry(KeyTypeInfo * type,
struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value) struct xkb_keymap * xkb, ExprDef * arrayNdx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
struct xkb_kt_map_entry entry; struct xkb_kt_map_entry entry;
@ -676,7 +676,7 @@ SetMapEntry(KeyTypeInfo * type,
static Bool static Bool
SetPreserve(KeyTypeInfo * type, SetPreserve(KeyTypeInfo * type,
struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value) struct xkb_keymap * xkb, ExprDef * arrayNdx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
PreserveInfo new; PreserveInfo new;
@ -816,7 +816,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
*/ */
static Bool static Bool
SetKeyTypeField(KeyTypeInfo * type, SetKeyTypeField(KeyTypeInfo * type,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
char *field, char *field,
ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info) ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info)
{ {
@ -874,7 +874,7 @@ SetKeyTypeField(KeyTypeInfo * type,
} }
static Bool static Bool
HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info) HandleKeyTypeVar(VarDef * stmt, struct xkb_keymap * xkb, KeyTypesInfo * info)
{ {
ExprResult elem, field; ExprResult elem, field;
ExprDef *arrayNdx; ExprDef *arrayNdx;
@ -900,7 +900,7 @@ HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
static int static int
HandleKeyTypeBody(VarDef * def, HandleKeyTypeBody(VarDef * def,
struct xkb_desc * xkb, KeyTypeInfo * type, KeyTypesInfo * info) struct xkb_keymap * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
{ {
int ok = 1; int ok = 1;
ExprResult tmp, field; ExprResult tmp, field;
@ -929,7 +929,7 @@ HandleKeyTypeBody(VarDef * def,
*/ */
static int static int
HandleKeyTypeDef(KeyTypeDef * def, HandleKeyTypeDef(KeyTypeDef * def,
struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info) struct xkb_keymap * xkb, unsigned merge, KeyTypesInfo * info)
{ {
unsigned int i; unsigned int i;
KeyTypeInfo type; KeyTypeInfo type;
@ -1009,7 +1009,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
*/ */
static void static void
HandleKeyTypesFile(XkbFile * file, HandleKeyTypesFile(XkbFile * file,
struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info) struct xkb_keymap * xkb, unsigned merge, KeyTypesInfo * info)
{ {
ParseCommon *stmt; ParseCommon *stmt;
@ -1070,7 +1070,7 @@ HandleKeyTypesFile(XkbFile * file,
} }
static Bool static Bool
CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo * def) CopyDefToKeyType(struct xkb_keymap * xkb, struct xkb_key_type * type, KeyTypeInfo * def)
{ {
unsigned int i; unsigned int i;
PreserveInfo *pre; PreserveInfo *pre;
@ -1143,7 +1143,7 @@ CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo
} }
Bool Bool
CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge) CompileKeyTypes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
{ {
KeyTypesInfo info; KeyTypesInfo info;

View File

@ -239,7 +239,7 @@ typedef struct _KeyNameDesc
* @return True if found, False otherwise. * @return True if found, False otherwise.
*/ */
Bool Bool
FindNamedKey(struct xkb_desc * xkb, FindNamedKey(struct xkb_keymap * xkb,
unsigned long name, unsigned long name,
xkb_keycode_t *kc_rtrn, xkb_keycode_t *kc_rtrn,
Bool use_aliases, Bool create, xkb_keycode_t start_from) Bool use_aliases, Bool create, xkb_keycode_t start_from)
@ -307,7 +307,7 @@ FindNamedKey(struct xkb_desc * xkb,
} }
Bool Bool
FindKeyNameForAlias(struct xkb_desc * xkb, unsigned long lname, FindKeyNameForAlias(struct xkb_keymap * xkb, unsigned long lname,
unsigned long *real_name) unsigned long *real_name)
{ {
unsigned int i; unsigned int i;

View File

@ -76,7 +76,7 @@ extern Bool ProcessIncludeFile(struct xkb_context * /* context */,
unsigned * /* merge_rtrn */ unsigned * /* merge_rtrn */
); );
extern Bool FindNamedKey(struct xkb_desc * /* xkb */ , extern Bool FindNamedKey(struct xkb_keymap * /* xkb */ ,
unsigned long /* name */ , unsigned long /* name */ ,
xkb_keycode_t * /* kc_rtrn */ , xkb_keycode_t * /* kc_rtrn */ ,
Bool /* use_aliases */ , Bool /* use_aliases */ ,
@ -84,7 +84,7 @@ extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
xkb_keycode_t /* start_from */ xkb_keycode_t /* start_from */
); );
extern Bool FindKeyNameForAlias(struct xkb_desc * /* xkb */ , extern Bool FindKeyNameForAlias(struct xkb_keymap * /* xkb */ ,
unsigned long /* lname */ , unsigned long /* lname */ ,
unsigned long * /* real_name */ unsigned long * /* real_name */
); );

View File

@ -277,7 +277,7 @@ typedef struct _SymbolsInfo
} SymbolsInfo; } SymbolsInfo;
static void static void
InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb) InitSymbolsInfo(SymbolsInfo * info, struct xkb_keymap * xkb)
{ {
int i; int i;
@ -705,7 +705,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
} }
static Bool static Bool
AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_desc * xkb) AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_keymap * xkb)
{ {
unsigned int i; unsigned int i;
unsigned long real_name; unsigned long real_name;
@ -817,7 +817,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
static void static void
MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from, MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
unsigned merge, struct xkb_desc * xkb) unsigned merge, struct xkb_keymap * xkb)
{ {
unsigned int i; unsigned int i;
KeyInfo *key; KeyInfo *key;
@ -867,14 +867,14 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
} }
typedef void (*FileHandler) (XkbFile * /* rtrn */ , typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
unsigned /* merge */ , unsigned /* merge */ ,
SymbolsInfo * /* included */ SymbolsInfo * /* included */
); );
static Bool static Bool
HandleIncludeSymbols(IncludeStmt * stmt, HandleIncludeSymbols(IncludeStmt * stmt,
struct xkb_desc * xkb, SymbolsInfo * info, FileHandler hndlr) struct xkb_keymap * xkb, SymbolsInfo * info, FileHandler hndlr)
{ {
unsigned newMerge; unsigned newMerge;
XkbFile *rtrn; XkbFile *rtrn;
@ -1021,7 +1021,7 @@ GetGroupIndex(KeyInfo * key,
static Bool static Bool
AddSymbolsToKey(KeyInfo * key, AddSymbolsToKey(KeyInfo * key,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
char *field, char *field,
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info) ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
{ {
@ -1088,7 +1088,7 @@ AddSymbolsToKey(KeyInfo * key,
static Bool static Bool
AddActionsToKey(KeyInfo * key, AddActionsToKey(KeyInfo * key,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
char *field, char *field,
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info) ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
{ {
@ -1176,7 +1176,7 @@ static const LookupEntry repeatEntries[] = {
static Bool static Bool
SetSymbolsField(KeyInfo * key, SetSymbolsField(KeyInfo * key,
struct xkb_desc * xkb, struct xkb_keymap * xkb,
char *field, char *field,
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info) ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
{ {
@ -1360,7 +1360,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
} }
static int static int
HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info) HandleSymbolsVar(VarDef * stmt, struct xkb_keymap * xkb, SymbolsInfo * info)
{ {
ExprResult elem, field, tmp; ExprResult elem, field, tmp;
ExprDef *arrayNdx; ExprDef *arrayNdx;
@ -1449,7 +1449,7 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
static Bool static Bool
HandleSymbolsBody(VarDef * def, HandleSymbolsBody(VarDef * def,
struct xkb_desc * xkb, KeyInfo * key, SymbolsInfo * info) struct xkb_keymap * xkb, KeyInfo * key, SymbolsInfo * info)
{ {
Bool ok = True; Bool ok = True;
ExprResult tmp, field; ExprResult tmp, field;
@ -1532,7 +1532,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
static int static int
HandleSymbolsDef(SymbolsDef * stmt, HandleSymbolsDef(SymbolsDef * stmt,
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info) struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
{ {
KeyInfo key; KeyInfo key;
@ -1562,7 +1562,7 @@ HandleSymbolsDef(SymbolsDef * stmt,
static Bool static Bool
HandleModMapDef(ModMapDef * def, HandleModMapDef(ModMapDef * def,
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info) struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
{ {
ExprDef *key; ExprDef *key;
ModMapEntry tmp; ModMapEntry tmp;
@ -1605,7 +1605,7 @@ HandleModMapDef(ModMapDef * def,
static void static void
HandleSymbolsFile(XkbFile * file, HandleSymbolsFile(XkbFile * file,
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info) struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
{ {
ParseCommon *stmt; ParseCommon *stmt;
@ -1665,7 +1665,7 @@ HandleSymbolsFile(XkbFile * file,
} }
static Bool static Bool
FindKeyForSymbol(struct xkb_desc * xkb, xkb_keysym_t sym, xkb_keycode_t *kc_rtrn) FindKeyForSymbol(struct xkb_keymap * xkb, xkb_keysym_t sym, xkb_keycode_t *kc_rtrn)
{ {
xkb_keycode_t key; xkb_keycode_t key;
unsigned int group, level; unsigned int group, level;
@ -1697,7 +1697,7 @@ FindKeyForSymbol(struct xkb_desc * xkb, xkb_keysym_t sym, xkb_keycode_t *kc_rtrn
* @return True if found, False otherwise. * @return True if found, False otherwise.
*/ */
static Bool static Bool
FindNamedType(struct xkb_desc * xkb, xkb_atom_t atom, unsigned *type_rtrn) FindNamedType(struct xkb_keymap * xkb, xkb_atom_t atom, unsigned *type_rtrn)
{ {
unsigned n; unsigned n;
const char *name = XkbcAtomText(atom); const char *name = XkbcAtomText(atom);
@ -1933,7 +1933,7 @@ PrepareKeyDef(KeyInfo * key)
* This function recurses. * This function recurses.
*/ */
static Bool static Bool
CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from) CopySymbolsDef(struct xkb_keymap * xkb, KeyInfo *key, int start_from)
{ {
unsigned int i; unsigned int i;
xkb_keycode_t kc; xkb_keycode_t kc;
@ -2132,7 +2132,7 @@ CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from)
} }
static Bool static Bool
CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry) CopyModMapDef(struct xkb_keymap * xkb, ModMapEntry *entry)
{ {
xkb_keycode_t kc; xkb_keycode_t kc;
@ -2174,7 +2174,7 @@ CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
* @param merge Merge strategy (e.g. MergeOverride). * @param merge Merge strategy (e.g. MergeOverride).
*/ */
Bool Bool
CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge) CompileSymbols(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
{ {
unsigned int i; unsigned int i;
SymbolsInfo info; SymbolsInfo info;

View File

@ -36,14 +36,14 @@
#include "vmod.h" #include "vmod.h"
void void
InitVModInfo(VModInfo * info, struct xkb_desc * xkb) InitVModInfo(VModInfo * info, struct xkb_keymap * xkb)
{ {
ClearVModInfo(info, xkb); ClearVModInfo(info, xkb);
info->errorCount = 0; info->errorCount = 0;
} }
void void
ClearVModInfo(VModInfo * info, struct xkb_desc * xkb) ClearVModInfo(VModInfo * info, struct xkb_keymap * xkb)
{ {
int i; int i;
@ -78,7 +78,7 @@ ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
* @param mergeMode Merge strategy (e.g. MergeOverride) * @param mergeMode Merge strategy (e.g. MergeOverride)
*/ */
Bool Bool
HandleVModDef(VModDef * stmt, struct xkb_desc *xkb, unsigned mergeMode, HandleVModDef(VModDef * stmt, struct xkb_keymap *xkb, unsigned mergeMode,
VModInfo * info) VModInfo * info)
{ {
int i, bit, nextFree; int i, bit, nextFree;
@ -162,7 +162,7 @@ HandleVModDef(VModDef * stmt, struct xkb_desc *xkb, unsigned mergeMode,
* undefined. * undefined.
*/ */
static int static int
LookupVModIndex(const struct xkb_desc *xkb, xkb_atom_t field, unsigned type, LookupVModIndex(const struct xkb_keymap *xkb, xkb_atom_t field, unsigned type,
ExprResult * val_rtrn) ExprResult * val_rtrn)
{ {
int i; int i;
@ -216,7 +216,7 @@ LookupVModMask(const void * priv, xkb_atom_t field, unsigned type,
} }
int int
FindKeypadVMod(struct xkb_desc * xkb) FindKeypadVMod(struct xkb_keymap * xkb)
{ {
xkb_atom_t name; xkb_atom_t name;
ExprResult rtrn; ExprResult rtrn;
@ -230,7 +230,7 @@ FindKeypadVMod(struct xkb_desc * xkb)
} }
Bool Bool
ResolveVirtualModifier(ExprDef * def, struct xkb_desc *xkb, ResolveVirtualModifier(ExprDef * def, struct xkb_keymap *xkb,
ExprResult * val_rtrn, VModInfo * info) ExprResult * val_rtrn, VModInfo * info)
{ {
struct xkb_names * names; struct xkb_names * names;

View File

@ -29,7 +29,7 @@
typedef struct _VModInfo typedef struct _VModInfo
{ {
struct xkb_desc * xkb; struct xkb_keymap * xkb;
unsigned defined; unsigned defined;
unsigned available; unsigned available;
unsigned newlyDefined; unsigned newlyDefined;
@ -37,28 +37,28 @@ typedef struct _VModInfo
} VModInfo; } VModInfo;
extern void InitVModInfo(VModInfo * /* info */ , extern void InitVModInfo(VModInfo * /* info */ ,
struct xkb_desc * /* xkb */ struct xkb_keymap * /* xkb */
); );
extern void ClearVModInfo(VModInfo * /* info */ , extern void ClearVModInfo(VModInfo * /* info */ ,
struct xkb_desc * /* xkb */ struct xkb_keymap * /* xkb */
); );
extern Bool HandleVModDef(VModDef * /* stmt */ , extern Bool HandleVModDef(VModDef * /* stmt */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
unsigned /* mergeMode */ , unsigned /* mergeMode */ ,
VModInfo * /* info */ VModInfo * /* info */
); );
extern Bool ApplyVModDefs(VModInfo * /* info */ , extern Bool ApplyVModDefs(VModInfo * /* info */ ,
struct xkb_desc * /* xkb */ struct xkb_keymap * /* xkb */
); );
extern int FindKeypadVMod(struct xkb_desc * /* xkb */ extern int FindKeypadVMod(struct xkb_keymap * /* xkb */
); );
extern Bool ResolveVirtualModifier(ExprDef * /* def */ , extern Bool ResolveVirtualModifier(ExprDef * /* def */ ,
struct xkb_desc * /* xkb */ , struct xkb_keymap * /* xkb */ ,
ExprResult * /* value_rtrn */ , ExprResult * /* value_rtrn */ ,
VModInfo * /* info */ VModInfo * /* info */
); );

View File

@ -114,13 +114,13 @@ unwind_file:
return names; return names;
} }
struct xkb_desc * struct xkb_keymap *
xkb_map_new_from_names(struct xkb_context *context, xkb_map_new_from_names(struct xkb_context *context,
const struct xkb_rule_names *rmlvo) const struct xkb_rule_names *rmlvo)
{ {
XkbRF_VarDefsRec defs; XkbRF_VarDefsRec defs;
struct xkb_component_names *names; struct xkb_component_names *names;
struct xkb_desc *xkb; struct xkb_keymap *xkb;
if (!rmlvo || ISEMPTY(rmlvo->rules) || ISEMPTY(rmlvo->layout)) { if (!rmlvo || ISEMPTY(rmlvo->rules) || ISEMPTY(rmlvo->layout)) {
ERROR("rules and layout required to generate XKB keymap\n"); ERROR("rules and layout required to generate XKB keymap\n");
@ -185,11 +185,11 @@ XkbChooseMap(XkbFile *file, const char *name)
return map; return map;
} }
static struct xkb_desc * static struct xkb_keymap *
compile_keymap(struct xkb_context *context, XkbFile *file) compile_keymap(struct xkb_context *context, XkbFile *file)
{ {
XkbFile *mapToUse; XkbFile *mapToUse;
struct xkb_desc * xkb = NULL; struct xkb_keymap * xkb = NULL;
/* Find map to use */ /* Find map to use */
mapToUse = XkbChooseMap(file, NULL); mapToUse = XkbChooseMap(file, NULL);
@ -216,7 +216,7 @@ err:
return xkb; return xkb;
} }
struct xkb_desc * struct xkb_keymap *
xkb_map_new_from_kccgst(struct xkb_context *context, xkb_map_new_from_kccgst(struct xkb_context *context,
const struct xkb_component_names *kccgst) const struct xkb_component_names *kccgst)
{ {
@ -255,7 +255,7 @@ xkb_map_new_from_kccgst(struct xkb_context *context,
return compile_keymap(context, file); return compile_keymap(context, file);
} }
struct xkb_desc * struct xkb_keymap *
xkb_map_new_from_string(struct xkb_context *context, xkb_map_new_from_string(struct xkb_context *context,
const char *string, const char *string,
enum xkb_keymap_format format) enum xkb_keymap_format format)
@ -280,7 +280,7 @@ xkb_map_new_from_string(struct xkb_context *context,
return compile_keymap(context, file); return compile_keymap(context, file);
} }
struct xkb_desc * struct xkb_keymap *
xkb_map_new_from_fd(struct xkb_context *context, xkb_map_new_from_fd(struct xkb_context *context,
int fd, int fd,
enum xkb_keymap_format format) enum xkb_keymap_format format)
@ -313,13 +313,13 @@ xkb_map_new_from_fd(struct xkb_context *context,
} }
void void
xkb_map_ref(struct xkb_desc *xkb) xkb_map_ref(struct xkb_keymap *xkb)
{ {
xkb->refcnt++; xkb->refcnt++;
} }
void void
xkb_map_unref(struct xkb_desc *xkb) xkb_map_unref(struct xkb_keymap *xkb)
{ {
if (--xkb->refcnt > 0) if (--xkb->refcnt > 0)
return; return;

View File

@ -254,25 +254,25 @@ typedef struct _XkbFile
Bool compiled; Bool compiled;
} XkbFile; } XkbFile;
extern struct xkb_desc * extern struct xkb_keymap *
CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge); CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge);
extern Bool extern Bool
CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge); CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
extern Bool extern Bool
CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge); CompileKeyTypes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
typedef struct _LEDInfo *LEDInfoPtr; typedef struct _LEDInfo *LEDInfoPtr;
extern Bool extern Bool
CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge, CompileCompatMap(XkbFile *file, struct xkb_keymap * xkb, unsigned merge,
LEDInfoPtr *unboundLEDs); LEDInfoPtr *unboundLEDs);
extern Bool extern Bool
CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge); CompileSymbols(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
extern Bool extern Bool
UpdateModifiersFromCompat(struct xkb_desc *xkb); UpdateModifiersFromCompat(struct xkb_keymap *xkb);
#endif /* XKBCOMP_H */ #endif /* XKBCOMP_H */

View File

@ -38,16 +38,16 @@ typedef uint32_t xkb_atom_t;
/***====================================================================***/ /***====================================================================***/
extern Bool extern Bool
XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type, XkbcComputeEffectiveMap(struct xkb_keymap * xkb, struct xkb_key_type * type,
unsigned char *map_rtrn); unsigned char *map_rtrn);
/***====================================================================***/ /***====================================================================***/
extern int extern int
XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod); XkbcInitCanonicalKeyTypes(struct xkb_keymap * xkb, unsigned which, int keypadVMod);
extern Bool extern Bool
XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask, XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
unsigned *mask_rtrn); unsigned *mask_rtrn);
extern void extern void
@ -86,7 +86,7 @@ extern const char *
XkbcAtomText(xkb_atom_t atm); XkbcAtomText(xkb_atom_t atm);
extern const char * extern const char *
XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask); XkbcVModMaskText(struct xkb_keymap * xkb, unsigned modMask, unsigned mask);
extern const char * extern const char *
XkbcModIndexText(unsigned ndx); XkbcModIndexText(unsigned ndx);

View File

@ -41,7 +41,7 @@ static char buffer[8192];
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
struct xkb_context *context; struct xkb_context *context;
struct xkb_desc *xkb; struct xkb_keymap *xkb;
char *path; char *path;
int fd; int fd;
int i, len, from_string = 0; int i, len, from_string = 0;

View File

@ -33,7 +33,7 @@ authorization from the authors.
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
struct xkb_context *context; struct xkb_context *context;
struct xkb_desc *xkb; struct xkb_keymap *xkb;
struct xkb_component_names kccgst; struct xkb_component_names kccgst;
/* Require Kc + T + C + S */ /* Require Kc + T + C + S */

View File

@ -34,7 +34,7 @@ authorization from the authors.
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
struct xkb_context *context; struct xkb_context *context;
struct xkb_desc *xkb; struct xkb_keymap *xkb;
struct xkb_rule_names rmlvo; struct xkb_rule_names rmlvo;
/* Require rmlvo */ /* Require rmlvo */

View File

@ -88,7 +88,7 @@ print_state(struct xkb_state *state)
} }
static void static void
test_update_key(struct xkb_desc *xkb) test_update_key(struct xkb_keymap *xkb)
{ {
struct xkb_state *state = xkb_state_new(xkb); struct xkb_state *state = xkb_state_new(xkb);
xkb_keysym_t *syms; xkb_keysym_t *syms;
@ -150,7 +150,7 @@ test_update_key(struct xkb_desc *xkb)
} }
static void static void
test_serialisation(struct xkb_desc *xkb) test_serialisation(struct xkb_keymap *xkb)
{ {
struct xkb_state *state = xkb_state_new(xkb); struct xkb_state *state = xkb_state_new(xkb);
xkb_mod_mask_t base_mods; xkb_mod_mask_t base_mods;
@ -206,7 +206,7 @@ int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
struct xkb_context *context; struct xkb_context *context;
struct xkb_desc *xkb; struct xkb_keymap *xkb;
struct xkb_rule_names rmlvo; struct xkb_rule_names rmlvo;
rmlvo.rules = "evdev"; rmlvo.rules = "evdev";