| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Clutter.Structs.ActorIter
Description
An iterator structure that allows to efficiently iterate over a section of the scene graph.
The contents of the ActorIter structure
are private and should only be accessed using the provided API.
Since: 1.10
Synopsis
- newtype ActorIter = ActorIter (ManagedPtr ActorIter)
- newZeroActorIter :: MonadIO m => m ActorIter
- actorIterDestroy :: (HasCallStack, MonadIO m) => ActorIter -> m ()
- actorIterInit :: (HasCallStack, MonadIO m, IsActor a) => ActorIter -> a -> m ()
- actorIterIsValid :: (HasCallStack, MonadIO m) => ActorIter -> m Bool
- actorIterNext :: (HasCallStack, MonadIO m) => ActorIter -> m (Bool, Actor)
- actorIterPrev :: (HasCallStack, MonadIO m) => ActorIter -> m (Bool, Actor)
- actorIterRemove :: (HasCallStack, MonadIO m) => ActorIter -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq ActorIter Source # | |
| BoxedPtr ActorIter Source # | |
Defined in GI.Clutter.Structs.ActorIter | |
| CallocPtr ActorIter Source # | |
Defined in GI.Clutter.Structs.ActorIter Methods boxedPtrCalloc :: IO (Ptr ActorIter) | |
| ManagedPtrNewtype ActorIter Source # | |
Defined in GI.Clutter.Structs.ActorIter Methods toManagedPtr :: ActorIter -> ManagedPtr ActorIter | |
| tag ~ 'AttrSet => Constructible ActorIter tag Source # | |
newZeroActorIter :: MonadIO m => m ActorIter Source #
Construct a ActorIter struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
destroy
Arguments
| :: (HasCallStack, MonadIO m) | |
| => ActorIter |
|
| -> m () |
Safely destroys the Actor currently pointer to by the iterator
from its parent.
This function can only be called after actorIterNext or
actorIterPrev returned True, and cannot be called more
than once for the same actor.
This function will call actorDestroy internally.
Since: 1.10
init
Arguments
| :: (HasCallStack, MonadIO m, IsActor a) | |
| => ActorIter |
|
| -> a |
|
| -> m () |
Initializes a 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.
C code
ClutterActorIter iter;
ClutterActor *child;
clutter_actor_iter_init (&iter, container);
while (clutter_actor_iter_next (&iter, &child))
{
// do something with child
}Since: 1.10
isValid
Arguments
| :: (HasCallStack, MonadIO m) | |
| => ActorIter |
|
| -> m Bool |
next
Arguments
| :: (HasCallStack, MonadIO m) | |
| => ActorIter |
|
| -> m (Bool, Actor) | Returns: |
Advances the iter and retrieves the next child of the root 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.
Since: 1.10
prev
Arguments
| :: (HasCallStack, MonadIO m) | |
| => ActorIter |
|
| -> m (Bool, Actor) | Returns: |
Advances the iter and retrieves the previous child of the root
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.
Since: 1.10
remove
Arguments
| :: (HasCallStack, MonadIO m) | |
| => ActorIter |
|
| -> m () |
Safely removes the Actor currently pointer to by the iterator
from its parent.
This function can only be called after actorIterNext or
actorIterPrev returned True, and cannot be called more
than once for the same actor.
This function will call actorRemoveChild internally.
Since: 1.10