skia2/tools/ModifierKey.h
Hal Canary 3a85ed12bf ModifierKey unifies sk_app::Window::ModifierKey & Sample::Click::ModifierKey
Change-Id: Idb5dfe57a7f6e3d6078ab1e68d542b084114cfbe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225735
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-09 16:16:41 +00:00

26 lines
642 B
C++

// 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 ModifierKey_DEFINED
#define ModifierKey_DEFINED
#include "include/private/SkBitmaskEnum.h"
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<ModifierKey> : std::true_type {};
}
static inline bool ModifierKeyIsSet(ModifierKey m) {
return m != ModifierKey::kNone;
}
#endif // ModifierKey_DEFINED