Clutter.ActorIter¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
dummy1 |
r |
||
dummy2 |
r |
||
dummy3 |
r |
||
dummy4 |
r |
||
dummy5 |
r |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Clutter.ActorIter¶
An iterator structure that allows to efficiently iterate over a section of the scene graph.
The contents of the
Clutter.ActorIter
structure are private and should only be accessed using the provided API.New in version 1.10.
- destroy()¶
Safely destroys the
Clutter.Actor
currently pointer to by the iterator from its parent.This function can only be called after
Clutter.ActorIter.next
() orClutter.ActorIter.prev
() returnedTrue
, and cannot be called more than once for the same actor.This function will call
Clutter.Actor.destroy
() internally.New in version 1.10.
- init(root)¶
- Parameters:
root (
Clutter.Actor
) – aClutter.Actor
Initializes a
Clutter.ActorIter
, 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.
ClutterActorIter iter; ClutterActor *child; clutter_actor_iter_init (&iter, container); while (clutter_actor_iter_next (&iter, &child)) { // do something with child }
New in version 1.10.
- is_valid()¶
-
Checks whether a
Clutter.ActorIter
is still valid.An iterator is considered valid if it has been initialized, and if the
Clutter.Actor
that it refers to hasn’t been modified after the initialization.New in version 1.12.
- next()¶
- Returns:
True
if the iterator could advance, andFalse
otherwise.- child:
return location for a
Clutter.Actor
- Return type:
(
bool
, child:Clutter.Actor
)
Advances the self and retrieves the next child of the root
Clutter.Actor
that was used to initialize the #ClutterActorIterator.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.New in version 1.10.
- prev()¶
- Returns:
True
if the iterator could advance, andFalse
otherwise.- child:
return location for a
Clutter.Actor
- Return type:
(
bool
, child:Clutter.Actor
)
Advances the self and retrieves the previous child of the root
Clutter.Actor
that was used to initialize the #ClutterActorIterator.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.New in version 1.10.
- remove()¶
Safely removes the
Clutter.Actor
currently pointer to by the iterator from its parent.This function can only be called after
Clutter.ActorIter.next
() orClutter.ActorIter.prev
() returnedTrue
, and cannot be called more than once for the same actor.This function will call
Clutter.Actor.remove_child
() internally.New in version 1.10.