## ClutterChildMeta

ClutterChildMeta — Wrapper for actors inside a container

## Synopsis

                        ClutterChildMeta;
    struct              ClutterChildMetaClass;
    ClutterContainer *  clutter_child_meta_get_container    (ClutterChildMeta *data);
    ClutterActor *      clutter_child_meta_get_actor        (ClutterChildMeta *data);

## Object Hierarchy

      GObject
       +----ClutterChildMeta
             +----ClutterLayoutMeta

## Properties

      "actor"                    ClutterActor*         : Read / Write / Construct Only
      "container"                ClutterContainer*     : Read / Write / Construct Only

## Description

ClutterChildMeta is a wrapper object created by ClutterContainer implementations in order to store child-specific data and properties.

A ClutterChildMeta wraps a ClutterActor inside a ClutterContainer.

ClutterChildMeta is available since Clutter 0.8

## Details

### ClutterChildMeta

    typedef struct {
      ClutterContainer *container;
      ClutterActor *actor;
    } ClutterChildMeta;

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 ClutterChildMeta and set the ClutterContainerIface child_meta_type interface member to your subclass type, like:

    1
    2
    3
    4
    5
    6
    7

    static void
    my_container_iface_init (ClutterContainerIface *iface)
    {
      /* set the rest of the <a class="link" href="ClutterContainer.html" title="ClutterContainer">ClutterContainer</a> vtable */

      container_iface->child_meta_type  = MY_TYPE_CHILD_META;
    }

This will automatically create a ClutterChildMeta 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 `clutter_container_get_child_meta()` 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 ClutterContainerIface virtual functions `create_child_meta`, `destroy_child_meta`, and `get_child_meta`.

ClutterContainer *`container`; | the container handling this data
ClutterActor *`actor`; | the actor wrapped by this data

Since 0.8

### struct ClutterChildMetaClass

    struct ClutterChildMetaClass {
    };

The ClutterChildMetaClass contains only private data

Since 0.8

### clutter_child_meta_get_container ()

    ClutterContainer *  clutter_child_meta_get_container    (ClutterChildMeta *data);

Retrieves the container using `data`

`data` : | a ClutterChildMeta
Returns : | a ClutterContainer. [transfer none]

Since 0.8

### clutter_child_meta_get_actor ()

    ClutterActor *      clutter_child_meta_get_actor        (ClutterChildMeta *data);

Retrieves the actor wrapped by `data`

`data` : | a ClutterChildMeta
Returns : | a ClutterActor. [transfer none]

Since 0.8

## Property Details

### The `"actor"` property

      "actor"                    ClutterActor*         : Read / Write / Construct Only

The ClutterActor being wrapped by this ClutterChildMeta

Since 0.8

### The `"container"` property

      "container"                ClutterContainer*     : Read / Write / Construct Only

The ClutterContainer that created this ClutterChildMeta.

Since 0.8