Gnash  0.8.10
gtk_canvas.h
Go to the documentation of this file.
00001 // gnash-canvas.h: Gtk canvas widget for gnash
00002 // 
00003 //   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 //
00019 
00020 #ifndef GNASH_GTK_CANVAS_H
00021 #define GNASH_GTK_CANVAS_H
00022 
00023 #include <string>
00024 #include <gtk/gtkdrawingarea.h>
00025 #include <boost/shared_ptr.hpp>
00026 
00027 // Forward declarations.
00028 namespace gnash {
00029     class Renderer;
00030     class movie_root;
00031 }
00032 
00033 G_BEGIN_DECLS
00034 
00035 typedef struct _GnashCanvas            GnashCanvas;
00036 typedef struct _GnashCanvasClass       GnashCanvasClass;
00037 
00038 #define GNASH_TYPE_CANVAS              (gnash_canvas_get_type())
00039 #define GNASH_CANVAS(object)           (G_TYPE_CHECK_INSTANCE_CAST((object), GNASH_TYPE_CANVAS, GnashCanvas))
00040 #define GNASH_CANVAS_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GNASH_TYPE_CANVAS, GnashCanvasClass))
00041 #define GNASH_IS_CANVAS(object)        (G_TYPE_CHECK_INSTANCE_TYPE((object), GNASH_TYPE_CANVAS))
00042 #define GNASH_IS_CANVAS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), GNASH_TYPE_CANVAS))
00043 #define GNASH_CANVAS_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), GNASH_TYPE_CANVAS, GnashCanvasClass))
00044 
00045 struct _GnashCanvasClass {
00046     GtkDrawingAreaClass base_class;
00047 };
00048 
00049 GType gnash_canvas_get_type();
00050 
00052 GtkWidget *gnash_canvas_new();
00053 
00055 void gnash_canvas_setup (GnashCanvas *canvas, std::string &hwaccel,
00056                          std::string &renderer, int argc, char **argv[]);
00057 
00058 void gnash_canvas_before_rendering (GnashCanvas *canvas, gnash::movie_root* stage);
00059 
00061 boost::shared_ptr<gnash::Renderer> gnash_canvas_get_renderer(GnashCanvas *canvas);
00062 
00063 G_END_DECLS
00064 
00065 #endif
00066 
00067 // local Variables:
00068 // mode: C++
00069 // indent-tabs-mode: nil
00070 // End:
00071