Gnash  0.8.10
aos4_agg_glue.h
Go to the documentation of this file.
00001 //
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
00003 //   2011 Free Software 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 #include "aos4_glue.h"
00020 #undef ACTION_END
00021 #include "Renderer.h"
00022 #include "Renderer_agg.h"
00023 
00024 #include <proto/intuition.h>
00025 #include <proto/graphics.h>
00026 #include <graphics/blitattr.h>
00027 #include <proto/Picasso96API.h>
00028 #include <proto/layers.h>
00029 #include <proto/dos.h>
00030 #include <proto/gadtools.h>
00031 
00032 #include <boost/cstdint.hpp> // for boost::?int??_t 
00033 #include <vector>
00034 
00035 namespace gnash
00036 {
00037         class AOS4AggGlue : public AOS4Glue
00038         {
00039           public:
00040         AOS4AggGlue();
00041             virtual ~AOS4AggGlue();
00042 
00043         bool                     init(int argc, char **argv[]);
00044             Renderer            *createRenderHandler(int depth);
00045         Renderer                *createRenderHandler();
00046             bool                         prepDrawingArea(int width, int height);
00047             void                         render();
00048         void                     render(int minx, int miny, int maxx, int maxy);
00049             void                         setInvalidatedRegions(const InvalidatedRanges& ranges);
00050                 struct Window   *getWindow(void);
00051                 struct Menu     *getMenu(void);
00052                 void                     setFullscreen();
00053                 void                     unsetFullscreen();
00054                 void                     resize(int width, int height);
00055                 void                     saveOrigiginalDimension(int width, int height, int xPosition, int yPosition);
00056          private:
00057         geometry::Range2d<int> _validbounds;
00058             std::vector< geometry::Range2d<int> > _drawbounds;
00059         unsigned char           *_offscreenbuf;
00060             Renderer                    *_agg_renderer;
00061         struct Window           *_window;
00062         struct Screen           *_screen;
00063                 bool                             _fullscreen;
00064                 int                              _width;
00065         int                              _orig_width;
00066             int                                  _height;
00067             int                                  _orig_height;
00068             int                                  _xPosition;
00069             int                                  _orig_xPosition;
00070             int                                  _yPosition;
00071             int                                  _orig_yPosition;
00072         int                                      _stride;
00073                 int                                      _btype;
00074                 struct Menu             *_menu;
00075                 RGBFTYPE                         _ftype;
00076         };
00077 }