From 4c6a550d130e2e3c2a0d4bd5198f8e79ee8ddab7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 14 Apr 2015 12:46:49 +0100 Subject: [PATCH] Soft-deprecation of actor state macros These are just terrible API that we've been stringing along since the 0.x days. We cannot truly deprecate them, because they are, in some cases, the only actual API to perform some operation, and porting all the code in the world is not going to make us any friends. For the time being, we use a deprecation notice in the documentation. --- clutter/clutter-actor.c | 12 ++++++++++++ clutter/clutter-actor.h | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 270126f91..eaf2ef88b 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -544,6 +544,9 @@ * unnecessary (and potentially expensive) state changes. * * Since: 0.2 + * + * Deprecated: 1.24: Use clutter_actor_is_mapped() or the #ClutterActor:mapped + * property instead of this macro. */ /** @@ -566,6 +569,9 @@ * must be realized. * * Since: 0.2 + * + * Deprecated: 1.24: Use clutter_actor_is_realized() or the #ClutterActor:realized + * property instead of this macro. */ /** @@ -580,6 +586,9 @@ * parents is a toplevel stage; see also %CLUTTER_ACTOR_IS_MAPPED. * * Since: 0.2 + * + * Deprecated: 1.24: Use clutter_actor_is_visible() or the #ClutterActor:visible + * property instead of this macro. */ /** @@ -591,6 +600,9 @@ * Only reactive actors will receive event-related signals. * * Since: 0.6 + * + * Deprecated: 1.24: Use clutter_actor_get_reactive() or the + * #ClutterActor:reactive property instead of this macro. */ #include "config.h" diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index a11fbb944..a71ca270d 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -54,6 +54,10 @@ G_BEGIN_DECLS * @f: the #ClutterActorFlags to set * * Sets the given flags on a #ClutterActor + * + * Deprecated: 1.24: Changing flags directly is heavily discouraged in + * newly written code. #ClutterActor will take care of setting the + * internal state. */ #define CLUTTER_ACTOR_SET_FLAGS(a,f) (((ClutterActor*)(a))->flags |= (f)) @@ -63,6 +67,10 @@ G_BEGIN_DECLS * @f: the #ClutterActorFlags to unset * * Unsets the given flags on a #ClutterActor + * + * Deprecated: 1.24: Changing flags directly is heavily discouraged in + * newly written code. #ClutterActor will take care of unsetting the + * internal state. */ #define CLUTTER_ACTOR_UNSET_FLAGS(a,f) (((ClutterActor*)(a))->flags &= ~(f))