michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project 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: michael@0: michael@0: #ifndef SkOSWindow_SDL_DEFINED michael@0: #define SkOSWindow_SDL_DEFINED michael@0: michael@0: #include "SDL.h" michael@0: #include "SkWindow.h" michael@0: michael@0: class SkGLCanvas; michael@0: michael@0: class SkOSWindow : public SkWindow { michael@0: public: michael@0: SkOSWindow(void* screen); michael@0: virtual ~SkOSWindow(); michael@0: michael@0: static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); michael@0: michael@0: void handleSDLEvent(const SDL_Event& event); michael@0: michael@0: protected: 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 onSetTitle(const char[]); michael@0: michael@0: private: michael@0: SDL_Surface* fScreen; michael@0: SDL_Surface* fSurface; michael@0: SkGLCanvas* fGLCanvas; michael@0: michael@0: void doDraw(); michael@0: michael@0: typedef SkWindow INHERITED; michael@0: }; michael@0: michael@0: #endif