| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 bool onChar(SkUnichar c, uint32_t modifiers); | 124 bool onChar(SkUnichar c, uint32_t modifiers); |
| 125 bool onKey(Key key, InputState state, uint32_t modifiers); | 125 bool onKey(Key key, InputState state, uint32_t modifiers); |
| 126 bool onMouse(int x, int y, InputState state, uint32_t modifiers); | 126 bool onMouse(int x, int y, InputState state, uint32_t modifiers); |
| 127 void onPaint(); | 127 void onPaint(); |
| 128 void onResize(uint32_t width, uint32_t height); | 128 void onResize(uint32_t width, uint32_t height); |
| 129 | 129 |
| 130 uint32_t width() { return fWidth; } | 130 uint32_t width() { return fWidth; } |
| 131 uint32_t height() { return fHeight; } | 131 uint32_t height() { return fHeight; } |
| 132 | 132 |
| 133 const DisplayParams& getDisplayParams(); | 133 virtual const DisplayParams& getDisplayParams(); |
| 134 void setDisplayParams(const DisplayParams& params); | 134 void setDisplayParams(const DisplayParams& params); |
| 135 | 135 |
| 136 protected: | 136 protected: |
| 137 Window(); | 137 Window(); |
| 138 | 138 |
| 139 uint32_t fWidth; | 139 uint32_t fWidth; |
| 140 uint32_t fHeight; | 140 uint32_t fHeight; |
| 141 | 141 |
| 142 OnCharFunc fCharFunc; | 142 OnCharFunc fCharFunc; |
| 143 void* fCharUserData; | 143 void* fCharUserData; |
| 144 OnKeyFunc fKeyFunc; | 144 OnKeyFunc fKeyFunc; |
| 145 void* fKeyUserData; | 145 void* fKeyUserData; |
| 146 OnMouseFunc fMouseFunc; | 146 OnMouseFunc fMouseFunc; |
| 147 void* fMouseUserData; | 147 void* fMouseUserData; |
| 148 OnPaintFunc fPaintFunc; | 148 OnPaintFunc fPaintFunc; |
| 149 void* fPaintUserData; | 149 void* fPaintUserData; |
| 150 | 150 |
| 151 WindowContext* fWindowContext; | 151 WindowContext* fWindowContext; |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace sk_app | 154 } // namespace sk_app |
| 155 #endif | 155 #endif |
| OLD | NEW |