## GESContainer GESContainer — Base Class for objects responsible for controlling other GESTimelineElement-s |

## Functions

#define | GES_CONTAINER_CHILDREN()
#define | GES_CONTAINER_HEIGHT()
GList * | ges_container_get_children ()
gboolean | ges_container_add ()
gboolean | ges_container_remove ()
GList * | ges_container_ungroup ()
GESContainer * | ges_container_group ()
gboolean | ges_container_edit ()

## Types and Values

| GESContainer
| GESContainerClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GESTimelineElement
                ╰── GESContainer
                    ├── GESClip
                    ╰── GESGroup

## Implemented Interfaces

GESContainer implements GESExtractable and GESMetaContainer.

## Includes

    #include <ges/ges.h>

## Description

## Functions

### GES_CONTAINER_CHILDREN()

    #define GES_CONTAINER_CHILDREN(obj) (((GESContainer*)obj)->children)

A GList containing the children of `object`

#### Parameters

obj | a GESContainer |

### GES_CONTAINER_HEIGHT()

    #define GES_CONTAINER_HEIGHT(obj) (((GESContainer*)obj)->height)

The span of priorities this object occupies.

#### Parameters

obj | a GESContainer |

### ges_container_get_children ()

    GList *
    ges_container_get_children (GESContainer *container,
                                gboolean recursive);

Get the list of GESTimelineElement contained in `container` The user is responsible for unreffing the contained objects and freeing the list.

#### Parameters

container | a GESContainer |
recursive | Whether to recursively get children in `container` |

#### Returns

The list of timeline element contained in `container` .

[transfer full][element-type GESTimelineElement]

### ges_container_add ()

    gboolean
    ges_container_add (GESContainer *container,
                       GESTimelineElement *child);

Add the GESTimelineElement to the container.

#### Parameters

container | a GESContainer |
child | the GESTimelineElement |

#### Returns

`TRUE` on success, `FALSE` on failure.

### ges_container_remove ()

    gboolean
    ges_container_remove (GESContainer *container,
                          GESTimelineElement *child);

Release the `child` from the control of `container` .

#### Parameters

container | a GESContainer |
child | the GESTimelineElement to release |

#### Returns

`TRUE` if the `child` was properly released, else `FALSE`.

### ges_container_ungroup ()

    GList *
    ges_container_ungroup (GESContainer *container,
                           gboolean recursive);

Ungroups the GESTimelineElement contained in this GESContainer, creating new GESContainer containing those GESTimelineElement apropriately.

#### Parameters

container | The GESContainer to ungroup. | [transfer full]
recursive | Wether to recursively ungroup `container` |

#### Returns

The list of GESContainer resulting from the ungrouping operation The user is responsible for unreffing the contained objects and freeing the list.

[transfer full][element-type GESContainer]

### ges_container_group ()

    GESContainer *
    ges_container_group (GList *containers);

Groups the GESContainer-s provided in `containers` . It creates a subclass of GESContainer, depending on the containers provided in `containers` . Basically, if all the containers in `containers` should be contained in a same clip (all the GESTrackElement they contain have the exact same start/inpoint/duration and are in the same layer), it will create a GESClip otherwise a GESGroup will be created

#### Parameters

containers | The GESContainer to group, they must all be in a same GESTimeline. | [transfer none][element-type GESContainer][allow-none]

#### Returns

The GESContainer (subclass) resulting of the grouping.

[transfer none]

### ges_container_edit ()

    gboolean
    ges_container_edit (GESContainer *container,
                        GList *layers,
                        gint new_layer_priority,
                        GESEditMode mode,
                        GESEdge edge,
                        guint64 position);

Edit `container` in the different exisiting GESEditMode modes. In the case of slide, and roll, you need to specify a GESEdge

#### Parameters

container | the GESClip to edit |
layers | The layers you want the edit to happen in, `NULL` means that the edition is done in all the GESLayers contained in the current timeline. | [element-type GESLayer]
new_layer_priority | The priority of the layer `container` should land in. If the layer you're trying to move the container to doesn't exist, it will be created automatically. -1 means no move. |
mode | The GESEditMode in which the editition will happen. |
edge | The GESEdge the edit should happen on. |
position | The position at which to edit `container` (in nanosecond) |

#### Returns

`TRUE` if the container as been edited properly, `FALSE` if an error occured

## Types and Values

### GESContainer

    typedef struct {
      /*< readonly >*/
      GList *children;

      /* We don't add those properties to the priv struct for optimization and code
       * readability purposes */
      guint32 height;       /* the span of priorities this object needs */
    } GESContainer;

The GESContainer base class.

#### Members

GList *`children`; | A list of TimelineElement controlled by this Container. NOTE: Do not modify. | [element-type GES.TimelineElement]
guint32 `height`; | The span of priorities this container occupies |

### GESContainerClass

    typedef struct {
      /* signals */
      void (*child_added)             (GESContainer *container, GESTimelineElement *element);
      void (*child_removed)           (GESContainer *container, GESTimelineElement *element);
      gboolean (*add_child)           (GESContainer *container, GESTimelineElement *element);
      gboolean (*remove_child)        (GESContainer *container, GESTimelineElement *element);
      GList* (*ungroup)               (GESContainer *container, gboolean recursive);
      GESContainer * (*group)         (GList *containers);
      gboolean (*edit)                (GESContainer * container,
                                       GList * layers, gint new_layer_priority,
                                       GESEditMode mode,
                                       GESEdge edge,
                                       guint64 position);
    } GESContainerClass;

#### Members

`child_added` () | Virtual method that is called right after a GESTimelineElement is added |
`child_removed` () | Virtual method that is called right after a GESTimelineElement is removed |
`add_child` () | Virtual method to add a child |
`remove_child` () | Virtual method to remove a child |
`ungroup` () | Ungroups the GESTimelineElement contained in this GESContainer, creating new |
`group` () | Groups the GESContainers together GESContainer containing those GESTimelineElement apropriately. |
`edit` () |  |