Index: tools/viewer/sk_app/Window.h |
diff --git a/tools/viewer/sk_app/Window.h b/tools/viewer/sk_app/Window.h |
index f233f131a5eb15f1ce6bf5865502c3a339291197..39b06f2cd9ef0e2569d9f90420460b70f82dd76b 100644 |
--- a/tools/viewer/sk_app/Window.h |
+++ b/tools/viewer/sk_app/Window.h |
@@ -9,8 +9,9 @@ |
#define Window_DEFINED |
#include "DisplayParams.h" |
-#include "SkTypes.h" |
#include "SkRect.h" |
+#include "SkTouchGesture.h" |
+#include "SkTypes.h" |
class SkCanvas; |
@@ -124,6 +125,7 @@ public: |
bool onChar(SkUnichar c, uint32_t modifiers); |
bool onKey(Key key, InputState state, uint32_t modifiers); |
bool onMouse(int x, int y, InputState state, uint32_t modifiers); |
+ bool onTouch(int owner, InputState state, float x, float y); // multi-owner = multi-touch |
void onPaint(); |
void onResize(uint32_t width, uint32_t height); |
@@ -133,6 +135,9 @@ public: |
virtual const DisplayParams& getDisplayParams(); |
void setDisplayParams(const DisplayParams& params); |
+ const SkMatrix& getGestureLocalM(); |
+ const SkMatrix& getGestureGlobalM() const; |
+ |
protected: |
Window(); |
@@ -148,7 +153,9 @@ protected: |
OnPaintFunc fPaintFunc; |
void* fPaintUserData; |
- WindowContext* fWindowContext; |
+ WindowContext* fWindowContext = nullptr; |
+ |
+ SkTouchGesture fGesture; |
}; |
} // namespace sk_app |