Gnash  0.8.10
fb_glue.h
Go to the documentation of this file.
00001 //
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
00003 //   Foundation, Inc
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef GNASH_FB_GLUE_H
00020 #define GNASH_FB_GLUE_H
00021 
00022 #include <cassert>
00023 
00024 #include "GnashDevice.h"
00025 #include "DeviceGlue.h"
00026 
00027 #ifdef BUILD_EGL_DEVICE
00028 #include "egl/eglDevice.h"
00029 #endif
00030 #ifdef BUILD_RAWFB_DEVICE
00031 #include "rawfb/RawFBDevice.h"
00032 #endif
00033 #ifdef BUILD_DIRECTFB_DEVICE
00034 #include "directfb/DirectFBDevice.h"
00035 #endif
00036 #ifdef BUILD_X11_DEVICE
00037 #include "x11/X11Device.h"
00038 #endif
00039 
00040 namespace gnash {
00041     class movie_root;
00042 }
00043 
00044 namespace gnash {
00045 
00046 namespace gui {
00047     
00048 typedef void FbWidget;
00049 
00053 class FBGlue : public DeviceGlue
00054 {
00055 public:
00056     FBGlue() {};
00057     virtual ~FBGlue() {};
00058 
00061     virtual bool init(int argc, char **argv[]) = 0;
00062 
00063     // Prepare the drawing area for the renderer
00064     virtual void prepDrawingArea(FbWidget *drawing_area) = 0;
00065     virtual Renderer* createRenderHandler() = 0;
00066     virtual void setRenderHandlerSize(int /*width*/, int /*height*/) {}
00067     virtual void setInvalidatedRegions(const InvalidatedRanges &/* ranges */) {};
00068     
00069     virtual void render() = 0;
00070     
00071     virtual int width() = 0;
00072     virtual int height() = 0;
00073     
00074     virtual void render(void* const /* region */) {};
00075 
00076     virtual void beforeRendering(movie_root *) {};
00077 
00078 protected:
00079     boost::scoped_ptr<Renderer> _renderer;
00080 };
00081 
00082 } // end of namespace gui
00083 } // end of namespace gnash
00084 
00085 // end of GNASH_FB_GLUE_H
00086 #endif
00087 
00088 // Local Variables:
00089 // mode: C++
00090 // indent-tabs-mode: nil
00091 // End: