diff options
author | Ran Benita <ran234@gmail.com> | 2012-07-15 15:55:34 +0300 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-07-18 12:47:29 +0300 |
commit | d0097f4e60b8356fe0355dee5c2b6552cce196e7 (patch) | |
tree | b87fc367e5453f3425802f8e31d7ddfc514c4a9c /src/darray.h | |
parent | 35a93b8e6496a6cd5623cc2c332dc4f5ea2a4f11 (diff) | |
download | libxkbcommon-d0097f4e60b8356fe0355dee5c2b6552cce196e7.tar.gz libxkbcommon-d0097f4e60b8356fe0355dee5c2b6552cce196e7.tar.bz2 libxkbcommon-d0097f4e60b8356fe0355dee5c2b6552cce196e7.zip |
Pass around xkb_key's instead of keycodes
This way we don't need to look up the key every time. We now only deal
with keycodes in the public API and in keycodes.c.
Also adds an xkb_foreach_key macro, which is used a lot.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/darray.h')
-rw-r--r-- | src/darray.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/darray.h b/src/darray.h index 9a076ea..18f8959 100644 --- a/src/darray.h +++ b/src/darray.h @@ -340,6 +340,9 @@ darray_next_alloc(size_t alloc, size_t need) #define darray_foreach(i, arr) \ for ((i) = &(arr).item[0]; (i) < &(arr).item[(arr).size]; (i)++) +#define darray_foreach_from(i, arr, from) \ + for ((i) = &(arr).item[from]; (i) < &(arr).item[(arr).size]; (i)++) + /* * darray_foreach_reverse(T *&i, darray(T) arr) {...} * |