Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef HAIKU_AGG_GLUE_H
00020 #define HAIKU_AGG_GLUE_H
00021
00022 #include <vector>
00023 #include <boost/cstdint.hpp>
00024 #include <Renderer.h>
00025
00026 #include <SupportDefs.h>
00027
00028 class BWindow;
00029
00030 namespace gnash
00031 {
00032
00033 class Gui;
00034 class BeV;
00035
00036
00037 const int GNASH_MOUSE_CLICKED = 'GMCL';
00038 const int GNASH_MOUSE_MOVED = 'GMMV';
00039 const int GNASH_KEY_EVENT = 'GKKE';
00040 const int GNASH_RESIZE = 'GRSZ';
00041 const int GNASH_HIDDEN = 'GHID';
00042 const int GNASH_SHOWN = 'GSHN';
00043
00044
00045 const int GNASH_SET_FULLSCREEN = 'GSFS';
00046 const int GNASH_UNSET_FULLSCREEN = 'GUFS';
00047
00048 class HaikuAggGlue
00049 {
00050 public:
00051 HaikuAggGlue(Gui *gui, unsigned long xid);
00052 virtual ~HaikuAggGlue();
00053
00054 bool init(int argc, char **argv[], BWindow **win, std::string sharefilename);
00055 Renderer* createRenderHandler(int depth);
00056 void setInvalidatedRegions(const InvalidatedRanges& ranges);
00057 void ViewNoMore();
00058 void ViewNeeded();
00059 bool prepDrawingArea(int width, int height, boost::uint32_t sdl_flags);
00060 boost::uint32_t maskFlags(boost::uint32_t sdl_flags);
00061 void render();
00062 void render(int minx, int miny, int maxx, int maxy);
00063 void Shown();
00064 void Hidden();
00065
00066 private:
00067 unsigned char *_offscreenbuf;
00068 unsigned char *_sharebuf;
00069 int _width, _height;
00070 unsigned int _bufsize;
00071 Renderer *_agg_renderer;
00072
00073 geometry::Range2d<int> _validbounds;
00074 std::vector< geometry::Range2d<int> > _drawbounds;
00075 int _bpp;
00076 BWindow **_win;
00077 BeV *_view;
00078 Gui *_gui;
00079 unsigned long _xid;
00080 std::string _sharefilename;
00081 int _sharefd;
00082 bool _viewhidden;
00083 };
00084
00085 }
00086
00087 #endif
00088