}
for (i = 0; i < XkbNumIndicators; i++) {
- if (!keymap->indicator_names[i])
+ if (keymap->indicators[i].name == XKB_ATOM_NONE)
continue;
write_buf(buf, "\t\tindicator %d = \"%s\";\n", i + 1,
- xkb_atom_text(keymap->ctx, keymap->indicator_names[i]));
+ xkb_atom_text(keymap->ctx, keymap->indicators[i].name));
}
struct xkb_indicator_map *led = &keymap->indicators[num];
write_buf(buf, "\t\tindicator \"%s\" {\n",
- xkb_atom_text(keymap->ctx, keymap->indicator_names[num]));
+ xkb_atom_text(keymap->ctx, keymap->indicators[num].name));
if (led->which_groups) {
if (led->which_groups != XkbIM_UseEffective) {
if (idx >= xkb_map_num_leds(keymap))
return NULL;
- return xkb_atom_text(keymap->ctx, keymap->indicator_names[idx]);
+ return xkb_atom_text(keymap->ctx, keymap->indicators[idx].name);
}
/**
return XKB_LED_INVALID;
for (i = 0; i < num_leds; i++)
- if (keymap->indicator_names[i] == atom)
+ if (keymap->indicators[i].name == atom)
return i;
return XKB_LED_INVALID;
};
struct xkb_indicator_map {
+ xkb_atom_t name;
unsigned char which_groups;
uint32_t groups;
unsigned char which_mods;
xkb_atom_t group_names[XkbNumKbdGroups];
struct xkb_indicator_map indicators[XkbNumIndicators];
- xkb_atom_t indicator_names[XkbNumIndicators];
char *keycodes_section_name;
char *symbols_section_name;
*/
im = NULL;
for (i = 0; i < XkbNumIndicators; i++) {
- if (keymap->indicator_names[i] == led->name) {
+ if (keymap->indicators[i].name == led->name) {
im = &keymap->indicators[i];
break;
}
xkb_atom_text(keymap->ctx, led->name));
for (i = 0; i < XkbNumIndicators; i++) {
- if (keymap->indicator_names[i] != XKB_ATOM_NONE)
+ if (keymap->indicators[i].name != XKB_ATOM_NONE)
continue;
- keymap->indicator_names[i] = led->name;
+ keymap->indicators[i].name = led->name;
im = &keymap->indicators[i];
break;
}
* xkb_keycode_t min_key_code;
* xkb_keycode_t max_key_code;
* darray(struct xkb_key_alias) key_aliases;
- * const char *indicator_names[XkbNumIndicators];
* char *keycodes_section_name;
+ * The 'name' field of indicators declared in xkb_keycodes:
+ * struct xkb_indicator_map indicators[XkbNumIndicators];
* Further, the array of keys:
* darray(struct xkb_key) keys;
* had been resized to its final size (i.e. all of the xkb_key objects are
if (led->name == XKB_ATOM_NONE)
continue;
- keymap->indicator_names[idx] = led->name;
+ keymap->indicators[idx].name = led->name;
}
ApplyAliases(info, keymap);