Gnash  0.8.11dev
gtk_canvas.h
Go to the documentation of this file.
1 // gnash-canvas.h: Gtk canvas widget for gnash
2 //
3 // Copyright (C) 2009, 2010, 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 
20 #ifndef GNASH_GTK_CANVAS_H
21 #define GNASH_GTK_CANVAS_H
22 
23 #include <memory>
24 #include <string>
25 #include <gtk/gtkdrawingarea.h>
26 
27 // Forward declarations.
28 namespace gnash {
29  class Renderer;
30  class movie_root;
31 }
32 
33 G_BEGIN_DECLS
34 
35 typedef struct _GnashCanvas GnashCanvas;
37 
38 #define GNASH_TYPE_CANVAS (gnash_canvas_get_type())
39 #define GNASH_CANVAS(object) (G_TYPE_CHECK_INSTANCE_CAST((object), GNASH_TYPE_CANVAS, GnashCanvas))
40 #define GNASH_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNASH_TYPE_CANVAS, GnashCanvasClass))
41 #define GNASH_IS_CANVAS(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), GNASH_TYPE_CANVAS))
42 #define GNASH_IS_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNASH_TYPE_CANVAS))
43 #define GNASH_CANVAS_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), GNASH_TYPE_CANVAS, GnashCanvasClass))
44 
46  GtkDrawingAreaClass base_class;
47 };
48 
49 GType gnash_canvas_get_type();
50 
52 GtkWidget *gnash_canvas_new();
53 
55 void gnash_canvas_setup (GnashCanvas *canvas, std::string &hwaccel,
56  std::string &renderer, int argc, char **argv[]);
57 
59 
60 G_END_DECLS
61 
63 std::shared_ptr<gnash::Renderer> gnash_canvas_get_renderer(GnashCanvas *canvas);
64 
65 
66 #endif
67 
68 // local Variables:
69 // mode: C++
70 // indent-tabs-mode: nil
71 // End:
72 
void gnash_canvas_setup(GnashCanvas *canvas, std::string &hwaccel, std::string &renderer, int argc, char **argv[])
Select renderer and hwaccel, prep canvas for drawing.
Definition: gtk_canvas.cpp:200
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
GtkDrawingAreaClass base_class
Definition: gtk_canvas.h:46
void gnash_canvas_before_rendering(GnashCanvas *canvas, gnash::movie_root *stage)
Definition: gtk_canvas.cpp:317
G_END_DECLS std::shared_ptr< gnash::Renderer > gnash_canvas_get_renderer(GnashCanvas *canvas)
Get the Renderer for this canvas.
Definition: gtk_canvas.cpp:323
typedefG_BEGIN_DECLS struct _GnashCanvas GnashCanvas
Definition: gtk_canvas.h:35
GType gnash_canvas_get_type()
GtkWidget * gnash_canvas_new()
allocate memory for canvas to draw in
Definition: gtk_canvas.cpp:80
Definition: gtk_canvas.h:45
This class represents the &#39;Stage&#39; and top-level movie.
Definition: movie_root.h:150