static bool
write_vmods(struct xkb_keymap *keymap, struct buf *buf)
{
- int num_vmods = 0;
- int i;
+ xkb_mod_index_t i, num_vmods = 0;
for (i = 0; i < XKB_NUM_VIRTUAL_MODS; i++) {
if (!keymap->vmod_names[i])
} while (0)
static char *
-get_indicator_state_text(uint8_t which)
+get_indicator_state_text(enum xkb_state_component which)
{
- int i;
+ unsigned int i;
static char ret[GET_TEXT_BUF_SIZE];
memset(ret, 0, GET_TEXT_BUF_SIZE);
{
struct xkb_key *key;
struct xkb_key_alias *alias;
- int i;
+ xkb_led_index_t i;
if (keymap->keycodes_section_name)
write_buf(buf, "\txkb_keycodes \"%s\" {\n",
}
xkb_foreach_key(key, keymap) {
- int mod;
+ xkb_mod_index_t mod;
if (key->modmap == 0)
continue;
struct xkb_indicator_map {
xkb_atom_t name;
enum xkb_state_component which_groups;
- uint32_t groups;
+ xkb_layout_mask_t groups;
enum xkb_state_component which_mods;
struct xkb_mods mods;
enum xkb_action_controls ctrls;
*/
int16_t mod_key_count[sizeof(xkb_mod_mask_t) * 8];
- uint32_t leds;
+ xkb_led_mask_t leds;
int refcnt;
darray(struct xkb_filter) filters;
for (led = 0; led < XKB_NUM_INDICATORS; led++) {
struct xkb_indicator_map *map = &state->keymap->indicators[led];
xkb_mod_mask_t mod_mask = 0;
- uint32_t group_mask = 0;
+ xkb_layout_mask_t group_mask = 0;
if (map->which_mods & XKB_STATE_DEPRESSED)
mod_mask |= state->base_mods;
*/
static int
match_mod_masks(struct xkb_state *state, enum xkb_state_match match,
- uint32_t wanted)
+ xkb_mod_mask_t wanted)
{
- uint32_t active = xkb_state_serialize_mods(state, XKB_STATE_EFFECTIVE);
+ xkb_mod_mask_t active = xkb_state_serialize_mods(state,
+ XKB_STATE_EFFECTIVE);
if (!(match & XKB_STATE_MATCH_NON_EXCLUSIVE) && (active & ~wanted))
return 0;
{
va_list ap;
xkb_mod_index_t idx = 0;
- uint32_t wanted = 0;
+ xkb_mod_mask_t wanted = 0;
int ret = 0;
xkb_mod_index_t num_mods = xkb_keymap_num_mods(state->keymap);
va_list ap;
xkb_mod_index_t idx = 0;
const char *str;
- uint32_t wanted = 0;
+ xkb_mod_mask_t wanted = 0;
int ret = 0;
va_start(ap, match);
ModMaskText(xkb_mod_mask_t mask);
const char *
-ActionTypeText(unsigned type);
+ActionTypeText(enum xkb_action_type type);
const char *
KeysymText(xkb_keysym_t sym);
KeyNameText(struct xkb_context *ctx, xkb_atom_t name);
const char *
-SIMatchText(unsigned type);
+SIMatchText(enum xkb_match_operation type);
#endif /* TEXT_H */
return false;
}
- act->type = (uint8_t) type;
+ act->type = (enum xkb_action_type) type;
return true;
}
else if (field == ACTION_FIELD_DATA) {
static bool
HandleInterpDef(CompatInfo *info, InterpDef *def, enum merge_mode merge)
{
- unsigned pred, mods;
+ enum xkb_match_operation pred;
+ xkb_mod_mask_t mods;
SymInterpInfo si;
if (!ResolveStateAndPredicate(def->match, &pred, &mods, info)) {
* such that when we find a match we return immediately.
*/
darray_foreach(interp, keymap->sym_interpret) {
- uint32_t mods;
+ xkb_mod_mask_t mods;
bool found;
if ((num_syms > 1 || interp->sym != syms[0]) &&
typedef struct _ModMapEntry {
enum merge_mode merge;
bool haveSymbol;
- int modifier;
+ xkb_mod_index_t modifier;
union {
xkb_atom_t keyName;
xkb_keysym_t keySym;
darray_foreach(mm, info->modMaps) {
if (new->haveSymbol && mm->haveSymbol
&& (new->u.keySym == mm->u.keySym)) {
- unsigned use, ignore;
+ xkb_mod_index_t use, ignore;
if (mm->modifier != new->modifier) {
if (clobber) {
use = new->modifier;
}
if ((!new->haveSymbol) && (!mm->haveSymbol) &&
(new->u.keyName == mm->u.keyName)) {
- unsigned use, ignore;
+ xkb_mod_index_t use, ignore;
if (mm->modifier != new->modifier) {
if (clobber) {
use = new->modifier;
void
InitVModInfo(VModInfo *info, struct xkb_keymap *keymap)
{
- xkb_layout_index_t i;
+ xkb_mod_index_t i;
memset(info, 0, sizeof(*info));
for (i = 0; i < XKB_NUM_VIRTUAL_MODS; i++)