Hal Canary | 3a85ed1 | 2019-07-08 16:07:57 -0400 | [diff] [blame] | 1 | // Copyright 2019 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
Hal Canary | b1f411a | 2019-08-29 10:39:22 -0400 | [diff] [blame] | 3 | #ifndef skui_modifierkey_defined |
| 4 | #define skui_modifierkey_defined |
Hal Canary | 3a85ed1 | 2019-07-08 16:07:57 -0400 | [diff] [blame] | 5 | |
| 6 | #include "include/private/SkBitmaskEnum.h" |
| 7 | |
Hal Canary | b1f411a | 2019-08-29 10:39:22 -0400 | [diff] [blame] | 8 | namespace skui { |
Hal Canary | 3a85ed1 | 2019-07-08 16:07:57 -0400 | [diff] [blame] | 9 | enum class ModifierKey { |
| 10 | kNone = 0, |
| 11 | kShift = 1 << 0, |
| 12 | kControl = 1 << 1, |
| 13 | kOption = 1 << 2, // same as ALT |
| 14 | kCommand = 1 << 3, |
| 15 | kFirstPress = 1 << 4, |
| 16 | }; |
Hal Canary | 3a85ed1 | 2019-07-08 16:07:57 -0400 | [diff] [blame] | 17 | } |
| 18 | |
Mike Klein | dc976a9 | 2020-04-30 06:45:25 -0500 | [diff] [blame] | 19 | namespace sknonstd { |
Hal Canary | b1f411a | 2019-08-29 10:39:22 -0400 | [diff] [blame] | 20 | template <> struct is_bitmask_enum<skui::ModifierKey> : std::true_type {}; |
| 21 | } |
| 22 | #endif // skui_modifierkey_defined |