00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SkOSWindow_Mac_DEFINED
00018 #define SkOSWindow_Mac_DEFINED
00019
00020 #include <Carbon/Carbon.h>
00021 #include "SkWindow.h"
00022
00023 class SkOSWindow : public SkWindow {
00024 public:
00025 SkOSWindow(void* hwnd);
00026
00027 void* getHWND() const { return fHWND; }
00028 void* getHVIEW() const { return fHVIEW; }
00029 void updateSize();
00030
00031 static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
00032
00033 static OSStatus EventHandler(EventHandlerCallRef inHandler,
00034 EventRef inEvent, void* userData);
00035
00036 void doPaint(void* ctx);
00037
00038 protected:
00039
00040 virtual bool onEvent(const SkEvent& evt);
00041
00042 virtual void onHandleInval(const SkIRect&);
00043
00044 virtual void onAddMenu(const SkOSMenu*);
00045 virtual void onSetTitle(const char[]);
00046
00047 private:
00048 void* fHWND;
00049 void* fHVIEW;
00050
00051 typedef SkWindow INHERITED;
00052 };
00053
00054 #endif
00055