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:
parent
bed2d9e787
commit
e81800607c
@ -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)
|
||||
{
|
||||
|
@ -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__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user