summaryrefslogtreecommitdiff
path: root/bindings/python/ges.override
diff options
context:
space:
mode:
authorMathieu Duponchelle <seeed@laposte.net>2011-06-07 19:35:00 +0200
committerThibault Saunier <thibault.saunier@collabora.com>2011-08-10 17:12:46 +0200
commitee96719f3c9beb1ad973fa19bf98f6ae2ae622ec (patch)
tree606446be9903aae39923c15cd25c10832ac1c789 /bindings/python/ges.override
parentcea06907c9d202936a359d5bafbc14ffdda82cfe (diff)
pyges: Override methods using GList
Diffstat (limited to 'bindings/python/ges.override')
-rw-r--r--bindings/python/ges.override100
1 files changed, 100 insertions, 0 deletions
diff --git a/bindings/python/ges.override b/bindings/python/ges.override
index bcd8edd6fd..291d56fed7 100644
--- a/bindings/python/ges.override
+++ b/bindings/python/ges.override
@@ -43,3 +43,103 @@ _wrap_ges_track_get_timeline(PyGObject *self)
/* pygobject_new handles NULL checking */
return pygobject_new((GObject *)ret);
}
+
+%%
+override ges_timeline_get_tracks noargs
+static PyObject *
+_wrap_ges_timeline_get_tracks(PyGObject *self)
+{
+ const GList *l, *list;
+ PyObject *py_list;
+
+ g_return_val_if_fail (GES_IS_TIMELINE (self->obj), PyList_New(0));
+
+ pyg_begin_allow_threads;
+ list = ges_timeline_get_tracks(GES_TIMELINE(self->obj));
+ pyg_end_allow_threads;
+
+ py_list = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GESTrack *track = (GESTrack*)l->data;
+ PyObject *py_track = pygobject_new(G_OBJECT(track));
+ PyList_Append(py_list, py_track);
+ Py_DECREF(py_track);
+ }
+
+ return py_list;
+}
+
+%%
+override ges_timeline_get_layers noargs
+static PyObject *
+_wrap_ges_timeline_get_layers(PyGObject *self)
+{
+ const GList *l, *list;
+ PyObject *py_list;
+
+ g_return_val_if_fail (GES_IS_TIMELINE (self->obj), PyList_New(0));
+
+ pyg_begin_allow_threads;
+ list = ges_timeline_get_layers(GES_TIMELINE(self->obj));
+ pyg_end_allow_threads;
+
+ py_list = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GESTimelineLayer *layer = (GESTimelineLayer*)l->data;
+ PyObject *py_layer = pygobject_new(G_OBJECT(layer));
+ PyList_Append(py_list, py_layer);
+ Py_DECREF(py_layer);
+ }
+
+ return py_list;
+}
+
+%%
+override ges_timeline_layer_get_objects noargs
+static PyObject *
+_wrap_ges_timeline_layer_get_objects(PyGObject *self)
+{
+ const GList *l, *list;
+ PyObject *py_list;
+
+ g_return_val_if_fail (GES_IS_TIMELINE_LAYER (self->obj), PyList_New(0));
+
+ pyg_begin_allow_threads;
+ list = ges_timeline_layer_get_objects(GES_TIMELINE_LAYER(self->obj));
+ pyg_end_allow_threads;
+
+ py_list = PyList_New(0);
+ for (l = list; l; l = l->next) {
+ GESTimelineObject *object = (GESTimelineObject*)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_timeline_object_get_track_objects noargs
+static PyObject *
+_wrap_ges_timeline_object_get_track_objects(PyGObject *self)
+{
+ const GList *l, *list;
+ PyObject *py_list;
+
+ g_return_val_if_fail (GES_IS_TIMELINE_OBJECT (self->obj), PyList_New(0));
+
+ pyg_begin_allow_threads;
+ list = ges_timeline_object_get_track_objects(GES_TIMELINE_OBJECT(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;
+}