GESTimelineLayer

GESTimelineLayer — Non-overlaping sequence of GESTimelineObject

Functions

Properties

guint priority Read / Write

Signals

void object-added Run First
void object-removed Run First

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GESTimelineLayer
            ╰── GESSimpleTimelineLayer

Includes

#include <ges/ges.h>

Description

Responsible for the ordering of the various contained TimelineObject(s). A timeline layer has a "priority" property, which is used to manage the priorities of individual TimelineObjects. Two layers should not have the same priority within a given timeline.

Functions

ges_timeline_layer_add_object ()

gboolean
ges_timeline_layer_add_object (GESTimelineLayer *layer,
                               GESTimelineObject *object);

Adds the given object to the layer. Sets the object's parent, and thus takes ownership of the object.

An object can only be added to one layer.

Parameters

layer

a GESTimelineLayer

 

object

the GESTimelineObject to add.

[transfer full]

Returns

TRUE if the object was properly added to the layer, or FALSE if the layer refuses to add the object.


ges_timeline_layer_new ()

GESTimelineLayer *
ges_timeline_layer_new (void);

Creates a new GESTimelineLayer.

Returns

A new GESTimelineLayer


ges_timeline_layer_remove_object ()

gboolean
ges_timeline_layer_remove_object (GESTimelineLayer *layer,
                                  GESTimelineObject *object);

Removes the given object from the layer and unparents it. Unparenting it means the reference owned by layer on the object will be removed. If you wish to use the object after this function, make sure you call g_object_ref() before removing it from the layer .

Parameters

layer

a GESTimelineLayer

 

object

the GESTimelineObject to remove

 

Returns

TRUE if the object could be removed, FALSE if the layer does not want to remove the object.


ges_timeline_layer_set_priority ()

void
ges_timeline_layer_set_priority (GESTimelineLayer *layer,
                                 guint priority);

Sets the layer to the given priority . See the documentation of the priority property for more information.

Parameters

layer

a GESTimelineLayer

 

priority

the priority to set

 

ges_timeline_layer_get_priority ()

guint
ges_timeline_layer_get_priority (GESTimelineLayer *layer);

Get the priority of layer within the timeline.

Parameters

layer

a GESTimelineLayer

 

Returns

The priority of the layer within the timeline.


ges_timeline_layer_get_objects ()

GList *
ges_timeline_layer_get_objects (GESTimelineLayer *layer);

Get the timeline objects this layer contains.

Parameters

layer

a GESTimelineLayer

 

Returns

a GList of timeline objects. The user is responsible for unreffing the contained objects and freeing the list.

[transfer full][element-type GESTimelineObject]

Types and Values

GESTimelineLayer

typedef struct {
  GESTimeline *timeline;
} GESTimelineLayer;

Members

GESTimeline *timeline;

the GESTimeline where this layer is being used.

 

GESTimelineLayerClass

typedef struct {
  /* virtual methods for subclasses */
  GList *(*get_objects) (GESTimelineLayer * layer);
} GESTimelineLayerClass;

Subclasses can override the get_objects if they can provide a more efficient way of providing the list of contained GESTimelineObject(s).

Members

get_objects ()

method to get the objects contained in the layer

 

Property Details

The “priority” property

  “priority”                 guint

The priority of the layer in the GESTimeline. 0 is the highest priority. Conceptually, a GESTimeline is a stack of GESTimelineLayers, and the priority of the layer represents its position in the stack. Two layers should not have the same priority within a given GESTimeline.

Flags: Read / Write

Default value: 0

Signal Details

The “object-added” signal

void
user_function (GESTimelineLayer  *layer,
               GESTimelineObject *object,
               gpointer           user_data)

Will be emitted after the object was added to the layer.

Parameters

layer

the GESTimelineLayer

 

object

the GESTimelineObject that was added.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “object-removed” signal

void
user_function (GESTimelineLayer  *layer,
               GESTimelineObject *object,
               gpointer           user_data)

Will be emitted after the object was removed from the layer.

Parameters

layer

the GESTimelineLayer

 

object

the GESTimelineObject that was removed

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First