OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef Window_mac_DEFINED |
| 9 #define Window_mac_DEFINED |
| 10 |
| 11 #include "../Window.h" |
| 12 #include "SkChecksum.h" |
| 13 #include "SkTDynamicHash.h" |
| 14 |
| 15 namespace sk_app { |
| 16 |
| 17 struct ContextPlatformData_mac { |
| 18 #if 0 |
| 19 // TODO: use Mac-specific objects |
| 20 Display* fDisplay; |
| 21 XWindow fWindow; |
| 22 XVisualInfo* fVisualInfo; |
| 23 #endif |
| 24 }; |
| 25 |
| 26 class Window_mac : public Window { |
| 27 public: |
| 28 Window_mac() : Window() |
| 29 #if 0 |
| 30 // TODO: use Mac-specific objects |
| 31 , fDisplay(nullptr) |
| 32 , fWindow(0) |
| 33 , fGC(nullptr) |
| 34 , fVisualInfo(nullptr) |
| 35 #endif |
| 36 , fMSAASampleCount(0) {} |
| 37 ~Window_mac() override { this->closeWindow(); } |
| 38 |
| 39 #if 0 |
| 40 // TODO: need to init with Mac-specific data |
| 41 bool initWindow(Display* display, const DisplayParams* params); |
| 42 #endif |
| 43 |
| 44 void setTitle(const char*) override; |
| 45 void show() override; |
| 46 |
| 47 bool attach(BackendType attachType, const DisplayParams& params) override; |
| 48 |
| 49 void onInval() override; |
| 50 |
| 51 private: |
| 52 void closeWindow(); |
| 53 |
| 54 #if 0 |
| 55 // TODO: use Mac-specific window data |
| 56 Display* fDisplay; |
| 57 XWindow fWindow; |
| 58 GC fGC; |
| 59 XVisualInfo* fVisualInfo; |
| 60 #endif |
| 61 |
| 62 int fMSAASampleCount; |
| 63 }; |
| 64 |
| 65 } // namespace sk_app |
| 66 |
| 67 #endif |
OLD | NEW |