blob: 97c60e2d0998cc523066ca87be97b7c4a35ec728 [file] [log] [blame]
yangsu@google.com1a2b4c12011-06-24 17:20:50 +00001#ifndef SkOSWindow_iOS_DEFINED
2#define SkOSWindow_iOS_DEFINED
3
4#include "SkWindow.h"
5#include "SkMatrix.h"
6class SkOSWindow : public SkWindow {
7public:
8 SkOSWindow(void* hwnd);
9 ~SkOSWindow();
10 void* getHWND() const { return fHWND; }
11
12 static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
yangsu@google.com6eece452011-07-07 19:45:39 +000013 virtual bool onDispatchClick(int x, int y, Click::State state,
14 void* owner);
yangsu@google.com1a2b4c12011-06-24 17:20:50 +000015 void detachGL();
16 bool attachGL();
17 void presentGL();
18
19protected:
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
28private:
29 void* fHWND;
30 bool fInvalEventIsPending;
31 void* fNotifier;
32 typedef SkWindow INHERITED;
33};
34
35#endif
36