gi-clutter-1.0.2: 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.Interfaces.Container

Description

Container is an opaque structure whose members cannot be directly accessed

Since: 0.4

Synopsis

Exported types

newtype Container Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf Container o) => IsContainer o Source #

Type class for types which can be safely cast to Container, for instance with toContainer.

Instances

Instances details
(GObject o, IsDescendantOf Container o) => IsContainer o Source # 
Instance details

Defined in GI.Clutter.Interfaces.Container

toContainer :: (MonadIO m, IsContainer o) => o -> m Container Source #

Cast to Container, for types for which this is known to be safe. For general casts, use castTo.

Methods

addActor

containerAddActor Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

actor: the first Actor to add

-> m () 

Deprecated: (Since version 1.10)Use actorAddChild instead.

Adds a Actor to container. This function will emit the "actor-added" signal. The actor should be parented to container. You cannot add a Actor to more than one Container.

This function will call ContainerIface.add(), which is a deprecated virtual function. The default implementation will call actorAddChild.

Since: 0.4

childGetProperty

containerChildGetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

child: a Actor that is a child of container.

-> Text

property: the name of the property to set.

-> GValue

value: the value.

-> m () 

Gets a container specific property of a child of container, In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling valueUnset.

Note that containerChildSetProperty is really intended for language bindings, clutter_container_child_set() is much more convenient for C programming.

Since: 0.8

childNotify

containerChildNotify Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

child: a Actor

-> GParamSpec

pspec: a ParamSpec

-> m () 

Calls the ContainerIface.child_notify() virtual function of Container. The default implementation will emit the childNotify signal.

Since: 1.6

childSetProperty

containerChildSetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

child: a Actor that is a child of container.

-> Text

property: the name of the property to set.

-> GValue

value: the value.

-> m () 

Sets a container-specific property on a child of container.

Since: 0.8

classFindChildProperty

containerClassFindChildProperty Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ObjectClass

klass: a ObjectClass implementing the Container interface.

-> Text

propertyName: a property name.

-> m GParamSpec

Returns: The ParamSpec for the property or Nothing if no such property exist.

Looks up the ParamSpec for a child property of klass.

Since: 0.8

createChildMeta

containerCreateChildMeta Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

actor: a Actor

-> m () 

Creates the ChildMeta wrapping actor inside the container, if the ContainerIface::child_meta_type class member is not set to G_TYPE_INVALID.

This function is only useful when adding a Actor to a Container implementation outside of the Container::add() virtual function implementation.

Applications should not call this function.

Since: 1.2

destroyChildMeta

containerDestroyChildMeta Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

actor: a Actor

-> m () 

Destroys the ChildMeta wrapping actor inside the container, if any.

This function is only useful when removing a Actor to a Container implementation outside of the Container::add() virtual function implementation.

Applications should not call this function.

Since: 1.2

findChildByName

containerFindChildByName Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: a Container

-> Text

childName: the name of the requested child.

-> m Actor

Returns: The child actor with the requested name, or Nothing if no actor with that name was found.

Finds a child actor of a container by its name. Search recurses into any child container.

Since: 0.6

foreach

containerForeach Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: a Container

-> Callback

callback: a function to be called for each child

-> m () 

Deprecated: (Since version 1.10)Use actorGetFirstChild or actorGetLastChild to retrieve the beginning of the list of children, and actorGetNextSibling and actorGetPreviousSibling to iterate over it; alternatively, use the ActorIter API.

Calls callback for each child of container that was added by the application (with containerAddActor). Does not iterate over "internal" children that are part of the container's own implementation, if any.

This function calls the ContainerIface.foreach() virtual function, which has been deprecated.

Since: 0.4

foreachWithInternals

containerForeachWithInternals Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: a Container

-> Callback

callback: a function to be called for each child

-> m () 

Deprecated: (Since version 1.10)See containerForeach.

Calls callback for each child of container, including "internal" children built in to the container itself that were never added by the application.

This function calls the ContainerIface.foreach_with_internals() virtual function, which has been deprecated.

Since: 1.0

getChildMeta

containerGetChildMeta Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

actor: a Actor that is a child of container.

-> m ChildMeta

Returns: the ChildMeta for the actor child of container or Nothing if the specifiec actor does not exist or the container is not configured to provide ChildMetas

Retrieves the ChildMeta which contains the data about the container specific state for actor.

Since: 0.8

getChildren

containerGetChildren Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: a Container

-> m [Actor]

Returns: a list of Actors. Use g_list_free() on the returned list when done.

Deprecated: (Since version 1.10)Use actorGetChildren instead.

Retrieves all the children of container.

Since: 0.4

lowerChild

containerLowerChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b, IsActor c) 
=> a

container: a Container

-> b

actor: the actor to raise

-> Maybe c

sibling: the sibling to lower to, or Nothing to lower to the bottom

-> m () 

Deprecated: (Since version 1.10)Use actorSetChildBelowSibling instead.

Lowers actor to sibling level, in the depth ordering.

This function calls the ContainerIface.lower() virtual function, which has been deprecated. The default implementation will call actorSetChildBelowSibling.

Since: 0.6

raiseChild

containerRaiseChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b, IsActor c) 
=> a

container: a Container

-> b

actor: the actor to raise

-> Maybe c

sibling: the sibling to raise to, or Nothing to raise to the top

-> m () 

Deprecated: (Since version 1.10)Use actorSetChildAboveSibling instead.

Raises actor to sibling level, in the depth ordering.

This function calls the ContainerIface.raise() virtual function, which has been deprecated. The default implementation will call actorSetChildAboveSibling.

Since: 0.6

removeActor

containerRemoveActor Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a, IsActor b) 
=> a

container: a Container

-> b

actor: a Actor

-> m () 

Deprecated: (Since version 1.10)Use actorRemoveChild instead.

Removes actor from container. The actor should be unparented, so if you want to keep it around you must hold a reference to it yourself, using objectRef. When the actor has been removed, the "actor-removed" signal is emitted by container.

This function will call ContainerIface.remove(), which is a deprecated virtual function. The default implementation will call actorRemoveChild.

Since: 0.4

sortDepthOrder

containerSortDepthOrder Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainer a) 
=> a

container: a Container

-> m () 

Deprecated: (Since version 1.10)The ContainerIface.sort_depth_order() virtual function should not be used any more; the default implementation in Container does not do anything.

Sorts a container's children using their depth. This function should not be normally used by applications.

Since: 0.6

Signals

actorAdded

type ContainerActorAddedCallback Source #

Arguments

 = Actor

actor: the new child that has been added to container

-> IO () 

The actorAdded signal is emitted each time an actor has been added to container.

Since: 0.4

afterContainerActorAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerActorAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the actorAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after container #actorAdded callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onContainerActorAdded :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerActorAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the actorAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on container #actorAdded callback

actorRemoved

type ContainerActorRemovedCallback Source #

Arguments

 = Actor

actor: the child that has been removed from container

-> IO () 

The actorRemoved signal is emitted each time an actor is removed from container.

Since: 0.4

afterContainerActorRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerActorRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the actorRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after container #actorRemoved callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onContainerActorRemoved :: (IsContainer a, MonadIO m) => a -> ((?self :: a) => ContainerActorRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the actorRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on container #actorRemoved callback

childNotify

type ContainerChildNotifyCallback Source #

Arguments

 = Actor

actor: the child that has had a property set

-> GParamSpec

pspec: the ParamSpec of the property set

-> IO () 

The childNotify signal is emitted each time a property is being set through the clutter_container_child_set() and containerChildSetProperty calls.

Since: 0.8

afterContainerChildNotify :: (IsContainer a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ContainerChildNotifyCallback) -> m SignalHandlerId Source #

Connect a signal handler for the childNotify signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after container #childNotify callback

This signal admits a optional parameter detail. If it's not Nothing, we will connect to “child-notify::detail” instead.

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onContainerChildNotify :: (IsContainer a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ContainerChildNotifyCallback) -> m SignalHandlerId Source #

Connect a signal handler for the childNotify signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on container #childNotify callback

This signal admits a optional parameter detail. If it's not Nothing, we will connect to “child-notify::detail” instead.