[clutter] ClutterActor: Add clutter_actor_has_actions
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] ClutterActor: Add clutter_actor_has_actions
- Date: Thu, 29 Sep 2011 17:34:31 +0000 (UTC)
commit e8ec7ebed013895e63c9579d8b7dbd6c63ccec80
Author: Adel Gadllah <adel gadllah gmail com>
Date: Thu Sep 29 18:34:12 2011 +0200
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
clutter/clutter-action.h | 2 ++
clutter/clutter-actor.c | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-action.h b/clutter/clutter-action.h
index afeafd9..d2e98db 100644
--- a/clutter/clutter-action.h
+++ b/clutter/clutter-action.h
@@ -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__ */
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 4af467c..60d0f86 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]