[clutter] actor: Deprecate show_all()/hide_all()



commit 0f39f20db6c906c3f32c9376a1cca94ce4c1a14f
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Jan 17 16:11:29 2012 +0000

    actor: Deprecate show_all()/hide_all()
    
    The hide_all() method is pretty much pointless, as hiding an actor will
    automatically prevent its children from being painted. The show_all()
    method would only be marginally useful, if actors weren't set to be
    visible by default when added to another actor - which was the case when
    we introduced show_all() and hide_all().

 clutter/clutter-actor.c            |    5 +++++
 clutter/clutter-actor.h            |    8 ++++----
 clutter/deprecated/clutter-actor.h |    6 ++++++
 3 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index d21d362..9ec6ceb 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -1311,6 +1311,8 @@ clutter_actor_show (ClutterActor *self)
  * Calls clutter_actor_show() on all children of an actor (if any).
  *
  * Since: 0.2
+ *
+ * Deprecated: 1.10: Actors are visible by default
  */
 void
 clutter_actor_show_all (ClutterActor *self)
@@ -1404,6 +1406,9 @@ clutter_actor_hide (ClutterActor *self)
  * Calls clutter_actor_hide() on all child actors (if any).
  *
  * Since: 0.2
+ *
+ * Deprecated: 1.10: Using clutter_actor_hide() on the actor will
+ *   prevent its children from being painted as well.
  */
 void
 clutter_actor_hide_all (ClutterActor *self)
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index 2ff753e..ee9ac84 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -119,13 +119,15 @@ struct _ClutterActor
  * @show_all: virtual function for containers and composite actors, to
  *   determine which children should be shown when calling
  *   clutter_actor_show_all() on the actor. Defaults to calling
- *   clutter_actor_show().
+ *   clutter_actor_show(). This virtual function is deprecated and it
+ *   should not be overridden.
  * @hide: signal class handler for #ClutterActor::hide; it must chain
  *   up to the parent's implementation
  * @hide_all: virtual function for containers and composite actors, to
  *   determine which children should be shown when calling
  *   clutter_actor_hide_all() on the actor. Defaults to calling
- *   clutter_actor_hide().
+ *   clutter_actor_hide(). This virtual function is deprecated and it
+ *   should not be overridden.
  * @realize: virtual function, used to allocate resources for the actor;
  *   it should chain up to the parent's implementation
  * @unrealize: virtual function, used to deallocate resources allocated
@@ -272,9 +274,7 @@ void                  clutter_actor_unset_flags               (ClutterActor
 ClutterActorFlags     clutter_actor_get_flags                 (ClutterActor          *self);
 
 void                  clutter_actor_show                      (ClutterActor          *self);
-void                  clutter_actor_show_all                  (ClutterActor          *self);
 void                  clutter_actor_hide                      (ClutterActor          *self);
-void                  clutter_actor_hide_all                  (ClutterActor          *self);
 void                  clutter_actor_realize                   (ClutterActor          *self);
 void                  clutter_actor_unrealize                 (ClutterActor          *self);
 void                  clutter_actor_map                       (ClutterActor          *self);
diff --git a/clutter/deprecated/clutter-actor.h b/clutter/deprecated/clutter-actor.h
index 545e7ab..25f92ad 100644
--- a/clutter/deprecated/clutter-actor.h
+++ b/clutter/deprecated/clutter-actor.h
@@ -77,6 +77,12 @@ void            clutter_actor_push_internal     (ClutterActor          *self);
 CLUTTER_DEPRECATED
 void            clutter_actor_pop_internal      (ClutterActor          *self);
 
+CLUTTER_DEPRECATED
+void            clutter_actor_show_all          (ClutterActor          *self);
+
+CLUTTER_DEPRECATED
+void            clutter_actor_hide_all          (ClutterActor          *self);
+
 G_END_DECLS
 
 #endif /* __CLUTTER_ACTOR_DEPRECATED_H__ */



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