Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
2 /*
3 * Copyright 2006 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
9 #ifndef SkOSWindow_MacCocoa_DEFINED
10 #define SkOSWindow_MacCocoa_DEFINED
12 #include "SkWindow.h"
14 class SkOSWindow : public SkWindow {
15 public:
16 SkOSWindow(void* hwnd);
17 ~SkOSWindow();
18 void* getHWND() const { return fHWND; }
20 virtual bool onDispatchClick(int x, int y, Click::State state,
21 void* owner, unsigned modi);
22 enum SkBackEndTypes {
23 kNone_BackEndType,
24 #if SK_SUPPORT_GPU
25 kNativeGL_BackEndType,
26 #endif
27 };
29 struct AttachmentInfo {
30 int fSampleCount;
31 int fStencilBits;
32 };
34 void detach();
35 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*);
36 void present();
38 protected:
39 // overrides from SkEventSink
40 virtual bool onEvent(const SkEvent& evt);
41 // overrides from SkWindow
42 virtual void onHandleInval(const SkIRect&);
43 // overrides from SkView
44 virtual void onAddMenu(const SkOSMenu*);
45 virtual void onUpdateMenu(const SkOSMenu*);
46 virtual void onSetTitle(const char[]);
48 private:
49 void* fHWND;
50 bool fInvalEventIsPending;
51 void* fNotifier;
52 #if SK_SUPPORT_GPU
53 void* fGLContext;
54 #endif
55 typedef SkWindow INHERITED;
56 };
58 #endif