From a35708eb74dcc3ffd474e1c07725ece7b8a4fb1a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 6 Nov 2010 15:54:21 +0000 Subject: [PATCH] Deprecate ClutterBehaviour and sub-classes The Behaviour class and its implementations have been replaced by the new animation framework API and by the constraints for layout-related animations. Currently, we need to make tests build, so we undef DISABLE_DEPRECATED in specific test cases while they get ported. --- clutter/clutter-actor.c | 4 ++- clutter/clutter-behaviour-depth.c | 15 +++++++++- clutter/clutter-behaviour-depth.h | 9 ++++++ clutter/clutter-behaviour-ellipse.c | 6 ++-- clutter/clutter-behaviour-ellipse.h | 8 ++++++ clutter/clutter-behaviour-opacity.c | 36 +++++++++++++----------- clutter/clutter-behaviour-opacity.h | 10 ++++++- clutter/clutter-behaviour-path.c | 25 ++++++++++++---- clutter/clutter-behaviour-path.h | 9 ++++++ clutter/clutter-behaviour-rotate.c | 13 ++++----- clutter/clutter-behaviour-rotate.h | 8 ++++++ clutter/clutter-behaviour-scale.c | 35 ++++++++++++++++------- clutter/clutter-behaviour-scale.h | 9 ++++++ clutter/clutter-behaviour.c | 7 +++-- clutter/clutter-behaviour.h | 12 +++++++- tests/conform/test-behaviours.c | 2 ++ tests/conform/test-script-parser.c | 1 + tests/interactive/test-actor-clone.c | 1 + tests/interactive/test-actors.c | 1 + tests/interactive/test-behave.c | 1 + tests/interactive/test-depth.c | 2 ++ tests/interactive/test-layout.c | 2 ++ tests/interactive/test-multistage.c | 2 ++ tests/interactive/test-paint-wrapper.c | 2 ++ tests/interactive/test-pixmap.c | 4 ++- tests/interactive/test-rotate.c | 1 + tests/interactive/test-scale.c | 2 ++ tests/interactive/test-script.c | 1 + tests/interactive/test-texture-async.c | 2 ++ tests/interactive/test-texture-quality.c | 2 ++ tests/interactive/test-threads.c | 2 ++ tests/interactive/test-viewport.c | 1 + 32 files changed, 187 insertions(+), 48 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 5f5d30f8a..ee4c2f957 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -291,7 +291,6 @@ #include "clutter-action.h" #include "clutter-actor-meta-private.h" #include "clutter-animatable.h" -#include "clutter-behaviour.h" #include "clutter-constraint.h" #include "clutter-container.h" #include "clutter-debug.h" @@ -307,6 +306,9 @@ #include "clutter-stage-private.h" #include "clutter-units.h" +#undef CLUTTER_DISABLE_DEPRECATED +#include "clutter-behaviour.h" + typedef struct _ShaderData ShaderData; typedef struct _AnchorCoord AnchorCoord; diff --git a/clutter/clutter-behaviour-depth.c b/clutter/clutter-behaviour-depth.c index aa1939372..1f22f28aa 100644 --- a/clutter/clutter-behaviour-depth.c +++ b/clutter/clutter-behaviour-depth.c @@ -27,6 +27,7 @@ #include "config.h" #endif +#undef CLUTTER_DISABLE_DEPRECATED #include "clutter-behaviour-depth.h" #include "clutter-enum-types.h" @@ -36,7 +37,9 @@ /** * SECTION:clutter-behaviour-depth + * @Title: ClutterBehaviourDepth * @short_description: A behaviour controlling the Z position + * @Deprecated: 1.6: Use clutter_actor_animate() instead * * #ClutterBehaviourDepth is a simple #ClutterBehaviour controlling the * depth of a set of actors between a start and end depth. @@ -163,6 +166,8 @@ clutter_behaviour_depth_class_init (ClutterBehaviourDepthClass *klass) * Start depth level to apply to the actors. * * Since: 0.4 + * + * Deprecated: 1.6 */ g_object_class_install_property (gobject_class, PROP_DEPTH_START, @@ -177,6 +182,8 @@ clutter_behaviour_depth_class_init (ClutterBehaviourDepthClass *klass) * End depth level to apply to the actors. * * Since: 0.4 + * + * Deprecated: 1.6 */ g_object_class_install_property (gobject_class, PROP_DEPTH_END, @@ -208,9 +215,11 @@ clutter_behaviour_depth_init (ClutterBehaviourDepth *depth) * of the #ClutterAlpha instance. In the case when @alpha is %NULL, * it can be set later with clutter_behaviour_set_alpha(). * - * Return value: the newly created behaviour + * Return value: (transfer full): the newly created behaviour * * Since: 0.4 + * + * Deprecated: 1.6 */ ClutterBehaviour * clutter_behaviour_depth_new (ClutterAlpha *alpha, @@ -235,6 +244,8 @@ clutter_behaviour_depth_new (ClutterAlpha *alpha, * Sets the boundaries of the @behaviour. * * Since: 0.6 + * + * Deprecated: 1.6 */ void clutter_behaviour_depth_set_bounds (ClutterBehaviourDepth *behaviour, @@ -273,6 +284,8 @@ clutter_behaviour_depth_set_bounds (ClutterBehaviourDepth *behaviour, * Gets the boundaries of the @behaviour * * Since: 0.6 + * + * Deprecated: 1.6 */ void clutter_behaviour_depth_get_bounds (ClutterBehaviourDepth *behaviour, diff --git a/clutter/clutter-behaviour-depth.h b/clutter/clutter-behaviour-depth.h index bb1c743e0..aa701b23e 100644 --- a/clutter/clutter-behaviour-depth.h +++ b/clutter/clutter-behaviour-depth.h @@ -35,6 +35,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR_DEPTH (clutter_behaviour_depth_get_type ()) #define CLUTTER_BEHAVIOUR_DEPTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BEHAVIOUR_DEPTH, ClutterBehaviourDepth)) #define CLUTTER_IS_BEHAVIOUR_DEPTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BEHAVIOUR_DEPTH)) @@ -53,6 +55,9 @@ typedef struct _ClutterBehaviourDepthClass ClutterBehaviourDepthClass; * and should be accessed using the provided API * * Since: 0.2 + * + * Deprecated: 1.6: Use clutter_actor_animate() with #ClutterActor:depth + * instead. */ struct _ClutterBehaviourDepth { @@ -68,6 +73,8 @@ struct _ClutterBehaviourDepth * The #ClutterBehaviourDepthClass structure contains only private data * * Since: 0.2 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourDepthClass { @@ -87,6 +94,8 @@ void clutter_behaviour_depth_get_bounds (ClutterBehaviourDepth *behaviour, gint *depth_start, gint *depth_end); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __CLUTTER_BEHAVIOUR_DEPTH__ */ diff --git a/clutter/clutter-behaviour-ellipse.c b/clutter/clutter-behaviour-ellipse.c index b7540e213..0414e8f9c 100644 --- a/clutter/clutter-behaviour-ellipse.c +++ b/clutter/clutter-behaviour-ellipse.c @@ -26,7 +26,9 @@ /** * SECTION:clutter-behaviour-ellipse + * @Title: ClutterBehaviourEllipse * @short_description: A behaviour interpolating position along an ellipse + * @Deprecated: 1.6: Use clutter_actor_animate() instead * * #ClutterBehaviourEllipse interpolates actors along a path defined by * an ellipse. @@ -45,9 +47,9 @@ #include #include -#include "clutter-fixed.h" -#include "clutter-marshal.h" +#undef CLUTTER_DISABLE_DEPRECATED #include "clutter-behaviour-ellipse.h" + #include "clutter-debug.h" #include "clutter-enum-types.h" #include "clutter-private.h" diff --git a/clutter/clutter-behaviour-ellipse.h b/clutter/clutter-behaviour-ellipse.h index dca99385d..480200918 100644 --- a/clutter/clutter-behaviour-ellipse.h +++ b/clutter/clutter-behaviour-ellipse.h @@ -35,6 +35,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR_ELLIPSE (clutter_behaviour_ellipse_get_type ()) #define CLUTTER_BEHAVIOUR_ELLIPSE(obj) \ @@ -68,6 +70,8 @@ typedef struct _ClutterBehaviourEllipseClass ClutterBehaviourEllipseClass; * and should be accessed using the provided API * * Since: 0.4 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourEllipse { @@ -82,6 +86,8 @@ struct _ClutterBehaviourEllipse * The #ClutterBehaviourEllipseClass struct contains only private data * * Since: 0.4 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourEllipseClass { @@ -134,6 +140,8 @@ ClutterRotateDirection clutter_behaviour_ellipse_get_direction (ClutterBehavio void clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self, ClutterRotateDirection direction); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __CLUTTER_BEHAVIOUR_ELLIPSE_H__ */ diff --git a/clutter/clutter-behaviour-opacity.c b/clutter/clutter-behaviour-opacity.c index f38eeb9fb..eadc63824 100644 --- a/clutter/clutter-behaviour-opacity.c +++ b/clutter/clutter-behaviour-opacity.c @@ -23,34 +23,26 @@ /** * SECTION:clutter-behaviour-opacity + * @Title: ClutterBehaviourOpacity * @short_description: A behaviour controlling opacity + * @Deprecated: 1.6: Use clutter_actor_animate() instead. * - * #ClutterBehaviourPath interpolates actors opacity between two values. + * #ClutterBehaviourOpacity controls the opacity of a set of actors. * + * Since: 0.2 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "clutter-actor.h" -#include "clutter-behaviour.h" -#include "clutter-behaviour-opacity.h" -#include "clutter-enum-types.h" -#include "clutter-main.h" -#include "clutter-private.h" -#include "clutter-debug.h" - #include -/** - * SECTION:clutter-behaviour-opacity - * @short_description: Behaviour controlling the opacity - * - * #ClutterBehaviourOpacity controls the opacity of a set of actors. - * - * Since: 0.2 - */ +#undef CLUTTER_DISABLE_DEPRECATED +#include "clutter-behaviour-opacity.h" + +#include "clutter-private.h" +#include "clutter-debug.h" G_DEFINE_TYPE (ClutterBehaviourOpacity, clutter_behaviour_opacity, @@ -179,6 +171,8 @@ clutter_behaviour_opacity_class_init (ClutterBehaviourOpacityClass *klass) * Initial opacity level of the behaviour. * * Since: 0.2 + * + * Deprecated: 1.6 */ pspec = g_param_spec_uint ("opacity-start", P_("Opacity Start"), @@ -195,6 +189,8 @@ clutter_behaviour_opacity_class_init (ClutterBehaviourOpacityClass *klass) * Final opacity level of the behaviour. * * Since: 0.2 + * + * Deprecated: 1.6 */ pspec = g_param_spec_uint ("opacity-end", P_("Opacity End"), @@ -234,6 +230,8 @@ clutter_behaviour_opacity_init (ClutterBehaviourOpacity *self) * Return value: the newly created #ClutterBehaviourOpacity * * Since: 0.2 + * + * Deprecated: 1.6 */ ClutterBehaviour * clutter_behaviour_opacity_new (ClutterAlpha *alpha, @@ -257,6 +255,8 @@ clutter_behaviour_opacity_new (ClutterAlpha *alpha, * on each actor it controls. * * Since: 0.6 + * + * Deprecated: 1.6 */ void clutter_behaviour_opacity_set_bounds (ClutterBehaviourOpacity *behaviour, @@ -298,6 +298,8 @@ clutter_behaviour_opacity_set_bounds (ClutterBehaviourOpacity *behaviour, * on each actor it controls. * * Since: 0.6 + * + * Deprecated: 1.6 */ void clutter_behaviour_opacity_get_bounds (ClutterBehaviourOpacity *behaviour, diff --git a/clutter/clutter-behaviour-opacity.h b/clutter/clutter-behaviour-opacity.h index 9ec5efca2..f5624e179 100644 --- a/clutter/clutter-behaviour-opacity.h +++ b/clutter/clutter-behaviour-opacity.h @@ -35,6 +35,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR_OPACITY (clutter_behaviour_opacity_get_type ()) #define CLUTTER_BEHAVIOUR_OPACITY(obj) \ @@ -68,6 +70,9 @@ typedef struct _ClutterBehaviourOpacityClass ClutterBehaviourOpacityClass; * should be accessed using the provided API * * Since: 0.2 + * + * Deprecated: 1.6: Use clutter_actor_animate() and #ClutterActor:opacity + * instead. */ struct _ClutterBehaviourOpacity { @@ -82,6 +87,8 @@ struct _ClutterBehaviourOpacity * The #ClutterBehaviourOpacityClass structure contains only private data * * Since: 0.2 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourOpacityClass { @@ -102,7 +109,8 @@ void clutter_behaviour_opacity_get_bounds (ClutterBehaviourOpacity *behaviour, guint8 *opacity_start, guint8 *opacity_end); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS - #endif /* __CLUTTER_BEHAVIOUR_OPACITY_H__ */ diff --git a/clutter/clutter-behaviour-path.c b/clutter/clutter-behaviour-path.c index 9651f7887..811e787e4 100644 --- a/clutter/clutter-behaviour-path.c +++ b/clutter/clutter-behaviour-path.c @@ -26,7 +26,10 @@ /** * SECTION:clutter-behaviour-path + * @Title: ClutterBehaviourPath * @short_description: A behaviour for moving actors along a #ClutterPath + * @Deprecated: 1.6: Use #ClutterPathConstraint and clutter_actor_animate() + * with the #ClutterPathConstraint:offset property instead. * * #ClutterBehaviourPath interpolates actors along a defined path. * @@ -61,9 +64,9 @@ #include "config.h" #endif -#include "clutter-actor.h" -#include "clutter-behaviour.h" +#undef CLUTTER_DISABLE_DEPRECATED #include "clutter-behaviour-path.h" + #include "clutter-bezier.h" #include "clutter-debug.h" #include "clutter-enum-types.h" @@ -231,6 +234,8 @@ clutter_behaviour_path_class_init (ClutterBehaviourPathClass *klass) * is reached. * * Since: 0.2 + * + * Deprecated: 1.6 */ path_signals[KNOT_REACHED] = g_signal_new ("knot-reached", @@ -323,9 +328,11 @@ clutter_behaviour_path_init (ClutterBehaviourPath *self) * of the #ClutterAlpha instance. In the case when @alpha is %NULL, * it can be set later with clutter_behaviour_set_alpha(). * - * Return value: a #ClutterBehaviour + * Return value: (transfer full): a #ClutterBehaviour * * Since: 0.2 + * + * Deprecated: 1.6 */ ClutterBehaviour * clutter_behaviour_path_new (ClutterAlpha *alpha, @@ -349,9 +356,11 @@ clutter_behaviour_path_new (ClutterAlpha *alpha, * of the #ClutterAlpha instance. In the case when @alpha is %NULL, * it can be set later with clutter_behaviour_set_alpha(). * - * Return value: a #ClutterBehaviour + * Return value: (transfer full): a #ClutterBehaviour * * Since: 1.0 + * + * Deprecated: 1.6 */ ClutterBehaviour * clutter_behaviour_path_new_with_description (ClutterAlpha *alpha, @@ -380,9 +389,11 @@ clutter_behaviour_path_new_with_description (ClutterAlpha *alpha, * of the #ClutterAlpha instance. In the case when @alpha is %NULL, * it can be set later with clutter_behaviour_set_alpha(). * - * Return value: a #ClutterBehaviour + * Return value: (transfer full): a #ClutterBehaviour * * Since: 1.0 + * + * Deprecated: 1.6 */ ClutterBehaviour * clutter_behaviour_path_new_with_knots (ClutterAlpha *alpha, @@ -416,6 +427,8 @@ clutter_behaviour_path_new_with_knots (ClutterAlpha *alpha, * it. * * Since: 1.0 + * + * Deprecated: 1.6 */ void clutter_behaviour_path_set_path (ClutterBehaviourPath *pathb, @@ -447,6 +460,8 @@ clutter_behaviour_path_set_path (ClutterBehaviourPath *pathb, * Return value: (transfer none): the path * * Since: 1.0 + * + * Deprecated: 1.6 */ ClutterPath * clutter_behaviour_path_get_path (ClutterBehaviourPath *pathb) diff --git a/clutter/clutter-behaviour-path.h b/clutter/clutter-behaviour-path.h index f3b8eecb2..2c3d92fbb 100644 --- a/clutter/clutter-behaviour-path.h +++ b/clutter/clutter-behaviour-path.h @@ -36,6 +36,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR_PATH (clutter_behaviour_path_get_type ()) #define CLUTTER_BEHAVIOUR_PATH(obj) \ @@ -69,6 +71,9 @@ typedef struct _ClutterBehaviourPathClass ClutterBehaviourPathClass; * and should be accessed using the provided API * * Since: 0.2 + * + * Deprecated: 1.6: Use #ClutterPathConstraint and clutter_actor_animate() + * instead. */ struct _ClutterBehaviourPath { @@ -85,6 +90,8 @@ struct _ClutterBehaviourPath * The #ClutterBehaviourPathClass struct contains only private data * * Since: 0.2 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourPathClass { @@ -121,6 +128,8 @@ void clutter_behaviour_path_set_path (ClutterBehaviourPath *pat ClutterPath * clutter_behaviour_path_get_path (ClutterBehaviourPath *pathb); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __CLUTTER_BEHAVIOUR_PATH_H__ */ diff --git a/clutter/clutter-behaviour-rotate.c b/clutter/clutter-behaviour-rotate.c index 9815c1ab2..5dde385a8 100644 --- a/clutter/clutter-behaviour-rotate.c +++ b/clutter/clutter-behaviour-rotate.c @@ -35,17 +35,16 @@ #include "config.h" #endif -#include "clutter-actor.h" -#include "clutter-behaviour.h" -#include "clutter-main.h" -#include "clutter-fixed.h" +#undef CLUTTER_DISABLE_DEPRECATED #include "clutter-behaviour-rotate.h" -#include "clutter-enum-types.h" -#include "clutter-private.h" -#include "clutter-debug.h" #include +#include "clutter-debug.h" +#include "clutter-enum-types.h" +#include "clutter-main.h" +#include "clutter-private.h" + G_DEFINE_TYPE (ClutterBehaviourRotate, clutter_behaviour_rotate, CLUTTER_TYPE_BEHAVIOUR); diff --git a/clutter/clutter-behaviour-rotate.h b/clutter/clutter-behaviour-rotate.h index f8a180312..429839724 100644 --- a/clutter/clutter-behaviour-rotate.h +++ b/clutter/clutter-behaviour-rotate.h @@ -34,6 +34,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR_ROTATE (clutter_behaviour_rotate_get_type ()) #define CLUTTER_BEHAVIOUR_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BEHAVIOUR_ROTATE, ClutterBehaviourRotate)) #define CLUTTER_IS_BEHAVIOUR_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BEHAVIOUR_ROTATE)) @@ -52,6 +54,8 @@ typedef struct _ClutterBehaviourRotateClass ClutterBehaviourRotateClass; * should be accessed using the provided API * * Since: 0.4 + * + * Deprecated: 1.6: Use clutter_actor_animate() instead. */ struct _ClutterBehaviourRotate { @@ -67,6 +71,8 @@ struct _ClutterBehaviourRotate * The #ClutterBehaviourRotateClass struct contains only private data * * Since: 0.4 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourRotateClass { @@ -102,6 +108,8 @@ void clutter_behaviour_rotate_set_bounds (ClutterBehaviourR gdouble angle_start, gdouble angle_end); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __CLUTTER_BEHAVIOUR_ROTATE_H__ */ diff --git a/clutter/clutter-behaviour-scale.c b/clutter/clutter-behaviour-scale.c index 066efb08c..a77b033e2 100644 --- a/clutter/clutter-behaviour-scale.c +++ b/clutter/clutter-behaviour-scale.c @@ -23,26 +23,27 @@ /** * SECTION:clutter-behaviour-scale + * @Title: ClutterBehaviourScale * @short_description: A behaviour controlling scale + * @Deprecated: 1.6: Use clutter_actor_animate() with #ClutterActor:x-scale + * and #ClutterActor:y-scale instead. * * A #ClutterBehaviourScale interpolates actors size between two values. - * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "clutter-actor.h" -#include "clutter-behaviour.h" -#include "clutter-enum-types.h" -#include "clutter-main.h" -#include "clutter-behaviour-scale.h" -#include "clutter-private.h" -#include "clutter-debug.h" - #include +#undef CLUTTER_DISABLE_DEPRECATED +#include "clutter-behaviour-scale.h" + +#include "clutter-debug.h" +#include "clutter-main.h" +#include "clutter-private.h" + G_DEFINE_TYPE (ClutterBehaviourScale, clutter_behaviour_scale, CLUTTER_TYPE_BEHAVIOUR); @@ -211,6 +212,8 @@ clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass) * The initial scaling factor on the X axis for the actors. * * Since: 0.6 + * + * Deprecated: 1.6 */ pspec = g_param_spec_double ("x-scale-start", P_("X Start Scale"), @@ -228,6 +231,8 @@ clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass) * The final scaling factor on the X axis for the actors. * * Since: 0.6 + * + * Deprecated: 1.6 */ pspec = g_param_spec_double ("x-scale-end", P_("X End Scale"), @@ -245,6 +250,8 @@ clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass) * The initial scaling factor on the Y axis for the actors. * * Since: 0.6 + * + * Deprecated: 1.6 */ pspec = g_param_spec_double ("y-scale-start", P_("Y Start Scale"), @@ -262,6 +269,8 @@ clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass) * The final scaling factor on the Y axis for the actors. * * Since: 0.6 + * + * Deprecated: 1.6 */ pspec = g_param_spec_double ("y-scale-end", P_("Y End Scale"), @@ -302,9 +311,11 @@ clutter_behaviour_scale_init (ClutterBehaviourScale *self) * of the #ClutterAlpha instance. In the case when @alpha is %NULL, * it can be set later with clutter_behaviour_set_alpha(). * - * Return value: the newly created #ClutterBehaviourScale + * Return value: (transfer full): the newly created #ClutterBehaviourScale * * Since: 0.2 + * + * Deprecated: 1.6 */ ClutterBehaviour * clutter_behaviour_scale_new (ClutterAlpha *alpha, @@ -335,6 +346,8 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha, * Sets the bounds used by scale behaviour. * * Since: 0.6 + * + * Deprecated: 1.6 */ void clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, @@ -393,6 +406,8 @@ clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, * Retrieves the bounds used by scale behaviour. * * Since: 0.4 + * + * Deprecated: 1.6 */ void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale, diff --git a/clutter/clutter-behaviour-scale.h b/clutter/clutter-behaviour-scale.h index 65dd297cc..849d0c044 100644 --- a/clutter/clutter-behaviour-scale.h +++ b/clutter/clutter-behaviour-scale.h @@ -34,6 +34,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR_SCALE (clutter_behaviour_scale_get_type ()) #define CLUTTER_BEHAVIOUR_SCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BEHAVIOUR_SCALE, ClutterBehaviourScale)) #define CLUTTER_BEHAVIOUR_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BEHAVIOUR_SCALE, ClutterBehaviourScaleClass)) @@ -52,6 +54,9 @@ typedef struct _ClutterBehaviourScaleClass ClutterBehaviourScaleClass; * should be accessed using the provided API * * Since: 0.2 + * + * Deprecated: 1.6: Use clutter_actor_animate() with #ClutterActor:x-scale + * and #ClutterActor:y-scale instead. */ struct _ClutterBehaviourScale { @@ -67,6 +72,8 @@ struct _ClutterBehaviourScale * The #ClutterBehaviourScaleClass struct contains only private data * * Since: 0.2 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourScaleClass { @@ -92,6 +99,8 @@ void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *sca gdouble *x_scale_end, gdouble *y_scale_end); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS #endif /* __CLUTTER_BEHAVIOUR_SCALE_H__ */ diff --git a/clutter/clutter-behaviour.c b/clutter/clutter-behaviour.c index 25e390eb8..5d56b293b 100644 --- a/clutter/clutter-behaviour.c +++ b/clutter/clutter-behaviour.c @@ -23,7 +23,9 @@ /** * SECTION:clutter-behaviour + * @Title: ClutterBehaviour * @short_description: Class for providing behaviours to actors + * @Deprecated: 1.6: Use the implicit animation API instead. * * #ClutterBehaviour is the base class for implementing behaviours. A * behaviour is a controller object for #ClutterActors; you can @@ -62,15 +64,16 @@ * instance bound to the behaviour and apply it to the desiderd property * (or properties) of every actor controlled by the behaviour. * - * #ClutterBehaviour is available since Clutter 0.2 + * #ClutterBehaviour is available since Clutter 0.2. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include "clutter-actor.h" +#undef CLUTTER_DISABLE_DEPRECATED #include "clutter-behaviour.h" + #include "clutter-debug.h" #include "clutter-main.h" #include "clutter-marshal.h" diff --git a/clutter/clutter-behaviour.h b/clutter/clutter-behaviour.h index 74ac9134c..c350ebafd 100644 --- a/clutter/clutter-behaviour.h +++ b/clutter/clutter-behaviour.h @@ -36,6 +36,8 @@ G_BEGIN_DECLS +#ifndef CLUTTER_DISABLE_DEPRECATED + #define CLUTTER_TYPE_BEHAVIOUR clutter_behaviour_get_type() #define CLUTTER_BEHAVIOUR(obj) \ @@ -72,6 +74,8 @@ typedef struct _ClutterBehaviourClass ClutterBehaviourClass; * will be called for each actor driven by @behaviour. * * Since: 0.2 + * + * Deprecated: 1.6 */ typedef void (*ClutterBehaviourForeachFunc) (ClutterBehaviour *behaviour, ClutterActor *actor, @@ -84,6 +88,8 @@ typedef void (*ClutterBehaviourForeachFunc) (ClutterBehaviour *behaviour, * be accessed with the functions below. * * Since: 0.2 + * + * Deprecated: 1.6 */ struct _ClutterBehaviour { @@ -104,6 +110,8 @@ struct _ClutterBehaviour * Base class for behaviours. * * Since: 0.2 + * + * Deprecated: 1.6 */ struct _ClutterBehaviourClass { @@ -151,6 +159,8 @@ void clutter_behaviour_set_alpha (ClutterBehaviour *beh gboolean clutter_behaviour_is_applied (ClutterBehaviour *behave, ClutterActor *actor); +#endif /* CLUTTER_DISABLE_DEPRECATED */ + G_END_DECLS -#endif +#endif /* __CLUTTER_BEHAVIOUR_H__ */ diff --git a/tests/conform/test-behaviours.c b/tests/conform/test-behaviours.c index ad0ac16a1..7df5e131e 100644 --- a/tests/conform/test-behaviours.c +++ b/tests/conform/test-behaviours.c @@ -1,4 +1,6 @@ #include + +#undef CLUTTER_DISABLE_DEPRECATED #include #include "test-conform-common.h" diff --git a/tests/conform/test-script-parser.c b/tests/conform/test-script-parser.c index c1195e717..44abe09cd 100644 --- a/tests/conform/test-script-parser.c +++ b/tests/conform/test-script-parser.c @@ -1,6 +1,7 @@ #include #include +#undef CLUTTER_DISABLE_DEPRECATED #include #include "test-conform-common.h" diff --git a/tests/interactive/test-actor-clone.c b/tests/interactive/test-actor-clone.c index 5e915e710..f9ea64a00 100644 --- a/tests/interactive/test-actor-clone.c +++ b/tests/interactive/test-actor-clone.c @@ -1,3 +1,4 @@ +#undef CLUTTER_DISABLE_DEPRECATED #include #include diff --git a/tests/interactive/test-actors.c b/tests/interactive/test-actors.c index 27a8612ac..108583b87 100644 --- a/tests/interactive/test-actors.c +++ b/tests/interactive/test-actors.c @@ -1,3 +1,4 @@ +#undef CLUTTER_DISABLE_DEPRECATED #include #include diff --git a/tests/interactive/test-behave.c b/tests/interactive/test-behave.c index d39eb0ce1..9039cba96 100644 --- a/tests/interactive/test-behave.c +++ b/tests/interactive/test-behave.c @@ -5,6 +5,7 @@ #include #include +#undef CLUTTER_DISABLE_DEPRECATED #include static gboolean diff --git a/tests/interactive/test-depth.c b/tests/interactive/test-depth.c index 7257a29a9..ca386bdff 100644 --- a/tests/interactive/test-depth.c +++ b/tests/interactive/test-depth.c @@ -1,5 +1,7 @@ #include #include + +#undef CLUTTER_DISABLE_DEPRECATED #include /* each time the timeline animating the label completes, swap the direction */ diff --git a/tests/interactive/test-layout.c b/tests/interactive/test-layout.c index 6b881e0c5..acd40e4bc 100644 --- a/tests/interactive/test-layout.c +++ b/tests/interactive/test-layout.c @@ -3,6 +3,8 @@ #include #include + +#undef CLUTTER_DISABLE_DEPRECATED #include /* layout actor, by Lucas Rocha */ diff --git a/tests/interactive/test-multistage.c b/tests/interactive/test-multistage.c index 74504582f..52aa7cbfc 100644 --- a/tests/interactive/test-multistage.c +++ b/tests/interactive/test-multistage.c @@ -1,4 +1,6 @@ #include + +#undef CLUTTER_DISABLE_DEPRECATED #include static gint n_stages = 1; diff --git a/tests/interactive/test-paint-wrapper.c b/tests/interactive/test-paint-wrapper.c index da63b3d2a..e97c097d5 100644 --- a/tests/interactive/test-paint-wrapper.c +++ b/tests/interactive/test-paint-wrapper.c @@ -3,6 +3,8 @@ #endif #include + +#undef CLUTTER_DISABLE_DEPRECATED #include #if defined (_MSC_VER) && !defined (_USE_MATH_DEFINES) diff --git a/tests/interactive/test-pixmap.c b/tests/interactive/test-pixmap.c index 523114df6..366865432 100644 --- a/tests/interactive/test-pixmap.c +++ b/tests/interactive/test-pixmap.c @@ -4,9 +4,11 @@ #include #include +#undef CLUTTER_DISABLE_DEPRECATED +#include + #if HAVE_CLUTTER_GLX -#include #include #include diff --git a/tests/interactive/test-rotate.c b/tests/interactive/test-rotate.c index 9337fc688..9c715abac 100644 --- a/tests/interactive/test-rotate.c +++ b/tests/interactive/test-rotate.c @@ -5,6 +5,7 @@ #include #include +#undef CLUTTER_DISABLE_DEPRECATED #include G_MODULE_EXPORT int diff --git a/tests/interactive/test-scale.c b/tests/interactive/test-scale.c index 5496f3625..4b101603b 100644 --- a/tests/interactive/test-scale.c +++ b/tests/interactive/test-scale.c @@ -1,5 +1,7 @@ #include #include + +#undef CLUTTER_DISABLE_DEPRECATED #include static const ClutterGravity gravities[] = { diff --git a/tests/interactive/test-script.c b/tests/interactive/test-script.c index 27db01c85..8ebb39117 100644 --- a/tests/interactive/test-script.c +++ b/tests/interactive/test-script.c @@ -6,6 +6,7 @@ #include #include +#undef CLUTTER_DISABLE_DEPRECATED #include static ClutterScript *script = NULL; diff --git a/tests/interactive/test-texture-async.c b/tests/interactive/test-texture-async.c index 80459ae8a..83270d373 100644 --- a/tests/interactive/test-texture-async.c +++ b/tests/interactive/test-texture-async.c @@ -1,5 +1,7 @@ #include #include + +#undef CLUTTER_DISABLE_DEPRECATED #include enum diff --git a/tests/interactive/test-texture-quality.c b/tests/interactive/test-texture-quality.c index 71cfee2bd..18d5c20c1 100644 --- a/tests/interactive/test-texture-quality.c +++ b/tests/interactive/test-texture-quality.c @@ -1,5 +1,7 @@ #include #include + +#undef CLUTTER_DISABLE_DEPRECATED #include /* each time the timeline animating the label completes, swap the direction */ diff --git a/tests/interactive/test-threads.c b/tests/interactive/test-threads.c index 7bed3752a..33b7de7bb 100644 --- a/tests/interactive/test-threads.c +++ b/tests/interactive/test-threads.c @@ -1,6 +1,8 @@ #include #include #include + +#undef CLUTTER_DISABLE_DEPRECATED #include typedef struct diff --git a/tests/interactive/test-viewport.c b/tests/interactive/test-viewport.c index ec6bc1788..6eac4b839 100644 --- a/tests/interactive/test-viewport.c +++ b/tests/interactive/test-viewport.c @@ -5,6 +5,7 @@ #include #include +#undef CLUTTER_DISABLE_DEPRECATED #include G_MODULE_EXPORT int