[gtk+/wip/actor: 4/42] xxx: add stuff
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/actor: 4/42] xxx: add stuff
- Date: Tue, 18 Dec 2012 13:26:22 +0000 (UTC)
commit d072d322cf337b275d7481ce7fd63f0d98738f42
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 25 21:45:44 2012 +0200
xxx: add stuff
gtk/actors/gtkactor.c | 2238 ++++++++++++++++++++++++++++++++++++++++++
gtk/actors/gtkactorprivate.h | 159 +++-
2 files changed, 2396 insertions(+), 1 deletions(-)
---
diff --git a/gtk/actors/gtkactor.c b/gtk/actors/gtkactor.c
index 4e9de6c..9e4c9bd 100644
--- a/gtk/actors/gtkactor.c
+++ b/gtk/actors/gtkactor.c
@@ -20,3 +20,2241 @@
*/
#include "config.h"
+
+#include "gtkactorprivate.h"
+#include "gtkdebug.h"
+#include "gtkintl.h"
+#include "gtkprivate.h"
+#include "gtksizerequestcacheprivate.h"
+#include "gtktypebuiltins.h"
+#include "gtkwidget.h"
+
+struct _GtkActorPrivate {
+ SizeRequestCache requests;
+
+ cairo_matrix_t transform;
+ gfloat width;
+ gfloat height;
+
+ /* scene graph */
+ GtkActor *parent;
+ GtkActor *prev_sibling;
+ GtkActor *next_sibling;
+ GtkActor *first_child;
+ GtkActor *last_child;
+
+ gint n_children;
+
+ /* tracks whenever the children of an actor are changed; the
+ * age is incremented by 1 whenever an actor is added or
+ * removed. the age is not incremented when the first or the
+ * last child pointers are changed, or when grandchildren of
+ * an actor are changed.
+ */
+ gint age;
+
+ /* the text direction configured for this child */
+ GtkTextDirection text_direction;
+
+ /* visibility flags */
+ guint visible : 1;
+ guint mapped : 1;
+ guint realized : 1;
+ /* cached request is invalid (implies allocation is too) */
+ guint needs_width_request : 1;
+ /* cached request is invalid (implies allocation is too) */
+ guint needs_height_request : 1;
+ /* cached allocation is invalid (request has changed, probably) */
+ guint needs_allocation : 1;
+ guint needs_compute_expand : 1;
+ guint needs_x_expand : 1;
+ guint needs_y_expand : 1;
+};
+
+enum
+{
+ PROP_0,
+
+ PROP_VISIBLE,
+ PROP_MAPPED,
+ PROP_REALIZED,
+
+ PROP_TEXT_DIRECTION,
+
+ PROP_FIRST_CHILD,
+ PROP_LAST_CHILD,
+
+ PROP_LAST
+};
+
+static GParamSpec *obj_props[PROP_LAST];
+
+G_DEFINE_TYPE (GtkActor, _gtk_actor, G_TYPE_INITIALLY_UNOWNED)
+
+static void
+gtk_actor_finalize (GObject *object)
+{
+ GtkActor *self = GTK_ACTOR (object);
+ GtkActorPrivate *priv = self->priv;
+
+ _gtk_size_request_cache_free (&priv->requests);
+
+ G_OBJECT_CLASS (_gtk_actor_parent_class)->finalize (object);
+}
+
+static void
+gtk_actor_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GtkActor *actor = GTK_ACTOR (object);
+ //GtkActorPrivate *priv = actor->priv;
+
+ switch (prop_id)
+ {
+ case PROP_VISIBLE:
+ _gtk_actor_set_visible (actor, g_value_get_boolean (value));
+ break;
+
+ case PROP_TEXT_DIRECTION:
+ _gtk_actor_set_text_direction (actor, g_value_get_enum (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gtk_actor_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GtkActor *actor = GTK_ACTOR (object);
+ GtkActorPrivate *priv = actor->priv;
+
+ switch (prop_id)
+ {
+ case PROP_VISIBLE:
+ g_value_set_boolean (value, _gtk_actor_get_visible (actor));
+ break;
+
+ case PROP_MAPPED:
+ g_value_set_boolean (value, _gtk_actor_get_mapped (actor));
+ break;
+
+ case PROP_REALIZED:
+ g_value_set_boolean (value, _gtk_actor_get_realized (actor));
+ break;
+
+ case PROP_TEXT_DIRECTION:
+ g_value_set_enum (value, _gtk_actor_get_text_direction (actor));
+ break;
+
+ case PROP_FIRST_CHILD:
+ g_value_set_object (value, priv->first_child);
+ break;
+
+ case PROP_LAST_CHILD:
+ g_value_set_object (value, priv->last_child);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gtk_actor_queue_only_relayout (GtkActor *self)
+{
+ GtkActorPrivate *priv = self->priv;
+
+ if (priv->needs_allocation)
+ return; /* save some cpu cycles */
+
+ GTK_ACTOR_GET_CLASS (self)->queue_relayout (self);
+}
+
+static void
+gtk_actor_real_queue_relayout (GtkActor *self)
+{
+ GtkActorPrivate *priv = self->priv;
+
+ priv->needs_allocation = TRUE;
+ /* reset the cached size requests and request mode */
+ _gtk_size_request_cache_clear (&priv->requests);
+
+ /* We need to go all the way up the hierarchy */
+ if (priv->parent != NULL)
+ gtk_actor_queue_only_relayout (priv->parent);
+}
+
+static gboolean
+matrix_is_translation (const cairo_matrix_t *matrix)
+{
+ return (matrix->xx == 1.0 && matrix->yx == 0.0 &&
+ matrix->xy == 0.0 && matrix->yy == 1.0);
+}
+
+static void
+transform_rectangle (cairo_rectangle_t *dest,
+ const cairo_rectangle_t *src,
+ const cairo_matrix_t *matrix)
+{
+ if (matrix_is_translation (matrix))
+ {
+ dest->x = src->x + matrix->x0;
+ dest->y = src->y + matrix->y0;
+ dest->width = src->width;
+ dest->height = src->height;
+ }
+ else
+ {
+ double x0, x1, x2, x3;
+ double y0, y1, y2, y3;
+
+ x0 = src->x;
+ y0 = src->y;
+ x1 = src->x + src->width;
+ y1 = src->y;
+ x2 = src->x + src->width;
+ y2 = src->y + src->height;
+ x3 = src->x;
+ y3 = src->y + src->height;
+ cairo_matrix_transform_point (matrix, &x0, &y0);
+ cairo_matrix_transform_point (matrix, &x1, &y1);
+ cairo_matrix_transform_point (matrix, &x2, &y2);
+ cairo_matrix_transform_point (matrix, &x3, &y3);
+
+ dest->x = MIN (MIN (x0, x1), MIN (x2, x3));
+ dest->y = MIN (MIN (y0, y1), MIN (y2, y3));
+ dest->width = MAX (MAX (x0, x1), MAX (x2, x3)) - dest->x;
+ dest->height = MAX (MAX (y0, y1), MAX (y2, y3)) - dest->y;
+ }
+}
+
+static void
+gtk_actor_real_queue_redraw (GtkActor *self,
+ const cairo_rectangle_t *box)
+{
+ GtkActorPrivate *priv = self->priv;
+
+ /* We need to go all the way up the hierarchy */
+ if (priv->parent != NULL)
+ {
+ cairo_rectangle_t parent_box;
+
+ transform_rectangle (&parent_box, box, &priv->transform);
+ _gtk_actor_queue_redraw_area (priv->parent, &parent_box);
+ }
+}
+
+static void
+gtk_actor_real_show (GtkActor *self)
+{
+ self->priv->visible = TRUE;
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
+}
+
+static void
+gtk_actor_real_hide (GtkActor *self)
+{
+ self->priv->visible = FALSE;
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_VISIBLE]);
+}
+
+static void
+gtk_actor_real_map (GtkActor *self)
+{
+ GtkActorPrivate *priv = self->priv;
+ GtkActor *iter;
+
+ priv->mapped = TRUE;
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_MAPPED]);
+
+ for (iter = self->priv->first_child;
+ iter != NULL;
+ iter = iter->priv->next_sibling)
+ {
+ _gtk_actor_map (iter);
+ }
+}
+
+static void
+gtk_actor_real_unmap (GtkActor *self)
+{
+ GtkActorPrivate *priv = self->priv;
+ GtkActor *iter;
+
+ for (iter = self->priv->first_child;
+ iter != NULL;
+ iter = iter->priv->next_sibling)
+ {
+ _gtk_actor_unmap (iter);
+ }
+
+ priv->mapped = FALSE;
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_MAPPED]);
+}
+
+static void
+gtk_actor_real_realize (GtkActor *self)
+{
+ GtkActorPrivate *priv = self->priv;
+
+ priv->realized = TRUE;
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_REALIZED]);
+}
+
+static void
+gtk_actor_real_unrealize (GtkActor *self)
+{
+ GtkActorPrivate *priv = self->priv;
+
+ priv->realized = FALSE;
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_REALIZED]);
+}
+
+static void
+gtk_actor_real_parent_set (GtkActor *self,
+ GtkActor *old_parent)
+{
+}
+
+static GtkSizeRequestMode
+gtk_actor_real_get_request_mode (GtkActor *self)
+{
+ return GTK_SIZE_REQUEST_CONSTANT_SIZE;
+}
+
+static void
+gtk_actor_real_get_preferred_size (GtkActor *self,
+ GtkOrientation orientation,
+ gfloat for_width,
+ gfloat *min_size_p,
+ gfloat *natural_size_p)
+{
+ *min_size_p = 0;
+ *natural_size_p = 0;
+}
+
+static void
+gtk_actor_real_allocate (GtkActor *self,
+ gfloat width,
+ gfloat height)
+{
+ GtkActorPrivate *priv = self->priv;
+
+ priv->width = width;
+ priv->height = height;
+ priv->needs_allocation = FALSE;
+}
+
+static void
+_gtk_actor_class_init (GtkActorClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = gtk_actor_finalize;
+ object_class->set_property = gtk_actor_set_property;
+ object_class->get_property = gtk_actor_get_property;
+
+ klass->show = gtk_actor_real_show;
+ klass->hide = gtk_actor_real_hide;
+ klass->realize = gtk_actor_real_realize;
+ klass->unrealize = gtk_actor_real_unrealize;
+ klass->map = gtk_actor_real_map;
+ klass->unmap = gtk_actor_real_unmap;
+#if 0
+ klass->draw = gtk_actor_real_draw;
+#endif
+ klass->parent_set = gtk_actor_real_parent_set;
+ klass->queue_relayout = gtk_actor_real_queue_relayout;
+ klass->queue_redraw = gtk_actor_real_queue_redraw;
+ klass->get_request_mode = gtk_actor_real_get_request_mode;
+ klass->get_preferred_size = gtk_actor_real_get_preferred_size;
+ klass->allocate = gtk_actor_real_allocate;
+
+ /**
+ * GtkActor:visible:
+ *
+ * Whether the actor is set to be visible or not
+ *
+ * See also #GtkActor:mapped
+ */
+ obj_props[PROP_VISIBLE] =
+ g_param_spec_boolean ("visible",
+ P_("Visible"),
+ P_("Whether the actor is visible or not"),
+ FALSE,
+ GTK_PARAM_READWRITE);
+
+ /**
+ * GtkActor:mapped:
+ *
+ * Whether the actor is mapped (will be painted when the stage
+ * to which it belongs is mapped)
+ *
+ * Since: 1.0
+ */
+ obj_props[PROP_MAPPED] =
+ g_param_spec_boolean ("mapped",
+ P_("Mapped"),
+ P_("Whether the actor will be painted"),
+ FALSE,
+ GTK_PARAM_READABLE);
+
+ /**
+ * GtkActor:realized:
+ *
+ * Whether the actor has been realized
+ *
+ * Since: 1.0
+ */
+ obj_props[PROP_REALIZED] =
+ g_param_spec_boolean ("realized",
+ P_("Realized"),
+ P_("Whether the actor has been realized"),
+ FALSE,
+ GTK_PARAM_READABLE);
+
+ /**
+ * GtkActor:text-direction:
+ *
+ * The direction of the text inside a #GtkActor.
+ *
+ * Since: 1.0
+ */
+ obj_props[PROP_TEXT_DIRECTION] =
+ g_param_spec_enum ("text-direction",
+ P_("Text Direction"),
+ P_("Direction of the text"),
+ GTK_TYPE_TEXT_DIRECTION,
+ GTK_TEXT_DIR_LTR,
+ GTK_PARAM_READWRITE);
+
+ /**
+ * GtkActor:first-child:
+ *
+ * The actor's first child.
+ *
+ * Since: 1.10
+ */
+ obj_props[PROP_FIRST_CHILD] =
+ g_param_spec_object ("first-child",
+ P_("First Child"),
+ P_("The actor's first child"),
+ GTK_TYPE_ACTOR,
+ GTK_PARAM_READABLE);
+
+ /**
+ * GtkActor:last-child:
+ *
+ * The actor's last child.
+ *
+ * Since: 1.10
+ */
+ obj_props[PROP_LAST_CHILD] =
+ g_param_spec_object ("last-child",
+ P_("Last Child"),
+ P_("The actor's last child"),
+ GTK_TYPE_ACTOR,
+ GTK_PARAM_READABLE);
+
+ g_type_class_add_private (klass, sizeof (GtkActorPrivate));
+}
+
+static void
+_gtk_actor_init (GtkActor *actor)
+{
+ GtkActorPrivate *priv;
+
+ actor->priv = G_TYPE_INSTANCE_GET_PRIVATE (actor,
+ GTK_TYPE_ACTOR,
+ GtkActorPrivate);
+ priv = actor->priv;
+
+ priv->visible = TRUE;
+
+ _gtk_size_request_cache_init (&priv->requests);
+}
+
+/*< private >
+ * insert_child_at_depth:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ *
+ * Inserts @child inside the list of children held by @self, using
+ * the depth as the insertion criteria.
+ *
+ * This sadly makes the insertion not O(1), but we can keep the
+ * list sorted so that the painters algorithm we use for painting
+ * the children will work correctly.
+ */
+static void
+insert_child_at_depth (GtkActor *self,
+ GtkActor *child,
+ gpointer dummy G_GNUC_UNUSED)
+{
+ GtkActor *iter;
+ float child_depth;
+
+ child->priv->parent = self;
+
+ child_depth = 0;
+ //_clutter_actor_get_transform_info_or_defaults (child)->z_position;
+
+ /* special-case the first child */
+ if (self->priv->n_children == 0)
+ {
+ self->priv->first_child = child;
+ self->priv->last_child = child;
+
+ child->priv->next_sibling = NULL;
+ child->priv->prev_sibling = NULL;
+
+ return;
+ }
+
+ /* Find the right place to insert the child so that it will still be
+ sorted and the child will be after all of the actors at the same
+ dept */
+ for (iter = self->priv->first_child;
+ iter != NULL;
+ iter = iter->priv->next_sibling)
+ {
+ float iter_depth;
+
+ iter_depth = 0;
+ //_clutter_actor_get_transform_info_or_defaults (iter)->z_position;
+
+ if (iter_depth > child_depth)
+ break;
+ }
+
+ if (iter != NULL)
+ {
+ GtkActor *tmp = iter->priv->prev_sibling;
+
+ if (tmp != NULL)
+ tmp->priv->next_sibling = child;
+
+ /* Insert the node before the found one */
+ child->priv->prev_sibling = iter->priv->prev_sibling;
+ child->priv->next_sibling = iter;
+ iter->priv->prev_sibling = child;
+ }
+ else
+ {
+ GtkActor *tmp = self->priv->last_child;
+
+ if (tmp != NULL)
+ tmp->priv->next_sibling = child;
+
+ /* insert the node at the end of the list */
+ child->priv->prev_sibling = self->priv->last_child;
+ child->priv->next_sibling = NULL;
+ }
+
+ if (child->priv->prev_sibling == NULL)
+ self->priv->first_child = child;
+
+ if (child->priv->next_sibling == NULL)
+ self->priv->last_child = child;
+}
+
+static void
+insert_child_at_index (GtkActor *self,
+ GtkActor *child,
+ gpointer data_)
+{
+ gint index_ = GPOINTER_TO_INT (data_);
+
+ child->priv->parent = self;
+
+ if (index_ == 0)
+ {
+ GtkActor *tmp = self->priv->first_child;
+
+ if (tmp != NULL)
+ tmp->priv->prev_sibling = child;
+
+ child->priv->prev_sibling = NULL;
+ child->priv->next_sibling = tmp;
+ }
+ else if (index_ < 0 || index_ >= self->priv->n_children)
+ {
+ GtkActor *tmp = self->priv->last_child;
+
+ if (tmp != NULL)
+ tmp->priv->next_sibling = child;
+
+ child->priv->prev_sibling = tmp;
+ child->priv->next_sibling = NULL;
+ }
+ else
+ {
+ GtkActor *iter;
+ int i;
+
+ for (iter = self->priv->first_child, i = 0;
+ iter != NULL;
+ iter = iter->priv->next_sibling, i += 1)
+ {
+ if (index_ == i)
+ {
+ GtkActor *tmp = iter->priv->prev_sibling;
+
+ child->priv->prev_sibling = tmp;
+ child->priv->next_sibling = iter;
+
+ iter->priv->prev_sibling = child;
+
+ if (tmp != NULL)
+ tmp->priv->next_sibling = child;
+
+ break;
+ }
+ }
+ }
+
+ if (child->priv->prev_sibling == NULL)
+ self->priv->first_child = child;
+
+ if (child->priv->next_sibling == NULL)
+ self->priv->last_child = child;
+}
+
+static void
+insert_child_above (GtkActor *self,
+ GtkActor *child,
+ gpointer data)
+{
+ GtkActor *sibling = data;
+
+ child->priv->parent = self;
+
+ if (sibling == NULL)
+ sibling = self->priv->last_child;
+
+ child->priv->prev_sibling = sibling;
+
+ if (sibling != NULL)
+ {
+ GtkActor *tmp = sibling->priv->next_sibling;
+
+ child->priv->next_sibling = tmp;
+
+ if (tmp != NULL)
+ tmp->priv->prev_sibling = child;
+
+ sibling->priv->next_sibling = child;
+ }
+ else
+ child->priv->next_sibling = NULL;
+
+ if (child->priv->prev_sibling == NULL)
+ self->priv->first_child = child;
+
+ if (child->priv->next_sibling == NULL)
+ self->priv->last_child = child;
+}
+
+static void
+insert_child_below (GtkActor *self,
+ GtkActor *child,
+ gpointer data)
+{
+ GtkActor *sibling = data;
+
+ child->priv->parent = self;
+
+ if (sibling == NULL)
+ sibling = self->priv->first_child;
+
+ child->priv->next_sibling = sibling;
+
+ if (sibling != NULL)
+ {
+ GtkActor *tmp = sibling->priv->prev_sibling;
+
+ child->priv->prev_sibling = tmp;
+
+ if (tmp != NULL)
+ tmp->priv->next_sibling = child;
+
+ sibling->priv->prev_sibling = child;
+ }
+ else
+ child->priv->prev_sibling = NULL;
+
+ if (child->priv->prev_sibling == NULL)
+ self->priv->first_child = child;
+
+ if (child->priv->next_sibling == NULL)
+ self->priv->last_child = child;
+}
+
+/*< private >
+ * _gtk_actor_get_debug_name:
+ * @actor: a #GtkActor
+ *
+ * Retrieves a printable name of @actor for debugging messages
+ *
+ * Return value: a string with a printable name
+ */
+const gchar *
+_gtk_actor_get_debug_name (GtkActor *actor)
+{
+ return G_OBJECT_TYPE_NAME (actor);
+}
+
+static gboolean
+update_direction_recursive (GtkActor *actor)
+{
+ GtkActor *child;
+
+ /* we need to emit the notify::text-direction first, so that
+ * the sub-classes can catch that and do specific handling of
+ * the text direction; see clutter_text_direction_changed_cb()
+ * inside clutter-text.c
+ */
+ g_object_notify_by_pspec (G_OBJECT (actor), obj_props[PROP_TEXT_DIRECTION]);
+
+ for (child = actor->priv->first_child; child != NULL; child = child->priv->next_sibling)
+ {
+ if (child->priv->text_direction == GTK_TEXT_DIR_NONE)
+ update_direction_recursive (actor);
+ }
+
+ _gtk_actor_queue_relayout (actor);
+
+ return TRUE;
+}
+
+/**
+ * _gtk_actor_set_text_direction:
+ * @self: a #GtkActor
+ * @text_dir: the text direction for @self
+ *
+ * Sets the #GtkTextDirection for an actor
+ *
+ * Actors requiring special handling when the text direction changes
+ * should connect to the #GObject::notify signal for the
+ * #GtkActor:text-direction property
+ *
+ * Since: 1.2
+ */
+void
+_gtk_actor_set_text_direction (GtkActor *self,
+ GtkTextDirection text_dir)
+{
+ GtkActorPrivate *priv;
+ GtkTextDirection previous_text_dir, new_text_dir;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ priv = self->priv;
+ if (priv->text_direction == text_dir)
+ return;
+
+ previous_text_dir = _gtk_actor_get_text_direction (self);
+
+ priv->text_direction = text_dir;
+
+ new_text_dir = _gtk_actor_get_text_direction (self);
+
+ if (previous_text_dir == new_text_dir)
+ return;
+
+ update_direction_recursive (self);
+}
+
+/**
+ * clutter_actor_get_text_direction:
+ * @self: a #ClutterActor
+ *
+ * Retrieves the value set using clutter_actor_set_text_direction()
+ *
+ * If no text direction has been previously set, the default text
+ * direction, as returned by clutter_get_default_text_direction(), will
+ * be returned instead
+ *
+ * Return value: the #ClutterTextDirection for the actor
+ *
+ * Since: 1.2
+ */
+GtkTextDirection
+_gtk_actor_get_text_direction (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_val_if_fail (GTK_IS_ACTOR (self), GTK_TEXT_DIR_LTR);
+
+ priv = self->priv;
+
+ /* if no direction has been set yet use the default */
+ if (priv->text_direction == GTK_TEXT_DIR_NONE)
+ {
+ GtkActor *parent = _gtk_actor_get_parent (self);
+
+ if (parent)
+ return _gtk_actor_get_text_direction (parent);
+ else
+ return gtk_widget_get_default_direction ();
+ }
+
+ return priv->text_direction;
+}
+
+/*< private >
+ * gtk_actor_queue_compute_expand:
+ * @self: a #GtkActor
+ *
+ * Invalidates the needs_x_expand and needs_y_expand flags on @self
+ * and its parents up to the top-level actor.
+ *
+ * This function also queues a relayout if anything changed.
+ */
+static inline void
+gtk_actor_queue_compute_expand (GtkActor *self)
+{
+ GtkActor *parent;
+
+ if (self->priv->needs_compute_expand)
+ return;
+
+ for (parent = self; parent; parent = parent->priv->parent)
+ {
+ if (!parent->priv->needs_compute_expand)
+ break;
+
+ parent->priv->needs_compute_expand = TRUE;
+ }
+
+ _gtk_actor_queue_relayout (self);
+}
+
+typedef void (* GtkActorAddChildFunc) (GtkActor *parent,
+ GtkActor *child,
+ gpointer data);
+
+/*< private >
+ * gtk_actor_add_child_internal:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ * @add_func: delegate function
+ * @data: (closure): data to pass to @add_func
+ *
+ * Adds @child to the list of children of @self.
+ *
+ * The actual insertion inside the list is delegated to @add_func: this
+ * function will just set up the state, perform basic checks, and emit
+ * signals.
+ *
+ * The @flags argument is used to perform additional operations.
+ */
+static inline void
+gtk_actor_add_child_internal (GtkActor *self,
+ GtkActor *child,
+ GtkActorAddChildFunc add_func,
+ gpointer data)
+{
+ GtkActor *old_first_child, *old_last_child;
+
+ if (child->priv->parent != NULL)
+ {
+ g_warning ("The actor '%s' already has a parent, '%s'. You must "
+ "use gtk_actor_remove_child() first.",
+ _gtk_actor_get_debug_name (child),
+ _gtk_actor_get_debug_name (child->priv->parent));
+ return;
+ }
+
+ old_first_child = self->priv->first_child;
+ old_last_child = self->priv->last_child;
+
+ g_object_freeze_notify (G_OBJECT (self));
+
+ g_object_ref_sink (child);
+ child->priv->parent = NULL;
+ child->priv->next_sibling = NULL;
+ child->priv->prev_sibling = NULL;
+
+ /* delegate the actual insertion */
+ add_func (self, child, data);
+
+ g_assert (child->priv->parent == self);
+
+ self->priv->n_children += 1;
+
+ self->priv->age += 1;
+
+ /* children may cause their parent to expand, if they are set
+ * to expand; if a child is not expanded then it cannot change
+ * its parent's state. any further change later on will queue
+ * an expand state check.
+ *
+ * this check, with the initial state of the needs_compute_expand
+ * flag set to FALSE, should avoid recomputing the expand flags
+ * state while building the actor tree.
+ */
+ if (_gtk_actor_get_visible (child) &&
+ (child->priv->needs_compute_expand ||
+ child->priv->needs_x_expand ||
+ child->priv->needs_y_expand))
+ {
+ gtk_actor_queue_compute_expand (self);
+ }
+
+ GTK_ACTOR_GET_CLASS (child)->parent_set (child, NULL);
+
+ /* If parent is mapped or realized, we need to also be mapped or
+ * realized once we're inside the parent.
+ */
+ if (_gtk_actor_get_mapped (self))
+ _gtk_actor_map (child);
+
+ /* propagate the parent's text direction to the child */
+ _gtk_actor_set_text_direction (child, _gtk_actor_get_text_direction (self));
+
+ if (_gtk_actor_get_mapped (child))
+ _gtk_actor_queue_redraw (child);
+
+ /* maintain the invariant that if an actor needs layout,
+ * its parents do as well
+ */
+ if (child->priv->needs_allocation)
+ {
+ /* we work around the short-circuiting we do
+ * in _gtk_actor_queue_relayout() since we
+ * want to force a relayout
+ */
+ _gtk_actor_queue_relayout (child->priv->parent);
+ }
+
+ g_signal_emit_by_name (self, "actor-added", child);
+
+ if (old_first_child != self->priv->first_child)
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_FIRST_CHILD]);
+
+ if (old_last_child != self->priv->last_child)
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_LAST_CHILD]);
+
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * gtk_actor_add_child:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ *
+ * Adds @child to the children of @self.
+ *
+ * This function will acquire a reference on @child that will only
+ * be released when calling gtk_actor_remove_child().
+ *
+ * This function will take into consideration the #GtkActor:depth
+ * of @child, and will keep the list of children sorted.
+ *
+ * This function will emit the #ClutterContainer::actor-added signal
+ * on @self.
+ *
+ * Since: 1.10
+ */
+void
+gtk_actor_add_child (GtkActor *self,
+ GtkActor *child)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (GTK_IS_ACTOR (child));
+ g_return_if_fail (self != child);
+ g_return_if_fail (child->priv->parent == NULL);
+
+ gtk_actor_add_child_internal (self, child,
+ insert_child_at_depth,
+ NULL);
+}
+
+/**
+ * _gtk_actor_insert_child_at_index:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ * @index_: the index
+ *
+ * Inserts @child into the list of children of @self, using the
+ * given @index_. If @index_ is greater than the number of children
+ * in @self, or is less than 0, then the new child is added at the end.
+ *
+ * This function will acquire a reference on @child that will only
+ * be released when calling gtk_actor_remove_child().
+ *
+ * This function will not take into consideration the #GtkActor:depth
+ * of @child.
+ *
+ * This function will emit the #ClutterContainer::actor-added signal
+ * on @self.
+ *
+ * Since: 1.10
+ */
+void
+_gtk_actor_insert_child_at_index (GtkActor *self,
+ GtkActor *child,
+ gint index_)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (GTK_IS_ACTOR (child));
+ g_return_if_fail (self != child);
+ g_return_if_fail (child->priv->parent == NULL);
+
+ gtk_actor_add_child_internal (self, child,
+ insert_child_at_index,
+ GINT_TO_POINTER (index_));
+}
+
+/**
+ * gtk_actor_insert_child_above:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ * @sibling: (allow-none): a child of @self, or %NULL
+ *
+ * Inserts @child into the list of children of @self, above another
+ * child of @self or, if @sibling is %NULL, above all the children
+ * of @self.
+ *
+ * This function will acquire a reference on @child that will only
+ * be released when calling gtk_actor_remove_child().
+ *
+ * This function will not take into consideration the #GtkActor:depth
+ * of @child.
+ *
+ * This function will emit the #ClutterContainer::actor-added signal
+ * on @self.
+ *
+ * Since: 1.10
+ */
+void
+gtk_actor_insert_child_above (GtkActor *self,
+ GtkActor *child,
+ GtkActor *sibling)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (GTK_IS_ACTOR (child));
+ g_return_if_fail (self != child);
+ g_return_if_fail (child != sibling);
+ g_return_if_fail (child->priv->parent == NULL);
+ g_return_if_fail (sibling == NULL ||
+ (GTK_IS_ACTOR (sibling) &&
+ sibling->priv->parent == self));
+
+ gtk_actor_add_child_internal (self, child,
+ insert_child_above,
+ sibling);
+}
+
+/**
+ * gtk_actor_insert_child_below:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ * @sibling: (allow-none): a child of @self, or %NULL
+ *
+ * Inserts @child into the list of children of @self, below another
+ * child of @self or, if @sibling is %NULL, below all the children
+ * of @self.
+ *
+ * This function will acquire a reference on @child that will only
+ * be released when calling gtk_actor_remove_child().
+ *
+ * This function will not take into consideration the #GtkActor:depth
+ * of @child.
+ *
+ * This function will emit the #ClutterContainer::actor-added signal
+ * on @self.
+ *
+ * Since: 1.10
+ */
+void
+gtk_actor_insert_child_below (GtkActor *self,
+ GtkActor *child,
+ GtkActor *sibling)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (GTK_IS_ACTOR (child));
+ g_return_if_fail (self != child);
+ g_return_if_fail (child != sibling);
+ g_return_if_fail (child->priv->parent == NULL);
+ g_return_if_fail (sibling == NULL ||
+ (GTK_IS_ACTOR (sibling) &&
+ sibling->priv->parent == self));
+
+ gtk_actor_add_child_internal (self, child,
+ insert_child_below,
+ sibling);
+}
+
+/**
+ * _gtk_actor_queue_relayout:
+ * @self: A #ClutterActor
+ *
+ * Indicates that the actor's size request or other layout-affecting
+ * properties may have changed. This function is used inside #GtkActor
+ * subclass implementations, not by applications directly.
+ *
+ * Queueing a new layout automatically queues a redraw as well.
+ *
+ * Since: 0.8
+ */
+void
+_gtk_actor_queue_relayout (GtkActor *self)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ gtk_actor_queue_only_relayout (self);
+ _gtk_actor_queue_redraw (self);
+}
+
+/**
+ * _gtk_actor_queue_redraw:
+ * @self: A #GtkActor
+ *
+ * Queues up a redraw of an actor and any children. The redraw occurs
+ * once the main loop becomes idle (after the current batch of events
+ * has been processed, roughly).
+ *
+ * Applications rarely need to call this, as redraws are handled
+ * automatically by modification functions.
+ *
+ * This function will not do anything if @self is not visible, or
+ * if the actor is inside an invisible part of the scenegraph.
+ *
+ * Also be aware that painting is a NOP for actors with an opacity of
+ * 0
+ *
+ * When you are implementing a custom actor you must queue a redraw
+ * whenever some private state changes that will affect painting or
+ * picking of your actor.
+ */
+void
+_gtk_actor_queue_redraw (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+ cairo_rectangle_t rect;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ priv = self->priv;
+
+ if (!_gtk_actor_get_mapped (self) ||
+ priv->needs_allocation)
+ return;
+
+ rect.x = 0;
+ rect.y = 0;
+ rect.width = priv->width;
+ rect.width = priv->height;
+
+ _gtk_actor_queue_redraw_area (self, &rect);
+}
+
+void
+_gtk_actor_queue_redraw_area (GtkActor *self,
+ const cairo_rectangle_t *box)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ if (!_gtk_actor_get_mapped (self) ||
+ self->priv->needs_allocation)
+ return;
+
+ GTK_ACTOR_GET_CLASS (self)->queue_redraw (self, box);
+}
+
+/**
+ * _gtk_actor_get_request_mode:
+ * @self: a #GtkActor
+ *
+ * Retrieves the geometry request mode of @self
+ *
+ * Return value: the request mode for the actor
+ *
+ * Since: 1.2
+ */
+GtkSizeRequestMode
+_gtk_actor_get_request_mode (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_val_if_fail (GTK_IS_ACTOR (self), GTK_SIZE_REQUEST_CONSTANT_SIZE);
+
+ priv = self->priv;
+
+ if (!priv->requests.request_mode_valid)
+ {
+ priv->requests.request_mode = GTK_ACTOR_GET_CLASS (self)->get_request_mode (self);
+ priv->requests.request_mode_valid = TRUE;
+ }
+
+ return priv->requests.request_mode;
+}
+
+/**
+ * _gtk_actor_get_preferred_size:
+ * @self: A #GtkActor
+ * @orientation: orientation to query the size for
+ * @for_size: available size in opposite orientation,
+ * or a negative value to indicate that no size is defined
+ * @min_size_p: (out) (allow-none): return location for minimum size,
+ * or %NULL
+ * @natural_size_p: (out) (allow-none): return location for the natural
+ * size, or %NULL
+ *
+ * Computes the requested minimum and natural sizes for an actor,
+ * optionally depending on the specified height, or if they are
+ * already computed, returns the cached values.
+ *
+ * An actor may not get its request - depending on the layout
+ * manager that's in effect.
+ *
+ * A request should not incorporate the actor's scale or anchor point;
+ * those transformations do not affect layout, only rendering.
+ *
+ * Since: 0.8
+ */
+void
+_gtk_actor_get_preferred_width (GtkActor *self,
+ GtkOrientation orientation,
+ gfloat for_size,
+ gfloat *min_size_p,
+ gfloat *natural_size_p)
+{
+ GtkActorPrivate *priv;
+ float min_size = 0;
+ float nat_size = 0;
+ gboolean found_in_cache;
+
+ priv = self->priv;
+
+ if (_gtk_actor_get_request_mode (self) == GTK_SIZE_REQUEST_CONSTANT_SIZE)
+ for_size = -1;
+
+ found_in_cache = _gtk_size_request_cache_lookup (&priv->requests,
+ orientation,
+ for_size,
+ &min_size,
+ &nat_size);
+
+ if (!found_in_cache)
+ {
+ GTK_ACTOR_GET_CLASS (self)->get_preferred_size (self, orientation, for_size, &min_size, &nat_size);
+
+ if (min_size > nat_size)
+ {
+ g_warning ("%s %p reported min size %f and natural size %f for size %f; natural size must be >= min size",
+ G_OBJECT_TYPE_NAME (self), self, min_size, nat_size, for_size);
+ }
+
+ _gtk_size_request_cache_commit (&priv->requests,
+ orientation,
+ for_size,
+ min_size,
+ nat_size);
+ }
+
+ if (min_size_p)
+ *min_size_p = min_size;
+
+ if (natural_size_p)
+ *natural_size_p = nat_size;
+
+ g_assert (min_size <= nat_size);
+
+ GTK_NOTE (SIZE_REQUEST,
+ g_print ("[%p] %s\t%s: %f is minimum %f and natural: %f (hit cache: %s)\n",
+ self, G_OBJECT_TYPE_NAME (self),
+ orientation == GTK_ORIENTATION_HORIZONTAL ?
+ "width for height" : "height for width" ,
+ for_size, min_size, nat_size,
+ found_in_cache ? "yes" : "no"));
+}
+
+static void
+remove_child (GtkActor *self,
+ GtkActor *child)
+{
+ GtkActor *prev_sibling, *next_sibling;
+
+ prev_sibling = child->priv->prev_sibling;
+ next_sibling = child->priv->next_sibling;
+
+ if (prev_sibling != NULL)
+ prev_sibling->priv->next_sibling = next_sibling;
+
+ if (next_sibling != NULL)
+ next_sibling->priv->prev_sibling = prev_sibling;
+
+ if (self->priv->first_child == child)
+ self->priv->first_child = next_sibling;
+
+ if (self->priv->last_child == child)
+ self->priv->last_child = prev_sibling;
+
+ child->priv->parent = NULL;
+ child->priv->prev_sibling = NULL;
+ child->priv->next_sibling = NULL;
+}
+
+/*< private >
+ * gtk_actor_remove_child_internal:
+ * @self: a #GtkActor
+ * @child: the child of @self that has to be removed
+ * @flags: control the removal operations
+ *
+ * Removes @child from the list of children of @self.
+ */
+static void
+gtk_actor_remove_child_internal (GtkActor *self,
+ GtkActor *child)
+{
+ GtkActor *old_first, *old_last;
+
+ g_object_freeze_notify (G_OBJECT (self));
+
+ if (_gtk_actor_get_mapped (child))
+ _gtk_actor_queue_relayout (self);
+
+ /* we need to unrealize *before* we set parent_actor to NULL,
+ * because in an unrealize method actors are dissociating from the
+ * stage, which means they need to be able to
+ * clutter_actor_get_stage().
+ */
+ _gtk_actor_unmap (child);
+ _gtk_actor_unrealize (child);
+
+ old_first = self->priv->first_child;
+ old_last = self->priv->last_child;
+
+ remove_child (self, child);
+
+ self->priv->n_children -= 1;
+
+ self->priv->age += 1;
+
+ /* if the child that got removed was visible and set to
+ * expand then we want to reset the parent's state in
+ * case the child was the only thing that was making it
+ * expand.
+ */
+ if (_gtk_actor_get_visible (child) &&
+ (child->priv->needs_compute_expand ||
+ child->priv->needs_x_expand ||
+ child->priv->needs_y_expand))
+ {
+ gtk_actor_queue_compute_expand (self);
+ }
+
+ GTK_ACTOR_GET_CLASS (child)->parent_set (child, self);
+
+ /* we need to emit the signal before dropping the reference */
+ g_signal_emit_by_name (self, "actor-removed", child);
+
+ if (old_first != self->priv->first_child)
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_FIRST_CHILD]);
+
+ if (old_last != self->priv->last_child)
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_LAST_CHILD]);
+
+ g_object_thaw_notify (G_OBJECT (self));
+
+ /* remove the reference we acquired in _gtk_actor_add_child() */
+ g_object_unref (child);
+}
+
+/**
+ * _gtk_actor_remove_child:
+ * @self: a #GtkActor
+ * @child: a #GtkActor
+ *
+ * Removes @child from the children of @self.
+ *
+ * This function will release the reference added by
+ * _gtk_actor_add_child(), so if you want to keep using @child
+ * you will have to acquire a referenced on it before calling this
+ * function.
+ *
+ * This function will emit the #ClutterContainer::actor-removed
+ * signal on @self.
+ *
+ * Since: 1.10
+ */
+void
+_gtk_actor_remove_child (GtkActor *self,
+ GtkActor *child)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (GTK_IS_ACTOR (child));
+ g_return_if_fail (self != child);
+ g_return_if_fail (child->priv->parent != NULL);
+ g_return_if_fail (child->priv->parent == self);
+
+ gtk_actor_remove_child_internal (self, child);
+}
+
+/**
+ * _gtk_actor_remove_all_children:
+ * @self: a #GtkActor
+ *
+ * Removes all children of @self.
+ *
+ * This function releases the reference added by inserting a child actor
+ * in the list of children of @self.
+ *
+ * If the reference count of a child drops to zero, the child will be
+ * destroyed. If you want to ensure the destruction of all the children
+ * of @self, use clutter_actor_destroy_all_children().
+ *
+ * Since: 1.10
+ */
+void
+_gtk_actor_remove_all_children (GtkActor *self)
+{
+ GtkActorIter iter;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ if (self->priv->n_children == 0)
+ return;
+
+ g_object_freeze_notify (G_OBJECT (self));
+
+ _gtk_actor_iter_init (&iter, self);
+ while (_gtk_actor_iter_next (&iter, NULL))
+ _gtk_actor_iter_remove (&iter);
+
+ g_object_thaw_notify (G_OBJECT (self));
+
+ /* sanity check */
+ g_assert (self->priv->first_child == NULL);
+ g_assert (self->priv->last_child == NULL);
+ g_assert (self->priv->n_children == 0);
+}
+
+/**
+ * _gtk_actor_get_n_children:
+ * @self: a #GtkActor
+ *
+ * Retrieves the number of children of @self.
+ *
+ * Return value: the number of children of an actor
+ *
+ * Since: 1.10
+ */
+gint
+_gtk_actor_get_n_children (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), 0);
+
+ return self->priv->n_children;
+}
+
+/**
+ * _gtk_actor_get_child_at_index:
+ * @self: a #GtkActor
+ * @index_: the position in the list of children
+ *
+ * Retrieves the actor at the given @index_ inside the list of
+ * children of @self.
+ *
+ * Return value: (transfer none): a pointer to a #GtkActor, or %NULL
+ *
+ * Since: 1.10
+ */
+GtkActor *
+_gtk_actor_get_child_at_index (GtkActor *self,
+ gint index_)
+{
+ GtkActor *iter;
+ int i;
+
+ g_return_val_if_fail (GTK_IS_ACTOR (self), NULL);
+ g_return_val_if_fail (index_ <= self->priv->n_children, NULL);
+
+ for (iter = self->priv->first_child, i = 0;
+ iter != NULL && i < index_;
+ iter = iter->priv->next_sibling, i += 1)
+ ;
+
+ return iter;
+}
+
+/**
+ * _gtk_actor_get_previous_sibling:
+ * @self: a #GtkActor
+ *
+ * Retrieves the sibling of @self that comes before it in the list
+ * of children of @self's parent.
+ *
+ * The returned pointer is only valid until the scene graph changes; it
+ * is not safe to modify the list of children of @self while iterating
+ * it.
+ *
+ * Return value: (transfer none): a pointer to a #GtkActor, or %NULL
+ *
+ * Since: 1.10
+ */
+GtkActor *
+_gtk_actor_get_previous_sibling (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), NULL);
+
+ return self->priv->prev_sibling;
+}
+
+/**
+ * _gtk_actor_get_next_sibling:
+ * @self: a #GtkActor
+ *
+ * Retrieves the sibling of @self that comes after it in the list
+ * of children of @self's parent.
+ *
+ * The returned pointer is only valid until the scene graph changes; it
+ * is not safe to modify the list of children of @self while iterating
+ * it.
+ *
+ * Return value: (transfer none): a pointer to a #GtkActor, or %NULL
+ *
+ * Since: 1.10
+ */
+GtkActor *
+_gtk_actor_get_next_sibling (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), NULL);
+
+ return self->priv->next_sibling;
+}
+
+/**
+ * _gtk_actor_get_first_child:
+ * @self: a #GtkActor
+ *
+ * Retrieves the first child of @self.
+ *
+ * The returned pointer is only valid until the scene graph changes; it
+ * is not safe to modify the list of children of @self while iterating
+ * it.
+ *
+ * Return value: (transfer none): a pointer to a #GtkActor, or %NULL
+ *
+ * Since: 1.10
+ */
+GtkActor *
+_gtk_actor_get_first_child (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), NULL);
+
+ return self->priv->first_child;
+}
+
+/**
+ * _gtk_actor_get_last_child:
+ * @self: a #GtkActor
+ *
+ * Retrieves the last child of @self.
+ *
+ * The returned pointer is only valid until the scene graph changes; it
+ * is not safe to modify the list of children of @self while iterating
+ * it.
+ *
+ * Return value: (transfer none): a pointer to a #GtkActor, or %NULL
+ *
+ * Since: 1.10
+ */
+GtkActor *
+_gtk_actor_get_last_child (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), NULL);
+
+ return self->priv->last_child;
+}
+
+/**
+ * _gtk_actor_get_parent:
+ * @self: A #GtkActor
+ *
+ * Retrieves the parent of @self.
+ *
+ * Return Value: (transfer none): The #GtkActor parent, or %NULL
+ * if no parent is set
+ */
+GtkActor *
+_gtk_actor_get_parent (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), NULL);
+
+ return self->priv->parent;
+}
+
+/**
+ * _gtk_actor_contains:
+ * @self: A #GtkActor
+ * @descendant: A #GtkActor, possibly contained in @self
+ *
+ * Determines if @descendant is contained inside @self (either as an
+ * immediate child, or as a deeper descendant). If @self and
+ * @descendant point to the same actor then it will also return %TRUE.
+ *
+ * Return value: whether @descendent is contained within @self
+ *
+ * Since: 1.4
+ */
+gboolean
+_gtk_actor_contains (GtkActor *self,
+ GtkActor *descendant)
+{
+ GtkActor *actor;
+
+ g_return_val_if_fail (GTK_IS_ACTOR (self), FALSE);
+ g_return_val_if_fail (GTK_IS_ACTOR (descendant), FALSE);
+
+ for (actor = descendant; actor; actor = actor->priv->parent)
+ if (actor == self)
+ return TRUE;
+
+ return FALSE;
+}
+
+/* easy way to have properly named fields instead of the dummy ones
+ * we use in the public structure
+ */
+typedef struct _RealActorIter
+{
+ GtkActor *root; /* dummy1 */
+ GtkActor *current; /* dummy2 */
+ gpointer padding_1; /* dummy3 */
+ gint age; /* dummy4 */
+ gpointer padding_2; /* dummy5 */
+} RealActorIter;
+
+G_STATIC_ASSERT (sizeof (GtkActorIter) == sizeof (RealActorIter));
+
+/**
+ * _gtk_actor_iter_init:
+ * @iter: a #GtkActorIter
+ * @root: a #GtkActor
+ *
+ * Initializes a #GtkActorIter, which can then be used to iterate
+ * efficiently over a section of the scene graph, and associates it
+ * with @root.
+ *
+ * Modifying the scene graph section that contains @root will invalidate
+ * the iterator.
+ *
+ * |[
+ * GtkActorIter iter;
+ * GtkActor *child;
+ *
+ * clutter_actor_iter_init (&iter, container);
+ * while (clutter_actor_iter_next (&iter, &child))
+ * {
+ * /* do something with child */
+ * }
+ * ]|
+ *
+ * Since: 1.10
+ */
+void
+_gtk_actor_iter_init (GtkActorIter *iter,
+ GtkActor *root)
+{
+ RealActorIter *ri = (RealActorIter *) iter;
+
+ g_return_if_fail (iter != NULL);
+ g_return_if_fail (GTK_IS_ACTOR (root));
+
+ ri->root = root;
+ ri->current = NULL;
+ ri->age = root->priv->age;
+}
+
+/**
+ * _gtk_actor_iter_is_valid:
+ * @iter: a #GtkActorIter
+ *
+ * Checks whether a #GtkActorIter is still valid.
+ *
+ * An iterator is considered valid if it has been initialized, and
+ * if the #GtkActor that it refers to hasn't been modified after
+ * the initialization.
+ *
+ * Return value: %TRUE if the iterator is valid, and %FALSE otherwise
+ *
+ * Since: 1.12
+ */
+gboolean
+_gtk_actor_iter_is_valid (const GtkActorIter *iter)
+{
+ RealActorIter *ri = (RealActorIter *) iter;
+
+ g_return_val_if_fail (iter != NULL, FALSE);
+
+ if (ri->root == NULL)
+ return FALSE;
+
+ return ri->root->priv->age == ri->age;
+}
+
+/**
+ * _gtk_actor_iter_next:
+ * @iter: a #GtkActorIter
+ * @child: (out) (transfer none): return location for a #GtkActor
+ *
+ * Advances the @iter and retrieves the next child of the root #GtkActor
+ * that was used to initialize the #GtkActorIterator.
+ *
+ * If the iterator can advance, this function returns %TRUE and sets the
+ * @child argument.
+ *
+ * If the iterator cannot advance, this function returns %FALSE, and
+ * the contents of @child are undefined.
+ *
+ * Return value: %TRUE if the iterator could advance, and %FALSE otherwise.
+ *
+ * Since: 1.10
+ */
+gboolean
+_gtk_actor_iter_next (GtkActorIter *iter,
+ GtkActor **child)
+{
+ RealActorIter *ri = (RealActorIter *) iter;
+
+ g_return_val_if_fail (iter != NULL, FALSE);
+ g_return_val_if_fail (ri->root != NULL, FALSE);
+#ifndef G_DISABLE_ASSERT
+ g_return_val_if_fail (ri->age == ri->root->priv->age, FALSE);
+#endif
+
+ if (ri->current == NULL)
+ ri->current = ri->root->priv->first_child;
+ else
+ ri->current = ri->current->priv->next_sibling;
+
+ if (child != NULL)
+ *child = ri->current;
+
+ return ri->current != NULL;
+}
+
+/**
+ * _gtk_actor_iter_prev:
+ * @iter: a #GtkActorIter
+ * @child: (out) (transfer none): return location for a #GtkActor
+ *
+ * Advances the @iter and retrieves the previous child of the root
+ * #GtkActor that was used to initialize the #GtkActorIterator.
+ *
+ * If the iterator can advance, this function returns %TRUE and sets the
+ * @child argument.
+ *
+ * If the iterator cannot advance, this function returns %FALSE, and
+ * the contents of @child are undefined.
+ *
+ * Return value: %TRUE if the iterator could advance, and %FALSE otherwise.
+ *
+ * Since: 1.10
+ */
+gboolean
+_gtk_actor_iter_prev (GtkActorIter *iter,
+ GtkActor **child)
+{
+ RealActorIter *ri = (RealActorIter *) iter;
+
+ g_return_val_if_fail (iter != NULL, FALSE);
+ g_return_val_if_fail (ri->root != NULL, FALSE);
+#ifndef G_DISABLE_ASSERT
+ g_return_val_if_fail (ri->age == ri->root->priv->age, FALSE);
+#endif
+
+ if (ri->current == NULL)
+ ri->current = ri->root->priv->last_child;
+ else
+ ri->current = ri->current->priv->prev_sibling;
+
+ if (child != NULL)
+ *child = ri->current;
+
+ return ri->current != NULL;
+}
+
+/**
+ * _gtk_actor_iter_remove:
+ * @iter: a #GtkActorIter
+ *
+ * Safely removes the #GtkActor currently pointer to by the iterator
+ * from its parent.
+ *
+ * This function can only be called after clutter_actor_iter_next() or
+ * _gtk_actor_iter_prev() returned %TRUE, and cannot be called more
+ * than once for the same actor.
+ *
+ * This function will call clutter_actor_remove_child() internally.
+ *
+ * Since: 1.10
+ */
+void
+_gtk_actor_iter_remove (GtkActorIter *iter)
+{
+ RealActorIter *ri = (RealActorIter *) iter;
+ GtkActor *cur;
+
+ g_return_if_fail (iter != NULL);
+ g_return_if_fail (ri->root != NULL);
+#ifndef G_DISABLE_ASSERT
+ g_return_if_fail (ri->age == ri->root->priv->age);
+#endif
+ g_return_if_fail (ri->current != NULL);
+
+ cur = ri->current;
+
+ if (cur != NULL)
+ {
+ ri->current = cur->priv->prev_sibling;
+
+ gtk_actor_remove_child_internal (ri->root, cur);
+
+ ri->age += 1;
+ }
+}
+
+/**
+ * _gtk_actor_set_visible:
+ * @actor: a #GtkActor
+ * @visible: whether the actor should be shown or not
+ *
+ * Sets the visibility state of @actor. Note that setting this to
+ * %TRUE doesn't mean the actor is actually viewable, see
+ * _gtk_actor_get_visible().
+ *
+ * This function simply calls _gtk_actor_show() or _gtk_actor_hide()
+ * but is nicer to use when the visibility of the actor depends on
+ * some condition.
+ *
+ * Actors are visible by default.
+ *
+ * Since: 2.18
+ **/
+void
+_gtk_actor_set_visible (GtkActor *self,
+ gboolean visible)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ if (visible != _gtk_actor_get_visible (self))
+ {
+ if (visible)
+ _gtk_actor_show (self);
+ else
+ _gtk_actor_hide (self);
+ }
+}
+
+/**
+ * _gtk_actor_get_visible:
+ * @actor: a #GtkActor
+ *
+ * Determines whether the actor is visible. This function does not take
+ * into account wether the parent actor is also marked as visible.
+ *
+ * This function does not check if the actor is obscured in any way.
+ *
+ * See _gtk_actor_set_visible().
+ *
+ * Return value: %TRUE if the actor is visible
+ *
+ * Since: 2.18
+ **/
+gboolean
+_gtk_actor_get_visible (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), FALSE);
+
+ return self->priv->visible;
+}
+
+/**
+ * _gtk_actor_get_realized:
+ * @self: A #GtkActor
+ *
+ * Evaluates to %TRUE if the actor is realized.
+ *
+ * The realized state has an actor-dependant interpretation. If an
+ * actor wants to delay allocating resources until it is attached to a
+ * screen, it may use the realize state to do so. If an actor is mapped
+ * it must also be realized, but an actor can be realized and unmapped
+ * (this is so hiding an actor temporarily doesn't do an expensive
+ * unrealize/realize).
+ *
+ * To be realized an actor must be inside a toplevel.
+ *
+ * Since: 0.2
+ */
+gboolean
+_gtk_actor_get_realized (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), FALSE);
+
+ return self->priv->realized;
+}
+
+/**
+ * _gtk_actor_realize:
+ * @self: A #ClutterActor
+ *
+ * Realization informs the actor that it is attached to a toplevel. It
+ * can use this to allocate resources if it wanted to delay allocation
+ * until it would be rendered.
+ *
+ * This function does nothing if the actor is already realized.
+ *
+ * Because a realized actor must have realized parent actors, calling
+ * clutter_actor_realize() will also realize all parents of the actor.
+ *
+ * This function does not realize child actors.
+ **/
+void
+_gtk_actor_realize (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (_gtk_actor_is_toplevel (self) || _gtk_actor_get_mapped (_gtk_actor_get_parent (self)));
+
+ if (_gtk_actor_get_realized (self))
+ return;
+
+ priv = self->priv;
+
+ /* To be realized, our parent actors must be realized first.
+ * This will only succeed if we're inside a toplevel.
+ */
+ if (priv->parent != NULL)
+ _gtk_actor_realize (priv->parent);
+
+ GTK_ACTOR_GET_CLASS (self)->realize (self);
+}
+
+/**
+ * _gtk_actor_unrealize:
+ * @self: A #GtkActor
+ *
+ * Unrealization informs the actor that it may be being destroyed or
+ * moved to another stage. The actor may want to destroy any
+ * underlying graphics resources at this point.
+ *
+ * Because mapped actors must be realized, actors may not be
+ * unrealized if they are mapped.
+ *
+ * This function should not be called by application code.
+ */
+void
+_gtk_actor_unrealize (GtkActor *self)
+{
+ GtkActor *iter;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (!_gtk_actor_get_mapped (self));
+
+ if (!_gtk_actor_get_realized (self))
+ return;
+
+ for (iter = self->priv->first_child;
+ iter != NULL;
+ iter = iter->priv->next_sibling)
+ {
+ _gtk_actor_unrealize (iter);
+ }
+
+ GTK_ACTOR_GET_CLASS (self)->unrealize (self);
+}
+
+/**
+ * _gtk_actor_get_mapped:
+ * @self: a #GtkActor
+ *
+ * Checks if the given actor is mapped.
+ *
+ * The mapped state is set when the actor is visible and all its parents up
+ * to a top-level are visible, realized, and mapped.
+ *
+ * This check can be used to see if an actor is going to be painted, as actors
+ * that are not mapped will never be painted.
+ *
+ * Since: 0.2
+ */
+gboolean
+_gtk_actor_get_mapped (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), FALSE);
+
+ return self->priv->mapped;
+}
+
+/**
+ * _gtk_actor_map:
+ * @self: A #GtkActor
+ *
+ * Marks an actor as mapped and possibly maps and realizes its children
+ * if they are visible. Does nothing if the actor is not visible.
+ *
+ * Calling this function is strongly disencouraged: the default
+ * implementation of #ClutterActorClass.map() will map all the children
+ * of an actor when mapping its parent.
+ *
+ * When overriding map, it is mandatory to chain up to the parent
+ * implementation.
+ *
+ * Since: 1.0
+ */
+void
+_gtk_actor_map (GtkActor *self)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (_gtk_actor_is_toplevel (self) || _gtk_actor_get_mapped (_gtk_actor_get_parent (self)));
+
+ if (_gtk_actor_get_mapped (self))
+ return;
+
+ if (!_gtk_actor_get_visible (self))
+ return;
+
+ _gtk_actor_realize (self);
+
+ GTK_ACTOR_GET_CLASS (self)->map (self);
+}
+
+/**
+ * _gtk_actor_unmap:
+ * @self: A #GtkActor
+ *
+ * Unsets the mapped state on the actor and unmaps its children if they
+ * were mapped.
+ *
+ * Calling this function is not encouraged: the default #GtkActor
+ * implementation of #GtkActorClass.unmap() will also unmap any
+ * eventual children by default when their parent is unmapped.
+ *
+ * When overriding #GtkActorClass.unmap(), it is mandatory to
+ * chain up to the parent implementation.
+ *
+ * <note>It is important to note that the implementation of the
+ * #GtkActorClass.unmap() virtual function may be called after
+ * the #GObjectClass.dispose() implementation, but it is
+ * guaranteed to be called before the #GObjectClass.finalize()
+ * implementation.</note>
+ *
+ * Since: 1.0
+ */
+void
+_gtk_actor_unmap (GtkActor *self)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ if (!_gtk_actor_get_mapped (self))
+ return;
+
+ GTK_ACTOR_GET_CLASS (self)->unmap (self);
+}
+
+/**
+ * _gtk_actor_show:
+ * @self: A #GtkActor
+ *
+ * Flags an actor to be displayed. An actor that isn't shown will not
+ * be rendered on the stage.
+ *
+ * Actors are visible by default.
+ */
+void
+_gtk_actor_show (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ if (_gtk_actor_get_visible (self))
+ return;
+
+ priv = self->priv;
+
+ g_object_freeze_notify (G_OBJECT (self));
+
+ /* if we're showing a child that needs to expand, or may
+ * expand, then we need to recompute the expand flags for
+ * its parent as well
+ */
+ if (priv->parent &&
+ (priv->needs_compute_expand ||
+ priv->needs_x_expand ||
+ priv->needs_y_expand))
+ {
+ gtk_actor_queue_compute_expand (priv->parent);
+ }
+
+ GTK_ACTOR_GET_CLASS (self)->show (self);
+
+ if (priv->parent != NULL)
+ _gtk_actor_queue_redraw (priv->parent);
+
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * _gtk_actor_hide:
+ * @self: A #GtkActor
+ *
+ * Flags an actor to be hidden. A hidden actor will not be
+ * rendered on the stage.
+ *
+ * Actors are visible by default.
+ */
+void
+_gtk_actor_hide (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_if_fail (GTK_IS_ACTOR (self));
+
+ /* simple optimization */
+ if (!_gtk_actor_get_visible (self))
+ return;
+
+ priv = self->priv;
+
+ g_object_freeze_notify (G_OBJECT (self));
+
+ /* if we're hiding a child that needs to expand, or may
+ * expand, then we need to recompute the expand flags for
+ * its parent as well
+ */
+ if (priv->parent &&
+ (priv->needs_x_expand ||
+ priv->needs_y_expand))
+ {
+ gtk_actor_queue_compute_expand (priv->parent);
+ }
+
+ GTK_ACTOR_GET_CLASS (self)->hide (self);
+
+ if (priv->parent != NULL)
+ _gtk_actor_queue_redraw (priv->parent);
+
+ g_object_thaw_notify (G_OBJECT (self));
+}
+
+/**
+ * _gtk_actor_is_toplevel:
+ * @self: A #GtkActor
+ *
+ * Checks if the actor is a toplevel. Toplevel actors don't need
+ * to have a parent.
+ *
+ * Returns: %TRUE if actor can act as a toplevel
+ **/
+gboolean
+_gtk_actor_is_toplevel (GtkActor *self)
+{
+ g_return_val_if_fail (GTK_IS_ACTOR (self), FALSE);
+
+ /* XXX */
+ return self->priv->parent == NULL;
+}
+
+/**
+ * _gtk_actor_get_width:
+ * @self: A #GtkActor
+ *
+ * Retrieves the width of a #GtkActor.
+ *
+ * If the actor has a valid allocation and is visible, this function
+ * will return the width of the allocated area given to the actor.
+ *
+ * If the actor does not have a valid allocation or is not visible,
+ * this function will return 0.
+ *
+ * Return value: the width of the actor, in pixels
+ */
+gfloat
+_gtk_actor_get_width (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_val_if_fail (GTK_IS_ACTOR (self), 0);
+
+ priv = self->priv;
+
+ if (priv->needs_allocation ||
+ !_gtk_actor_get_visible (self))
+ return 0;
+
+ return priv->width;
+}
+
+/**
+ * _gtk_actor_get_height:
+ * @self: A #GtkActor
+ *
+ * Retrieves the height of a #GtkActor.
+ *
+ * If the actor has a valid allocation and is visible, this function
+ * will return the height of the allocated area given to the actor.
+ *
+ * If the actor does not have a valid allocation or is not visible,
+ * this function will return 0.
+ *
+ * Return value: the height of the actor, in pixels
+ */
+gfloat
+_gtk_actor_get_height (GtkActor *self)
+{
+ GtkActorPrivate *priv;
+
+ g_return_val_if_fail (GTK_IS_ACTOR (self), 0);
+
+ priv = self->priv;
+
+ if (priv->needs_allocation ||
+ !_gtk_actor_get_visible (self))
+ return 0;
+
+ return priv->height;
+}
+
+/**
+ * _gtk_actor_allocate:
+ * @self: A #ClutterActor
+ * @width: new width of the actor
+ * @height: new width of the actor
+ *
+ * Called by the parent of an actor to assign the actor its size.
+ * Should never be called by applications (except when implementing
+ * a container or layout manager).
+ *
+ * Since: 0.8
+ */
+void
+_gtk_actor_allocate (GtkActor *self,
+ gfloat width,
+ gfloat height)
+{
+ g_return_if_fail (GTK_IS_ACTOR (self));
+ g_return_if_fail (width >= 0);
+ g_return_if_fail (height >= 0);
+
+ if (!_gtk_actor_get_visible (self))
+ return;
+
+ GTK_ACTOR_GET_CLASS (self)->allocate (self, width, height);
+}
+
diff --git a/gtk/actors/gtkactorprivate.h b/gtk/actors/gtkactorprivate.h
index a058a6b..6b28813 100644
--- a/gtk/actors/gtkactorprivate.h
+++ b/gtk/actors/gtkactorprivate.h
@@ -22,4 +22,161 @@
#ifndef __GTK_ACTOR_PRIVATE_H__
#define __GTK_ACTOR_PRIVATE_H__
-#endif
+#include <glib-object.h>
+#include <cairo.h>
+#include <gtk/gtkenums.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_ACTOR (_gtk_actor_get_type ())
+#define GTK_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_ACTOR, GtkActor))
+#define GTK_ACTOR_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_ACTOR, GtkActorClass))
+#define GTK_IS_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_ACTOR))
+#define GTK_IS_ACTOR_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_ACTOR))
+#define GTK_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ACTOR, GtkActorClass))
+
+typedef struct _GtkActor GtkActor;
+typedef struct _GtkActorPrivate GtkActorPrivate;
+typedef struct _GtkActorClass GtkActorClass;
+typedef struct _GtkActorIter GtkActorIter;
+
+struct _GtkActor
+{
+ GInitiallyUnowned parent;
+
+ GtkActorPrivate *priv;
+};
+
+struct _GtkActorClass
+{
+ GInitiallyUnownedClass parent_class;
+
+ void (* show) (GtkActor *self);
+ void (* hide) (GtkActor *self);
+ void (* realize) (GtkActor *self);
+ void (* unrealize) (GtkActor *self);
+ void (* map) (GtkActor *self);
+ void (* unmap) (GtkActor *self);
+ void (* draw) (GtkActor *self);
+ void (* parent_set) (GtkActor *self,
+ GtkActor *old_parent);
+ void (* queue_relayout) (GtkActor *self);
+ void (* queue_redraw) (GtkActor *self,
+ const cairo_rectangle_t *box);
+
+ /* size negotiation */
+ GtkSizeRequestMode (* get_request_mode) (GtkActor *self);
+ void (* get_preferred_size) (GtkActor *self,
+ GtkOrientation orientation,
+ gfloat for_width,
+ gfloat *min_size_p,
+ gfloat *natural_size_p);
+ void (* position) (GtkActor *self,
+ const cairo_matrix_t *transform);
+ void (* allocate) (GtkActor *self,
+ gfloat width,
+ gfloat height);
+};
+
+/**
+ * GtkActorIter:
+ *
+ * An iterator structure that allows to efficiently iterate over a
+ * section of the scene graph.
+ *
+ * The contents of the <structname>GtkActorIter</structname> structure
+ * are private and should only be accessed using the provided API.
+ */
+struct _GtkActorIter
+{
+ /*< private >*/
+ gpointer dummy1;
+ gpointer dummy2;
+ gpointer dummy3;
+ gint dummy4;
+ gpointer dummy5;
+};
+
+GType _gtk_actor_get_type (void) G_GNUC_CONST;
+
+void _gtk_actor_show (GtkActor *self);
+void _gtk_actor_hide (GtkActor *self);
+void _gtk_actor_realize (GtkActor *self);
+void _gtk_actor_unrealize (GtkActor *self);
+void _gtk_actor_map (GtkActor *self);
+void _gtk_actor_unmap (GtkActor *self);
+void _gtk_actor_queue_redraw (GtkActor *self);
+void _gtk_actor_queue_redraw_area (GtkActor *self,
+ const cairo_rectangle_t *box);
+void _gtk_actor_queue_relayout (GtkActor *self);
+void _gtk_actor_set_visible (GtkActor *self,
+ gboolean visible);
+gboolean _gtk_actor_get_visible (GtkActor *self);
+gboolean _gtk_actor_get_mapped (GtkActor *self);
+gboolean _gtk_actor_get_realized (GtkActor *self);
+
+/* Size negotiation */
+GtkSizeRequestMode _gtk_actor_get_request_mode (GtkActor *self);
+void _gtk_actor_get_preferred_size (GtkActor *self,
+ GtkOrientation orientation,
+ gfloat for_size,
+ gfloat *min_size_p,
+ gfloat *natural_size_p);
+gfloat _gtk_actor_get_width (GtkActor *self);
+gfloat _gtk_actor_get_height (GtkActor *self);
+void _gtk_actor_allocate (GtkActor *self,
+ gfloat width,
+ gfloat height);
+const cairo_matrix_t * _gtk_actor_get_position (GtkActor *actor);
+/* XXX: Do we wanna support that?
+void _gtk_actor_position (GtkActor *actor,
+ const cairo_matrix_t * position);
+*/
+void _gtk_actor_position_at (GtkActor *actor,
+ gfloat x,
+ gfloat y);
+
+/* Text */
+void _gtk_actor_set_text_direction (GtkActor *self,
+ GtkTextDirection text_dir);
+GtkTextDirection _gtk_actor_get_text_direction (GtkActor *self);
+
+/* Actor hierarchy */
+void _gtk_actor_add_child (GtkActor *self,
+ GtkActor *child);
+void _gtk_actor_insert_child_at_index (GtkActor *self,
+ GtkActor *child,
+ gint index_);
+void _gtk_actor_insert_child_above (GtkActor *self,
+ GtkActor *child,
+ GtkActor *sibling);
+void _gtk_actor_insert_child_below (GtkActor *self,
+ GtkActor *child,
+ GtkActor *sibling);
+void _gtk_actor_remove_child (GtkActor *self,
+ GtkActor *child);
+void _gtk_actor_remove_all_children (GtkActor *self);
+gint _gtk_actor_get_n_children (GtkActor *self);
+GtkActor * _gtk_actor_get_child_at_index (GtkActor *self,
+ gint index_);
+GtkActor * _gtk_actor_get_previous_sibling (GtkActor *self);
+GtkActor * _gtk_actor_get_next_sibling (GtkActor *self);
+GtkActor * _gtk_actor_get_first_child (GtkActor *self);
+GtkActor * _gtk_actor_get_last_child (GtkActor *self);
+GtkActor * _gtk_actor_get_parent (GtkActor *self);
+gboolean _gtk_actor_contains (GtkActor *self,
+ GtkActor *descendant);
+void _gtk_actor_iter_init (GtkActorIter *iter,
+ GtkActor *root);
+gboolean _gtk_actor_iter_next (GtkActorIter *iter,
+ GtkActor **child);
+gboolean _gtk_actor_iter_prev (GtkActorIter *iter,
+ GtkActor **child);
+void _gtk_actor_iter_remove (GtkActorIter *iter);
+gboolean _gtk_actor_iter_is_valid (const GtkActorIter *iter);
+
+gboolean _gtk_actor_is_toplevel (GtkActor *actor);
+
+G_END_DECLS
+
+#endif /* __GTK_ACTOR_PRIVATE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]