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