1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/include/views/SkOSWindow_iOS.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2011 Google Inc. 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 +#ifndef SkOSWindow_iOS_DEFINED 1.12 +#define SkOSWindow_iOS_DEFINED 1.13 + 1.14 +#include "SkWindow.h" 1.15 + 1.16 +class SkOSWindow : public SkWindow { 1.17 +public: 1.18 + SkOSWindow(void* hwnd); 1.19 + ~SkOSWindow(); 1.20 + void* getHWND() const { return fHWND; } 1.21 + 1.22 + enum SkBackEndTypes { 1.23 + kNone_BackEndType, 1.24 + kNativeGL_BackEndType, 1.25 + }; 1.26 + 1.27 + struct AttachmentInfo { 1.28 + int fSampleCount; 1.29 + int fStencilBits; 1.30 + }; 1.31 + 1.32 + void detach(); 1.33 + bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); 1.34 + void present(); 1.35 + 1.36 +protected: 1.37 + // overrides from SkEventSink 1.38 + virtual bool onEvent(const SkEvent& evt); 1.39 + // overrides from SkWindow 1.40 + virtual void onHandleInval(const SkIRect&); 1.41 + // overrides from SkView 1.42 + virtual void onAddMenu(const SkOSMenu*); 1.43 + virtual void onUpdateMenu(SkOSMenu*); 1.44 + virtual void onSetTitle(const char[]); 1.45 + 1.46 +private: 1.47 + void* fHWND; 1.48 + bool fInvalEventIsPending; 1.49 + void* fNotifier; 1.50 + typedef SkWindow INHERITED; 1.51 +}; 1.52 + 1.53 +#endif