struct list entry;
xkb_atom_t name;
- unsigned char indicator;
+ xkb_led_index_t indicator;
unsigned char flags;
unsigned char which_mods;
unsigned char real_mods;
#define _LED_Automatic (1 << 5)
#define _LED_DrivesKbd (1 << 6)
-#define _LED_NotBound 255
-
typedef struct _GroupCompatInfo {
unsigned file_id;
enum merge_mode merge;
ClearIndicatorMapInfo(struct xkb_context *ctx, LEDInfo * info)
{
info->name = xkb_atom_intern(ctx, "default");
- info->indicator = _LED_NotBound;
+ info->indicator = XKB_LED_INVALID;
info->flags = info->which_mods = info->real_mods = 0;
info->vmods = 0;
info->which_groups = info->groups = 0;
return false;
}
- led->indicator = (unsigned char) ndx;
+ led->indicator = (xkb_led_index_t) ndx;
led->defined |= _LED_Index;
}
else {
static void
BindIndicators(CompatInfo *info, struct list *unbound_leds)
{
- int i;
+ xkb_led_index_t i;
LEDInfo *led, *next_led;
struct xkb_indicator_map *map;
struct xkb_keymap *keymap = info->keymap;
list_foreach(led, unbound_leds, entry) {
- if (led->indicator == _LED_NotBound) {
+ if (led->indicator == XKB_LED_INVALID) {
for (i = 0; i < XkbNumIndicators; i++) {
if (keymap->indicator_names[i] &&
streq(keymap->indicator_names[i],
}
list_foreach(led, unbound_leds, entry) {
- if (led->indicator == _LED_NotBound) {
+ if (led->indicator == XKB_LED_INVALID) {
for (i = 0; i < XkbNumIndicators; i++) {
if (keymap->indicator_names[i] == NULL) {
keymap->indicator_names[i] =
}
}
- if (led->indicator == _LED_NotBound) {
+ if (led->indicator == XKB_LED_INVALID) {
log_err(info->keymap->ctx,
"No unnamed indicators found; "
"Virtual indicator map \"%s\" not bound\n",
}
list_foreach_safe(led, next_led, unbound_leds, entry) {
- if (led->indicator == _LED_NotBound) {
+ if (led->indicator == XKB_LED_INVALID) {
free(led);
continue;
}
if (led->which_mods == 0 && (led->real_mods || led->vmods))
led->which_mods = XkbIM_UseEffective;
- if (led->indicator == _LED_NotBound) {
+ if (led->indicator == XKB_LED_INVALID) {
list_append(&led->entry, &unbound_leds);
continue;
}