diff --git a/clutter/clutter-animation.c b/clutter/clutter-animation.c index c585df3c4..865e7ad94 100644 --- a/clutter/clutter-animation.c +++ b/clutter/clutter-animation.c @@ -1816,3 +1816,22 @@ clutter_actor_animate_with_alphav (ClutterActor *actor, return animation; } + +/** + * clutter_actor_get_animation: + * @actor: a #ClutterActor + * + * Retrieves the #ClutterAnimation used by @actor, if clutter_actor_animate() + * has been called on @actor. + * + * Return value: (transfer none): a #ClutterAnimation, or %NULL + * + * Since: 1.0 + */ +ClutterAnimation * +clutter_actor_get_animation (ClutterActor *actor) +{ + g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), NULL); + + return g_object_get_qdata (G_OBJECT (actor), quark_object_animation); +} diff --git a/clutter/clutter-animation.h b/clutter/clutter-animation.h index 5cfe8e4fa..1660bfc89 100644 --- a/clutter/clutter-animation.h +++ b/clutter/clutter-animation.h @@ -163,6 +163,8 @@ ClutterAnimation * clutter_actor_animate_with_alphav (ClutterActor const gchar * const properties[], const GValue *values); +ClutterAnimation * clutter_actor_get_animation (ClutterActor *actor); + G_END_DECLS #endif /* __CLUTTER_ANIMATION_H__ */