memset(ret, 0, GET_TEXT_BUF_SIZE);
- which &= XkbIM_UseAnyMods;
-
if (which == 0) {
strcpy(ret, "0");
return NULL;
xkb_atom_text(keymap->ctx, keymap->indicators[num].name));
if (led->which_groups) {
- if (led->which_groups != XkbIM_UseEffective) {
+ if (led->which_groups != XKB_STATE_EFFECTIVE) {
write_buf(buf, "\t\t\twhichGroupState= %s;\n",
get_indicator_state_text(led->which_groups));
}
}
if (led->which_mods) {
- if (led->which_mods != XkbIM_UseEffective) {
+ if (led->which_mods != XKB_STATE_EFFECTIVE) {
write_buf(buf, "\t\t\twhichModState= %s;\n",
get_indicator_state_text(led->which_mods));
}
xkb_mod_mask_t mod_mask = 0;
uint32_t group_mask = 0;
- if (map->which_mods & XkbIM_UseAnyMods) {
- if (map->which_mods & XkbIM_UseBase)
- mod_mask |= state->base_mods;
- if (map->which_mods & XkbIM_UseLatched)
- mod_mask |= state->latched_mods;
- if (map->which_mods & XkbIM_UseLocked)
- mod_mask |= state->locked_mods;
- if (map->which_mods & XkbIM_UseEffective)
- mod_mask |= state->mods;
- if ((map->mods.mask & mod_mask))
- state->leds |= (1 << led);
- }
- if (map->which_groups & XkbIM_UseAnyGroup) {
- if (map->which_groups & XkbIM_UseBase)
- group_mask |= (1 << state->base_group);
- if (map->which_groups & XkbIM_UseLatched)
- group_mask |= (1 << state->latched_group);
- if (map->which_groups & XkbIM_UseLocked)
- group_mask |= (1 << state->locked_group);
- if (map->which_groups & XkbIM_UseEffective)
- group_mask |= (1 << state->group);
- if ((map->groups & group_mask))
- state->leds |= (1 << led);
- }
+ if (map->which_mods & XKB_STATE_DEPRESSED)
+ mod_mask |= state->base_mods;
+ if (map->which_mods & XKB_STATE_LATCHED)
+ mod_mask |= state->latched_mods;
+ if (map->which_mods & XKB_STATE_LOCKED)
+ mod_mask |= state->locked_mods;
+ if ((map->mods.mask & mod_mask))
+ state->leds |= (1 << led);
+
+ if (map->which_groups & XKB_STATE_DEPRESSED)
+ group_mask |= (1 << state->base_group);
+ if (map->which_groups & XKB_STATE_LATCHED)
+ group_mask |= (1 << state->latched_group);
+ if (map->which_groups & XKB_STATE_LOCKED)
+ group_mask |= (1 << state->locked_group);
+ if ((map->groups & group_mask))
+ state->leds |= (1 << led);
+
if (map->ctrls) {
if ((map->ctrls & state->keymap->enabled_ctrls))
state->leds |= (1 << led);
};
const LookupEntry modComponentMaskNames[] = {
- {"base", XkbIM_UseBase},
- {"latched", XkbIM_UseLatched},
- {"locked", XkbIM_UseLocked},
- {"effective", XkbIM_UseEffective},
- {"compat", XkbIM_UseCompat},
- {"any", XkbIM_UseAnyMods},
+ {"base", XKB_STATE_DEPRESSED},
+ {"latched", XKB_STATE_LATCHED},
+ {"locked", XKB_STATE_LOCKED},
+ {"effective", XKB_STATE_EFFECTIVE},
+ {"compat", XKB_STATE_EFFECTIVE},
+ {"any", XKB_STATE_EFFECTIVE},
{"none", 0},
{NULL, 0}
};
const LookupEntry groupComponentMaskNames[] = {
- {"base", XkbIM_UseBase},
- {"latched", XkbIM_UseLatched},
- {"locked", XkbIM_UseLocked},
- {"effective", XkbIM_UseEffective},
- {"any", XkbIM_UseAnyGroup},
+ {"base", XKB_STATE_DEPRESSED},
+ {"latched", XKB_STATE_LATCHED},
+ {"locked", XKB_STATE_LOCKED},
+ {"effective", XKB_STATE_EFFECTIVE},
+ {"any", XKB_STATE_EFFECTIVE},
{"none", 0},
{NULL, 0}
};
struct xkb_indicator_map {
xkb_atom_t name;
- unsigned char which_groups;
+ enum xkb_state_component which_groups;
uint32_t groups;
- unsigned char which_mods;
+ enum xkb_state_component which_mods;
struct xkb_mods mods;
unsigned int ctrls;
};
im = &keymap->indicators[i];
*im = led->im;
if (im->groups != 0 && im->which_groups == 0)
- im->which_groups = XkbIM_UseEffective;
+ im->which_groups = XKB_STATE_EFFECTIVE;
if (im->mods.mods != 0 && im->which_mods == 0)
- im->which_mods = XkbIM_UseEffective;
+ im->which_mods = XKB_STATE_EFFECTIVE;
}
}