summaryrefslogtreecommitdiff
path: root/include/vcl/keycodes.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-31 18:39:32 +0200
committerNoel Grandin <noel@peralex.com>2015-01-07 11:20:43 +0200
commit079590c9097a9491b31f1ef1b30d67d42bd0139a (patch)
treee77fb91fbc3b4b7312bcd29875434b1d1344e3e7 /include/vcl/keycodes.hxx
parente197bcc6285b69179463b5847fe8ce459806455a (diff)
fdo#84938: convert INDICATOR_ #defines to 'enum class'
and replace SalIndicatorState, it serves the same purpose Change-Id: I618b8946b8e2527883eecb13060b2256abc505b6
Diffstat (limited to 'include/vcl/keycodes.hxx')
-rw-r--r--include/vcl/keycodes.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/vcl/keycodes.hxx b/include/vcl/keycodes.hxx
index 271ff61ec7a2..45adac1f6d24 100644
--- a/include/vcl/keycodes.hxx
+++ b/include/vcl/keycodes.hxx
@@ -24,6 +24,7 @@
#undef DELETE
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
+#include <o3tl/typed_flags_set.hxx>
// Key-Gruppen
#define KEYGROUP_NUM ((sal_uInt16)::com::sun::star::awt::KeyGroup::NUM)
@@ -169,9 +170,16 @@
#define MOUSE_MIDDLE ((sal_uInt16)0x0002)
#define MOUSE_RIGHT ((sal_uInt16)0x0004)
-#define INDICATOR_CAPSLOCK 0x0001
-#define INDICATOR_NUMLOCK 0x0002
-#define INDICATOR_SCROLLLOCK 0x0004
+enum class KeyIndicatorState {
+ NONE = 0x0000,
+ CAPSLOCK = 0x0001,
+ NUMLOCK = 0x0002,
+ SCROLLLOCK = 0x0004
+};
+namespace o3tl
+{
+ template<> struct typed_flags<KeyIndicatorState> : is_typed_flags<KeyIndicatorState, 0x0007> {};
+}
#endif // INCLUDED_VCL_KEYCODES_HXX