blob: 5f4d25d67e2e13ef23b9d6df0a5c7f7a520b3ad9 [file] [log] [blame]
Hal Canary3a85ed12019-07-08 16:07:57 -04001// 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.
3#ifndef ModifierKey_DEFINED
4#define ModifierKey_DEFINED
5
6#include "include/private/SkBitmaskEnum.h"
7
8enum class ModifierKey {
9 kNone = 0,
10 kShift = 1 << 0,
11 kControl = 1 << 1,
12 kOption = 1 << 2, // same as ALT
13 kCommand = 1 << 3,
14 kFirstPress = 1 << 4,
15};
16
17namespace skstd {
18template <> struct is_bitmask_enum<ModifierKey> : std::true_type {};
19}
20
21static inline bool ModifierKeyIsSet(ModifierKey m) {
22 return m != ModifierKey::kNone;
23}
24
25#endif // ModifierKey_DEFINED