Lines Matching refs:keyi
143 InitKeyInfo(struct xkb_context *ctx, KeyInfo *keyi) in InitKeyInfo() argument
145 memset(keyi, 0, sizeof(*keyi)); in InitKeyInfo()
146 keyi->merge = MERGE_OVERRIDE; in InitKeyInfo()
147 keyi->name = xkb_atom_intern_literal(ctx, "*"); in InitKeyInfo()
148 keyi->out_of_range_group_action = RANGE_WRAP; in InitKeyInfo()
152 ClearKeyInfo(KeyInfo *keyi) in ClearKeyInfo() argument
155 darray_foreach(groupi, keyi->groups) in ClearKeyInfo()
157 darray_free(keyi->groups); in ClearKeyInfo()
206 KeyInfo *keyi; in ClearSymbolsInfo() local
208 darray_foreach(keyi, info->keys) in ClearSymbolsInfo()
209 ClearKeyInfo(keyi); in ClearSymbolsInfo()
217 KeyInfoText(SymbolsInfo *info, KeyInfo *keyi) in KeyInfoText() argument
219 return KeyNameText(info->ctx, keyi->name); in KeyInfoText()
421 AddKeySymbols(SymbolsInfo *info, KeyInfo *keyi, bool same_file) in AddKeySymbols() argument
432 real_name = XkbResolveKeyAlias(info->keymap, keyi->name); in AddKeySymbols()
434 keyi->name = real_name; in AddKeySymbols()
437 if (iter->name == keyi->name) in AddKeySymbols()
438 return MergeKeys(info, iter, keyi, same_file); in AddKeySymbols()
440 darray_append(info->keys, *keyi); in AddKeySymbols()
441 InitKeyInfo(info->ctx, keyi); in AddKeySymbols()
529 KeyInfo *keyi; in MergeIncludedSymbols() local
530 darray_foreach(keyi, from->keys) { in MergeIncludedSymbols()
531 keyi->merge = (merge == MERGE_DEFAULT ? keyi->merge : merge); in MergeIncludedSymbols()
532 if (!AddKeySymbols(into, keyi, false)) in MergeIncludedSymbols()
608 GetGroupIndex(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx, in GetGroupIndex() argument
619 darray_enumerate(i, groupi, keyi->groups) { in GetGroupIndex()
630 name, KeyInfoText(info, keyi), XKB_MAX_GROUPS, name); in GetGroupIndex()
634 darray_resize0(keyi->groups, darray_size(keyi->groups) + 1); in GetGroupIndex()
635 *ndx_rtrn = darray_size(keyi->groups) - 1; in GetGroupIndex()
643 name, KeyInfoText(info, keyi)); in GetGroupIndex()
648 if (*ndx_rtrn >= darray_size(keyi->groups)) in GetGroupIndex()
649 darray_resize0(keyi->groups, *ndx_rtrn + 1); in GetGroupIndex()
655 AddSymbolsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx, in AddSymbolsToKey() argument
662 if (!GetGroupIndex(info, keyi, arrayNdx, SYMBOLS, &ndx)) in AddSymbolsToKey()
665 groupi = &darray_item(keyi->groups, ndx); in AddSymbolsToKey()
677 KeyInfoText(info, keyi)); in AddSymbolsToKey()
685 KeyInfoText(info, keyi), ndx + 1); in AddSymbolsToKey()
724 AddActionsToKey(SymbolsInfo *info, KeyInfo *keyi, ExprDef *arrayNdx, in AddActionsToKey() argument
732 if (!GetGroupIndex(info, keyi, arrayNdx, ACTIONS, &ndx)) in AddActionsToKey()
735 groupi = &darray_item(keyi->groups, ndx); in AddActionsToKey()
746 value->expr.op, ndx, KeyInfoText(info, keyi)); in AddActionsToKey()
753 KeyInfoText(info, keyi), ndx); in AddActionsToKey()
774 KeyInfoText(info, keyi), ndx + 1, i + 1); in AddActionsToKey()
794 SetSymbolsField(SymbolsInfo *info, KeyInfo *keyi, const char *field, in SetSymbolsField() argument
809 keyi->default_type = val; in SetSymbolsField()
810 keyi->defined |= KEY_FIELD_DEFAULT_TYPE; in SetSymbolsField()
816 KeyInfoText(info, keyi)); in SetSymbolsField()
821 if (ndx >= darray_size(keyi->groups)) in SetSymbolsField()
822 darray_resize0(keyi->groups, ndx + 1); in SetSymbolsField()
823 darray_item(keyi->groups, ndx).type = val; in SetSymbolsField()
824 darray_item(keyi->groups, ndx).defined |= GROUP_FIELD_TYPE; in SetSymbolsField()
828 return AddSymbolsToKey(info, keyi, arrayNdx, value); in SetSymbolsField()
831 return AddActionsToKey(info, keyi, arrayNdx, value); in SetSymbolsField()
844 KeyInfoText(info, keyi)); in SetSymbolsField()
848 keyi->vmodmap = mask; in SetSymbolsField()
849 keyi->defined |= KEY_FIELD_VMODMAP; in SetSymbolsField()
857 KeyInfoText(info, keyi)); in SetSymbolsField()
865 KeyInfoText(info, keyi)); in SetSymbolsField()
872 KeyInfoText(info, keyi)); in SetSymbolsField()
883 KeyInfoText(info, keyi)); in SetSymbolsField()
887 keyi->repeat = val; in SetSymbolsField()
888 keyi->defined |= KEY_FIELD_REPEAT; in SetSymbolsField()
898 KeyInfoText(info, keyi)); in SetSymbolsField()
902 keyi->out_of_range_group_action = (set ? RANGE_WRAP : RANGE_SATURATE); in SetSymbolsField()
903 keyi->defined |= KEY_FIELD_GROUPINFO; in SetSymbolsField()
913 KeyInfoText(info, keyi)); in SetSymbolsField()
917 keyi->out_of_range_group_action = (set ? RANGE_SATURATE : RANGE_WRAP); in SetSymbolsField()
918 keyi->defined |= KEY_FIELD_GROUPINFO; in SetSymbolsField()
928 KeyInfoText(info, keyi)); in SetSymbolsField()
932 keyi->out_of_range_group_action = RANGE_REDIRECT; in SetSymbolsField()
933 keyi->out_of_range_group_number = grp - 1; in SetSymbolsField()
934 keyi->defined |= KEY_FIELD_GROUPINFO; in SetSymbolsField()
1048 HandleSymbolsBody(SymbolsInfo *info, VarDef *def, KeyInfo *keyi) in HandleSymbolsBody() argument
1075 ok = SetSymbolsField(info, keyi, field, arrayNdx, def->value); in HandleSymbolsBody()
1082 SetExplicitGroup(SymbolsInfo *info, KeyInfo *keyi) in SetExplicitGroup() argument
1091 darray_enumerate_from(i, groupi, keyi->groups, 1) { in SetExplicitGroup()
1104 info->name, KeyInfoText(info, keyi)); in SetExplicitGroup()
1106 darray_resize0(keyi->groups, info->explicit_group + 1); in SetExplicitGroup()
1108 darray_item(keyi->groups, info->explicit_group) = in SetExplicitGroup()
1109 darray_item(keyi->groups, 0); in SetExplicitGroup()
1110 InitGroupInfo(&darray_item(keyi->groups, 0)); in SetExplicitGroup()
1119 KeyInfo keyi; in HandleSymbolsDef() local
1121 keyi = info->default_key; in HandleSymbolsDef()
1122 darray_init(keyi.groups); in HandleSymbolsDef()
1123 darray_copy(keyi.groups, info->default_key.groups); in HandleSymbolsDef()
1124 for (xkb_layout_index_t i = 0; i < darray_size(keyi.groups); i++) in HandleSymbolsDef()
1125 CopyGroupInfo(&darray_item(keyi.groups, i), in HandleSymbolsDef()
1127 keyi.merge = stmt->merge; in HandleSymbolsDef()
1128 keyi.name = stmt->keyName; in HandleSymbolsDef()
1130 if (!HandleSymbolsBody(info, stmt->symbols, &keyi)) { in HandleSymbolsDef()
1135 if (!SetExplicitGroup(info, &keyi)) { in HandleSymbolsDef()
1140 if (!AddKeySymbols(info, &keyi, true)) { in HandleSymbolsDef()
1344 FindTypeForGroup(struct xkb_keymap *keymap, KeyInfo *keyi, in FindTypeForGroup() argument
1348 GroupInfo *groupi = &darray_item(keyi->groups, group); in FindTypeForGroup()
1354 if (keyi->default_type != XKB_ATOM_NONE) { in FindTypeForGroup()
1355 type_name = keyi->default_type; in FindTypeForGroup()
1368 KeyNameText(keymap->ctx, keyi->name), group + 1, in FindTypeForGroup()
1382 KeyNameText(keymap->ctx, keyi->name), group + 1); in FindTypeForGroup()
1398 KeyInfo *keyi) in CopySymbolsDefToKeymap() argument
1409 key = XkbKeyByName(keymap, keyi->name, false); in CopySymbolsDefToKeymap()
1413 KeyInfoText(info, keyi)); in CopySymbolsDefToKeymap()
1419 darray_enumerate(i, groupi, keyi->groups) in CopySymbolsDefToKeymap()
1426 darray_resize(keyi->groups, key->num_groups); in CopySymbolsDefToKeymap()
1433 group0 = &darray_item(keyi->groups, 0); in CopySymbolsDefToKeymap()
1434 darray_foreach_from(groupi, keyi->groups, 1) { in CopySymbolsDefToKeymap()
1444 darray_enumerate(i, groupi, keyi->groups) { in CopySymbolsDefToKeymap()
1448 type = FindTypeForGroup(keymap, keyi, i, &explicit_type); in CopySymbolsDefToKeymap()
1458 KeyInfoText(info, keyi), in CopySymbolsDefToKeymap()
1471 darray_enumerate(i, groupi, keyi->groups) in CopySymbolsDefToKeymap()
1474 key->out_of_range_group_number = keyi->out_of_range_group_number; in CopySymbolsDefToKeymap()
1475 key->out_of_range_group_action = keyi->out_of_range_group_action; in CopySymbolsDefToKeymap()
1477 if (keyi->defined & KEY_FIELD_VMODMAP) { in CopySymbolsDefToKeymap()
1478 key->vmodmap = keyi->vmodmap; in CopySymbolsDefToKeymap()
1482 if (keyi->repeat != KEY_REPEAT_UNDEFINED) { in CopySymbolsDefToKeymap()
1483 key->repeats = (keyi->repeat == KEY_REPEAT_YES); in CopySymbolsDefToKeymap()
1487 darray_foreach(groupi, keyi->groups) { in CopySymbolsDefToKeymap()
1533 KeyInfo *keyi; in CopySymbolsToKeymap() local
1544 darray_foreach(keyi, info->keys) in CopySymbolsToKeymap()
1545 if (!CopySymbolsDefToKeymap(keymap, info, keyi)) in CopySymbolsToKeymap()