-static bool
-LookupVModIndex(struct xkb_context *ctx, const void *priv,
- xkb_atom_t field, enum expr_value_type type,
- xkb_mod_index_t *val_rtrn)
-{
- const struct xkb_mod *mod;
- xkb_mod_index_t i;
- const struct xkb_keymap *keymap = priv;
-
- if (type != EXPR_TYPE_INT)
- return false;
-
- darray_enumerate(i, mod, keymap->mods) {
- if (mod->type == MOD_VIRT && mod->name == field) {
- *val_rtrn = i;
- return true;
- }
- }
-
- return false;
-}
-
-static bool
-LookupVModMask(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
- enum expr_value_type type, xkb_mod_mask_t *val_rtrn)
-{
- xkb_mod_index_t ndx;
- const struct xkb_keymap *keymap = priv;
-
- if (LookupModMask(ctx, keymap, field, type, val_rtrn)) {
- return true;
- }
- else if (LookupVModIndex(ctx, keymap, field, type, &ndx)) {
- *val_rtrn = (1 << ndx);
- return true;
- }
-
- return false;
-}
-