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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 void onUIStateChanged(const SkString& stateName, const SkString& stateValue)
; | 154 void onUIStateChanged(const SkString& stateName, const SkString& stateValue)
; |
155 void onPaint(); | 155 void onPaint(); |
156 void onResize(uint32_t width, uint32_t height); | 156 void onResize(uint32_t width, uint32_t height); |
157 | 157 |
158 uint32_t width() { return fWidth; } | 158 uint32_t width() { return fWidth; } |
159 uint32_t height() { return fHeight; } | 159 uint32_t height() { return fHeight; } |
160 | 160 |
161 virtual const DisplayParams& getDisplayParams(); | 161 virtual const DisplayParams& getDisplayParams(); |
162 void setDisplayParams(const DisplayParams& params); | 162 void setDisplayParams(const DisplayParams& params); |
163 | 163 |
| 164 WindowContext* getContext(); |
| 165 |
164 protected: | 166 protected: |
165 Window(); | 167 Window(); |
166 | 168 |
167 uint32_t fWidth; | 169 uint32_t fWidth; |
168 uint32_t fHeight; | 170 uint32_t fHeight; |
169 | 171 |
170 OnCharFunc fCharFunc; | 172 OnCharFunc fCharFunc; |
171 void* fCharUserData; | 173 void* fCharUserData; |
172 OnKeyFunc fKeyFunc; | 174 OnKeyFunc fKeyFunc; |
173 void* fKeyUserData; | 175 void* fKeyUserData; |
(...skipping 12 matching lines...) Expand all Loading... |
186 virtual void onInval() = 0; | 188 virtual void onInval() = 0; |
187 | 189 |
188 // Uncheck fIsContentInvalided to allow future inval/onInval. | 190 // Uncheck fIsContentInvalided to allow future inval/onInval. |
189 void markInvalProcessed(); | 191 void markInvalProcessed(); |
190 | 192 |
191 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida
te events | 193 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida
te events |
192 }; | 194 }; |
193 | 195 |
194 } // namespace sk_app | 196 } // namespace sk_app |
195 #endif | 197 #endif |
OLD | NEW |