Gnash  0.8.11dev
haiku_agg_glue.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 // 2011 Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef HAIKU_AGG_GLUE_H
20 #define HAIKU_AGG_GLUE_H
21 
22 #include <vector>
23 #include <cstdint> // for boost::?int??_t
24 #include <Renderer.h>
25 
26 #include <SupportDefs.h>
27 
28 class BWindow;
29 
30 namespace gnash
31 {
32 
33 class Gui;
34 class BeV;
35 
36 /* copy in plugin.cpp */
37 const int GNASH_MOUSE_CLICKED = 'GMCL';
38 const int GNASH_MOUSE_MOVED = 'GMMV';
39 const int GNASH_KEY_EVENT = 'GKKE';
40 const int GNASH_RESIZE = 'GRSZ';
41 const int GNASH_HIDDEN = 'GHID';
42 const int GNASH_SHOWN = 'GSHN';
43 
44 
45 const int GNASH_SET_FULLSCREEN = 'GSFS';
46 const int GNASH_UNSET_FULLSCREEN = 'GUFS';
47 
49 {
50  public:
51  HaikuAggGlue(Gui *gui, unsigned long xid);
52  virtual ~HaikuAggGlue();
53 
54  bool init(int argc, char **argv[], BWindow **win, std::string sharefilename);
55  Renderer* createRenderHandler(int depth);
56  void setInvalidatedRegions(const InvalidatedRanges& ranges);
57  void ViewNoMore();
58  void ViewNeeded();
59  bool prepDrawingArea(int width, int height, std::uint32_t sdl_flags);
60  std::uint32_t maskFlags(std::uint32_t sdl_flags);
61  void render();
62  void render(int minx, int miny, int maxx, int maxy);
63  void Shown();
64  void Hidden();
65  //void BlankScreen();
66  private:
67  unsigned char *_offscreenbuf;
68  unsigned char *_sharebuf;
69  int _width, _height;
70  unsigned int _bufsize;
71  Renderer *_agg_renderer;
72 
73  geometry::Range2d<int> _validbounds;
74  std::vector< geometry::Range2d<int> > _drawbounds;
75  int _bpp;
76  BWindow **_win;
77  BeV *_view;
78  Gui *_gui;
79  unsigned long _xid;
80  std::string _sharefilename;
81  int _sharefd;
82  bool _viewhidden;
83 };
84 
85 }
86 
87 #endif
88 
const int GNASH_MOUSE_CLICKED
Definition: haiku_agg_glue.h:37
const int GNASH_UNSET_FULLSCREEN
Definition: haiku_agg_glue.h:46
virtual ~HaikuAggGlue()
Definition: haiku_agg_glue.cpp:231
Renderer * createRenderHandler(int depth)
Definition: haiku_agg_glue.cpp:270
bool init(int argc, char **argv[], BWindow **win, std::string sharefilename)
Definition: haiku_agg_glue.cpp:247
void render()
Definition: haiku_agg_glue.cpp:459
void ViewNoMore()
Definition: haiku_agg_glue.cpp:306
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
const int GNASH_KEY_EVENT
Definition: haiku_agg_glue.h:39
Definition: klash_part.cpp:329
void Hidden()
Definition: haiku_agg_glue.cpp:495
std::uint32_t maskFlags(std::uint32_t sdl_flags)
Base class for render handlers.
Definition: Renderer.h:188
void setInvalidatedRegions(const InvalidatedRanges &ranges)
Definition: haiku_agg_glue.cpp:440
const int GNASH_SHOWN
Definition: haiku_agg_glue.h:42
Parent class from which all GUI implementations will depend.
Definition: gui.h:88
Definition: haiku_agg_glue.h:48
Definition: klash_part.cpp:329
void Shown()
Definition: haiku_agg_glue.cpp:489
void ViewNeeded()
Definition: haiku_agg_glue.cpp:312
HaikuAggGlue(Gui *gui, unsigned long xid)
Definition: haiku_agg_glue.cpp:213
const int GNASH_RESIZE
Definition: haiku_agg_glue.h:40
const int GNASH_MOUSE_MOVED
Definition: haiku_agg_glue.h:38
const int GNASH_SET_FULLSCREEN
Definition: haiku_agg_glue.h:45
Object * win
Definition: aos4_gnash_prefs.cpp:31
bool prepDrawingArea(int width, int height, std::uint32_t sdl_flags)
Definition: haiku_agg_glue.cpp:329
const int GNASH_HIDDEN
Definition: haiku_agg_glue.h:41