Gnash
0.8.10
|
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_AGG_H 00020 #define GNASH_FB_GLUE_AGG_H 00021 00022 #ifdef HAVE_CONFIG_H 00023 #include "gnashconfig.h" 00024 #endif 00025 00026 #include <boost/cstdint.hpp> 00027 #include <boost/shared_ptr.hpp> 00028 00029 #include "Renderer.h" 00030 #include "fbsup.h" 00031 #include "fb_glue.h" 00032 00033 namespace gnash { 00034 00035 namespace gui { 00036 00037 class FBAggGlue: public FBGlue 00038 { 00039 public: 00040 FBAggGlue(); 00041 00042 // This constructor is not part of the API, as it's AGG and 00043 // Framebuffer specific 00044 FBAggGlue(int fd); 00045 00046 // All of these virtuals are all defined in the base FBGlue class 00047 ~FBAggGlue(); 00048 00055 bool init(int argc, char ***argv); 00056 00058 Renderer *createRenderHandler(); 00059 00062 void prepDrawingArea(void *drawing_area); 00063 00065 // 00079 // does not need to be implemented (optional feature), 00080 // but still needs to be available. 00081 // 00082 void setInvalidatedRegion(const SWFRect& bounds); 00083 void setInvalidatedRegions(const InvalidatedRanges &ranges); 00084 00088 int width(); 00089 00092 int height(); 00093 00095 void render(); 00096 void render(void* const /* region */) { }; 00097 00098 size_t getWidth() { return (_device) ? _device->getWidth() : 0; }; 00099 size_t getHeight() { return (_device) ? _device->getWidth() : 0; }; 00100 size_t getDepth() { return (_device) ? _device->getDepth() : 0; }; 00101 00102 protected: 00104 int _fd; 00105 struct fb_fix_screeninfo _fixinfo; 00106 struct fb_var_screeninfo _varinfo; 00107 00108 boost::scoped_ptr<Renderer> _renderer; 00109 00110 geometry::Range2d<int> _validbounds; 00111 std::vector< geometry::Range2d<int> > _drawbounds; 00112 }; 00113 00114 } // end of namespace gui 00115 } // end of gnash namespace 00116 00117 #endif // GNASH_FB_GLUE_AGG_H 00118 00119 // Local Variables: 00120 // mode: C++ 00121 // indent-tabs-mode: nil 00122 // End: