yangsu@google.com | 1a2b4c1 | 2011-06-24 17:20:50 +0000 | [diff] [blame] | 1 | #ifndef SkOSWindow_iOS_DEFINED |
| 2 | #define SkOSWindow_iOS_DEFINED |
| 3 | |
| 4 | #include "SkWindow.h" |
| 5 | #include "SkMatrix.h" |
| 6 | class SkOSWindow : public SkWindow { |
| 7 | public: |
| 8 | SkOSWindow(void* hwnd); |
| 9 | ~SkOSWindow(); |
| 10 | void* getHWND() const { return fHWND; } |
| 11 | |
| 12 | static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); |
yangsu@google.com | 6eece45 | 2011-07-07 19:45:39 +0000 | [diff] [blame^] | 13 | virtual bool onDispatchClick(int x, int y, Click::State state, |
| 14 | void* owner); |
yangsu@google.com | 1a2b4c1 | 2011-06-24 17:20:50 +0000 | [diff] [blame] | 15 | void detachGL(); |
| 16 | bool attachGL(); |
| 17 | void presentGL(); |
| 18 | |
| 19 | protected: |
| 20 | // overrides from SkEventSink |
| 21 | virtual bool onEvent(const SkEvent& evt); |
| 22 | // overrides from SkWindow |
| 23 | virtual void onHandleInval(const SkIRect&); |
| 24 | // overrides from SkView |
| 25 | virtual void onAddMenu(const SkOSMenu*); |
| 26 | virtual void onSetTitle(const char[]); |
| 27 | |
| 28 | private: |
| 29 | void* fHWND; |
| 30 | bool fInvalEventIsPending; |
| 31 | void* fNotifier; |
| 32 | typedef SkWindow INHERITED; |
| 33 | }; |
| 34 | |
| 35 | #endif |
| 36 | |