# GESContainer

A GESContainer is a timeline element that controls other GESTimelineElement-s, which are its children. In particular, it is responsible for maintaining the relative start and duration times of its children. Therefore, if a container is temporally adjusted or moved to a new layer, it may accordingly adjust and move its children. Similarly, a change in one of its children may prompt the parent to correspondingly change its siblings.

## GESContainer

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

Note, you may read, but should not modify these properties.

### Members

`parent` (GESTimelineElement) –
No description available
`children` (GList *) –

The list of GESTimelineElement-s controlled by this Container

`height` (guint32) –

The height of obj

`children_control_mode` (GESChildrenControlMode) –
No description available
`initiated_move` (GESTimelineElement *) –
No description available

### Class structure

#### GESContainerClass

### GES.ContainerClass

## GES.Container

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──GES.TimelineElement
                ╰──GES.Container
                    ╰──GES.Clip
                    ╰──GES.Group

Note, you may read, but should not modify these properties.

### Members

`parent` (GES.TimelineElement) –
No description available
`children` ([ GES.TimelineElement ]) –

The list of GES.TimelineElement-s controlled by this Container

`height` (Number) –

The height of obj

`children_control_mode` (GES.ChildrenControlMode) –
No description available
`initiated_move` (GES.TimelineElement) –
No description available

## GES.Container

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──GES.TimelineElement
                ╰──GES.Container
                    ╰──GES.Clip
                    ╰──GES.Group

Note, you may read, but should not modify these properties.

### Members

`parent` (GES.TimelineElement) –
No description available
`children` ([ GES.TimelineElement ]) –

The list of GES.TimelineElement-s controlled by this Container

`height` (int) –

The height of obj

`children_control_mode` (GES.ChildrenControlMode) –
No description available
`initiated_move` (GES.TimelineElement) –
No description available

### Methods

#### ges_container_add

    gboolean
    ges_container_add (GESContainer * container,
                       GESTimelineElement * child)

Adds a timeline element to the container. The element will now be a child of the container (and the container will be the parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.

Additionally, the children properties of the newly added element will be shared with the container, meaning they can also be read and set using ges_timeline_element_get_child_property and ges_timeline_element_set_child_property on the container.

Parameters:

`container` –

A GESContainer

`child` –

The element to add as a child

Returns –

TRUE if child was successfully added to container.

#### GES.Container.prototype.add

    function GES.Container.prototype.add(child: GES.TimelineElement): {
        // javascript wrapper for 'ges_container_add'
    }

Adds a timeline element to the container. The element will now be a child of the container (and the container will be the parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.

Additionally, the children properties of the newly added element will be shared with the container, meaning they can also be read and set using GES.TimelineElement.prototype.get_child_property and GES.TimelineElement.prototype.set_child_property on the container.

Parameters:

`container` (GES.Container) –

A GES.Container

`child` (GES.TimelineElement) –

The element to add as a child

Returns (Number) –

true if child was successfully added to container.

#### GES.Container.add

    def GES.Container.add (self, child):
        #python wrapper for 'ges_container_add'

Adds a timeline element to the container. The element will now be a child of the container (and the container will be the parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.

Additionally, the children properties of the newly added element will be shared with the container, meaning they can also be read and set using GES.TimelineElement.get_child_property and GES.TimelineElement.set_child_property on the container.

Parameters:

`container` (GES.Container) –

A GES.Container

`child` (GES.TimelineElement) –

The element to add as a child

Returns (bool) –

True if child was successfully added to container.

#### ges_container_edit

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

Edits the container within its timeline.

Parameters:

`container` –

The GESContainer to edit

`layers` ( [element-typeGESLayer][nullable]) –

A whitelist of layers where the edit can be performed, NULL allows all layers in the timeline

`new_layer_priority` –

The priority/index of the layer container should be moved to. -1 means no move

`mode` –

The edit mode

`edge` –

The edge of container where the edit should occur

`position` –

The edit position: a new location for the edge of container (in nanoseconds)

Returns –

TRUE if the edit of container completed, FALSE on failure.

deprecated : 1.18: use #ges_timeline_element_edit instead.

#### GES.Container.prototype.edit

    function GES.Container.prototype.edit(layers: [ GES.Layer ], new_layer_priority: Number, mode: GES.EditMode, edge: GES.Edge, position: Number): {
        // javascript wrapper for 'ges_container_edit'
    }

Edits the container within its timeline.

Parameters:

`container` (GES.Container) –

The GES.Container to edit

`layers` ([ GES.Layer ]) –

A whitelist of layers where the edit can be performed, null allows all layers in the timeline

`new_layer_priority` (Number) –

The priority/index of the layer container should be moved to. -1 means no move

`mode` (GES.EditMode) –

The edit mode

`edge` (GES.Edge) –

The edge of container where the edit should occur

`position` (Number) –

The edit position: a new location for the edge of container (in nanoseconds)

Returns (Number) –

true if the edit of container completed, false on failure.

deprecated : 1.18: use #ges_timeline_element_edit instead.

#### GES.Container.edit

    def GES.Container.edit (self, layers, new_layer_priority, mode, edge, position):
        #python wrapper for 'ges_container_edit'

Edits the container within its timeline.

Parameters:

`container` (GES.Container) –

The GES.Container to edit

`layers` ([ GES.Layer ]) –

A whitelist of layers where the edit can be performed, None allows all layers in the timeline

`new_layer_priority` (int) –

The priority/index of the layer container should be moved to. -1 means no move

`mode` (GES.EditMode) –

The edit mode

`edge` (GES.Edge) –

The edge of container where the edit should occur

`position` (int) –

The edit position: a new location for the edge of container (in nanoseconds)

Returns (bool) –

True if the edit of container completed, False on failure.

deprecated : 1.18: use #ges_timeline_element_edit instead.

#### ges_container_get_children

    GList *
    ges_container_get_children (GESContainer * container,
                                gboolean recursive)

Get the list of timeline elements contained in the container. If recursive is TRUE, and the container contains other containers as children, then their children will be added to the list, in addition to themselves, and so on.

Parameters:

`container` –

A GESContainer

`recursive` –

Whether to recursively get children in container

Returns ( [transfer: full][element-typeGESTimelineElement]) –

The list of GESTimelineElement-s contained in container.

#### GES.Container.prototype.get_children

    function GES.Container.prototype.get_children(recursive: Number): {
        // javascript wrapper for 'ges_container_get_children'
    }

Get the list of timeline elements contained in the container. If recursive is true, and the container contains other containers as children, then their children will be added to the list, in addition to themselves, and so on.

Parameters:

`container` (GES.Container) –

A GES.Container

`recursive` (Number) –

Whether to recursively get children in container

Returns ([ GES.TimelineElement ]) –

The list of GES.TimelineElement-s contained in container.

#### GES.Container.get_children

    def GES.Container.get_children (self, recursive):
        #python wrapper for 'ges_container_get_children'

Get the list of timeline elements contained in the container. If recursive is True, and the container contains other containers as children, then their children will be added to the list, in addition to themselves, and so on.

Parameters:

`container` (GES.Container) –

A GES.Container

`recursive` (bool) –

Whether to recursively get children in container

Returns ([ GES.TimelineElement ]) –

The list of GES.TimelineElement-s contained in container.

#### ges_container_remove

    gboolean
    ges_container_remove (GESContainer * container,
                          GESTimelineElement * child)

Removes a timeline element from the container. The element will no longer be controlled by the container.

Parameters:

`container` –

A GESContainer

`child` –

The child to remove

Returns –

TRUE if child was successfully removed from container.

#### GES.Container.prototype.remove

    function GES.Container.prototype.remove(child: GES.TimelineElement): {
        // javascript wrapper for 'ges_container_remove'
    }

Removes a timeline element from the container. The element will no longer be controlled by the container.

Parameters:

`container` (GES.Container) –

A GES.Container

`child` (GES.TimelineElement) –

The child to remove

Returns (Number) –

true if child was successfully removed from container.

#### GES.Container.remove

    def GES.Container.remove (self, child):
        #python wrapper for 'ges_container_remove'

Removes a timeline element from the container. The element will no longer be controlled by the container.

Parameters:

`container` (GES.Container) –

A GES.Container

`child` (GES.TimelineElement) –

The child to remove

Returns (bool) –

True if child was successfully removed from container.

#### ges_container_ungroup

    GList *
    ges_container_ungroup (GESContainer * container,
                           gboolean recursive)

Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A GESGroup will simply split into its children. A GESClip will split into one GESClip per GESTrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the GESTrackElement-s from the original clip with a matching track-type.

If recursive is TRUE, and the container contains other containers as children, then they will also be ungrouped, and so on.

Parameters:

`container` ( [transfer: full]) –

The container to ungroup

`recursive` –

Whether to recursively ungroup container

Returns ( [transfer: full][element-typeGESContainer]) –

The list of new GESContainer-s created from the splitting of container.

#### GES.Container.prototype.ungroup

    function GES.Container.prototype.ungroup(recursive: Number): {
        // javascript wrapper for 'ges_container_ungroup'
    }

Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A GES.Group will simply split into its children. A GES.Clip will split into one GES.Clip per GES.TrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the GES.TrackElement-s from the original clip with a matching track-type.

If recursive is true, and the container contains other containers as children, then they will also be ungrouped, and so on.

Parameters:

`container` (GES.Container) –

The container to ungroup

`recursive` (Number) –

Whether to recursively ungroup container

Returns ([ GES.Container ]) –

The list of new GES.Container-s created from the splitting of container.

#### GES.Container.ungroup

    def GES.Container.ungroup (self, recursive):
        #python wrapper for 'ges_container_ungroup'

Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A GES.Group will simply split into its children. A GES.Clip will split into one GES.Clip per GES.TrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the GES.TrackElement-s from the original clip with a matching track_type.

If recursive is True, and the container contains other containers as children, then they will also be ungrouped, and so on.

Parameters:

`container` (GES.Container) –

The container to ungroup

`recursive` (bool) –

Whether to recursively ungroup container

Returns ([ GES.Container ]) –

The list of new GES.Container-s created from the splitting of container.

### Functions

#### ges_container_group

    GESContainer *
    ges_container_group (GList * containers)

Groups the containers into a single container by merging them. The containers must all belong to the same timeline.

If the elements are all GESClip-s then this method will attempt to combine them all into a single GESClip. This should succeed if they: share the same start, duration and in-point; exist in the same layer; and all of the sources share the same GESAsset. If this fails, or one of the elements is not a GESClip, this method will try to create a GESGroup instead.

Parameters:

`containers` –

(transfer none) (element-type GESContainer) (nullable): The GESContainer-s to group

Returns ( [transfer: floating][nullable]) –

The container created by merging containers, or NULL if they could not be merged into a single container.

#### GES.Container.prototype.group

    function GES.Container.prototype.group(containers: [ GES.Container ]): {
        // javascript wrapper for 'ges_container_group'
    }

Groups the containers into a single container by merging them. The containers must all belong to the same timeline.

If the elements are all GES.Clip-s then this method will attempt to combine them all into a single GES.Clip. This should succeed if they: share the same start, duration and in-point; exist in the same layer; and all of the sources share the same GES.Asset. If this fails, or one of the elements is not a GES.Clip, this method will try to create a GES.Group instead.

Parameters:

`containers` ([ GES.Container ]) –

(transfer none) (element-type GESContainer) (nullable): The GES.Container-s to group

Returns (GES.Container) –

The container created by merging containers, or null if they could not be merged into a single container.

#### GES.Container.group

    def GES.Container.group (containers):
        #python wrapper for 'ges_container_group'

Groups the containers into a single container by merging them. The containers must all belong to the same timeline.

If the elements are all GES.Clip-s then this method will attempt to combine them all into a single GES.Clip. This should succeed if they: share the same start, duration and in_point; exist in the same layer; and all of the sources share the same GES.Asset. If this fails, or one of the elements is not a GES.Clip, this method will try to create a GES.Group instead.

Parameters:

`containers` ([ GES.Container ]) –

(transfer none) (element-type GESContainer) (nullable): The GES.Container-s to group

Returns (GES.Container) –

The container created by merging containers, or None if they could not be merged into a single container.

### Signals

#### child-added

    child_added_callback (GESContainer * self,
                          GESTimelineElement * element,
                          gpointer user_data)

Will be emitted after a child is added to the container. Usually, you should connect with g_signal_connect_after since the signal may be stopped internally.

Parameters:

`self` –
No description available
`element` –

The child that was added

`user_data` –
No description available

Flags: Run First

#### child-added

    function child_added_callback(self: GES.Container, element: GES.TimelineElement, user_data: Object): {
        // javascript callback for the 'child-added' signal
    }

Will be emitted after a child is added to the container. Usually, you should connect with g_signal_connect_after (not introspectable) since the signal may be stopped internally.

Parameters:

`self` (GES.Container) –
No description available
`element` (GES.TimelineElement) –

The child that was added

`user_data` (Object) –
No description available

Flags: Run First

#### child-added

    def child_added_callback (self, element, *user_data):
        #python callback for the 'child-added' signal

Will be emitted after a child is added to the container. Usually, you should connect with g_signal_connect_after (not introspectable) since the signal may be stopped internally.

Parameters:

`self` (GES.Container) –
No description available
`element` (GES.TimelineElement) –

The child that was added

`user_data` (variadic) –
No description available

Flags: Run First

#### child-removed

    child_removed_callback (GESContainer * self,
                            GESTimelineElement * element,
                            gpointer user_data)

Will be emitted after a child is removed from the container.

Parameters:

`self` –
No description available
`element` –

The child that was removed

`user_data` –
No description available

Flags: Run Last

#### child-removed

    function child_removed_callback(self: GES.Container, element: GES.TimelineElement, user_data: Object): {
        // javascript callback for the 'child-removed' signal
    }

Will be emitted after a child is removed from the container.

Parameters:

`self` (GES.Container) –
No description available
`element` (GES.TimelineElement) –

The child that was removed

`user_data` (Object) –
No description available

Flags: Run Last

#### child-removed

    def child_removed_callback (self, element, *user_data):
        #python callback for the 'child-removed' signal

Will be emitted after a child is removed from the container.

Parameters:

`self` (GES.Container) –
No description available
`element` (GES.TimelineElement) –

The child that was removed

`user_data` (variadic) –
No description available

Flags: Run Last

### Properties

#### height

    “height” guint

The span of the container's children's priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container's children (maximum - minimum + 1).

Flags : Read

#### height

    “height” Number

The span of the container's children's priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container's children (maximum - minimum + 1).

Flags : Read

#### height

    “self.props.height” int

The span of the container's children's priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container's children (maximum - minimum + 1).

Flags : Read

### Virtual Methods

#### add_child

    gboolean
    add_child (GESContainer * container,
               GESTimelineElement * element)

Virtual method to add a child

Parameters:

`container` –
No description available
`element` –
No description available
Returns –
No description available

#### vfunc_add_child

    function vfunc_add_child(container: GES.Container, element: GES.TimelineElement): {
        // javascript implementation of the 'add_child' virtual method
    }

Virtual method to add a child

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available
Returns (Number) –
No description available

#### do_add_child

    def do_add_child (container, element):
        #python implementation of the 'add_child' virtual method

Virtual method to add a child

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available
Returns (bool) –
No description available

#### child_added

    child_added (GESContainer * container,
                 GESTimelineElement * element)

Virtual method that is called right after a GESTimelineElement is added

Parameters:

`container` –
No description available
`element` –
No description available

#### vfunc_child_added

    function vfunc_child_added(container: GES.Container, element: GES.TimelineElement): {
        // javascript implementation of the 'child_added' virtual method
    }

Virtual method that is called right after a GES.TimelineElement is added

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available

#### do_child_added

    def do_child_added (container, element):
        #python implementation of the 'child_added' virtual method

Virtual method that is called right after a GES.TimelineElement is added

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available

#### child_removed

    child_removed (GESContainer * container,
                   GESTimelineElement * element)

Virtual method that is called right after a GESTimelineElement is removed

Parameters:

`container` –
No description available
`element` –
No description available

#### vfunc_child_removed

    function vfunc_child_removed(container: GES.Container, element: GES.TimelineElement): {
        // javascript implementation of the 'child_removed' virtual method
    }

Virtual method that is called right after a GES.TimelineElement is removed

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available

#### do_child_removed

    def do_child_removed (container, element):
        #python implementation of the 'child_removed' virtual method

Virtual method that is called right after a GES.TimelineElement is removed

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available

#### edit

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

Deprecated

Parameters:

`container` –
No description available
`layers` –
No description available
`new_layer_priority` –
No description available
`mode` –
No description available
`edge` –
No description available
`position` –
No description available
Returns –
No description available

#### vfunc_edit

    function vfunc_edit(container: GES.Container, layers: [ GES.Layer ], new_layer_priority: Number, mode: GES.EditMode, edge: GES.Edge, position: Number): {
        // javascript implementation of the 'edit' virtual method
    }

Deprecated

Parameters:

`container` (GES.Container) –
No description available
`layers` ([ GES.Layer ]) –
No description available
`new_layer_priority` (Number) –
No description available
`mode` (GES.EditMode) –
No description available
`edge` (GES.Edge) –
No description available
`position` (Number) –
No description available
Returns (Number) –
No description available

#### do_edit

    def do_edit (container, layers, new_layer_priority, mode, edge, position):
        #python implementation of the 'edit' virtual method

Deprecated

Parameters:

`container` (GES.Container) –
No description available
`layers` ([ GES.Layer ]) –
No description available
`new_layer_priority` (int) –
No description available
`mode` (GES.EditMode) –
No description available
`edge` (GES.Edge) –
No description available
`position` (int) –
No description available
Returns (bool) –
No description available

#### remove_child

    gboolean
    remove_child (GESContainer * container,
                  GESTimelineElement * element)

Virtual method to remove a child

Parameters:

`container` –
No description available
`element` –
No description available
Returns –
No description available

#### vfunc_remove_child

    function vfunc_remove_child(container: GES.Container, element: GES.TimelineElement): {
        // javascript implementation of the 'remove_child' virtual method
    }

Virtual method to remove a child

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available
Returns (Number) –
No description available

#### do_remove_child

    def do_remove_child (container, element):
        #python implementation of the 'remove_child' virtual method

Virtual method to remove a child

Parameters:

`container` (GES.Container) –
No description available
`element` (GES.TimelineElement) –
No description available
Returns (bool) –
No description available

#### ungroup

    GList *
    ungroup (GESContainer * container,
             gboolean recursive)

Virtual method to ungroup a container into a list of containers

Parameters:

`container` –
No description available
`recursive` –
No description available
Returns –
No description available

#### vfunc_ungroup

    function vfunc_ungroup(container: GES.Container, recursive: Number): {
        // javascript implementation of the 'ungroup' virtual method
    }

Virtual method to ungroup a container into a list of containers

Parameters:

`container` (GES.Container) –
No description available
`recursive` (Number) –
No description available
Returns ([ GES.Container ]) –
No description available

#### do_ungroup

    def do_ungroup (container, recursive):
        #python implementation of the 'ungroup' virtual method

Virtual method to ungroup a container into a list of containers

Parameters:

`container` (GES.Container) –
No description available
`recursive` (bool) –
No description available
Returns ([ GES.Container ]) –
No description available

## Function Macros

### GES_CONTAINER_CHILDREN

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

The GList containing the children of obj.

Parameters:

`obj` –

a GESContainer

### GES_CONTAINER_HEIGHT

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

The height of obj.

Parameters:

`obj` –

a GESContainer

## Enumerations

### GESChildrenControlMode

To be used by subclasses only. This indicate how to handle a change in a child.

##### Members

`GES_CHILDREN_UPDATE` (0) –
No description available
`GES_CHILDREN_IGNORE_NOTIFIES` (1) –
No description available
`GES_CHILDREN_UPDATE_OFFSETS` (2) –
No description available
`GES_CHILDREN_UPDATE_ALL_VALUES` (3) –
No description available
`GES_CHILDREN_LAST` (4) –
No description available

### GES.ChildrenControlMode

To be used by subclasses only. This indicate how to handle a change in a child.

##### Members

`GES.ChildrenControlMode.UPDATE` (0) –
No description available
`GES.ChildrenControlMode.IGNORE_NOTIFIES` (1) –
No description available
`GES.ChildrenControlMode.UPDATE_OFFSETS` (2) –
No description available
`GES.ChildrenControlMode.UPDATE_ALL_VALUES` (3) –
No description available
`GES.ChildrenControlMode.LAST` (4) –
No description available

### GES.ChildrenControlMode

To be used by subclasses only. This indicate how to handle a change in a child.

##### Members

`GES.ChildrenControlMode.UPDATE` (0) –
No description available
`GES.ChildrenControlMode.IGNORE_NOTIFIES` (1) –
No description available
`GES.ChildrenControlMode.UPDATE_OFFSETS` (2) –
No description available
`GES.ChildrenControlMode.UPDATE_ALL_VALUES` (3) –
No description available
`GES.ChildrenControlMode.LAST` (4) –
No description available

## Constants

### GES_TYPE_CONTAINER

    #define GES_TYPE_CONTAINER             ges_container_get_type()

The results of the search are