From 714a7bf886e30b6e90ef0330dffa39082254999b Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 7 Dec 2011 20:36:24 -0300 Subject: [PATCH] ges: Add a method to TimelineObject to set contained TrackObject-s locked state API: ges_timeline_object_objects_set_locked --- bindings/python/ges.defs | 8 ++++++++ docs/libs/ges-sections.txt | 1 + ges/ges-timeline-object.c | 23 +++++++++++++++++++++++ ges/ges-timeline-object.h | 2 ++ 4 files changed, 34 insertions(+) diff --git a/bindings/python/ges.defs b/bindings/python/ges.defs index d38d442..d397e37 100644 --- a/bindings/python/ges.defs +++ b/bindings/python/ges.defs @@ -1106,6 +1106,14 @@ ) +(define-method objects_set_locked + (of-object "GESTimelineObject") + (c-name "ges_timeline_object_objects_set_locked") + (return-type "none") + (parameters + '("gboolean" "locked") + ) +) ;; From ges-timeline-operation.h diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index 32686fc..f7e5af2 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -324,6 +324,7 @@ ges_timeline_object_get_track_objects ges_timeline_object_set_layer ges_timeline_object_set_moving_from_layer ges_timeline_object_set_priority +ges_timeline_object_lock_track_objects GESTimelineObjectPrivate GES_IS_TIMELINE_OBJECT GES_IS_TIMELINE_OBJECT_CLASS diff --git a/ges/ges-timeline-object.c b/ges/ges-timeline-object.c index dc7b693..62416d1 100644 --- a/ges/ges-timeline-object.c +++ b/ges/ges-timeline-object.c @@ -1342,6 +1342,29 @@ ges_timeline_object_copy (GESTimelineObject * object, gboolean * deep) return ret; } +/** + * ges_timeline_object_objects_set_locked: + * @object: the #GESTimelineObject + * @locked: whether the #GESTrackObject contained in @object are locked to it. + * + * Set the locking status of all the #GESTrackObject contained in @object to @locked. + * See the ges_track_object_set_locked documentation for more details. + * + * Since: 0.10.XX + */ +void +ges_timeline_object_objects_set_locked (GESTimelineObject * object, + gboolean locked) +{ + GList *tmp; + + g_return_if_fail (GES_IS_TIMELINE_OBJECT (object)); + + for (tmp = object->priv->mappings; tmp; tmp = g_list_next (tmp)) { + ges_track_object_set_locked (((ObjectMapping *) tmp->data)->object, locked); + } +} + static void update_height (GESTimelineObject * object) { diff --git a/ges/ges-timeline-object.h b/ges/ges-timeline-object.h index 024b20e..3c707ff 100644 --- a/ges/ges-timeline-object.h +++ b/ges/ges-timeline-object.h @@ -293,6 +293,8 @@ ges_timeline_object_set_supported_formats (GESTimelineObject * self, GESTimelineObject * ges_timeline_object_split(GESTimelineObject * self, gint64 position); +void +ges_timeline_object_objects_set_locked (GESTimelineObject * object, gboolean locked); G_END_DECLS #endif /* _GES_TIMELINE_OBJECT */ -- 2.7.4