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.Objects.ChildMeta

Description

Base interface for container specific state for child actors. A child data is meant to be used when you need to keep track of information about each individual child added to a container.

In order to use it you should create your own subclass of ChildMeta and set the ContainerIface child_meta_type interface member to your subclass type, like:

static void
my_container_iface_init (ClutterContainerIface *iface)
{
  // set the rest of the #ClutterContainer vtable

  container_iface->child_meta_type  = MY_TYPE_CHILD_META;
}

This will automatically create a ChildMeta of type MY_TYPE_CHILD_META for every actor that is added to the container.

The child data for an actor can be retrieved using the containerGetChildMeta function.

The properties of the data and your subclass can be manipulated with clutter_container_child_set() and clutter_container_child_get() which act like g_object_set() and g_object_get().

You can provide hooks for your own storage as well as control the instantiation by overriding the ContainerIface virtual functions ContainerIface.create_child_meta(), ContainerIface.destroy_child_meta(), and ContainerIface.get_child_meta().

Since: 0.8

Synopsis

Exported types

newtype ChildMeta Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf ChildMeta o) => IsChildMeta o Source #

Type class for types which can be safely cast to ChildMeta, for instance with toChildMeta.

Instances

Instances details
(GObject o, IsDescendantOf ChildMeta o) => IsChildMeta o Source # 
Instance details

Defined in GI.Clutter.Objects.ChildMeta

toChildMeta :: (MonadIO m, IsChildMeta o) => o -> m ChildMeta Source #

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

Methods

getActor

childMetaGetActor Source #

Arguments

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

data: a ChildMeta

-> m Actor

Returns: a Actor

Retrieves the actor wrapped by data

Since: 0.8

getContainer

childMetaGetContainer Source #

Arguments

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

data: a ChildMeta

-> m Container

Returns: a Container

Retrieves the container using data

Since: 0.8

Properties

actor

The Actor being wrapped by this ChildMeta

Since: 0.8

constructChildMetaActor :: (IsChildMeta o, MonadIO m, IsActor a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “actor” property. This is rarely needed directly, but it is used by new.

getChildMetaActor :: (MonadIO m, IsChildMeta o) => o -> m Actor Source #

Get the value of the “actor” property. When overloading is enabled, this is equivalent to

get childMeta #actor

container

The Container that created this ChildMeta.

Since: 0.8

constructChildMetaContainer :: (IsChildMeta o, MonadIO m, IsContainer a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “container” property. This is rarely needed directly, but it is used by new.

getChildMetaContainer :: (MonadIO m, IsChildMeta o) => o -> m Container Source #

Get the value of the “container” property. When overloading is enabled, this is equivalent to

get childMeta #container