[animation] Add an emitter for ::completed

The ::completed signal requires an emitter in case we want to stop
the animation and safely dispose it inside application code without
breaking invariants.
This commit is contained in:
Emmanuele Bassi 2009-03-16 11:30:10 +00:00
parent a5c88e62f2
commit 44d0733665
2 changed files with 19 additions and 0 deletions

View File

@ -1133,6 +1133,24 @@ clutter_animation_get_alpha (ClutterAnimation *animation)
return animation->priv->alpha;
}
/**
* clutter_animation_completed:
* @animation: a #ClutterAnimation
*
* Emits the ::completed signal on @animation. After this function
* terminates @animation will be unreferenced and it will not be
* valid anymore, unless g_object_ref() was called before
*
* Since: 1.0
*/
void
clutter_animation_completed (ClutterAnimation *animation)
{
g_return_if_fail (CLUTTER_IS_ANIMATION (animation));
g_signal_emit (animation, animation_signals[COMPLETED], 0);
}
/*
* starts the timeline
*/

View File

@ -128,6 +128,7 @@ void clutter_animation_unbind_property (ClutterAnimation *an
const gchar *property_name);
ClutterInterval *clutter_animation_get_interval (ClutterAnimation *animation,
const gchar *property_name);
void clutter_animation_completed (ClutterAnimation *animation);
ClutterAnimation * clutter_actor_animate (ClutterActor *actor,
gulong mode,