1 /* gtk-clutter-actor.h: Gtk widget ClutterActor
2  *
3  * Copyright (C) 2009 Red Hat, Inc
4  * Copyright (C) 2010 Intel Corp
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not see <http://www.fsf.org/licensing>.
18  *
19  * Authors:
20  *   Alexander Larsson <alexl@redhat.com>
21  *   Emmanuele Bassi <ebassi@linux.intel.com>
22  */
23 
24 #if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
25 #error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
26 #endif
27 
28 #ifndef __GTK_CLUTTER_ACTOR_H__
29 #define __GTK_CLUTTER_ACTOR_H__
30 
31 #include <gtk/gtk.h>
32 #include <clutter/clutter.h>
33 #include <clutter-gtk/gtk-clutter-version.h>
34 
35 G_BEGIN_DECLS
36 
37 #define GTK_CLUTTER_TYPE_ACTOR          (gtk_clutter_actor_get_type ())
38 #define GTK_CLUTTER_ACTOR(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_CLUTTER_TYPE_ACTOR, GtkClutterActor))
39 #define GTK_CLUTTER_IS_ACTOR(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_CLUTTER_TYPE_ACTOR))
40 #define GTK_CLUTTER_ACTOR_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST ((k), GTK_CLUTTER_TYPE_ACTOR, GtkClutterActorClass))
41 #define GTK_CLUTTER_IS_ACTOR_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_CLUTTER_TYPE_ACTOR))
42 #define GTK_CLUTTER_ACTOR_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_CLUTTER_TYPE_ACTOR, GtkClutterActorClass))
43 
44 typedef struct _GtkClutterActor         GtkClutterActor;
45 typedef struct _GtkClutterActorPrivate  GtkClutterActorPrivate;
46 typedef struct _GtkClutterActorClass    GtkClutterActorClass;
47 
48 /**
49  * GtkClutterActor:
50  *
51  * A ClutterActor containing a #GtkWidget.
52  */
53 struct _GtkClutterActor
54 {
55   /*< private >*/
56   ClutterActor parent_instance;
57 
58   GtkClutterActorPrivate *priv;
59 };
60 
61 /**
62  * GtkClutterActorClass:
63  *
64  * Base class for #GtkClutterActor.
65  */
66 struct _GtkClutterActorClass
67 {
68   /*< private >*/
69   ClutterActorClass parent_class;
70 
71   /* padding for future expansion */
72   void (*_clutter_gtk_reserved1) (void);
73   void (*_clutter_gtk_reserved2) (void);
74   void (*_clutter_gtk_reserved3) (void);
75   void (*_clutter_gtk_reserved4) (void);
76   void (*_clutter_gtk_reserved5) (void);
77   void (*_clutter_gtk_reserved6) (void);
78 };
79 
80 CLUTTER_GTK_EXTERN
81 GType         gtk_clutter_actor_get_type          (void) G_GNUC_CONST;
82 CLUTTER_GTK_EXTERN
83 ClutterActor *gtk_clutter_actor_new               (void);
84 CLUTTER_GTK_EXTERN
85 ClutterActor *gtk_clutter_actor_new_with_contents (GtkWidget       *contents);
86 CLUTTER_GTK_EXTERN
87 GtkWidget *   gtk_clutter_actor_get_contents      (GtkClutterActor *actor);
88 CLUTTER_GTK_EXTERN
89 GtkWidget *   gtk_clutter_actor_get_widget        (GtkClutterActor *actor);
90 
91 G_END_DECLS
92 
93 #endif /* __GTK_CLUTTER_ACTOR_H__ */
94