Gnash  0.8.11dev
gtk_glue_cairo.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 #include "gtk_glue.h"
20 
21 #include <gtk/gtk.h>
22 #include <gdk/gdk.h>
23 
24 # include <cairo.h>
25 
26 namespace gnash
27 {
28 
29 class GtkCairoGlue : public GtkGlue
30 {
31  public:
32  GtkCairoGlue();
33  ~GtkCairoGlue();
34 
35  bool init(int argc, char ***argv);
36  bool needsDrawingArea() { return true; };
37  void prepDrawingArea(GtkWidget *drawing_area);
39  void beforeRendering();
40  void render();
41  void render(int minx, int miny, int maxx, int maxy);
42  void configure(GtkWidget *const widget, GdkEventConfigure *const event);
43  private:
44  cairo_surface_t* createGdkImageSurface(const int& width, const int& height);
45  cairo_surface_t* createSimilarSurface(const int& width, const int& height);
46  cairo_surface_t* createMemorySurface(const int& width, const int& height);
47 
48  cairo_t* _cairo_handle;
49  cairo_t* _cairo_offscreen;
50  Renderer* _renderer;
51  GdkImage* _image;
52 };
53 
54 } // namespace gnash
bool init(int argc, char ***argv)
Definition: gtk_glue_cairo.cpp:48
Renderer * createRenderHandler()
Definition: gtk_glue_cairo.cpp:63
~GtkCairoGlue()
Definition: gtk_glue_cairo.cpp:40
void configure(GtkWidget *const widget, GdkEventConfigure *const event)
Definition: gtk_glue_cairo.cpp:198
GtkCairoGlue()
Definition: gtk_glue_cairo.cpp:31
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
Definition: klash_part.cpp:329
void prepDrawingArea(GtkWidget *drawing_area)
Definition: gtk_glue_cairo.cpp:54
void render()
Definition: gtk_glue_cairo.cpp:111
Base class for render handlers.
Definition: Renderer.h:188
Definition: gtk_glue_cairo.h:29
Definition: klash_part.cpp:329
bool needsDrawingArea()
Definition: gtk_glue_cairo.h:36
void beforeRendering()
Definition: gtk_glue_cairo.cpp:71
Definition: gtk_glue.h:40