keymap: remove XkbKeyGetKeycode

Because we keep the keycode inside the xkb_key now.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-09-22 10:21:22 +03:00 committed by Daniel Stone
parent 428c6f313f
commit be3cbc993e
2 changed files with 1 additions and 8 deletions

View File

@ -239,7 +239,7 @@ write_keycodes(struct xkb_keymap *keymap, struct buf *buf)
continue;
write_buf(buf, "\t\t%6s = %d;\n",
KeyNameText(key->name), XkbKeyGetKeycode(keymap, key));
KeyNameText(key->name), key->keycode);
}
for (i = 0; i < XKB_NUM_INDICATORS; i++) {

View File

@ -382,13 +382,6 @@ XkbKey(struct xkb_keymap *keymap, xkb_keycode_t kc)
return &darray_item(keymap->keys, kc);
}
static inline xkb_keycode_t
XkbKeyGetKeycode(struct xkb_keymap *keymap, const struct xkb_key *key)
{
/* Hack to avoid having to keep the keycode inside the xkb_key. */
return (xkb_keycode_t)(key - keymap->keys.item);
}
#define xkb_foreach_key(iter, keymap) \
darray_foreach(iter, keymap->keys)