diff options
author | Ran Benita <ran234@gmail.com> | 2012-10-18 21:04:27 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-10-18 21:04:27 +0200 |
commit | eb748ab643ea1f35952e398fb1194d8a8fd41ec7 (patch) | |
tree | fa5327310756264518c07099842056d40293aa6e /src/keymap.h | |
parent | 5d9a5cb003a654bde26897fbafb5036029993c8e (diff) | |
download | xorg-lib-libxkbcommon-eb748ab643ea1f35952e398fb1194d8a8fd41ec7.tar.gz |
Clean up xkb_sym_interpret a bit
First we split the LEVEL_ONE_ONLY bit off of the 'match' field, which
allows us to turn enum xkb_match_operation to a simple enum and remove
the need for MATCH_OP_MASK.
Next we rename 'act' to 'action', because we've settled on that
everywhere else.
Finally, SIMatchText is changed to not handle illegal values - it
shouldn't get any. This removes one usage of the GetBuffer hack.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/keymap.h')
-rw-r--r-- | src/keymap.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/keymap.h b/src/keymap.h index f72599e..1684979 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -171,15 +171,11 @@ enum xkb_action_controls { }; enum xkb_match_operation { - MATCH_NONE = 0, - MATCH_ANY_OR_NONE = 1, - MATCH_ANY = 2, - MATCH_ALL = 3, - MATCH_EXACTLY = 4, - MATCH_OP_MASK = \ - (MATCH_NONE | MATCH_ANY_OR_NONE | MATCH_ANY | MATCH_ALL | \ - MATCH_EXACTLY), - MATCH_LEVEL_ONE_ONLY = (1 << 7), + MATCH_NONE, + MATCH_ANY_OR_NONE, + MATCH_ANY, + MATCH_ALL, + MATCH_EXACTLY, }; struct xkb_mods { @@ -277,11 +273,12 @@ struct xkb_key_type { struct xkb_sym_interpret { xkb_keysym_t sym; - bool repeat; enum xkb_match_operation match; + bool level_one_only; xkb_mod_mask_t mods; xkb_mod_index_t virtual_mod; - union xkb_action act; + union xkb_action action; + bool repeat; }; struct xkb_indicator_map { |