Gnash  0.8.11dev
fb_glue.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
3 // 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 GNASH_FB_GLUE_H
20 #define GNASH_FB_GLUE_H
21 
22 #include <cassert>
23 
24 #include "GnashDevice.h"
25 #include "DeviceGlue.h"
26 
27 #ifdef BUILD_EGL_DEVICE
28 #include "egl/eglDevice.h"
29 #endif
30 #ifdef BUILD_RAWFB_DEVICE
31 #include "rawfb/RawFBDevice.h"
32 #endif
33 #ifdef BUILD_DIRECTFB_DEVICE
35 #endif
36 #ifdef BUILD_X11_DEVICE
37 #include "x11/X11Device.h"
38 #endif
39 
40 namespace gnash {
41  class movie_root;
42 }
43 
44 namespace gnash {
45 
46 namespace gui {
47 
48 typedef void FbWidget;
49 
53 class FBGlue : public DeviceGlue
54 {
55 public:
56  FBGlue() {};
57  virtual ~FBGlue() {};
58 
61  virtual bool init(int argc, char **argv[]) = 0;
62 
63  // Prepare the drawing area for the renderer
64  virtual void prepDrawingArea(FbWidget *drawing_area) = 0;
65  virtual Renderer* createRenderHandler() = 0;
66  virtual void setRenderHandlerSize(int /*width*/, int /*height*/) {}
67  virtual void setInvalidatedRegions(const InvalidatedRanges &/* ranges */) {};
68 
69  virtual void render() = 0;
70 
71  virtual int width() = 0;
72  virtual int height() = 0;
73 
74  virtual void render(void* const /* region */) {};
75 
76  virtual void beforeRendering(movie_root *) {};
77 
78 protected:
79  std::unique_ptr<Renderer> _renderer;
80 };
81 
82 } // end of namespace gui
83 } // end of namespace gnash
84 
85 // end of GNASH_FB_GLUE_H
86 #endif
87 
88 // Local Variables:
89 // mode: C++
90 // indent-tabs-mode: nil
91 // End:
std::unique_ptr< Renderer > _renderer
Definition: fb_glue.h:76
virtual Renderer * createRenderHandler()=0
virtual ~FBGlue()
Definition: fb_glue.h:57
Definition: fb_glue.h:53
void FbWidget
Definition: fb_glue.h:48
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
virtual void setInvalidatedRegions(const InvalidatedRanges &)
Definition: fb_glue.h:67
FBGlue()
Definition: fb_glue.h:56
Definition: DeviceGlue.h:37
Base class for render handlers.
Definition: Renderer.h:188
virtual void setRenderHandlerSize(int, int)
Definition: fb_glue.h:66
virtual bool init(int argc, char **argv[])=0
virtual void beforeRendering(movie_root *)
Definition: fb_glue.h:76
virtual void render(void *const)
Definition: fb_glue.h:74
virtual int width()=0
virtual void prepDrawingArea(FbWidget *drawing_area)=0
virtual int height()=0
virtual void render()=0
This class represents the &#39;Stage&#39; and top-level movie.
Definition: movie_root.h:150