summaryrefslogtreecommitdiff
path: root/src/map.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-08-21 12:48:20 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-09-10 19:23:35 +0100
commitb04d896ab25cca055e5bcc3d2e58d9c9fb6ef3c4 (patch)
treede0aaff12b30c7465941a128520ca11a0fdafae3 /src/map.c
parent74ec4c1c3fa9d7ff739013728d42ff06d72697c7 (diff)
downloadlibxkbcommon-b04d896ab25cca055e5bcc3d2e58d9c9fb6ef3c4.tar.gz
libxkbcommon-b04d896ab25cca055e5bcc3d2e58d9c9fb6ef3c4.tar.bz2
libxkbcommon-b04d896ab25cca055e5bcc3d2e58d9c9fb6ef3c4.zip
kbproto unentanglement: XkbNumVirtualMods
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map.c b/src/map.c
index 1ed5a44..8b751e6 100644
--- a/src/map.c
+++ b/src/map.c
@@ -113,13 +113,13 @@ xkb_map_num_mods(struct xkb_keymap *keymap)
{
xkb_mod_index_t i;
- for (i = 0; i < XkbNumVirtualMods; i++)
+ for (i = 0; i < XKB_NUM_VIRTUAL_MODS; i++)
if (!keymap->vmod_names[i])
break;
/* We always have all the core modifiers (for now), plus any virtual
* modifiers we may have defined. */
- return i + XkbNumModifiers;
+ return i + XKB_NUM_CORE_MODS;
}
/**
@@ -138,7 +138,7 @@ xkb_map_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx)
name = ModIndexToName(idx);
if (!name)
name = xkb_atom_text(keymap->ctx,
- keymap->vmod_names[idx - XkbNumModifiers]);
+ keymap->vmod_names[idx - XKB_NUM_CORE_MODS]);
return name;
}
@@ -160,11 +160,11 @@ xkb_map_mod_get_index(struct xkb_keymap *keymap, const char *name)
if (atom == XKB_ATOM_NONE)
return XKB_MOD_INVALID;
- for (i = 0; i < XkbNumVirtualMods; i++) {
+ for (i = 0; i < XKB_NUM_VIRTUAL_MODS; i++) {
if (keymap->vmod_names[i] == XKB_ATOM_NONE)
break;
if (keymap->vmod_names[i] == atom)
- return i + XkbNumModifiers;
+ return i + XKB_NUM_CORE_MODS;
}
return XKB_MOD_INVALID;