• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*
3  * Copyright 2011 Google Inc.
4  *
5  * Use of this source code is governed by a BSD-style license that can be
6  * found in the LICENSE file.
7  */
8 #ifndef SkOSWindow_iOS_DEFINED
9 #define SkOSWindow_iOS_DEFINED
10 
11 #include "SkWindow.h"
12 
13 class SkOSWindow : public SkWindow {
14 public:
15     SkOSWindow(void* hwnd);
16     ~SkOSWindow();
getHWND()17     void*   getHWND() const { return fHWND; }
18 
19     enum SkBackEndTypes {
20         kNone_BackEndType,
21         kNativeGL_BackEndType,
22     };
23 
24     void    release();
25     bool    attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor,
26                    AttachmentInfo*);
27     void    present();
28 
makeFullscreen()29     bool makeFullscreen() { return true; }
closeWindow()30     void closeWindow() { /* Not impl yet */ }
setVsync(bool)31     void setVsync(bool) { /* Can't turn off vsync? */ }
32 
33 protected:
34     // overrides from SkEventSink
35     virtual bool onEvent(const SkEvent& evt);
36     // overrides from SkWindow
37     virtual void onHandleInval(const SkIRect&);
38     // overrides from SkView
39     virtual void onAddMenu(const SkOSMenu*);
40     virtual void onUpdateMenu(const SkOSMenu*);
41     virtual void onSetTitle(const char[]);
42 
43 private:
44     void*   fHWND;
45     bool    fInvalEventIsPending;
46     void*   fNotifier;
47     typedef SkWindow INHERITED;
48 };
49 
50 #endif
51