Release Clutter 1.11.4 (snapshot)
[profile/ivi/clutter.git] / clutter / clutter-actor-meta-private.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 #ifndef __CLUTTER_ACTOR_META_PRIVATE_H__
26 #define __CLUTTER_ACTOR_META_PRIVATE_H__
27
28 #include <clutter/clutter-actor-meta.h>
29
30 G_BEGIN_DECLS
31
32 #define CLUTTER_TYPE_META_GROUP         (_clutter_meta_group_get_type ())
33 #define CLUTTER_META_GROUP(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_META_GROUP, ClutterMetaGroup))
34 #define CLUTTER_IS_META_GROUP(obj)      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_META_GROUP))
35
36 typedef struct _ClutterMetaGroup        ClutterMetaGroup;
37 typedef struct _ClutterMetaGroupClass   ClutterMetaGroupClass;
38
39 struct _ClutterMetaGroup
40 {
41   GObject parent_instance;
42
43   ClutterActor *actor;
44
45   GList *meta;
46 };
47
48 struct _ClutterMetaGroupClass
49 {
50   GObjectClass parent_class;
51 };
52
53 /* Each actor meta has a priority with zero as a default. A higher
54    number means higher priority. Higher priority metas stay at the
55    beginning of the list. The priority can be negative to give lower
56    priority than the default. */
57
58 #define CLUTTER_ACTOR_META_PRIORITY_DEFAULT 0
59
60 /* Any value greater than this is considered an 'internal' priority
61    and if we expose the priority property publicly then an application
62    would not be able to use these values. */
63
64 #define CLUTTER_ACTOR_META_PRIORITY_INTERNAL_HIGH (G_MAXINT / 2)
65 #define CLUTTER_ACTOR_META_PRIORITY_INTERNAL_LOW (G_MININT / 2)
66
67 GType _clutter_meta_group_get_type (void) G_GNUC_CONST;
68
69 void                    _clutter_meta_group_add_meta    (ClutterMetaGroup *group,
70                                                          ClutterActorMeta *meta);
71 void                    _clutter_meta_group_remove_meta (ClutterMetaGroup *group,
72                                                          ClutterActorMeta *meta);
73 const GList *           _clutter_meta_group_peek_metas  (ClutterMetaGroup *group);
74 void                    _clutter_meta_group_clear_metas (ClutterMetaGroup *group);
75 ClutterActorMeta *      _clutter_meta_group_get_meta    (ClutterMetaGroup *group,
76                                                          const gchar      *name);
77
78 gboolean                _clutter_meta_group_has_metas_no_internal (ClutterMetaGroup *group);
79
80 GList *                 _clutter_meta_group_get_metas_no_internal   (ClutterMetaGroup *group);
81 void                    _clutter_meta_group_clear_metas_no_internal (ClutterMetaGroup *group);
82
83 /* ActorMeta */
84 void                    _clutter_actor_meta_set_actor           (ClutterActorMeta *meta,
85                                                                  ClutterActor     *actor);
86
87 const gchar *           _clutter_actor_meta_get_debug_name      (ClutterActorMeta *meta);
88
89 void                    _clutter_actor_meta_set_priority        (ClutterActorMeta *meta,
90                                                                  gint priority);
91 int                     _clutter_actor_meta_get_priority        (ClutterActorMeta *meta);
92
93 gboolean                _clutter_actor_meta_is_internal         (ClutterActorMeta *meta);
94
95 G_END_DECLS
96
97 #endif /* __CLUTTER_ACTOR_META_PRIVATE_H__ */