michael@0: michael@0: /* michael@0: * Copyright 2011 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #ifndef SkOSWindow_iOS_DEFINED michael@0: #define SkOSWindow_iOS_DEFINED michael@0: michael@0: #include "SkWindow.h" michael@0: michael@0: class SkOSWindow : public SkWindow { michael@0: public: michael@0: SkOSWindow(void* hwnd); michael@0: ~SkOSWindow(); michael@0: void* getHWND() const { return fHWND; } michael@0: michael@0: enum SkBackEndTypes { michael@0: kNone_BackEndType, michael@0: kNativeGL_BackEndType, michael@0: }; michael@0: michael@0: struct AttachmentInfo { michael@0: int fSampleCount; michael@0: int fStencilBits; michael@0: }; michael@0: michael@0: void detach(); michael@0: bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); michael@0: void present(); michael@0: michael@0: protected: michael@0: // overrides from SkEventSink michael@0: virtual bool onEvent(const SkEvent& evt); michael@0: // overrides from SkWindow michael@0: virtual void onHandleInval(const SkIRect&); michael@0: // overrides from SkView michael@0: virtual void onAddMenu(const SkOSMenu*); michael@0: virtual void onUpdateMenu(SkOSMenu*); michael@0: virtual void onSetTitle(const char[]); michael@0: michael@0: private: michael@0: void* fHWND; michael@0: bool fInvalEventIsPending; michael@0: void* fNotifier; michael@0: typedef SkWindow INHERITED; michael@0: }; michael@0: michael@0: #endif