tools/skui: put all enums in a common namespace
Change-Id: Icd331e8946d80652750b8b6ea0db65f5f676ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/tools/skui/ModifierKey.h b/tools/skui/ModifierKey.h
new file mode 100644
index 0000000..09c5536
--- /dev/null
+++ b/tools/skui/ModifierKey.h
@@ -0,0 +1,22 @@
+// Copyright 2019 Google LLC.
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+#ifndef skui_modifierkey_defined
+#define skui_modifierkey_defined
+
+#include "include/private/SkBitmaskEnum.h"
+
+namespace skui {
+enum class ModifierKey {
+ kNone = 0,
+ kShift = 1 << 0,
+ kControl = 1 << 1,
+ kOption = 1 << 2, // same as ALT
+ kCommand = 1 << 3,
+ kFirstPress = 1 << 4,
+};
+}
+
+namespace skstd {
+template <> struct is_bitmask_enum<skui::ModifierKey> : std::true_type {};
+}
+#endif // skui_modifierkey_defined