gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Exported types

newtype ActorIter Source #

Memory-managed wrapper type.

Constructors

ActorIter (ManagedPtr ActorIter) 

Instances

Instances details
Eq ActorIter Source # 
Instance details

Defined in GI.Clutter.Structs.ActorIter

BoxedPtr ActorIter Source # 
Instance details

Defined in GI.Clutter.Structs.ActorIter

CallocPtr ActorIter Source # 
Instance details

Defined in GI.Clutter.Structs.ActorIter

ManagedPtrNewtype ActorIter Source # 
Instance details

Defined in GI.Clutter.Structs.ActorIter

Methods

toManagedPtr :: ActorIter -> ManagedPtr ActorIter

tag ~ 'AttrSet => Constructible ActorIter tag Source # 
Instance details

Defined in GI.Clutter.Structs.ActorIter

Methods

new :: MonadIO m => (ManagedPtr ActorIter -> ActorIter) -> [AttrOp ActorIter tag] -> m ActorIter

newZeroActorIter :: MonadIO m => m ActorIter Source #

Construct a ActorIter struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

destroy, init, isValid, next, prev, remove.

Getters

None.

Setters

None.

destroy

actorIterDestroy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorIter

iter: a 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

actorIterInit Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> ActorIter

iter: a ActorIter

-> a

root: a Actor

-> 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

actorIterIsValid Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorIter

iter: a ActorIter

-> m Bool

Returns: True if the iterator is valid, and False otherwise

Checks whether a ActorIter is still valid.

An iterator is considered valid if it has been initialized, and if the Actor that it refers to hasn't been modified after the initialization.

Since: 1.12

next

actorIterNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorIter

iter: a ActorIter

-> m (Bool, Actor)

Returns: True if the iterator could advance, and False otherwise.

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

actorIterPrev Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorIter

iter: a ActorIter

-> m (Bool, Actor)

Returns: True if the iterator could advance, and False otherwise.

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

actorIterRemove Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorIter

iter: a 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