1 2 /* 3 * Copyright 2006 The Android Open Source Project 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 #ifndef SkOSWindow_MacCocoa_DEFINED 10 #define SkOSWindow_MacCocoa_DEFINED 11 12 #include "SkWindow.h" 13 14 class SkOSWindow : public SkWindow { 15 public: 16 SkOSWindow(void* hwnd); 17 ~SkOSWindow(); getHWND()18 void* getHWND() const { return fHWND; } 19 20 virtual bool onDispatchClick(int x, int y, Click::State state, 21 void* owner); 22 void detachGL(); 23 bool attachGL(); 24 void presentGL(); 25 26 protected: 27 // overrides from SkEventSink 28 virtual bool onEvent(const SkEvent& evt); 29 // overrides from SkWindow 30 virtual void onHandleInval(const SkIRect&); 31 // overrides from SkView 32 virtual void onAddMenu(const SkOSMenu*); 33 virtual void onUpdateMenu(const SkOSMenu*); 34 virtual void onSetTitle(const char[]); 35 36 private: 37 void* fHWND; 38 bool fInvalEventIsPending; 39 void* fNotifier; 40 void* fGLContext; 41 typedef SkWindow INHERITED; 42 }; 43 44 #endif 45