[clutter/wip/apocalypses/apocalypse-1: 40/92] Deprecate ClutterGroup



commit 38a1d4b14d318e12eb73b3d89c1d23dd0e823a4a
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Dec 6 17:33:44 2011 +0000

    Deprecate ClutterGroup
    
    The Group functionality is now provided by ClutterActor.
    
    Sadly, we need to keep the ClutterGroup structure definition in the
    non-deprecated header because ClutterStage inherits from Group - an API
    wart that was never fixed during the 0.x cycles, and that we'll have to
    keep around until we can break API.

 clutter/Makefile.am                      |    2 +-
 clutter/clutter-group.h                  |   12 ++++++------
 clutter/{ => deprecated}/clutter-group.c |   11 +++++++++++
 clutter/deprecated/clutter-group.h       |   14 ++++++++++++++
 4 files changed, 32 insertions(+), 7 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index 0d78ce2..ecaf823 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -157,7 +157,6 @@ source_c = \
 	$(srcdir)/clutter-flatten-effect.c	\
 	$(srcdir)/clutter-flow-layout.c		\
 	$(srcdir)/clutter-gesture-action.c 	\
-	$(srcdir)/clutter-group.c 		\
 	$(srcdir)/clutter-input-device.c	\
 	$(srcdir)/clutter-interval.c            \
 	$(srcdir)/clutter-keysyms-table.c	\
@@ -261,6 +260,7 @@ deprecated_c = \
 	$(srcdir)/deprecated/clutter-box.c			\
 	$(srcdir)/deprecated/clutter-fixed.c			\
 	$(srcdir)/deprecated/clutter-frame-source.c		\
+	$(srcdir)/deprecated/clutter-group.c 			\
 	$(srcdir)/deprecated/clutter-timeout-pool.c		\
 	$(srcdir)/deprecated/clutter-score.c 			\
 	$(srcdir)/deprecated/clutter-shader.c 			\
diff --git a/clutter/clutter-group.h b/clutter/clutter-group.h
index 0d17792..31f8c03 100644
--- a/clutter/clutter-group.h
+++ b/clutter/clutter-group.h
@@ -41,6 +41,12 @@ G_BEGIN_DECLS
 #define CLUTTER_IS_GROUP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_GROUP))
 #define CLUTTER_GROUP_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_GROUP, ClutterGroupClass))
 
+/* XXX - ClutterGroup is to be considered fully deprecated; the only
+ * reason we keep this header is because ClutterStage inherits from
+ * ClutterGroup, and thus we need to have a structure definition for
+ * the Stage object to expand.
+ */
+
 typedef struct _ClutterGroup            ClutterGroup;
 typedef struct _ClutterGroupClass       ClutterGroupClass;
 typedef struct _ClutterGroupPrivate     ClutterGroupPrivate;
@@ -84,12 +90,6 @@ struct _ClutterGroupClass
 
 GType clutter_group_get_type (void) G_GNUC_CONST;
 
-ClutterActor *  clutter_group_new               (void);
-ClutterActor *  clutter_group_get_nth_child     (ClutterGroup *self,
-                                                 gint          index_);
-gint            clutter_group_get_n_children    (ClutterGroup *self);
-void            clutter_group_remove_all        (ClutterGroup *self);
-
 G_END_DECLS
 
 #endif /* __CLUTTER_GROUP_H__ */
diff --git a/clutter/clutter-group.c b/clutter/deprecated/clutter-group.c
similarity index 95%
rename from clutter/clutter-group.c
rename to clutter/deprecated/clutter-group.c
index 7180de7..3c1ee60 100644
--- a/clutter/clutter-group.c
+++ b/clutter/deprecated/clutter-group.c
@@ -42,6 +42,8 @@
  * the visible area of a #ClutterGroup to a specified allocation is to
  * explicitly set the size of the #ClutterGroup and then use the
  * #ClutterActor:clip-to-allocation property.
+ *
+ * Deprecated: 1.10: Use #ClutterActor instead.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -200,6 +202,8 @@ clutter_group_init (ClutterGroup *self)
  * Create a new  #ClutterGroup.
  *
  * Return value: the newly created #ClutterGroup actor
+ *
+ * Deprecated: 1.10: Use clutter_actor_new() instead.
  */
 ClutterActor *
 clutter_group_new (void)
@@ -212,6 +216,9 @@ clutter_group_new (void)
  * @self: A #ClutterGroup
  *
  * Removes all children actors from the #ClutterGroup.
+ *
+ * Deprecated: 1.10: Use clutter_actor_get_children() and
+ *   clutter_actor_remove_child() instead.
  */
 void
 clutter_group_remove_all (ClutterGroup *self)
@@ -242,6 +249,8 @@ clutter_group_remove_all (ClutterGroup *self)
  * Return value: The number of child actors held in the group.
  *
  * Since: 0.2
+ *
+ * Deprecated: 1.10: Use clutter_actor_get_n_children() instead.
  */
 gint
 clutter_group_get_n_children (ClutterGroup *self)
@@ -262,6 +271,8 @@ clutter_group_get_n_children (ClutterGroup *self)
  *   @index_ is invalid.
  *
  * Since: 0.2
+ *
+ * Deprecated: 1.10: Use clutter_actor_get_child_at_index() instead.
  */
 ClutterActor *
 clutter_group_get_nth_child (ClutterGroup *self,
diff --git a/clutter/deprecated/clutter-group.h b/clutter/deprecated/clutter-group.h
index 0f0536c..a6ea39d 100644
--- a/clutter/deprecated/clutter-group.h
+++ b/clutter/deprecated/clutter-group.h
@@ -2,9 +2,23 @@
 #define __CLUTTER_GROUP_DEPRECATED_H__
 
 #include <clutter/clutter-types.h>
+#include <clutter/clutter-group.h>
 
 G_BEGIN_DECLS
 
+CLUTTER_DEPRECATED_FOR(clutter_actor_new)
+ClutterActor *  clutter_group_new               (void);
+
+CLUTTER_DEPRECATED_FOR(clutter_actor_get_child_at_index)
+ClutterActor *  clutter_group_get_nth_child     (ClutterGroup *self,
+                                                 gint          index_);
+
+CLUTTER_DEPRECATED_FOR(clutter_actor_get_n_children)
+gint            clutter_group_get_n_children    (ClutterGroup *self);
+
+CLUTTER_DEPRECATED
+void            clutter_group_remove_all        (ClutterGroup *self);
+
 #ifndef CLUTTER_DISABLE_DEPRECATED
 
 /* for Mr. Mallum only */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]