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
parent
bc872252f3
commit
ef88c7efab
|
@ -144,7 +144,7 @@ struct xkb_context;
|
|||
* Opaque keymap object; may only be created, accessed, manipulated and
|
||||
* destroyed through the xkb_state_*() API.
|
||||
*/
|
||||
struct xkb_desc;
|
||||
struct xkb_keymap;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* keymaps.
|
||||
*/
|
||||
_X_EXPORT extern struct xkb_desc *
|
||||
_X_EXPORT extern struct xkb_keymap *
|
||||
xkb_map_new_from_names(struct xkb_context *context,
|
||||
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.
|
||||
*/
|
||||
_X_EXPORT extern struct xkb_desc *
|
||||
_X_EXPORT extern struct xkb_keymap *
|
||||
xkb_map_new_from_kccgst(struct xkb_context *context,
|
||||
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
|
||||
* file descriptor.
|
||||
*/
|
||||
_X_EXPORT extern struct xkb_desc *
|
||||
_X_EXPORT extern struct xkb_keymap *
|
||||
xkb_map_new_from_fd(struct xkb_context *context,
|
||||
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
|
||||
* enormous string.
|
||||
*/
|
||||
_X_EXPORT extern struct xkb_desc *
|
||||
_X_EXPORT extern struct xkb_keymap *
|
||||
xkb_map_new_from_string(struct xkb_context *context,
|
||||
const char *string,
|
||||
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.
|
||||
*/
|
||||
_X_EXPORT extern void
|
||||
xkb_map_ref(struct xkb_desc *xkb);
|
||||
xkb_map_ref(struct xkb_keymap *xkb);
|
||||
|
||||
/**
|
||||
* Releases a reference on a keymap.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
*/
|
||||
_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.
|
||||
|
|
|
@ -391,7 +391,7 @@ struct xkb_controls {
|
|||
};
|
||||
|
||||
/* Common keyboard description structure */
|
||||
struct xkb_desc {
|
||||
struct xkb_keymap {
|
||||
struct xkb_context *context;
|
||||
|
||||
unsigned int refcnt;
|
||||
|
@ -456,7 +456,7 @@ struct xkb_state {
|
|||
int refcnt;
|
||||
void *filters;
|
||||
int num_filters;
|
||||
struct xkb_desc *xkb;
|
||||
struct xkb_keymap *xkb;
|
||||
};
|
||||
|
||||
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
|
||||
|
|
24
src/alloc.c
24
src/alloc.c
|
@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <X11/extensions/XKB.h>
|
||||
|
||||
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_sym_interpret *prev_interpret;
|
||||
|
@ -84,7 +84,7 @@ XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI)
|
|||
|
||||
|
||||
static void
|
||||
XkbcFreeCompatMap(struct xkb_desc * xkb)
|
||||
XkbcFreeCompatMap(struct xkb_keymap * xkb)
|
||||
{
|
||||
struct xkb_compat_map * compat;
|
||||
|
||||
|
@ -99,7 +99,7 @@ XkbcFreeCompatMap(struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases)
|
||||
XkbcAllocNames(struct xkb_keymap * xkb, unsigned which, unsigned nTotalAliases)
|
||||
{
|
||||
struct xkb_names * names;
|
||||
|
||||
|
@ -163,7 +163,7 @@ XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases)
|
|||
}
|
||||
|
||||
static void
|
||||
XkbcFreeNames(struct xkb_desc * xkb)
|
||||
XkbcFreeNames(struct xkb_keymap * xkb)
|
||||
{
|
||||
struct xkb_names * names;
|
||||
struct xkb_client_map * map;
|
||||
|
@ -201,7 +201,7 @@ XkbcFreeNames(struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
|
||||
XkbcAllocControls(struct xkb_keymap * xkb, unsigned which)
|
||||
{
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
@ -223,7 +223,7 @@ XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
|
|||
}
|
||||
|
||||
static void
|
||||
XkbcFreeControls(struct xkb_desc * xkb)
|
||||
XkbcFreeControls(struct xkb_keymap * xkb)
|
||||
{
|
||||
if (xkb && xkb->ctrls) {
|
||||
free(xkb->ctrls->per_key_repeat);
|
||||
|
@ -233,7 +233,7 @@ XkbcFreeControls(struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
|
||||
XkbcAllocIndicatorMaps(struct xkb_keymap * xkb)
|
||||
{
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
@ -248,7 +248,7 @@ XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
static void
|
||||
XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
|
||||
XkbcFreeIndicatorMaps(struct xkb_keymap * xkb)
|
||||
{
|
||||
if (xkb) {
|
||||
free(xkb->indicators);
|
||||
|
@ -256,12 +256,12 @@ XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
|
|||
}
|
||||
}
|
||||
|
||||
struct xkb_desc *
|
||||
struct xkb_keymap *
|
||||
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)
|
||||
return NULL;
|
||||
|
||||
|
@ -273,7 +273,7 @@ XkbcAllocKeyboard(struct xkb_context *context)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeKeyboard(struct xkb_desc * xkb)
|
||||
XkbcFreeKeyboard(struct xkb_keymap * xkb)
|
||||
{
|
||||
if (!xkb)
|
||||
return;
|
||||
|
|
12
src/malloc.c
12
src/malloc.c
|
@ -30,7 +30,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "XKBcommonint.h"
|
||||
|
||||
int
|
||||
XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
|
||||
XkbcAllocClientMap(struct xkb_keymap * xkb, unsigned which, unsigned nTotalTypes)
|
||||
{
|
||||
struct xkb_client_map * map;
|
||||
|
||||
|
@ -101,7 +101,7 @@ XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions)
|
||||
XkbcAllocServerMap(struct xkb_keymap * xkb, unsigned which, unsigned nNewActions)
|
||||
{
|
||||
unsigned i;
|
||||
struct xkb_server_map * map;
|
||||
|
@ -241,7 +241,7 @@ XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type * into)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcResizeKeySyms(struct xkb_desc * xkb, xkb_keycode_t key,
|
||||
XkbcResizeKeySyms(struct xkb_keymap * xkb, xkb_keycode_t key,
|
||||
unsigned int 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 *
|
||||
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;
|
||||
union xkb_action *newActs;
|
||||
|
@ -322,7 +322,7 @@ XkbcResizeKeyActions(struct xkb_desc * xkb, xkb_keycode_t key, uint32_t needed)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeClientMap(struct xkb_desc * xkb)
|
||||
XkbcFreeClientMap(struct xkb_keymap * xkb)
|
||||
{
|
||||
struct xkb_client_map * map;
|
||||
struct xkb_key_type * type;
|
||||
|
@ -360,7 +360,7 @@ XkbcFreeClientMap(struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeServerMap(struct xkb_desc * xkb)
|
||||
XkbcFreeServerMap(struct xkb_keymap * xkb)
|
||||
{
|
||||
struct xkb_server_map * map;
|
||||
|
||||
|
|
24
src/map.c
24
src/map.c
|
@ -62,7 +62,7 @@
|
|||
* Returns the total number of modifiers active in the keymap.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -79,7 +79,7 @@ xkb_map_num_mods(struct xkb_desc *xkb)
|
|||
* Return the name for a given modifier.
|
||||
*/
|
||||
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))
|
||||
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.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -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.
|
||||
*/
|
||||
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 i;
|
||||
|
@ -163,7 +163,7 @@ xkb_map_num_groups(struct xkb_desc *xkb)
|
|||
* Returns the name for a given group.
|
||||
*/
|
||||
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))
|
||||
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.
|
||||
*/
|
||||
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 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.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
@ -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.
|
||||
*/
|
||||
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 i;
|
||||
|
@ -219,7 +219,7 @@ xkb_map_num_leds(struct xkb_desc *xkb)
|
|||
* Returns the name for a given group.
|
||||
*/
|
||||
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))
|
||||
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.
|
||||
*/
|
||||
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 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.
|
||||
*/
|
||||
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)
|
||||
{
|
||||
int num_syms;
|
||||
|
@ -331,7 +331,7 @@ unsigned int
|
|||
xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
|
||||
xkb_keysym_t **syms_out)
|
||||
{
|
||||
struct xkb_desc *xkb = state->xkb;
|
||||
struct xkb_keymap *xkb = state->xkb;
|
||||
int group;
|
||||
int level;
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ static struct xkb_key_type canonicalTypes[XkbNumRequiredTypes] = {
|
|||
};
|
||||
|
||||
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_key_type *from, *to;
|
||||
|
@ -142,7 +142,7 @@ XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
|
||||
XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
|
||||
unsigned *mask_rtrn)
|
||||
{
|
||||
int i, bit;
|
||||
|
|
|
@ -460,7 +460,7 @@ xkb_filter_apply_all(struct xkb_state *state, xkb_keycode_t key,
|
|||
}
|
||||
|
||||
struct xkb_state *
|
||||
xkb_state_new(struct xkb_desc *xkb)
|
||||
xkb_state_new(struct xkb_keymap *xkb)
|
||||
{
|
||||
struct xkb_state *ret;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ tbGetBuffer(unsigned int size)
|
|||
}
|
||||
|
||||
static const char *
|
||||
XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
|
||||
XkbcVModIndexText(struct xkb_keymap * xkb, unsigned ndx)
|
||||
{
|
||||
int len;
|
||||
char *rtrn;
|
||||
|
@ -84,7 +84,7 @@ XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
|
|||
}
|
||||
|
||||
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;
|
||||
const char *mm = NULL;
|
||||
|
|
|
@ -96,7 +96,7 @@ xkb_canonicalise_components(struct xkb_component_names * names,
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -32,48 +32,48 @@ authorization from the authors.
|
|||
#include "XKBcommonint.h"
|
||||
|
||||
extern int
|
||||
XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI);
|
||||
XkbcAllocCompatMap(struct xkb_keymap * xkb, unsigned which, unsigned nSI);
|
||||
|
||||
extern int
|
||||
XkbcAllocNames(struct xkb_desc * xkb, unsigned which, unsigned nTotalAliases);
|
||||
XkbcAllocNames(struct xkb_keymap * xkb, unsigned which, unsigned nTotalAliases);
|
||||
|
||||
extern int
|
||||
XkbcAllocControls(struct xkb_desc * xkb, unsigned which);
|
||||
XkbcAllocControls(struct xkb_keymap * xkb, unsigned which);
|
||||
|
||||
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);
|
||||
|
||||
extern void
|
||||
XkbcFreeKeyboard(struct xkb_desc * xkb);
|
||||
XkbcFreeKeyboard(struct xkb_keymap * xkb);
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern int
|
||||
XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes);
|
||||
XkbcAllocClientMap(struct xkb_keymap * xkb, unsigned which, unsigned nTotalTypes);
|
||||
|
||||
extern int
|
||||
XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions);
|
||||
XkbcAllocServerMap(struct xkb_keymap * xkb, unsigned which, unsigned nNewActions);
|
||||
|
||||
extern int
|
||||
XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type *into);
|
||||
|
||||
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 *
|
||||
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
|
||||
XkbcFreeClientMap(struct xkb_desc * xkb);
|
||||
XkbcFreeClientMap(struct xkb_keymap * xkb);
|
||||
|
||||
extern void
|
||||
XkbcFreeServerMap(struct xkb_desc * xkb);
|
||||
XkbcFreeServerMap(struct xkb_keymap * xkb);
|
||||
|
||||
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,
|
||||
xkb_keysym_t **syms_out);
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ ReportNotFound(unsigned action, unsigned field, const char *what,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleNoAction(struct xkb_desc * xkb,
|
||||
HandleNoAction(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -242,7 +242,7 @@ CheckLatchLockFlags(unsigned action,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CheckModifierField(struct xkb_desc * xkb,
|
||||
CheckModifierField(struct xkb_keymap * xkb,
|
||||
unsigned action,
|
||||
ExprDef * value,
|
||||
unsigned *flags_inout, unsigned *mods_rtrn)
|
||||
|
@ -270,7 +270,7 @@ CheckModifierField(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleSetLatchMods(struct xkb_desc * xkb,
|
||||
HandleSetLatchMods(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -315,7 +315,7 @@ HandleSetLatchMods(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleLockMods(struct xkb_desc * xkb,
|
||||
HandleLockMods(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -371,7 +371,7 @@ CheckGroupField(unsigned action,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleSetLatchGroup(struct xkb_desc * xkb,
|
||||
HandleSetLatchGroup(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ HandleSetLatchGroup(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleLockGroup(struct xkb_desc * xkb,
|
||||
HandleLockGroup(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -442,7 +442,7 @@ HandleLockGroup(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleMovePtr(struct xkb_desc * xkb,
|
||||
HandleMovePtr(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -497,7 +497,7 @@ static const LookupEntry lockWhich[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandlePtrBtn(struct xkb_desc * xkb,
|
||||
HandlePtrBtn(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ static const LookupEntry ptrDflts[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleSetPtrDflt(struct xkb_desc * xkb,
|
||||
HandleSetPtrDflt(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -629,7 +629,7 @@ static const LookupEntry isoNames[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleISOLock(struct xkb_desc * xkb,
|
||||
HandleISOLock(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -676,7 +676,7 @@ HandleISOLock(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleSwitchScreen(struct xkb_desc * xkb,
|
||||
HandleSwitchScreen(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -751,7 +751,7 @@ const LookupEntry ctrlNames[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleSetLockControls(struct xkb_desc * xkb,
|
||||
HandleSetLockControls(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -782,7 +782,7 @@ static const LookupEntry evNames[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleActionMessage(struct xkb_desc * xkb,
|
||||
HandleActionMessage(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -860,7 +860,7 @@ HandleActionMessage(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleRedirectKey(struct xkb_desc * xkb,
|
||||
HandleRedirectKey(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -912,7 +912,7 @@ HandleRedirectKey(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleDeviceBtn(struct xkb_desc * xkb,
|
||||
HandleDeviceBtn(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -981,7 +981,7 @@ HandleDeviceBtn(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleDeviceValuator(struct xkb_desc * xkb,
|
||||
HandleDeviceValuator(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -996,7 +996,7 @@ HandleDeviceValuator(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandlePrivate(struct xkb_desc * xkb,
|
||||
HandlePrivate(struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -1065,7 +1065,7 @@ HandlePrivate(struct xkb_desc * xkb,
|
|||
return ReportIllegal(PrivateAction, field);
|
||||
}
|
||||
|
||||
typedef Bool(*actionHandler) (struct xkb_desc * /* xkb */ ,
|
||||
typedef Bool(*actionHandler) (struct xkb_keymap * /* xkb */ ,
|
||||
struct xkb_any_action * /* action */ ,
|
||||
unsigned /* field */ ,
|
||||
ExprDef * /* array_ndx */ ,
|
||||
|
@ -1119,7 +1119,7 @@ ActionsInit(void);
|
|||
|
||||
int
|
||||
HandleActionDef(ExprDef * def,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info)
|
||||
{
|
||||
ExprDef *arg;
|
||||
|
@ -1226,7 +1226,7 @@ HandleActionDef(ExprDef * def,
|
|||
/***====================================================================***/
|
||||
|
||||
int
|
||||
SetActionField(struct xkb_desc * xkb,
|
||||
SetActionField(struct xkb_keymap * xkb,
|
||||
char *elem,
|
||||
char *field,
|
||||
ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn)
|
||||
|
|
|
@ -65,13 +65,13 @@ typedef struct _ActionInfo
|
|||
} ActionInfo;
|
||||
|
||||
extern int HandleActionDef(ExprDef * /* def */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
struct xkb_any_action * /* action */ ,
|
||||
unsigned /* mergeMode */ ,
|
||||
ActionInfo * /* info */
|
||||
);
|
||||
|
||||
extern int SetActionField(struct xkb_desc * /* xkb */ ,
|
||||
extern int SetActionField(struct xkb_keymap * /* xkb */ ,
|
||||
char * /* elem */ ,
|
||||
char * /* field */ ,
|
||||
ExprDef * /* index */ ,
|
||||
|
|
|
@ -151,7 +151,7 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
|
|||
}
|
||||
|
||||
int
|
||||
ApplyAliases(struct xkb_desc * xkb, AliasInfo ** info_in)
|
||||
ApplyAliases(struct xkb_keymap * xkb, AliasInfo ** info_in)
|
||||
{
|
||||
int i;
|
||||
struct xkb_key_alias *old, *a;
|
||||
|
|
|
@ -48,7 +48,7 @@ extern Bool MergeAliases(AliasInfo ** /* into */ ,
|
|||
unsigned /* how_merge */
|
||||
);
|
||||
|
||||
extern int ApplyAliases(struct xkb_desc * /* xkb */ ,
|
||||
extern int ApplyAliases(struct xkb_keymap * /* xkb */ ,
|
||||
AliasInfo ** /* info */
|
||||
);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ typedef struct _CompatInfo
|
|||
LEDInfo *leds;
|
||||
VModInfo vmods;
|
||||
ActionInfo *act;
|
||||
struct xkb_desc * xkb;
|
||||
struct xkb_keymap * xkb;
|
||||
} CompatInfo;
|
||||
|
||||
/***====================================================================***/
|
||||
|
@ -100,7 +100,7 @@ siText(SymInterpInfo * si, CompatInfo * info)
|
|||
}
|
||||
|
||||
static void
|
||||
InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
|
||||
InitCompatInfo(CompatInfo * info, struct xkb_keymap * xkb)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -130,7 +130,7 @@ InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
static void
|
||||
ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
|
||||
ClearCompatInfo(CompatInfo * info, struct xkb_keymap * xkb)
|
||||
{
|
||||
unsigned int i;
|
||||
ActionInfo *next;
|
||||
|
@ -389,14 +389,14 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
CompatInfo * /* info */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeCompatMap(IncludeStmt * stmt,
|
||||
struct xkb_desc * xkb, CompatInfo * info, FileHandler hndlr)
|
||||
struct xkb_keymap * xkb, CompatInfo * info, FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -496,7 +496,7 @@ static const LookupEntry useModMapValues[] = {
|
|||
|
||||
static int
|
||||
SetInterpField(SymInterpInfo * si,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
|
||||
{
|
||||
|
@ -583,7 +583,7 @@ SetInterpField(SymInterpInfo * si,
|
|||
}
|
||||
|
||||
static int
|
||||
HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
|
||||
HandleInterpVar(VarDef * stmt, struct xkb_keymap * xkb, CompatInfo * info)
|
||||
{
|
||||
ExprResult elem, field;
|
||||
ExprDef *ndx;
|
||||
|
@ -606,7 +606,7 @@ HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
|
|||
}
|
||||
|
||||
static int
|
||||
HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
|
||||
HandleInterpBody(VarDef * def, struct xkb_keymap * xkb, SymInterpInfo * si,
|
||||
CompatInfo * info)
|
||||
{
|
||||
int ok = 1;
|
||||
|
@ -631,7 +631,7 @@ HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
|
|||
}
|
||||
|
||||
static int
|
||||
HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
|
||||
HandleInterpDef(InterpDef * def, struct xkb_keymap * xkb, unsigned merge,
|
||||
CompatInfo * info)
|
||||
{
|
||||
unsigned pred, mods;
|
||||
|
@ -672,7 +672,7 @@ HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
|
|||
|
||||
static int
|
||||
HandleGroupCompatDef(GroupCompatDef * def,
|
||||
struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, CompatInfo * info)
|
||||
{
|
||||
ExprResult val;
|
||||
GroupCompatInfo tmp;
|
||||
|
@ -704,7 +704,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
|
|||
|
||||
static void
|
||||
HandleCompatMapFile(XkbFile * file,
|
||||
struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, CompatInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -795,7 +795,7 @@ CopyInterps(CompatInfo * info,
|
|||
}
|
||||
|
||||
Bool
|
||||
CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
|
||||
CompileCompatMap(XkbFile *file, struct xkb_keymap * xkb, unsigned merge,
|
||||
LEDInfoPtr *unboundLEDs)
|
||||
{
|
||||
int i;
|
||||
|
@ -854,7 +854,7 @@ CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
|
|||
}
|
||||
|
||||
static uint32_t
|
||||
VModsToReal(struct xkb_desc *xkb, uint32_t vmodmask)
|
||||
VModsToReal(struct xkb_keymap *xkb, uint32_t vmodmask)
|
||||
{
|
||||
uint32_t ret = 0;
|
||||
int i;
|
||||
|
@ -872,7 +872,7 @@ VModsToReal(struct xkb_desc *xkb, uint32_t vmodmask)
|
|||
}
|
||||
|
||||
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) {
|
||||
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.
|
||||
*/
|
||||
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;
|
||||
xkb_keysym_t *syms;
|
||||
|
@ -958,7 +958,7 @@ FindInterpForKey(struct xkb_desc *xkb, xkb_keycode_t key, uint32_t group, uint32
|
|||
/**
|
||||
*/
|
||||
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)
|
||||
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 ...
|
||||
*/
|
||||
Bool
|
||||
UpdateModifiersFromCompat(struct xkb_desc *xkb)
|
||||
UpdateModifiersFromCompat(struct xkb_keymap *xkb)
|
||||
{
|
||||
xkb_keycode_t key;
|
||||
int i;
|
||||
|
|
|
@ -970,7 +970,7 @@ ExprResolveModMask(ExprDef * expr,
|
|||
int
|
||||
ExprResolveVModMask(ExprDef * expr,
|
||||
ExprResult * val_rtrn,
|
||||
struct xkb_desc *xkb)
|
||||
struct xkb_keymap *xkb)
|
||||
{
|
||||
return ExprResolveMaskLookup(expr, val_rtrn, LookupVModMask, xkb);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ extern int ExprResolveModMask(ExprDef * /* expr */ ,
|
|||
|
||||
extern int ExprResolveVModMask(ExprDef * /* expr */ ,
|
||||
ExprResult * /* val_rtrn */ ,
|
||||
struct xkb_desc * /* xkb */
|
||||
struct xkb_keymap * /* xkb */
|
||||
);
|
||||
|
||||
extern int ExprResolveBoolean(ExprDef * /* expr */ ,
|
||||
|
|
|
@ -198,7 +198,7 @@ static const LookupEntry groupNames[] = {
|
|||
|
||||
int
|
||||
SetIndicatorMapField(LEDInfo * led,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
char *field, ExprDef * arrayNdx, ExprDef * value)
|
||||
{
|
||||
ExprResult rtrn;
|
||||
|
@ -318,7 +318,7 @@ SetIndicatorMapField(LEDInfo * led,
|
|||
|
||||
LEDInfo *
|
||||
HandleIndicatorMapDef(IndicatorMapDef * def,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge)
|
||||
{
|
||||
LEDInfo led, *rtrn;
|
||||
|
@ -367,7 +367,7 @@ HandleIndicatorMapDef(IndicatorMapDef * def,
|
|||
}
|
||||
|
||||
Bool
|
||||
CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
|
||||
CopyIndicatorMapDefs(struct xkb_keymap * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
|
||||
{
|
||||
LEDInfo *led, *next;
|
||||
LEDInfo *unbound, *last;
|
||||
|
@ -437,7 +437,7 @@ CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn
|
|||
}
|
||||
|
||||
Bool
|
||||
BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
|
||||
BindIndicators(struct xkb_keymap * xkb, Bool force, LEDInfo *unbound,
|
||||
LEDInfo **unboundRtrn)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -60,24 +60,24 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ ,
|
|||
);
|
||||
|
||||
extern int SetIndicatorMapField(LEDInfo * /* led */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
char * /* field */ ,
|
||||
ExprDef * /* arrayNdx */ ,
|
||||
ExprDef * /* value */
|
||||
);
|
||||
|
||||
extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
LEDInfo * /* dflt */ ,
|
||||
LEDInfo * /* oldLEDs */ ,
|
||||
unsigned /* mergeMode */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
|
||||
CopyIndicatorMapDefs(struct xkb_keymap * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
|
||||
|
||||
extern Bool
|
||||
BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
|
||||
BindIndicators(struct xkb_keymap * xkb, Bool force, LEDInfo *unbound,
|
||||
LEDInfo **unboundRtrn);
|
||||
|
||||
#endif /* INDICATORS_H */
|
||||
|
|
|
@ -82,7 +82,7 @@ typedef struct _KeyNamesInfo
|
|||
} KeyNamesInfo;
|
||||
|
||||
static void HandleKeycodesFile(XkbFile * file,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
unsigned merge,
|
||||
KeyNamesInfo * info);
|
||||
|
||||
|
@ -545,7 +545,7 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
|
|||
* @param info Struct to store the key info in.
|
||||
*/
|
||||
static Bool
|
||||
HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_desc * xkb, KeyNamesInfo * info)
|
||||
HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_keymap * xkb, KeyNamesInfo * info)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -804,7 +804,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
|
|||
*/
|
||||
static void
|
||||
HandleKeycodesFile(XkbFile * file,
|
||||
struct xkb_desc * xkb, unsigned merge, KeyNamesInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, KeyNamesInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -876,7 +876,7 @@ HandleKeycodesFile(XkbFile * file,
|
|||
* @return True on success, False otherwise.
|
||||
*/
|
||||
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 */
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
* @param file A list of XkbFiles, each denoting one type (e.g.
|
||||
* XkmKeyNamesIdx, etc.)
|
||||
*/
|
||||
struct xkb_desc *
|
||||
struct xkb_keymap *
|
||||
CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
|
||||
{
|
||||
unsigned have;
|
||||
|
@ -47,7 +47,7 @@ CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge)
|
|||
unsigned mainType;
|
||||
const char *mainName;
|
||||
LEDInfo *unbound = NULL, *next;
|
||||
struct xkb_desc *xkb = XkbcAllocKeyboard(context);
|
||||
struct xkb_keymap *xkb = XkbcAllocKeyboard(context);
|
||||
struct {
|
||||
XkbFile *keycodes;
|
||||
XkbFile *types;
|
||||
|
|
|
@ -106,7 +106,7 @@ static xkb_atom_t tok_KEYPAD;
|
|||
/***====================================================================***/
|
||||
|
||||
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_TWO_LEVEL = xkb_intern_atom("TWO_LEVEL");
|
||||
|
@ -246,7 +246,7 @@ ReportTypeBadWidth(const char *type, int has, int needs)
|
|||
}
|
||||
|
||||
static Bool
|
||||
AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
||||
AddKeyType(struct xkb_keymap * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
||||
{
|
||||
KeyTypeInfo *old;
|
||||
|
||||
|
@ -332,7 +332,7 @@ AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
|||
|
||||
static void
|
||||
MergeIncludedKeyTypes(KeyTypesInfo * into,
|
||||
KeyTypesInfo * from, unsigned merge, struct xkb_desc * xkb)
|
||||
KeyTypesInfo * from, unsigned merge, struct xkb_keymap * xkb)
|
||||
{
|
||||
KeyTypeInfo *type;
|
||||
|
||||
|
@ -357,14 +357,14 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* file */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
KeyTypesInfo * /* included */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeKeyTypes(IncludeStmt * stmt,
|
||||
struct xkb_desc * xkb, KeyTypesInfo * info, FileHandler hndlr)
|
||||
struct xkb_keymap * xkb, KeyTypesInfo * info, FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -512,7 +512,7 @@ NextMapEntry(KeyTypeInfo * type)
|
|||
}
|
||||
|
||||
static Bool
|
||||
AddPreserve(struct xkb_desc * xkb,
|
||||
AddPreserve(struct xkb_keymap * xkb,
|
||||
KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report)
|
||||
{
|
||||
PreserveInfo *old;
|
||||
|
@ -584,7 +584,7 @@ AddPreserve(struct xkb_desc * xkb,
|
|||
* @param report True if a warning is to be printed on.
|
||||
*/
|
||||
static Bool
|
||||
AddMapEntry(struct xkb_desc * xkb,
|
||||
AddMapEntry(struct xkb_keymap * xkb,
|
||||
KeyTypeInfo * type,
|
||||
struct xkb_kt_map_entry * new, Bool clobber, Bool report)
|
||||
{
|
||||
|
@ -638,7 +638,7 @@ AddMapEntry(struct xkb_desc * xkb,
|
|||
|
||||
static Bool
|
||||
SetMapEntry(KeyTypeInfo * type,
|
||||
struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
struct xkb_keymap * xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
{
|
||||
ExprResult rtrn;
|
||||
struct xkb_kt_map_entry entry;
|
||||
|
@ -676,7 +676,7 @@ SetMapEntry(KeyTypeInfo * type,
|
|||
|
||||
static Bool
|
||||
SetPreserve(KeyTypeInfo * type,
|
||||
struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
struct xkb_keymap * xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
{
|
||||
ExprResult rtrn;
|
||||
PreserveInfo new;
|
||||
|
@ -816,7 +816,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
|||
*/
|
||||
static Bool
|
||||
SetKeyTypeField(KeyTypeInfo * type,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info)
|
||||
{
|
||||
|
@ -874,7 +874,7 @@ SetKeyTypeField(KeyTypeInfo * type,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
|
||||
HandleKeyTypeVar(VarDef * stmt, struct xkb_keymap * xkb, KeyTypesInfo * info)
|
||||
{
|
||||
ExprResult elem, field;
|
||||
ExprDef *arrayNdx;
|
||||
|
@ -900,7 +900,7 @@ HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
|
|||
|
||||
static int
|
||||
HandleKeyTypeBody(VarDef * def,
|
||||
struct xkb_desc * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
|
||||
struct xkb_keymap * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
|
||||
{
|
||||
int ok = 1;
|
||||
ExprResult tmp, field;
|
||||
|
@ -929,7 +929,7 @@ HandleKeyTypeBody(VarDef * def,
|
|||
*/
|
||||
static int
|
||||
HandleKeyTypeDef(KeyTypeDef * def,
|
||||
struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, KeyTypesInfo * info)
|
||||
{
|
||||
unsigned int i;
|
||||
KeyTypeInfo type;
|
||||
|
@ -1009,7 +1009,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
|
|||
*/
|
||||
static void
|
||||
HandleKeyTypesFile(XkbFile * file,
|
||||
struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, KeyTypesInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ HandleKeyTypesFile(XkbFile * file,
|
|||
}
|
||||
|
||||
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;
|
||||
PreserveInfo *pre;
|
||||
|
@ -1143,7 +1143,7 @@ CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo
|
|||
}
|
||||
|
||||
Bool
|
||||
CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
CompileKeyTypes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
|
||||
{
|
||||
KeyTypesInfo info;
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ typedef struct _KeyNameDesc
|
|||
* @return True if found, False otherwise.
|
||||
*/
|
||||
Bool
|
||||
FindNamedKey(struct xkb_desc * xkb,
|
||||
FindNamedKey(struct xkb_keymap * xkb,
|
||||
unsigned long name,
|
||||
xkb_keycode_t *kc_rtrn,
|
||||
Bool use_aliases, Bool create, xkb_keycode_t start_from)
|
||||
|
@ -307,7 +307,7 @@ FindNamedKey(struct xkb_desc * xkb,
|
|||
}
|
||||
|
||||
Bool
|
||||
FindKeyNameForAlias(struct xkb_desc * xkb, unsigned long lname,
|
||||
FindKeyNameForAlias(struct xkb_keymap * xkb, unsigned long lname,
|
||||
unsigned long *real_name)
|
||||
{
|
||||
unsigned int i;
|
||||
|
|
|
@ -76,7 +76,7 @@ extern Bool ProcessIncludeFile(struct xkb_context * /* context */,
|
|||
unsigned * /* merge_rtrn */
|
||||
);
|
||||
|
||||
extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
|
||||
extern Bool FindNamedKey(struct xkb_keymap * /* xkb */ ,
|
||||
unsigned long /* name */ ,
|
||||
xkb_keycode_t * /* kc_rtrn */ ,
|
||||
Bool /* use_aliases */ ,
|
||||
|
@ -84,7 +84,7 @@ extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
|
|||
xkb_keycode_t /* start_from */
|
||||
);
|
||||
|
||||
extern Bool FindKeyNameForAlias(struct xkb_desc * /* xkb */ ,
|
||||
extern Bool FindKeyNameForAlias(struct xkb_keymap * /* xkb */ ,
|
||||
unsigned long /* lname */ ,
|
||||
unsigned long * /* real_name */
|
||||
);
|
||||
|
|
|
@ -277,7 +277,7 @@ typedef struct _SymbolsInfo
|
|||
} SymbolsInfo;
|
||||
|
||||
static void
|
||||
InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb)
|
||||
InitSymbolsInfo(SymbolsInfo * info, struct xkb_keymap * xkb)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -705,7 +705,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
|
|||
}
|
||||
|
||||
static Bool
|
||||
AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_desc * xkb)
|
||||
AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_keymap * xkb)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned long real_name;
|
||||
|
@ -817,7 +817,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
|
|||
|
||||
static void
|
||||
MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
|
||||
unsigned merge, struct xkb_desc * xkb)
|
||||
unsigned merge, struct xkb_keymap * xkb)
|
||||
{
|
||||
unsigned int i;
|
||||
KeyInfo *key;
|
||||
|
@ -867,14 +867,14 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
SymbolsInfo * /* included */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeSymbols(IncludeStmt * stmt,
|
||||
struct xkb_desc * xkb, SymbolsInfo * info, FileHandler hndlr)
|
||||
struct xkb_keymap * xkb, SymbolsInfo * info, FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -1021,7 +1021,7 @@ GetGroupIndex(KeyInfo * key,
|
|||
|
||||
static Bool
|
||||
AddSymbolsToKey(KeyInfo * key,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
|
||||
{
|
||||
|
@ -1088,7 +1088,7 @@ AddSymbolsToKey(KeyInfo * key,
|
|||
|
||||
static Bool
|
||||
AddActionsToKey(KeyInfo * key,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
|
||||
{
|
||||
|
@ -1176,7 +1176,7 @@ static const LookupEntry repeatEntries[] = {
|
|||
|
||||
static Bool
|
||||
SetSymbolsField(KeyInfo * key,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_keymap * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
|
||||
{
|
||||
|
@ -1360,7 +1360,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
|
|||
}
|
||||
|
||||
static int
|
||||
HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
|
||||
HandleSymbolsVar(VarDef * stmt, struct xkb_keymap * xkb, SymbolsInfo * info)
|
||||
{
|
||||
ExprResult elem, field, tmp;
|
||||
ExprDef *arrayNdx;
|
||||
|
@ -1449,7 +1449,7 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
|
|||
|
||||
static Bool
|
||||
HandleSymbolsBody(VarDef * def,
|
||||
struct xkb_desc * xkb, KeyInfo * key, SymbolsInfo * info)
|
||||
struct xkb_keymap * xkb, KeyInfo * key, SymbolsInfo * info)
|
||||
{
|
||||
Bool ok = True;
|
||||
ExprResult tmp, field;
|
||||
|
@ -1532,7 +1532,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
|||
|
||||
static int
|
||||
HandleSymbolsDef(SymbolsDef * stmt,
|
||||
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
|
||||
{
|
||||
KeyInfo key;
|
||||
|
||||
|
@ -1562,7 +1562,7 @@ HandleSymbolsDef(SymbolsDef * stmt,
|
|||
|
||||
static Bool
|
||||
HandleModMapDef(ModMapDef * def,
|
||||
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
|
||||
{
|
||||
ExprDef *key;
|
||||
ModMapEntry tmp;
|
||||
|
@ -1605,7 +1605,7 @@ HandleModMapDef(ModMapDef * def,
|
|||
|
||||
static void
|
||||
HandleSymbolsFile(XkbFile * file,
|
||||
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
|
||||
struct xkb_keymap * xkb, unsigned merge, SymbolsInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -1665,7 +1665,7 @@ HandleSymbolsFile(XkbFile * file,
|
|||
}
|
||||
|
||||
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;
|
||||
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.
|
||||
*/
|
||||
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;
|
||||
const char *name = XkbcAtomText(atom);
|
||||
|
@ -1933,7 +1933,7 @@ PrepareKeyDef(KeyInfo * key)
|
|||
* This function recurses.
|
||||
*/
|
||||
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;
|
||||
xkb_keycode_t kc;
|
||||
|
@ -2132,7 +2132,7 @@ CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from)
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
|
||||
CopyModMapDef(struct xkb_keymap * xkb, ModMapEntry *entry)
|
||||
{
|
||||
xkb_keycode_t kc;
|
||||
|
||||
|
@ -2174,7 +2174,7 @@ CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
|
|||
* @param merge Merge strategy (e.g. MergeOverride).
|
||||
*/
|
||||
Bool
|
||||
CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
CompileSymbols(XkbFile *file, struct xkb_keymap * xkb, unsigned merge)
|
||||
{
|
||||
unsigned int i;
|
||||
SymbolsInfo info;
|
||||
|
|
|
@ -36,14 +36,14 @@
|
|||
#include "vmod.h"
|
||||
|
||||
void
|
||||
InitVModInfo(VModInfo * info, struct xkb_desc * xkb)
|
||||
InitVModInfo(VModInfo * info, struct xkb_keymap * xkb)
|
||||
{
|
||||
ClearVModInfo(info, xkb);
|
||||
info->errorCount = 0;
|
||||
}
|
||||
|
||||
void
|
||||
ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
|
||||
ClearVModInfo(VModInfo * info, struct xkb_keymap * xkb)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -78,7 +78,7 @@ ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
|
|||
* @param mergeMode Merge strategy (e.g. MergeOverride)
|
||||
*/
|
||||
Bool
|
||||
HandleVModDef(VModDef * stmt, struct xkb_desc *xkb, unsigned mergeMode,
|
||||
HandleVModDef(VModDef * stmt, struct xkb_keymap *xkb, unsigned mergeMode,
|
||||
VModInfo * info)
|
||||
{
|
||||
int i, bit, nextFree;
|
||||
|
@ -162,7 +162,7 @@ HandleVModDef(VModDef * stmt, struct xkb_desc *xkb, unsigned mergeMode,
|
|||
* undefined.
|
||||
*/
|
||||
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)
|
||||
{
|
||||
int i;
|
||||
|
@ -216,7 +216,7 @@ LookupVModMask(const void * priv, xkb_atom_t field, unsigned type,
|
|||
}
|
||||
|
||||
int
|
||||
FindKeypadVMod(struct xkb_desc * xkb)
|
||||
FindKeypadVMod(struct xkb_keymap * xkb)
|
||||
{
|
||||
xkb_atom_t name;
|
||||
ExprResult rtrn;
|
||||
|
@ -230,7 +230,7 @@ FindKeypadVMod(struct xkb_desc * xkb)
|
|||
}
|
||||
|
||||
Bool
|
||||
ResolveVirtualModifier(ExprDef * def, struct xkb_desc *xkb,
|
||||
ResolveVirtualModifier(ExprDef * def, struct xkb_keymap *xkb,
|
||||
ExprResult * val_rtrn, VModInfo * info)
|
||||
{
|
||||
struct xkb_names * names;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
typedef struct _VModInfo
|
||||
{
|
||||
struct xkb_desc * xkb;
|
||||
struct xkb_keymap * xkb;
|
||||
unsigned defined;
|
||||
unsigned available;
|
||||
unsigned newlyDefined;
|
||||
|
@ -37,28 +37,28 @@ typedef struct _VModInfo
|
|||
} VModInfo;
|
||||
|
||||
extern void InitVModInfo(VModInfo * /* info */ ,
|
||||
struct xkb_desc * /* xkb */
|
||||
struct xkb_keymap * /* xkb */
|
||||
);
|
||||
|
||||
extern void ClearVModInfo(VModInfo * /* info */ ,
|
||||
struct xkb_desc * /* xkb */
|
||||
struct xkb_keymap * /* xkb */
|
||||
);
|
||||
|
||||
extern Bool HandleVModDef(VModDef * /* stmt */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
unsigned /* mergeMode */ ,
|
||||
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 */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_keymap * /* xkb */ ,
|
||||
ExprResult * /* value_rtrn */ ,
|
||||
VModInfo * /* info */
|
||||
);
|
||||
|
|
|
@ -114,13 +114,13 @@ unwind_file:
|
|||
return names;
|
||||
}
|
||||
|
||||
struct xkb_desc *
|
||||
struct xkb_keymap *
|
||||
xkb_map_new_from_names(struct xkb_context *context,
|
||||
const struct xkb_rule_names *rmlvo)
|
||||
{
|
||||
XkbRF_VarDefsRec defs;
|
||||
struct xkb_component_names *names;
|
||||
struct xkb_desc *xkb;
|
||||
struct xkb_keymap *xkb;
|
||||
|
||||
if (!rmlvo || ISEMPTY(rmlvo->rules) || ISEMPTY(rmlvo->layout)) {
|
||||
ERROR("rules and layout required to generate XKB keymap\n");
|
||||
|
@ -185,11 +185,11 @@ XkbChooseMap(XkbFile *file, const char *name)
|
|||
return map;
|
||||
}
|
||||
|
||||
static struct xkb_desc *
|
||||
static struct xkb_keymap *
|
||||
compile_keymap(struct xkb_context *context, XkbFile *file)
|
||||
{
|
||||
XkbFile *mapToUse;
|
||||
struct xkb_desc * xkb = NULL;
|
||||
struct xkb_keymap * xkb = NULL;
|
||||
|
||||
/* Find map to use */
|
||||
mapToUse = XkbChooseMap(file, NULL);
|
||||
|
@ -216,7 +216,7 @@ err:
|
|||
return xkb;
|
||||
}
|
||||
|
||||
struct xkb_desc *
|
||||
struct xkb_keymap *
|
||||
xkb_map_new_from_kccgst(struct xkb_context *context,
|
||||
const struct xkb_component_names *kccgst)
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ xkb_map_new_from_kccgst(struct xkb_context *context,
|
|||
return compile_keymap(context, file);
|
||||
}
|
||||
|
||||
struct xkb_desc *
|
||||
struct xkb_keymap *
|
||||
xkb_map_new_from_string(struct xkb_context *context,
|
||||
const char *string,
|
||||
enum xkb_keymap_format format)
|
||||
|
@ -280,7 +280,7 @@ xkb_map_new_from_string(struct xkb_context *context,
|
|||
return compile_keymap(context, file);
|
||||
}
|
||||
|
||||
struct xkb_desc *
|
||||
struct xkb_keymap *
|
||||
xkb_map_new_from_fd(struct xkb_context *context,
|
||||
int fd,
|
||||
enum xkb_keymap_format format)
|
||||
|
@ -313,13 +313,13 @@ xkb_map_new_from_fd(struct xkb_context *context,
|
|||
}
|
||||
|
||||
void
|
||||
xkb_map_ref(struct xkb_desc *xkb)
|
||||
xkb_map_ref(struct xkb_keymap *xkb)
|
||||
{
|
||||
xkb->refcnt++;
|
||||
}
|
||||
|
||||
void
|
||||
xkb_map_unref(struct xkb_desc *xkb)
|
||||
xkb_map_unref(struct xkb_keymap *xkb)
|
||||
{
|
||||
if (--xkb->refcnt > 0)
|
||||
return;
|
||||
|
|
|
@ -254,25 +254,25 @@ typedef struct _XkbFile
|
|||
Bool compiled;
|
||||
} XkbFile;
|
||||
|
||||
extern struct xkb_desc *
|
||||
extern struct xkb_keymap *
|
||||
CompileKeymap(struct xkb_context *context, XkbFile *file, unsigned merge);
|
||||
|
||||
extern Bool
|
||||
CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
CompileKeycodes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
|
||||
|
||||
extern Bool
|
||||
CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
CompileKeyTypes(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
|
||||
|
||||
typedef struct _LEDInfo *LEDInfoPtr;
|
||||
|
||||
extern Bool
|
||||
CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
|
||||
CompileCompatMap(XkbFile *file, struct xkb_keymap * xkb, unsigned merge,
|
||||
LEDInfoPtr *unboundLEDs);
|
||||
|
||||
extern Bool
|
||||
CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
CompileSymbols(XkbFile *file, struct xkb_keymap * xkb, unsigned merge);
|
||||
|
||||
extern Bool
|
||||
UpdateModifiersFromCompat(struct xkb_desc *xkb);
|
||||
UpdateModifiersFromCompat(struct xkb_keymap *xkb);
|
||||
|
||||
#endif /* XKBCOMP_H */
|
||||
|
|
|
@ -38,16 +38,16 @@ typedef uint32_t xkb_atom_t;
|
|||
/***====================================================================***/
|
||||
|
||||
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);
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern int
|
||||
XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod);
|
||||
XkbcInitCanonicalKeyTypes(struct xkb_keymap * xkb, unsigned which, int keypadVMod);
|
||||
|
||||
extern Bool
|
||||
XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
|
||||
XkbcVirtualModsToReal(struct xkb_keymap * xkb, unsigned virtual_mask,
|
||||
unsigned *mask_rtrn);
|
||||
|
||||
extern void
|
||||
|
@ -86,7 +86,7 @@ extern const char *
|
|||
XkbcAtomText(xkb_atom_t atm);
|
||||
|
||||
extern const char *
|
||||
XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask);
|
||||
XkbcVModMaskText(struct xkb_keymap * xkb, unsigned modMask, unsigned mask);
|
||||
|
||||
extern const char *
|
||||
XkbcModIndexText(unsigned ndx);
|
||||
|
|
|
@ -41,7 +41,7 @@ static char buffer[8192];
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct xkb_context *context;
|
||||
struct xkb_desc *xkb;
|
||||
struct xkb_keymap *xkb;
|
||||
char *path;
|
||||
int fd;
|
||||
int i, len, from_string = 0;
|
||||
|
|
|
@ -33,7 +33,7 @@ authorization from the authors.
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct xkb_context *context;
|
||||
struct xkb_desc *xkb;
|
||||
struct xkb_keymap *xkb;
|
||||
struct xkb_component_names kccgst;
|
||||
|
||||
/* Require Kc + T + C + S */
|
||||
|
|
|
@ -34,7 +34,7 @@ authorization from the authors.
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct xkb_context *context;
|
||||
struct xkb_desc *xkb;
|
||||
struct xkb_keymap *xkb;
|
||||
struct xkb_rule_names rmlvo;
|
||||
|
||||
/* Require rmlvo */
|
||||
|
|
|
@ -88,7 +88,7 @@ print_state(struct xkb_state *state)
|
|||
}
|
||||
|
||||
static void
|
||||
test_update_key(struct xkb_desc *xkb)
|
||||
test_update_key(struct xkb_keymap *xkb)
|
||||
{
|
||||
struct xkb_state *state = xkb_state_new(xkb);
|
||||
xkb_keysym_t *syms;
|
||||
|
@ -150,7 +150,7 @@ test_update_key(struct xkb_desc *xkb)
|
|||
}
|
||||
|
||||
static void
|
||||
test_serialisation(struct xkb_desc *xkb)
|
||||
test_serialisation(struct xkb_keymap *xkb)
|
||||
{
|
||||
struct xkb_state *state = xkb_state_new(xkb);
|
||||
xkb_mod_mask_t base_mods;
|
||||
|
@ -206,7 +206,7 @@ int
|
|||
main(int argc, char *argv[])
|
||||
{
|
||||
struct xkb_context *context;
|
||||
struct xkb_desc *xkb;
|
||||
struct xkb_keymap *xkb;
|
||||
struct xkb_rule_names rmlvo;
|
||||
|
||||
rmlvo.rules = "evdev";
|
||||
|
|
Loading…
Reference in New Issue