layout-manager: Deprecate the layout animation
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 20 Apr 2012 17:14:42 +0000 (18:14 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 27 Apr 2012 11:30:50 +0000 (12:30 +0100)
This semi-aborted API was broken for various reasons:

  - it strongly depended on ClutterAlpha, a class we're trying to
    deprecate;
  - it requires a lot of boilerplate and copy-and-paste code;
  - it requires a full relayout of the actor tree for something
    that ought to be automatically handled by ClutterActor.

Now that clutter_actor_allocate() handles transitions using the easing
state of the actor, we can deprecate the LayoutManager API for the 1.x
series, and remove it for the 2.x series.

clutter/clutter-layout-manager.c
clutter/clutter-layout-manager.h

index e51b3da..07e035c 100644 (file)
@@ -1311,6 +1311,8 @@ clutter_layout_manager_list_child_properties (ClutterLayoutManager *manager,
  *   manager and should not be unreferenced
  *
  * Since: 1.2
+ *
+ * Deprecated: 1.12
  */
 ClutterAlpha *
 clutter_layout_manager_begin_animation (ClutterLayoutManager *manager,
@@ -1335,6 +1337,8 @@ clutter_layout_manager_begin_animation (ClutterLayoutManager *manager,
  * The result of this call depends on the @manager implementation
  *
  * Since: 1.2
+ *
+ * Deprecated: 1.12
  */
 void
 clutter_layout_manager_end_animation (ClutterLayoutManager *manager)
@@ -1357,6 +1361,8 @@ clutter_layout_manager_end_animation (ClutterLayoutManager *manager)
  * Return value: the progress of the animation
  *
  * Since: 1.2
+ *
+ * Deprecated: 1.12
  */
 gdouble
 clutter_layout_manager_get_animation_progress (ClutterLayoutManager *manager)
index 6d65d3b..967bf3f 100644 (file)
@@ -83,11 +83,16 @@ struct _ClutterLayoutManager
  *   #ClutterLayoutMeta instance associated to a #ClutterContainer and a
  *   child #ClutterActor, used to maintain layout manager specific properties
  * @begin_animation: virtual function; override to control the animation
- *   of a #ClutterLayoutManager with the given duration and easing mode
+ *   of a #ClutterLayoutManager with the given duration and easing mode.
+ *   This virtual function is deprecated, and it should not be overridden
+ *   in newly written code.
  * @end_animation: virtual function; override to end an animation started
- *   by clutter_layout_manager_begin_animation()
+ *   by clutter_layout_manager_begin_animation(). This virtual function is
+ *   deprecated, and it should not be overriden in newly written code.
  * @get_animation_progress: virtual function; override to control the
- *   progress of the animation of a #ClutterLayoutManager
+ *   progress of the animation of a #ClutterLayoutManager. This virtual
+ *   function is deprecated, and it should not be overridden in newly written
+ *   code.
  * @layout_changed: class handler for the #ClutterLayoutManager::layout-changed
  *   signal
  *
@@ -125,10 +130,13 @@ struct _ClutterLayoutManagerClass
                                                  ClutterContainer       *container,
                                                  ClutterActor           *actor);
 
+  /* deprecated */
   ClutterAlpha *     (* begin_animation)        (ClutterLayoutManager   *manager,
                                                  guint                   duration,
                                                  gulong                  mode);
+  /* deprecated */
   gdouble            (* get_animation_progress) (ClutterLayoutManager   *manager);
+  /* deprecated */
   void               (* end_animation)          (ClutterLayoutManager   *manager);
 
   void               (* layout_changed)         (ClutterLayoutManager   *manager);
@@ -196,10 +204,13 @@ void               clutter_layout_manager_child_get_property    (ClutterLayoutMa
                                                                  const gchar            *property_name,
                                                                  GValue                 *value);
 
+CLUTTER_DEPRECATED_IN_1_12
 ClutterAlpha *     clutter_layout_manager_begin_animation       (ClutterLayoutManager   *manager,
                                                                  guint                   duration,
                                                                  gulong                  mode);
+CLUTTER_DEPRECATED_IN_1_12
 void               clutter_layout_manager_end_animation         (ClutterLayoutManager   *manager);
+CLUTTER_DEPRECATED_IN_1_12
 gdouble            clutter_layout_manager_get_animation_progress (ClutterLayoutManager   *manager);
 
 G_END_DECLS