mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
GESSimpleTimelineLayer: add _index() method
This commit is contained in:
parent
e970c86753
commit
82e4d95a28
3 changed files with 24 additions and 0 deletions
|
@ -452,6 +452,7 @@ ges_simple_timeline_layer_new
|
|||
ges_simple_timeline_layer_add_object
|
||||
ges_simple_timeline_layer_move_object
|
||||
ges_simple_timeline_layer_nth
|
||||
ges_simple_timeline_layer_index
|
||||
ges_simple_timeline_layer_is_valid
|
||||
<SUBSECTION Standard>
|
||||
GESSimpleTimelineLayerClass
|
||||
|
|
|
@ -376,6 +376,25 @@ ges_simple_timeline_layer_nth (GESSimpleTimelineLayer * layer, gint position)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_index:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* @object: a #GESTimelineObject in the layer
|
||||
*
|
||||
* Gets the position of the given object within the given layer.
|
||||
*
|
||||
* Returns: The position of the object starting from 0, or -1 if the
|
||||
* object was not found.
|
||||
*/
|
||||
|
||||
gint
|
||||
ges_simple_timeline_layer_index (GESSimpleTimelineLayer * layer,
|
||||
GESTimelineObject * object)
|
||||
{
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
return g_list_index (priv->objects, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_move_object:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
|
|
|
@ -91,6 +91,10 @@ const GESTimelineObject *
|
|||
ges_simple_timeline_layer_nth (GESSimpleTimelineLayer *layer,
|
||||
gint position);
|
||||
|
||||
gint
|
||||
ges_simple_timeline_layer_index (GESSimpleTimelineLayer *layer,
|
||||
GESTimelineObject *object);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_SIMPLE_TIMELINE_LAYER */
|
||||
|
|
Loading…
Reference in a new issue