diff --git a/bindings/python/ges.defs b/bindings/python/ges.defs index d9ec4beabe..cfc7037794 100644 --- a/bindings/python/ges.defs +++ b/bindings/python/ges.defs @@ -905,6 +905,12 @@ ) ) +(define-method get_timeline + (of-object "GESTimelineLayer") + (c-name "ges_timeline_layer_get_timeline") + (return-type "GESTimeline*") +) + (define-method add_object (of-object "GESTimelineLayer") (c-name "ges_timeline_layer_add_object") diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index c918172376..f64216c56d 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -278,6 +278,7 @@ ges_timeline_layer_remove_object ges_timeline_layer_set_priority ges_timeline_layer_get_priority ges_timeline_layer_get_objects +ges_timeline_layer_get_timeline ges_timeline_layer_get_auto_transition ges_timeline_layer_set_auto_transition diff --git a/ges/ges-timeline-layer.c b/ges/ges-timeline-layer.c index 1f4d063f73..fea2070dca 100644 --- a/ges/ges-timeline-layer.c +++ b/ges/ges-timeline-layer.c @@ -232,6 +232,23 @@ ges_timeline_layer_new (void) return g_object_new (GES_TYPE_TIMELINE_LAYER, NULL); } +/** + * ges_timeline_layer_get_timeline: + * @layer: The #GESTimelineLayer to get the parent #GESTimeline from + * + * Get the #GESTimeline in which #GESTimelineLayer currently is. + * + * Returns: (transfer none): the #GESTimeline in which #GESTimelineLayer + * currently is or %NULL if not in any timeline yet. + */ +GESTimeline * +ges_timeline_layer_get_timeline (GESTimelineLayer * layer) +{ + g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), NULL); + + return layer->timeline; +} + void ges_timeline_layer_set_timeline (GESTimelineLayer * layer, GESTimeline * timeline) diff --git a/ges/ges-timeline-layer.h b/ges/ges-timeline-layer.h index b32611af3c..007674c2ed 100644 --- a/ges/ges-timeline-layer.h +++ b/ges/ges-timeline-layer.h @@ -95,7 +95,12 @@ GESTimelineLayer* ges_timeline_layer_new (void); void ges_timeline_layer_set_timeline (GESTimelineLayer * layer, GESTimeline * timeline); + +GESTimeline * +ges_timeline_layer_get_timeline (GESTimelineLayer * layer); + gboolean ges_timeline_layer_add_object (GESTimelineLayer * layer, + GESTimelineObject * object); gboolean ges_timeline_layer_remove_object (GESTimelineLayer * layer, GESTimelineObject * object);