Release Clutter 1.11.4 (snapshot)
[profile/ivi/clutter.git] / clutter / clutter-actor-meta.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Copyright (C) 2010  Intel Corporation.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * Author:
22  *   Emmanuele Bassi <ebassi@linux.intel.com>
23  */
24
25 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be included directly."
27 #endif
28
29 #ifndef __CLUTTER_ACTOR_META_H__
30 #define __CLUTTER_ACTOR_META_H__
31
32 #include <clutter/clutter-types.h>
33
34 G_BEGIN_DECLS
35
36 #define CLUTTER_TYPE_ACTOR_META                 (clutter_actor_meta_get_type ())
37 #define CLUTTER_ACTOR_META(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_ACTOR_META, ClutterActorMeta))
38 #define CLUTTER_IS_ACTOR_META(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_ACTOR_META))
39 #define CLUTTER_ACTOR_META_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_ACTOR_META, ClutterActorMetaClass))
40 #define CLUTTER_IS_ACTOR_META_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_ACTOR_META))
41 #define CLUTTER_ACTOR_META_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_ACTOR_META, ClutterActorMetaClass))
42
43 typedef struct _ClutterActorMetaPrivate         ClutterActorMetaPrivate;
44 typedef struct _ClutterActorMetaClass           ClutterActorMetaClass;
45
46 /**
47  * ClutterActorMeta:
48  *
49  * The <structname>ClutterActorMeta</structname> structure contains only
50  * private data and should be accessed using the provided API
51  *
52  * Since: 1.4
53  */
54 struct _ClutterActorMeta
55 {
56   /*< private >*/
57   GInitiallyUnowned parent_instance;
58
59   ClutterActorMetaPrivate *priv;
60 };
61
62 /**
63  * ClutterActorMetaClass:
64  * @set_actor: virtual function, invoked when attaching and detaching
65  *   a #ClutterActorMeta instance to a #ClutterActor
66  *
67  * The <structname>ClutterActorMetaClass</structname> structure contains
68  * only private data
69  *
70  * Since: 1.4
71  */
72 struct _ClutterActorMetaClass
73 {
74   /*< private >*/
75   GInitiallyUnownedClass parent_class;
76
77   /*< public >*/
78
79   /**
80    * ClutterActorMetaClass::set_actor:
81    * @meta: a #ClutterActorMeta
82    * @actor: (allow-none): the actor attached to @meta, or %NULL
83    *
84    * Virtual function, called when @meta is attached or detached
85    * from a #ClutterActor.
86    */
87   void (* set_actor) (ClutterActorMeta *meta,
88                       ClutterActor     *actor);
89
90   /*< private >*/
91   void (* _clutter_meta1) (void);
92   void (* _clutter_meta2) (void);
93   void (* _clutter_meta3) (void);
94   void (* _clutter_meta4) (void);
95   void (* _clutter_meta5) (void);
96   void (* _clutter_meta6) (void);
97   void (* _clutter_meta7) (void);
98 };
99
100 GType clutter_actor_meta_get_type (void) G_GNUC_CONST;
101
102 void            clutter_actor_meta_set_name     (ClutterActorMeta *meta,
103                                                  const gchar      *name);
104 const gchar *   clutter_actor_meta_get_name     (ClutterActorMeta *meta);
105 void            clutter_actor_meta_set_enabled  (ClutterActorMeta *meta,
106                                                  gboolean          is_enabled);
107 gboolean        clutter_actor_meta_get_enabled  (ClutterActorMeta *meta);
108
109 ClutterActor *  clutter_actor_meta_get_actor    (ClutterActorMeta *meta);
110
111 G_END_DECLS
112
113 #endif /* __CLUTTER_ACTOR_META_H__ */