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>
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 125e2de..b45c65b 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -1375,7 +1375,7 @@
}
const auto slidePt = this->mapEvent(x, y);
- if (fSlides[fCurrentSlide]->onMouse(slidePt.x(), slidePt.y(), state, 0)) {
+ if (fSlides[fCurrentSlide]->onMouse(slidePt.x(), slidePt.y(), state, ModifierKey::kNone)) {
fWindow->inval();
return true;
}
@@ -1417,7 +1417,7 @@
return true;
}
-bool Viewer::onMouse(int x, int y, Window::InputState state, uint32_t modifiers) {
+bool Viewer::onMouse(int x, int y, Window::InputState state, ModifierKey modifiers) {
if (GestureDevice::kTouch == fGestureDevice) {
return false;
}
@@ -2341,11 +2341,11 @@
}
}
-bool Viewer::onKey(sk_app::Window::Key key, sk_app::Window::InputState state, uint32_t modifiers) {
+bool Viewer::onKey(sk_app::Window::Key key, sk_app::Window::InputState state, ModifierKey modifiers) {
return fCommands.onKey(key, state, modifiers);
}
-bool Viewer::onChar(SkUnichar c, uint32_t modifiers) {
+bool Viewer::onChar(SkUnichar c, ModifierKey modifiers) {
if (fSlides[fCurrentSlide]->onChar(c)) {
fWindow->inval();
return true;