| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef Window_DEFINED | 8 #ifndef Window_DEFINED |
| 9 #define Window_DEFINED | 9 #define Window_DEFINED |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 fUIStateChangedFunc = func; | 149 fUIStateChangedFunc = func; |
| 150 fUIStateChangedUserData = userData; | 150 fUIStateChangedUserData = userData; |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool onChar(SkUnichar c, uint32_t modifiers); | 153 bool onChar(SkUnichar c, uint32_t modifiers); |
| 154 bool onKey(Key key, InputState state, uint32_t modifiers); | 154 bool onKey(Key key, InputState state, uint32_t modifiers); |
| 155 bool onMouse(int x, int y, InputState state, uint32_t modifiers); | 155 bool onMouse(int x, int y, InputState state, uint32_t modifiers); |
| 156 bool onTouch(intptr_t owner, InputState state, float x, float y); // multi-
owner = multi-touch | 156 bool onTouch(intptr_t owner, InputState state, float x, float y); // multi-
owner = multi-touch |
| 157 void onUIStateChanged(const SkString& stateName, const SkString& stateValue)
; | 157 void onUIStateChanged(const SkString& stateName, const SkString& stateValue)
; |
| 158 void onPaint(); | 158 void onPaint(); |
| 159 void onResize(uint32_t width, uint32_t height); | 159 void onResize(int width, int height); |
| 160 | 160 |
| 161 int width() { return fWidth; } | 161 int width() { return fWidth; } |
| 162 int height() { return fHeight; } | 162 int height() { return fHeight; } |
| 163 | 163 |
| 164 virtual const DisplayParams& getDisplayParams(); | 164 virtual const DisplayParams& getDisplayParams(); |
| 165 void setDisplayParams(const DisplayParams& params); | 165 void setDisplayParams(const DisplayParams& params); |
| 166 | 166 |
| 167 // This is just for the sRGB split screen | 167 // This is just for the sRGB split screen |
| 168 sk_sp<SkSurface> getOffscreenSurface(bool forceSRGB); | 168 sk_sp<SkSurface> getOffscreenSurface(bool forceSRGB); |
| 169 | 169 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 192 virtual void onInval() = 0; | 192 virtual void onInval() = 0; |
| 193 | 193 |
| 194 // Uncheck fIsContentInvalided to allow future inval/onInval. | 194 // Uncheck fIsContentInvalided to allow future inval/onInval. |
| 195 void markInvalProcessed(); | 195 void markInvalProcessed(); |
| 196 | 196 |
| 197 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida
te events | 197 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida
te events |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 } // namespace sk_app | 200 } // namespace sk_app |
| 201 #endif | 201 #endif |
| OLD | NEW |