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 #if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
24 #error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
25 #endif
26 
27 #ifndef __GTK_CLUTTER_EMBED_H__
28 #define __GTK_CLUTTER_EMBED_H__
29 
30 #include <gtk/gtk.h>
31 #include <clutter/clutter.h>
32 #include <clutter-gtk/gtk-clutter-version.h>
33 
34 G_BEGIN_DECLS
35 
36 #define GTK_CLUTTER_TYPE_EMBED          (gtk_clutter_embed_get_type ())
37 #define GTK_CLUTTER_EMBED(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbed))
38 #define GTK_CLUTTER_IS_EMBED(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_CLUTTER_TYPE_EMBED))
39 #define GTK_CLUTTER_EMBED_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST ((k), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbedClass))
40 #define GTK_CLUTTER_IS_EMBED_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_CLUTTER_TYPE_EMBED))
41 #define GTK_CLUTTER_EMBED_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbedClass))
42 
43 typedef struct _GtkClutterEmbed         GtkClutterEmbed;
44 typedef struct _GtkClutterEmbedPrivate  GtkClutterEmbedPrivate;
45 typedef struct _GtkClutterEmbedClass    GtkClutterEmbedClass;
46 
47 /**
48  * GtkClutterEmbed:
49  *
50  * A #GtkWidget containing the default Clutter stage.
51  *
52  * The <structname>GtkClutterEmbed</structname> structure contains only
53  * private data and should be accessed using the provided API.
54  */
55 struct _GtkClutterEmbed
56 {
57   /*< private >*/
58   GtkContainer parent_instance;
59 
60   GtkClutterEmbedPrivate *priv;
61 };
62 
63 /**
64  * GtkClutterEmbedClass:
65  *
66  * Base class for #GtkClutterEmbed.
67  *
68  * The <structname>GtkClutterEmbedClass</structname> contains only private
69  * data.
70  */
71 struct _GtkClutterEmbedClass
72 {
73   /*< private >*/
74   GtkContainerClass parent_class;
75 
76   /* padding for future expansion */
77   void (*_clutter_gtk_reserved1) (void);
78   void (*_clutter_gtk_reserved2) (void);
79   void (*_clutter_gtk_reserved3) (void);
80   void (*_clutter_gtk_reserved4) (void);
81   void (*_clutter_gtk_reserved5) (void);
82   void (*_clutter_gtk_reserved6) (void);
83 };
84 
85 CLUTTER_GTK_EXTERN
86 GType         gtk_clutter_embed_get_type  (void) G_GNUC_CONST;
87 
88 CLUTTER_GTK_EXTERN
89 GtkWidget *   gtk_clutter_embed_new       (void);
90 CLUTTER_GTK_EXTERN
91 ClutterActor *gtk_clutter_embed_get_stage (GtkClutterEmbed *embed);
92 CLUTTER_GTK_EXTERN
93 void          gtk_clutter_embed_set_use_layout_size (GtkClutterEmbed *embed,
94 						     gboolean use_layout_size);
95 CLUTTER_GTK_EXTERN
96 gboolean      gtk_clutter_embed_get_use_layout_size (GtkClutterEmbed *embed);
97 
98 G_END_DECLS
99 
100 #endif /* __GTK_CLUTTER_EMBED_H__ */
101