Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 virtual ~Window() {}; | 25 virtual ~Window() {}; |
| 26 | 26 |
| 27 virtual void setTitle(const char*) = 0; | 27 virtual void setTitle(const char*) = 0; |
| 28 virtual void show() = 0; | 28 virtual void show() = 0; |
| 29 virtual void inval() = 0; | 29 virtual void inval() = 0; |
| 30 | 30 |
| 31 virtual bool scaleContentToFit() const { return false; } | 31 virtual bool scaleContentToFit() const { return false; } |
| 32 virtual bool supportsContentRect() const { return false; } | 32 virtual bool supportsContentRect() const { return false; } |
| 33 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } | 33 virtual SkRect getContentRect() { return SkRect::MakeEmpty(); } |
| 34 | 34 |
| 35 enum BackEndType { | 35 enum BackendType { |
| 36 kNativeGL_BackendType, | 36 kNativeGL_BackendType, |
| 37 kVulkan_BackendType | 37 kVulkan_BackendType, |
| 38 | |
| 39 kLast_BackendType = kVulkan_BackendType | |
| 40 }; | |
| 41 enum { | |
| 42 kBackendTypeCount = kLast_BackendType + 1 | |
|
Brian Osman
2016/05/17 17:32:11
Is this used anywhere?
jvanverth1
2016/05/17 17:59:50
It's used for the array of strings in Viewer.cpp.
| |
| 38 }; | 43 }; |
| 39 | 44 |
| 40 virtual bool attach(BackEndType attachType, const DisplayParams& params) = 0; | 45 virtual bool attach(BackendType attachType, const DisplayParams& params) = 0; |
| 41 void detach(); | 46 void detach(); |
| 42 | 47 |
| 43 // input handling | 48 // input handling |
| 44 enum class Key { | 49 enum class Key { |
| 45 kNONE, //corresponds to android's UNKNOWN | 50 kNONE, //corresponds to android's UNKNOWN |
| 46 | 51 |
| 47 kLeftSoftKey, | 52 kLeftSoftKey, |
| 48 kRightSoftKey, | 53 kRightSoftKey, |
| 49 | 54 |
| 50 kHome, //!< the home key - added to match android | 55 kHome, //!< the home key - added to match android |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 OnMouseFunc fMouseFunc; | 151 OnMouseFunc fMouseFunc; |
| 147 void* fMouseUserData; | 152 void* fMouseUserData; |
| 148 OnPaintFunc fPaintFunc; | 153 OnPaintFunc fPaintFunc; |
| 149 void* fPaintUserData; | 154 void* fPaintUserData; |
| 150 | 155 |
| 151 WindowContext* fWindowContext; | 156 WindowContext* fWindowContext; |
| 152 }; | 157 }; |
| 153 | 158 |
| 154 } // namespace sk_app | 159 } // namespace sk_app |
| 155 #endif | 160 #endif |
| OLD | NEW |