[clutter] actor: Add functions mapping to state query macros
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] actor: Add functions mapping to state query macros
- Date: Thu, 23 Apr 2015 19:16:25 +0000 (UTC)
commit 849607316a36d733a7f0cba3b076c85f9b7d6249
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Apr 14 12:37:42 2015 +0100
actor: Add functions mapping to state query macros
The macros are useless for language bindings, and are terribly unsafe
from C as well. There's always the option of using the GObject
properties they refer to, but it's more efficient to just have a simple
getter function.
clutter/clutter-actor.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++
clutter/clutter-actor.h | 7 +++++
2 files changed, 67 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index df43e4d..270126f 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -1542,6 +1542,26 @@ clutter_actor_map (ClutterActor *self)
clutter_actor_update_map_state (self, MAP_STATE_MAKE_MAPPED);
}
+/**
+ * clutter_actor_is_mapped:
+ * @self: a #ClutterActor
+ *
+ * Checks whether a #ClutterActor has been set as mapped.
+ *
+ * See also %CLUTTER_ACTOR_IS_MAPPED and #ClutterActor:mapped
+ *
+ * Returns: %TRUE if the actor is mapped
+ *
+ * Since: 1.24
+ */
+gboolean
+clutter_actor_is_mapped (ClutterActor *self)
+{
+ g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
+
+ return CLUTTER_ACTOR_IS_MAPPED (self);
+}
+
static void
clutter_actor_real_unmap (ClutterActor *self)
{
@@ -1741,6 +1761,26 @@ clutter_actor_show (ClutterActor *self)
}
/**
+ * clutter_actor_is_visible:
+ * @self: a #ClutterActor
+ *
+ * Checks whether an actor is marked as visible.
+ *
+ * See also %CLUTTER_ACTOR_IS_VISIBLE and #ClutterActor:visible.
+ *
+ * Returns: %TRUE if the actor visible
+ *
+ * Since: 1.24
+ */
+gboolean
+clutter_actor_is_visible (ClutterActor *self)
+{
+ g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
+
+ return CLUTTER_ACTOR_IS_VISIBLE (self);
+}
+
+/**
* clutter_actor_show_all:
* @self: a #ClutterActor
*
@@ -1900,6 +1940,26 @@ clutter_actor_realize (ClutterActor *self)
clutter_actor_realize_internal (self);
}
+/**
+ * clutter_actor_is_realized:
+ * @self: a #ClutterActor
+ *
+ * Checks whether a #ClutterActor is realized.
+ *
+ * See also %CLUTTER_ACTOR_IS_REALIZED and #ClutterActor:realized.
+ *
+ * Returns: %TRUE if the actor is realized
+ *
+ * Since: 1.24
+ */
+gboolean
+clutter_actor_is_realized (ClutterActor *self)
+{
+ g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
+
+ return CLUTTER_ACTOR_IS_REALIZED (self);
+}
+
static void
clutter_actor_realize_internal (ClutterActor *self)
{
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index 85dc68a..a11fbb9 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -345,6 +345,13 @@ const gchar * clutter_actor_get_name
CLUTTER_AVAILABLE_IN_ALL
AtkObject * clutter_actor_get_accessible (ClutterActor
*self);
+CLUTTER_AVAILABLE_IN_1_24
+gboolean clutter_actor_is_visible (ClutterActor
*self);
+CLUTTER_AVAILABLE_IN_1_24
+gboolean clutter_actor_is_mapped (ClutterActor
*self);
+CLUTTER_AVAILABLE_IN_1_24
+gboolean clutter_actor_is_realized (ClutterActor
*self);
+
/* Size negotiation */
CLUTTER_AVAILABLE_IN_ALL
void clutter_actor_set_request_mode (ClutterActor
*self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]