diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-24 12:07:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-25 07:03:08 +0000 |
commit | 63a6de2cab00e949751fcb35f4814844fc4ec71e (patch) | |
tree | c745e6d946e076f75ebaa31849ef2a77bd81b868 /include/vcl/keycodes.hxx | |
parent | daf9156c76049873583f1f7c5de96524d7eba68a (diff) |
convert MODKEY constants to o3tl::typed_flags
Change-Id: I53a6f6f6b12e0fb299e7d76e8e8f354ef3afbbb3
Reviewed-on: https://gerrit.libreoffice.org/31152
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl/keycodes.hxx')
-rw-r--r-- | include/vcl/keycodes.hxx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/include/vcl/keycodes.hxx b/include/vcl/keycodes.hxx index 58cbf966b922..5356c203a187 100644 --- a/include/vcl/keycodes.hxx +++ b/include/vcl/keycodes.hxx @@ -153,18 +153,22 @@ #define KEY_SCROLLLOCK ((sal_uInt16)css::awt::Key::SCROLLLOCK) // extended Modifier-Keys (only used for modkey events) -#define MODKEY_LSHIFT 0x0001 -#define MODKEY_RSHIFT 0x0002 -#define MODKEY_LMOD1 0x0004 -#define MODKEY_RMOD1 0x0008 -#define MODKEY_LMOD2 0x0010 -#define MODKEY_RMOD2 0x0020 -#define MODKEY_LMOD3 0x0040 -#define MODKEY_RMOD3 0x0080 -#define MODKEY_SHIFT (MODKEY_LSHIFT|MODKEY_RSHIFT) -#define MODKEY_MOD1 (MODKEY_LMOD1|MODKEY_RMOD1) -#define MODKEY_MOD2 (MODKEY_LMOD2|MODKEY_RMOD2) -#define MODKEY_MOD3 (MODKEY_LMOD3|MODKEY_RMOD3) +enum class ModKeyFlags { + NONE = 0x0000, + LeftShift = 0x0001, + RightShift = 0x0002, + LeftMod1 = 0x0004, + RightMod1 = 0x0008, + LeftMod2 = 0x0010, + RightMod2 = 0x0020, + LeftMod3 = 0x0040, + RightMod3 = 0x0080, + Mod1Msk = LeftMod1 | RightMod1, // should be Mod1Mask, but that conflicts with a X.h macro grrrr + Mod2Msk = LeftMod2 | RightMod2, +}; +namespace o3tl { + template<> struct typed_flags<ModKeyFlags> : is_typed_flags<ModKeyFlags, 0x00ff> {}; +} enum class KeyIndicatorState { NONE = 0x0000, |