aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/sk_app/mac/Window_mac.h
blob: a5f2aa10f0cf34e1ff2f2ad09ded67fa7f917a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/

#ifndef Window_mac_DEFINED
#define Window_mac_DEFINED

#include "../Window.h"
#include "SkChecksum.h"
#include "SkTDynamicHash.h"

namespace sk_app {

class Window_mac : public Window {
public:
    Window_mac() : Window()
#if 0
                  // TODO: use Mac-specific objects
                  , fDisplay(nullptr)
                  , fWindow(0)
                  , fGC(nullptr)
                  , fVisualInfo(nullptr)
#endif
                  , fMSAASampleCount(0) {}
    ~Window_mac() override { this->closeWindow(); }

#if 0
    // TODO: need to init with Mac-specific data
    bool initWindow(Display* display, const DisplayParams* params);
#endif

    void setTitle(const char*) override;
    void show() override;

    bool attach(BackendType attachType, const DisplayParams& params) override;

    void onInval() override;

private:
    void closeWindow();

#if 0
    // TODO: use Mac-specific window data
    Display*     fDisplay;
    XWindow      fWindow;
    GC           fGC;
    XVisualInfo* fVisualInfo;
#endif
    
    int          fMSAASampleCount;
};

}   // namespace sk_app

#endif