mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
GESTimelineLayer: add get_objects virtual method
This commit is contained in:
parent
9848c33e40
commit
06695545e0
3 changed files with 36 additions and 0 deletions
|
@ -232,6 +232,7 @@ ges_timeline_layer_add_object
|
|||
ges_timeline_layer_new
|
||||
ges_timeline_layer_remove_object
|
||||
ges_timeline_layer_set_priority
|
||||
ges_timeline_layer_get_objects
|
||||
<SUBSECTION Standard>
|
||||
ges_timeline_layer_set_timeline
|
||||
ges_timeline_layer_get_type
|
||||
|
|
|
@ -333,3 +333,35 @@ ges_timeline_layer_set_priority (GESTimelineLayer * layer, guint priority)
|
|||
ges_timeline_layer_resync_priorities (layer);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_get_objects:
|
||||
* @layer: a #GESTimelineLayer
|
||||
*
|
||||
* Get the timeline objects this layer contains.
|
||||
*
|
||||
* Returns: a #GList of timeline objects. The user is responsible for
|
||||
* unreffing the contained objects and freeing the list.
|
||||
*/
|
||||
|
||||
GList *
|
||||
ges_timeline_layer_get_objects (GESTimelineLayer * layer)
|
||||
{
|
||||
GList *ret = NULL;
|
||||
GSList *tmp;
|
||||
GESTimelineLayerClass *klass;
|
||||
|
||||
klass = GES_TIMELINE_LAYER_GET_CLASS (layer);
|
||||
|
||||
if (klass->get_objects) {
|
||||
return klass->get_objects (layer);
|
||||
}
|
||||
|
||||
for (tmp = layer->objects_start; tmp; tmp = tmp->next) {
|
||||
ret = g_list_prepend (ret, tmp->data);
|
||||
g_object_ref (tmp->data);
|
||||
}
|
||||
|
||||
ret = g_list_reverse (ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,8 @@ struct _GESTimelineLayer {
|
|||
struct _GESTimelineLayerClass {
|
||||
GObjectClass parent_class;
|
||||
|
||||
GList *(*get_objects) (GESTimelineLayer * layer);
|
||||
|
||||
/*< signals >*/
|
||||
void (*object_added) (GESTimelineLayer * layer, GESTimelineObject * object);
|
||||
void (*object_removed) (GESTimelineLayer * layer, GESTimelineObject * object);
|
||||
|
@ -87,6 +89,7 @@ gboolean ges_timeline_layer_add_object (GESTimelineLayer * layer, GESTimelineObj
|
|||
gboolean ges_timeline_layer_remove_object (GESTimelineLayer * layer, GESTimelineObject * object);
|
||||
|
||||
void ges_timeline_layer_set_priority (GESTimelineLayer * layer, guint priority);
|
||||
GList * ges_timeline_layer_get_objects (GESTimelineLayer * layer);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue