1
0
Fork 0

ClutterActor: Add clutter_actor_has_contraints

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

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

View file

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

View file

@ -101,6 +101,8 @@ ClutterConstraint *clutter_actor_get_constraint (ClutterActor *s
const gchar *name);
void clutter_actor_clear_constraints (ClutterActor *self);
gboolean clutter_actor_has_constraints (ClutterActor *self);
G_END_DECLS
#endif /* __CLUTTER_CONSTRAINT_H__ */