2008-04-11 Emmanuele Bassi <ebassi@openedhand.com>
[clutter-gtk] / clutter-gtk / gtk-clutter-embed.h
1 /* gtk-clutter-embed.h: Embeddable ClutterStage
2  *
3  * Copyright (C) 2007 OpenedHand
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not see <http://www.fsf.org/licensing>.
17  *
18  * Authors:
19  *   Iain Holmes  <iain@openedhand.com>
20  *   Emmanuele Bassi  <ebassi@openedhand.com>
21  */
22
23 #ifndef __GTK_CLUTTER_EMBED_H__
24 #define __GTK_CLUTTER_EMBED_H__
25
26 #include <gtk/gtkwidget.h>
27 #include <clutter/clutter-main.h>
28 #include <clutter/clutter-actor.h>
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_CLUTTER_EMBED          (gtk_clutter_embed_get_type ())
33 #define GTK_CLUTTER_EMBED(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_CLUTTER_EMBED, GtkClutterEmbed))
34 #define GTK_IS_CLUTTER_EMBED(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_CLUTTER_EMBED))
35 #define GTK_CLUTTER_EMBED_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_CLUTTER_EMBED, GtkClutterEmbedClass))
36 #define GTK_IS_CLUTTER_EMBED_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_CLUTTER_EMBED))
37 #define GTK_CLUTTER_EMBED_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_CLUTTER_EMBED, GtkClutterEmbedClass))
38
39 typedef struct _GtkClutterEmbed         GtkClutterEmbed;
40 typedef struct _GtkClutterEmbedPrivate  GtkClutterEmbedPrivate;
41 typedef struct _GtkClutterEmbedClass    GtkClutterEmbedClass;
42
43 /**
44  * ClutterGtkInitError:
45  * @CLUTTER_INIT_ERROR_LAST: Placeholder
46  * @CLUTTER_INIT_ERROR_GTK: Unable to initialize GTK+
47  *
48  * Extension of the #ClutterInitError enumeration for the integration
49  * with GTK+
50  *
51  * Since: 0.8
52  */
53 typedef enum {
54   CLUTTER_INIT_ERROR_LAST = CLUTTER_INIT_ERROR_INTERNAL,
55
56   CLUTTER_INIT_ERROR_GTK  = (CLUTTER_INIT_ERROR_LAST - 1)
57 } ClutterGtkInitError;
58
59 /**
60  * GtkClutterEmbed:
61  *
62  * A #GtkWidget containing the default Clutter stage.
63  *
64  * Since: 0.6
65  */
66 struct _GtkClutterEmbed
67 {
68   /*< private >*/
69   GtkWidget parent_instance;
70
71   GtkClutterEmbedPrivate *priv;
72 };
73
74 /**
75  * GtkClutterEmbedClass:
76  *
77  * Base class for #GtkClutterEmbed.
78  *
79  * Since: 0.6
80  */
81 struct _GtkClutterEmbedClass
82 {
83   /*< private >*/
84   GtkWidgetClass parent_class;
85
86   /* padding for future expansion */
87   void (*_clutter_gtk_reserved1) (void);
88   void (*_clutter_gtk_reserved2) (void);
89   void (*_clutter_gtk_reserved3) (void);
90   void (*_clutter_gtk_reserved4) (void);
91   void (*_clutter_gtk_reserved5) (void);
92   void (*_clutter_gtk_reserved6) (void);
93 };
94
95 GType         gtk_clutter_embed_get_type  (void) G_GNUC_CONST;
96 GtkWidget *   gtk_clutter_embed_new       (void);
97 ClutterActor *gtk_clutter_embed_get_stage (GtkClutterEmbed *embed);
98
99 ClutterInitError gtk_clutter_init (gint    *argc,
100                                    gchar ***argv);
101
102 G_END_DECLS
103
104 #endif /* __GTK_CLUTTER_EMBED_H__ */