ClutterActor: Add clutter_actor_has_actions

Adds an efficent way to query whether an actor has any
applied actions.

https://bugzilla.gnome.org/show_bug.cgi?id=660471
This commit is contained in:
Adel Gadllah 2011-09-29 18:34:12 +02:00
parent e81800607c
commit e8ec7ebed0
2 changed files with 21 additions and 0 deletions

View File

@ -96,6 +96,8 @@ ClutterAction *clutter_actor_get_action (ClutterActor *self,
GList * clutter_actor_get_actions (ClutterActor *self);
void clutter_actor_clear_actions (ClutterActor *self);
gboolean clutter_actor_has_actions (ClutterActor *self);
G_END_DECLS
#endif /* __CLUTTER_ACTION_H__ */

View File

@ -12493,6 +12493,25 @@ clutter_actor_has_constraints (ClutterActor *self)
return self->priv->constraints != NULL;
}
/**
* clutter_actor_has_actions:
* @self: A #ClutterActor
*
* Returns whether the actor has any actions applied.
*
* Return value: %TRUE if the actor has any actions,
* %FALSE otherwise
*
* Since: 1.10
*/
gboolean
clutter_actor_has_actions (ClutterActor *self)
{
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), TRUE);
return self->priv->actions != NULL;
}
gint
_clutter_actor_get_n_children (ClutterActor *self)
{