actor: Add ClutterActorIter

Iterating over children and ancestors of an actor is a relatively common
operation. Currently, you only have one option: start a for() loop, get
the first child of the actor, and advance to the next sibling for the
list of children; or start a for() loop and advance to the parent of the
actor.

These operations can be easily done through the ClutterActor API, but
they all require going through the public API, and performing multiple
type checks on the arguments.

Along with the DOM API, it would be nice to have an ancillary, utility
API that uses an iterator structure to hold the state, and can be
advanced in a loop.

https://bugzilla.gnome.org/show_bug.cgi?id=668669
This commit is contained in:
Emmanuele Bassi
2012-01-25 15:27:57 +00:00
parent fa856e3f5e
commit 58ffcfb10e
8 changed files with 385 additions and 13 deletions

View File

@@ -403,6 +403,13 @@ clutter_actor_set_child_at_index
clutter_actor_set_child_below_sibling
clutter_actor_contains
clutter_actor_get_stage
ClutterActorIter
clutter_actor_iter_init
clutter_actor_iter_next
clutter_actor_iter_prev
clutter_actor_iter_remove
<SUBSECTION>
clutter_actor_push_internal
clutter_actor_pop_internal
clutter_actor_set_parent