python: bind and override the ges_track_get_objects method

This commit is contained in:
Mathieu Duponchelle 2011-07-13 18:30:06 +02:00 committed by Thibault Saunier
parent c191715608
commit ba37d07261
2 changed files with 31 additions and 0 deletions

View file

@ -1572,6 +1572,12 @@
)
)
(define-method get_objects
(of-object "GESTrack")
(c-name "ges_track_get_objects")
(return-type "GList*")
)
(define-method set_timeline
(of-object "GESTrack")
(c-name "ges_track_set_timeline")

View file

@ -284,6 +284,31 @@ _wrap_ges_timeline_object_get_track_objects(PyGObject *self)
return py_list;
}
%%
override ges_track_get_objects noargs
static PyObject *
_wrap_ges_track_get_objects(PyGObject *self)
{
const GList *l, *list;
PyObject *py_list;
g_return_val_if_fail (GES_IS_TRACK (self->obj), PyList_New(0));
pyg_begin_allow_threads;
list = ges_track_get_objects(GES_TRACK(self->obj));
pyg_end_allow_threads;
py_list = PyList_New(0);
for (l = list; l; l = l->next) {
GESTrackObject *object = (GESTrackObject*)l->data;
PyObject *py_object = pygobject_new(G_OBJECT(object));
PyList_Append(py_list, py_object);
Py_DECREF(py_object);
}
return py_list;
}
%%
override ges_track_object_get_child_property kwargs
static PyObject *