aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/Viewer.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/viewer/Viewer.h')
-rw-r--r--tools/viewer/Viewer.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/viewer/Viewer.h b/tools/viewer/Viewer.h
index ff47b35f7f..1f5d1c5dc4 100644
--- a/tools/viewer/Viewer.h
+++ b/tools/viewer/Viewer.h
@@ -20,19 +20,21 @@
class SkCanvas;
-class Viewer : public sk_app::Application {
+class Viewer : public sk_app::Application, sk_app::Window::Layer {
public:
Viewer(int argc, char** argv, void* platformData);
~Viewer() override;
- void onBackendCreated();
- void onPaint(SkCanvas* canvas);
void onIdle() override;
- bool onTouch(intptr_t owner, sk_app::Window::InputState state, float x, float y);
- bool onMouse(float x, float y, sk_app::Window::InputState state, uint32_t modifiers);
- void onUIStateChanged(const SkString& stateName, const SkString& stateValue);
- bool onKey(sk_app::Window::Key key, sk_app::Window::InputState state, uint32_t modifiers);
- bool onChar(SkUnichar c, uint32_t modifiers);
+
+ void onBackendCreated() override;
+ void onPaint(SkCanvas* canvas) override;
+ bool onTouch(intptr_t owner, sk_app::Window::InputState state, float x, float y) override;
+ bool onMouse(int x, int y, sk_app::Window::InputState state, uint32_t modifiers) override;
+ bool onMouseWheel(float delta, uint32_t modifiers) override;
+ void onUIStateChanged(const SkString& stateName, const SkString& stateValue) override;
+ bool onKey(sk_app::Window::Key key, sk_app::Window::InputState state, uint32_t modifiers) override;
+ bool onChar(SkUnichar c, uint32_t modifiers) override;
private:
enum class ColorMode {