udapted vi.po
[rhythmbox.git] / bindings / python / rb.override
blob631c1e5ee3285767a422ba2704387f2898ca1901
1 %%
2 headers
3 #define NO_IMPORT_PYGOBJECT
4 #include <pygobject.h>
5 #include <pygtk/pygtk.h>
7 #include "override_common.h"
8 #include "rb-util.h"
9 #include "rb-debug.h"
11 #include "rb-browser-source.h"
12 #include "rb-dialog.h"
13 #include "rb-entry-view.h"
14 #include "rb-library-browser.h"
15 #include "rb-plugin.h"
16 #include "rb-property-view.h"
17 #include "rb-removable-media-manager.h"
18 #include "rb-removable-media-source.h"
19 #include "rb-shell.h"
20 #include "rb-shell-player.h"
21 #include "rb-source.h"
22 #include "rb-sourcelist.h"
24 void pyrb_register_classes (PyObject *d);
25 void pyrb_add_constants (PyObject *module, const gchar *strip_prefix);
27 /* hacks to deal with the nonstandard class name RHYTHMDB */
28 #define RHYTHMDB_TYPE_RHYTHMDB RHYTHMDB_TYPE
29 #define RHYTHMDB_RHYTHMDB(o) RHYTHMDB(o)
32 modulename rb
34 import gobject.GObject as PyGObject_Type
35 import gtk.ActionGroup as PyGtkActionGroup_Type
36 import gtk.Dialog as PyGtkDialog_Type
37 import gtk.HBox as PyGtkHBox_Type
38 import gtk.ScrolledWindow as PyGtkScrolledWindow_Type
39 import gtk.TreeView as PyGtkTreeView_Type
40 import gtk.TreeViewColumn as PyGtkTreeViewColumn_Type
41 import gtk.UIManager as PyGtkUIManager_Type
42 import gtk.VBox as PyGtkVBox_Type
43 import gtk.Widget as PyGtkWidget_Type
44 import gtk.Window as PyGtkWindow_Type
45 import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
47 import rhythmdb.Entry as PyRhythmDBEntry_Type
48 import rhythmdb.EntryType as PyRhythmDBEntryType_Type
49 import rhythmdb.PropertyModel as PyRhythmDBPropertyModel_Type
50 import rhythmdb.PropertyModelColumn as PyRhythmDBPropertyModelColumn_Type
51 import rhythmdb.PropType as PyRhythmDBPropType_Type
52 import rhythmdb.Query as PyRhythmDBQuery_Type
53 import rhythmdb.QueryModel as PyRhythmDBQueryModel_Type
54 import rhythmdb.QueryResults as PyRhythmDBQueryResults_Type
55 import rhythmdb.QueryType as PyRhythmDBQueryType_Type
56 import rhythmdb.RhythmDB as PyRhythmDB_Type
58 new-constructor RB_TYPE_BROWSER_SOURCE
59 new-constructor RB_TYPE_SOURCE
61 ignore-glob
62   *_get_type
63   *_quark
65 override rb_entry_view_get_selected_entries noargs
66 static PyObject *
67 _wrap_rb_entry_view_get_selected_entries(PyGObject *self)
69     GList *list;
70     PyObject *py_list;
72     list = rb_entry_view_get_selected_entries (RB_ENTRY_VIEW(self->obj));
73     py_list = _helper_wrap_pointer_glist (list, RHYTHMDB_TYPE_ENTRY);
74     g_list_free (list);
76     return py_list;
79 override rb_source_get_property_views noargs
80 static PyObject *
81 _wrap_rb_source_get_property_views(PyGObject *self)
83     GList *list;
84     PyObject *py_list;
86     list = rb_source_get_property_views (RB_SOURCE(self->obj));
87     py_list = _helper_wrap_gobject_glist (list);
88     g_list_free (list);
90     return py_list;
93 override rb_source_get_search_actions noargs
94 static PyObject *
95 _wrap_rb_source_get_search_actions(PyGObject *self)
97     GList *list;
98     PyObject *py_list;
100     list = rb_source_get_search_actions (RB_SOURCE(self->obj));
101     py_list = _helper_wrap_string_glist (list);
102     g_list_free (list);
104     return py_list;
107 override rb_source_get_ui_actions noargs
108 static PyObject *
109 _wrap_rb_source_get_ui_actions(PyGObject *self)
111     GList *list;
112     PyObject *py_list;
114     list = rb_source_get_ui_actions (RB_SOURCE(self->obj));
115     py_list = _helper_wrap_string_glist (list);
116     g_list_free (list);
118     return py_list;
121 override rb_source_cut noargs
122 static PyObject *
123 _wrap_rb_source_cut(PyGObject *self)
125     GList *list;
126     PyObject *py_list;
128     list = rb_source_cut (RB_SOURCE(self->obj));
129     py_list = _helper_wrap_pointer_glist (list, RHYTHMDB_TYPE_ENTRY);
130     g_list_free (list);
132     return py_list;
135 override rb_source_copy noargs
136 static PyObject *
137 _wrap_rb_source_copy(PyGObject *self)
139     GList *list;
140     PyObject *py_list;
142     list = rb_source_copy (RB_SOURCE(self->obj));
143     py_list = _helper_wrap_pointer_glist (list, RHYTHMDB_TYPE_ENTRY);
144     g_list_free (list);
146     return py_list;
149 override rb_source_paste kwargs
150 static PyObject *
151 _wrap_rb_source_paste(PyGObject *self, PyObject *args, PyObject *kwargs)
153     static char *kwlist[] = { "entries", NULL };
154     PyObject *py_entries = NULL;
155     GList *entries;
157     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:RBSource.copy", kwlist, &py_entries))
158         return NULL;
160     entries = _helper_unwrap_pointer_pylist (py_entries, RHYTHMDB_TYPE_ENTRY);
161     rb_source_paste (RB_SOURCE(self->obj), entries);
162     g_list_free (entries);
164     Py_INCREF(Py_None);
165     return Py_None;
168 override rb_source_gather_selected_properties kwargs
169 static PyObject *
170 _wrap_rb_source_gather_selected_properties(PyGObject *self, PyObject *args, PyObject *kwargs)
172     static char *kwlist[] = { "keys", NULL };
173     PyObject *py_propid, *py_list;
174     RhythmDBPropType propid;
175     GList *list;
177     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:RBSource.gather_selected_properties", kwlist, &py_propid))
178         return NULL;
179     if (pyg_enum_get_value(RHYTHMDB_TYPE_PROP_TYPE, py_propid, (gint *)&propid))
180         return NULL;
182     list = rb_source_gather_selected_properties (RB_SOURCE(self->obj), propid);
183     py_list = _helper_wrap_string_glist (list);
184     rb_list_deep_free (list);
186     return py_list;
189 override rb_property_view_set_selection kwargs
190 static PyObject *
191 _wrap_rb_property_view_set_selection(PyGObject *self, PyObject *args, PyObject *kwargs)
193     static char *kwlist[] = { "strings", NULL };
194     PyObject *py_strings = NULL;
195     GList *strings;
197     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:RBPropertyView.set_selection", kwlist, &py_strings))
198         return NULL;
200     strings = _helper_unwrap_string_pylist (py_strings);
201     rb_property_view_set_selection (RB_PROPERTY_VIEW(self->obj), strings);
202     rb_list_deep_free (strings);
204     Py_INCREF(Py_None);
205     return Py_None;
208 override rb_shell_player_get_volume noargs
209 static PyObject *
210 _wrap_rb_shell_player_get_volume(PyGObject *self)
212     gdouble vol = 0.0;
213     GError *error = NULL;
215     rb_shell_player_get_volume(RB_SHELL_PLAYER(self->obj), &vol, &error);
217     if (pyg_error_check(&error))
218         return NULL;
220     return PyFloat_FromDouble(vol);
223 override rb_shell_player_get_mute noargs
224 static PyObject *
225 _wrap_rb_shell_player_get_mute(PyGObject *self)
227     gboolean muted = FALSE;
228     GError *error = NULL;
230     rb_shell_player_get_mute(RB_SHELL_PLAYER(self->obj), &muted, &error);
232     if (pyg_error_check(&error))
233         return NULL;
235     return PyBool_FromLong((long) muted);
238 override rb_shell_player_get_playing noargs
239 static PyObject *
240 _wrap_rb_shell_player_get_playing(PyGObject *self)
242     gboolean playing = FALSE;
243     GError *error = NULL;
245     rb_shell_player_get_playing(RB_SHELL_PLAYER(self->obj), &playing, &error);
247     if (pyg_error_check(&error))
248         return NULL;
250     return PyBool_FromLong((long) playing);
253 override rb_shell_player_get_playing_time noargs
254 static PyObject *
255 _wrap_rb_shell_player_get_playing_time(PyGObject *self)
257     guint time = 0;
258     GError *error = NULL;
260     rb_shell_player_get_playing_time(RB_SHELL_PLAYER(self->obj), &time, &error);
262     if (pyg_error_check(&error))
263         return NULL;
265     return PyLong_FromLong((long) time);
268 override rb_shell_player_get_playing_path noargs
269 static PyObject *
270 _wrap_rb_shell_player_get_playing_path(PyGObject *self)
272     const char *path = NULL;
273     GError *error = NULL;
275     rb_shell_player_get_playing_path(RB_SHELL_PLAYER(self->obj), &path, &error);
277     if (pyg_error_check(&error))
278         return NULL;
280     return PyString_FromString (path);
283 override RBSource__do_impl_cut
284 static PyObject *
285 _wrap_RBSource__do_impl_cut(PyObject *cls, PyObject *args, PyObject *kwargs)
287         gpointer klass;
288         static char *kwlist[] = { "self", NULL };
289         PyGObject *self;
290         GList *ret;
292         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_cut", kwlist, &PyRBSource_Type, &self))
293                 return NULL;
294         klass = g_type_class_ref(pyg_type_from_object(cls));
295         if (RB_SOURCE_CLASS(klass)->impl_cut)
296                 ret = RB_SOURCE_CLASS(klass)->impl_cut(RB_SOURCE(self->obj));
297         else {
298                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_cut not implemented");
299                 g_type_class_unref(klass);
300                 return NULL;
301         }
302         g_type_class_unref(klass);
303         return _helper_wrap_pointer_glist (ret, RHYTHMDB_TYPE_ENTRY);
306 override RBSource__proxy_do_impl_cut
307 static GList *
308 _wrap_RBSource__proxy_do_impl_cut (RBSource *self)
310         PyGILState_STATE __py_state;
311         PyObject *py_self;
312         PyObject *py_method;
313         PyObject *py_retval;
314         GList *ret = NULL;
316         __py_state = pyg_gil_state_ensure();
317         py_self = pygobject_new((GObject *)self);
318         if (!py_self) {
319                 if (PyErr_Occurred())
320                         PyErr_Print();
321                 pyg_gil_state_release(__py_state);
322                 return NULL;
323         }
325         py_method = PyObject_GetAttrString(py_self, "do_impl_cut");
326         if (!py_method) {
327                 if (PyErr_Occurred())
328                         PyErr_Print();
329                 Py_DECREF(py_self);
330                 pyg_gil_state_release(__py_state);
331                 return FALSE;
332         }
334         py_retval = PyObject_CallObject(py_method, NULL);
335         if (!py_retval) {
336                 if (PyErr_Occurred())
337                         PyErr_Print();
338                 Py_DECREF(py_method);
339                 Py_DECREF(py_self);
340                 pyg_gil_state_release(__py_state);
341                 return NULL;
342         }
344         ret = _helper_unwrap_pointer_pylist (py_retval, RHYTHMDB_TYPE_ENTRY);
346         Py_DECREF(py_retval);
347         Py_DECREF(py_method);
348         Py_DECREF(py_self);
349         pyg_gil_state_release(__py_state);
351         return ret;
354 override RBSource__do_impl_copy
355 static PyObject *
356 _wrap_RBSource__do_impl_copy(PyObject *cls, PyObject *args, PyObject *kwargs)
358         gpointer klass;
359         static char *kwlist[] = { "self", NULL };
360         PyGObject *self;
361         GList *ret;
363         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_copy", kwlist, &PyRBSource_Type, &self))
364                 return NULL;
365         klass = g_type_class_ref(pyg_type_from_object(cls));
366         if (RB_SOURCE_CLASS(klass)->impl_copy)
367                 ret = RB_SOURCE_CLASS(klass)->impl_copy(RB_SOURCE(self->obj));
368         else {
369                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_copy not implemented");
370                 g_type_class_unref(klass);
371                 return NULL;
372         }
373         g_type_class_unref(klass);
374         return _helper_wrap_pointer_glist (ret, RHYTHMDB_TYPE_ENTRY);
377 override RBSource__proxy_do_impl_copy
378 static GList *
379 _wrap_RBSource__proxy_do_impl_copy (RBSource *self)
381         PyGILState_STATE __py_state;
382         PyObject *py_self;
383         PyObject *py_method;
384         PyObject *py_retval;
385         GList *ret = NULL;
387         __py_state = pyg_gil_state_ensure();
388         py_self = pygobject_new((GObject *)self);
389         if (!py_self) {
390                 if (PyErr_Occurred())
391                         PyErr_Print();
392                 pyg_gil_state_release(__py_state);
393                 return NULL;
394         }
396         py_method = PyObject_GetAttrString(py_self, "do_impl_copy");
397         if (!py_method) {
398                 if (PyErr_Occurred())
399                         PyErr_Print();
400                 Py_DECREF(py_self);
401                 pyg_gil_state_release(__py_state);
402                 return FALSE;
403         }
405         py_retval = PyObject_CallObject(py_method, NULL);
406         if (!py_retval) {
407                 if (PyErr_Occurred())
408                         PyErr_Print();
409                 Py_DECREF(py_method);
410                 Py_DECREF(py_self);
411                 pyg_gil_state_release(__py_state);
412                 return NULL;
413         }
415         ret = _helper_unwrap_pointer_pylist (py_retval, RHYTHMDB_TYPE_ENTRY);
417         Py_DECREF(py_retval);
418         Py_DECREF(py_method);
419         Py_DECREF(py_self);
420         pyg_gil_state_release(__py_state);
422         return ret;
425 override RBSource__do_impl_get_property_views
426 static PyObject *
427 _wrap_RBSource__do_impl_get_property_views(PyObject *cls, PyObject *args, PyObject *kwargs)
429         gpointer klass;
430         static char *kwlist[] = { "self", NULL };
431         PyGObject *self;
432         GList *ret;
434         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_get_property_views", kwlist, &PyRBSource_Type, &self))
435                 return NULL;
436         klass = g_type_class_ref(pyg_type_from_object(cls));
437         if (RB_SOURCE_CLASS(klass)->impl_get_property_views)
438                 ret = RB_SOURCE_CLASS(klass)->impl_get_property_views(RB_SOURCE(self->obj));
439         else {
440                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_get_property_views not implemented");
441                 g_type_class_unref(klass);
442                 return NULL;
443         }
444         g_type_class_unref(klass);
445         return _helper_wrap_pointer_glist (ret, RHYTHMDB_TYPE_ENTRY);
448 override RBSource__proxy_do_impl_get_property_views
449 static GList *
450 _wrap_RBSource__proxy_do_impl_get_property_views (RBSource *self)
452         PyGILState_STATE __py_state;
453         PyObject *py_self;
454         PyObject *py_method;
455         PyObject *py_retval;
456         GList *ret = NULL;
458         __py_state = pyg_gil_state_ensure();
459         py_self = pygobject_new((GObject *)self);
460         if (!py_self) {
461                 if (PyErr_Occurred())
462                         PyErr_Print();
463                 pyg_gil_state_release(__py_state);
464                 return NULL;
465         }
467         py_method = PyObject_GetAttrString(py_self, "do_impl_get_property_views");
468         if (!py_method) {
469                 if (PyErr_Occurred())
470                         PyErr_Print();
471                 Py_DECREF(py_self);
472                 pyg_gil_state_release(__py_state);
473                 return FALSE;
474         }
476         py_retval = PyObject_CallObject(py_method, NULL);
477         if (!py_retval) {
478                 if (PyErr_Occurred())
479                         PyErr_Print();
480                 Py_DECREF(py_method);
481                 Py_DECREF(py_self);
482                 pyg_gil_state_release(__py_state);
483                 return NULL;
484         }
486         ret = _helper_unwrap_pointer_pylist (py_retval, RB_TYPE_PROPERTY_VIEW);
488         Py_DECREF(py_retval);
489         Py_DECREF(py_method);
490         Py_DECREF(py_self);
491         pyg_gil_state_release(__py_state);
493         return ret;
496 override RBSource__do_impl_get_ui_actions
497 static PyObject *
498 _wrap_RBSource__do_impl_get_ui_actions(PyObject *cls, PyObject *args, PyObject *kwargs)
500         gpointer klass;
501         static char *kwlist[] = { "self", NULL };
502         PyGObject *self;
503         GList *ret;
505         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_get_ui_actions", kwlist, &PyRBSource_Type, &self))
506                 return NULL;
507         klass = g_type_class_ref(pyg_type_from_object(cls));
508         if (RB_SOURCE_CLASS(klass)->impl_get_ui_actions)
509                 ret = RB_SOURCE_CLASS(klass)->impl_get_ui_actions(RB_SOURCE(self->obj));
510         else {
511                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_get_ui_actions not implemented");
512                 g_type_class_unref(klass);
513                 return NULL;
514         }
515         g_type_class_unref(klass);
516         return _helper_wrap_string_glist (ret);
519 override RBSource__proxy_do_impl_get_ui_actions
520 static GList *
521 _wrap_RBSource__proxy_do_impl_get_ui_actions (RBSource *self)
523         PyGILState_STATE __py_state;
524         PyObject *py_self;
525         PyObject *py_method;
526         PyObject *py_retval;
527         GList *ret;
528         GList *list;
530         __py_state = pyg_gil_state_ensure();
531         py_self = pygobject_new((GObject *)self);
532         if (!py_self) {
533                 if (PyErr_Occurred())
534                         PyErr_Print();
535                 pyg_gil_state_release(__py_state);
536                 return NULL;
537         }
539         py_method = PyObject_GetAttrString(py_self, "do_impl_get_ui_actions");
540         if (!py_method) {
541                 if (PyErr_Occurred())
542                         PyErr_Print();
543                 Py_DECREF(py_self);
544                 pyg_gil_state_release(__py_state);
545                 return FALSE;
546         }
548         py_retval = PyObject_CallObject(py_method, NULL);
549         if (!py_retval) {
550                 if (PyErr_Occurred())
551                         PyErr_Print();
552                 Py_DECREF(py_method);
553                 Py_DECREF(py_self);
554                 pyg_gil_state_release(__py_state);
555                 return NULL;
556         }
558         list = _helper_unwrap_string_pylist (py_retval);
560         Py_DECREF(py_retval);
561         Py_DECREF(py_method);
562         Py_DECREF(py_self);
563         pyg_gil_state_release(__py_state);
565         ret = rb_string_list_copy (list);
566         g_list_free (list);
567         return ret;
570 override RBSource__do_impl_get_search_actions
571 static PyObject *
572 _wrap_RBSource__do_impl_get_search_actions(PyObject *cls, PyObject *args, PyObject *kwargs)
574         gpointer klass;
575         static char *kwlist[] = { "self", NULL };
576         PyGObject *self;
577         GList *ret;
579         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_get_search_actions", kwlist, &PyRBSource_Type, &self))
580                 return NULL;
581         klass = g_type_class_ref(pyg_type_from_object(cls));
582         if (RB_SOURCE_CLASS(klass)->impl_get_search_actions)
583                 ret = RB_SOURCE_CLASS(klass)->impl_get_search_actions(RB_SOURCE(self->obj));
584         else {
585                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_get_search_actions not implemented");
586                 g_type_class_unref(klass);
587                 return NULL;
588         }
589         g_type_class_unref(klass);
590         return _helper_wrap_string_glist (ret);
593 override RBSource__proxy_do_impl_get_search_actions
594 static GList *
595 _wrap_RBSource__proxy_do_impl_get_search_actions (RBSource *self)
597         PyGILState_STATE __py_state;
598         PyObject *py_self;
599         PyObject *py_method;
600         PyObject *py_retval;
601         GList *ret = NULL;
603         __py_state = pyg_gil_state_ensure();
604         py_self = pygobject_new((GObject *)self);
605         if (!py_self) {
606                 if (PyErr_Occurred())
607                         PyErr_Print();
608                 pyg_gil_state_release(__py_state);
609                 return NULL;
610         }
612         py_method = PyObject_GetAttrString(py_self, "do_impl_get_search_actions");
613         if (!py_method) {
614                 if (PyErr_Occurred())
615                         PyErr_Print();
616                 Py_DECREF(py_self);
617                 pyg_gil_state_release(__py_state);
618                 return FALSE;
619         }
621         py_retval = PyObject_CallObject(py_method, NULL);
622         if (!py_retval) {
623                 if (PyErr_Occurred())
624                         PyErr_Print();
625                 Py_DECREF(py_method);
626                 Py_DECREF(py_self);
627                 pyg_gil_state_release(__py_state);
628                 return NULL;
629         }
631         ret = _helper_unwrap_string_pylist (py_retval);
633         Py_DECREF(py_retval);
634         Py_DECREF(py_method);
635         Py_DECREF(py_self);
636         pyg_gil_state_release(__py_state);
638         return ret;
641 override rb_shell_player_get_playback_state noargs
642 static PyObject *
643 _wrap_rb_shell_player_get_playback_state(PyGObject *self)
645     gboolean shuffle = FALSE;
646     gboolean repeat = FALSE;
648     if (!rb_shell_player_get_playback_state(RB_SHELL_PLAYER(self->obj), &shuffle, &repeat))
649         return NULL;
651     return Py_BuildValue ("bb", shuffle, repeat);
654 override rb_entry_view_get_sorting_order noargs
655 static PyObject *
656 _wrap_rb_entry_view_get_sorting_order(PyGObject *self)
658     char *column = NULL;
659     gint order = 0;
660     PyObject *object;
662     rb_entry_view_get_sorting_order(RB_ENTRY_VIEW(self->obj), &column, &order);
663     object = Py_BuildValue ("si", column, order);
664     g_free (column);
666     return object;
669 override rb_entry_view_set_fixed_column_width kwargs
670 static PyObject *
671 _wrap_rb_entry_view_set_fixed_column_width(PyGObject *self, PyObject *args, PyObject *kwargs)
673         static char *kwlist[] = { "column", "renderer", "strings", NULL };
674         PyGObject *py_column = NULL;
675         PyGObject *py_renderer = NULL;
676         PyObject *py_strings = NULL;
677         const char **strings;
678         int length, i;
680         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:RBEntryView.set_fixed_column_width", kwlist,
681             &py_column, &py_renderer, &py_strings))
682                 return NULL;
684         /* build the string list */
685         length = PySequence_Length (py_strings);
686         if (length < 0)
687                 return NULL;
688         strings = g_new0(const char*, length);
689         for (i = 0; i < length; i++) {
690                 PyObject *o;
692                 o = PySequence_GetItem (py_strings, i);
693                 strings[i] = PyString_AsString (o);
694                 Py_DECREF (o);
695         }
697         rb_entry_view_set_fixed_column_width (RB_ENTRY_VIEW (self->obj),
698                                               GTK_TREE_VIEW_COLUMN (py_column->obj),
699                                               GTK_CELL_RENDERER (py_renderer->obj),
700                                               strings);
701         g_free (strings);
703         Py_INCREF(Py_None);
704         return Py_None;
707 override RBSource__do_impl_paste
708 static PyObject *
709 _wrap_RBSource__do_impl_paste(PyObject *cls, PyObject *args, PyObject *kwargs)
711         gpointer klass;
712         static char *kwlist[] = { "self", "entries",NULL };
713         PyGObject *self;
714         PyObject *py_entries;
715         GList *entries;
717         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:RBSource.impl_paste", kwlist, &PyRBSource_Type, &self, &py_entries))
718                 return NULL;
720         entries = _helper_unwrap_pointer_pylist (py_entries, RHYTHMDB_TYPE_ENTRY);
722         klass = g_type_class_ref(pyg_type_from_object(cls));
723         if (RB_SOURCE_CLASS(klass)->impl_paste)
724                 RB_SOURCE_CLASS(klass)->impl_paste(RB_SOURCE(self->obj), entries);
725         else {
726                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_paste not implemented");
727                 g_type_class_unref(klass);
728                 return NULL;
729         }
730         g_type_class_unref(klass);
732         g_list_free (entries);
734         Py_INCREF(Py_None);
735         return Py_None;
738 override RBSource__proxy_do_impl_paste
739 static void
740 _wrap_RBSource__proxy_do_impl_paste(RBSource *self, GList *entries)
742     PyGILState_STATE __py_state;
743     PyObject *py_self;
744     PyObject *py_entries;
745     PyObject *py_retval;
746     PyObject *py_args;
747     PyObject *py_method;
749     __py_state = pyg_gil_state_ensure();
750     py_self = pygobject_new((GObject *) self);
751     if (!py_self) {
752         if (PyErr_Occurred())
753             PyErr_Print();
754         pyg_gil_state_release(__py_state);
755         return;
756     }
757     py_entries = _helper_wrap_pointer_glist (entries, RHYTHMDB_TYPE_ENTRY);
759     py_args = PyTuple_New(1);
760     Py_INCREF(py_entries);
761     PyTuple_SET_ITEM(py_args, 0, py_entries);
763     py_method = PyObject_GetAttrString(py_self, "do_impl_paste");
764     if (!py_method) {
765         if (PyErr_Occurred())
766             PyErr_Print();
767         Py_DECREF(py_args);
768         Py_DECREF(py_self);
769         pyg_gil_state_release(__py_state);
770         return;
771     }
772     py_retval = PyObject_CallObject(py_method, py_args);
773     if (!py_retval) {
774         if (PyErr_Occurred())
775             PyErr_Print();
776         Py_DECREF(py_method);
777         Py_DECREF(py_args);
778         Py_DECREF(py_self);
779         pyg_gil_state_release(__py_state);
780         return;
781     }
782     if (py_retval != Py_None) {
783         if (PyErr_Occurred())
784             PyErr_Print();
785         PyErr_SetString(PyExc_TypeError, "retval should be None");
786         Py_DECREF(py_retval);
787         Py_DECREF(py_method);
788         Py_DECREF(py_args);
789         Py_DECREF(py_self);
790         pyg_gil_state_release(__py_state);
791         return;
792     }
794     Py_DECREF(py_retval);
795     Py_DECREF(py_method);
796     Py_DECREF(py_args);
797     Py_DECREF(py_self);
798     pyg_gil_state_release(__py_state);
802 override rb_library_browser_get_property_views noargs
803 static PyObject *
804 _wrap_rb_library_browser_get_property_views(PyGObject *self)
806         PyObject *py_list;
807         GList *list;
809         list = rb_library_browser_get_property_views (RB_LIBRARY_BROWSER(self->obj));
810         py_list = _helper_wrap_gobject_glist (list);
811         g_list_free (list);
813         return py_list;
817 override rb_library_browser_set_selection kwargs
818 static PyObject *
819 _wrap_rb_library_browser_set_selection(PyGObject *self, PyObject *args, PyObject *kwargs)
821     static char *kwlist[] = { "type", "keys", NULL };
822     PyObject *py_keys = NULL;
823     PyObject *py_propid = NULL;
824     RhythmDBPropType propid;
825     GList *keys;
827     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:RBLibraryBrowser.set_selection", kwlist, &py_propid, &py_keys))
828         return NULL;
829     if (pyg_enum_get_value(RHYTHMDB_TYPE_PROP_TYPE, py_propid, (gint *)&propid))
830         return NULL;
832     keys = _helper_unwrap_string_pylist (py_keys);
833     rb_library_browser_set_selection (RB_LIBRARY_BROWSER(self->obj), propid, keys);
834     rb_list_deep_free (keys);
836     Py_INCREF(Py_None);
837     return Py_None;
841 override rb_source_get_status noargs
842 static PyObject *
843 _wrap_rb_source_get_status(PyGObject *self)
845     char *status_text = NULL;
846     char *progress_text = NULL;
847     float progress = 0.0f;
848     PyObject *tuple;
850     rb_source_get_status (RB_SOURCE (self->obj), &status_text, &progress_text, &progress);
851     tuple = Py_BuildValue ("ssf", status_text, progress_text, progress);
852     g_free (status_text);
853     g_free (progress_text);
854     return tuple;
858 override RBSource__proxy_do_impl_get_status
859 static void
860 _wrap_RBSource__proxy_do_impl_get_status(RBSource *self, char **status_text, char **progress_text, float *progress)
862     PyGILState_STATE __py_state;
863     PyObject *py_self;
864     PyObject *py_retval;
865     PyObject *py_method;
866     const char *st, *pt;
868     __py_state = pyg_gil_state_ensure();
869     py_self = pygobject_new((GObject *) self);
870     if (!py_self) {
871         if (PyErr_Occurred())
872             PyErr_Print();
873         pyg_gil_state_release(__py_state);
874         return;
875     }
877     py_method = PyObject_GetAttrString(py_self, "do_impl_get_status");
878     if (!py_method) {
879         if (PyErr_Occurred())
880             PyErr_Print();
881         Py_DECREF(py_self);
882         pyg_gil_state_release(__py_state);
883         return;
884     }
885     py_retval = PyObject_CallObject(py_method, NULL);
886     if (!py_retval) {
887         if (PyErr_Occurred())
888             PyErr_Print();
889         Py_DECREF(py_method);
890         Py_DECREF(py_self);
891         pyg_gil_state_release(__py_state);
892         return;
893     }
894     if (py_retval == Py_None) {
895         if (PyErr_Occurred())
896             PyErr_Print();
897         PyErr_SetString(PyExc_TypeError, "retval was None");
898         Py_DECREF(py_retval);
899         Py_DECREF(py_method);
900         Py_DECREF(py_self);
901         pyg_gil_state_release(__py_state);
902         return;
903     }
905     PyArg_ParseTuple (py_retval, "zzf", &st, &pt, progress);
906     if (st)
907       *status_text = g_strdup (st);
908     if (pt)
909       *progress_text = g_strdup (pt);
911     Py_DECREF(py_retval);
912     Py_DECREF(py_method);
913     Py_DECREF(py_self);
914     pyg_gil_state_release(__py_state);
918 override RBSource__do_impl_get_status
919 static PyObject *
920 _wrap_RBSource__do_impl_get_status(PyObject *cls, PyObject *args, PyObject *kwargs)
922     gpointer klass;
923     static char *kwlist[] = { "self", NULL };
924     PyGObject *self;
925     PyObject *tuple;
926     char *status_text = NULL;
927     char *progress_text = NULL;
928     float progress = 0.0f;
930     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_get_status", kwlist, &PyRBSource_Type, &self))
931         return NULL;
933     klass = g_type_class_ref(pyg_type_from_object(cls));
934     if (RB_SOURCE_CLASS(klass)->impl_get_status) {
935         RB_SOURCE_CLASS(klass)->impl_get_status(RB_SOURCE(self->obj), &status_text, &progress_text, &progress);
936     } else {
937         PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_get_status not implemented");
938         g_type_class_unref(klass);
939         return NULL;
940     }
941     g_type_class_unref(klass);
943     tuple = Py_BuildValue ("(ssf)", status_text, progress_text, progress);
944     g_free (status_text);
945     g_free (progress_text);
946     return tuple;
949 override rb_debug_real kwargs
951 static PyObject *
952 _wrap_rb_debug_real(PyObject *self, PyObject *args, PyObject *kwargs)
954     static char *kwlist[] = { "function", "file", "line", "newline", "str", NULL };
955     char *function, *file, *str;
956     int line, newline;
958     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ssiis:debug_real", kwlist, &function, &file, &line, &newline, &str))
959         return NULL;
960     rb_debug_real(function, file, line, (newline != 0), "%s", str);
961     Py_INCREF(Py_None);
962     return Py_None;