Updated Finnish translation
[rhythmbox.git] / bindings / python / rb.override
blob60c7acf5292a6880870fffa121ffb7352ef20ef7
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 = NULL;
529         __py_state = pyg_gil_state_ensure();
530         py_self = pygobject_new((GObject *)self);
531         if (!py_self) {
532                 if (PyErr_Occurred())
533                         PyErr_Print();
534                 pyg_gil_state_release(__py_state);
535                 return NULL;
536         }
538         py_method = PyObject_GetAttrString(py_self, "do_impl_get_ui_actions");
539         if (!py_method) {
540                 if (PyErr_Occurred())
541                         PyErr_Print();
542                 Py_DECREF(py_self);
543                 pyg_gil_state_release(__py_state);
544                 return FALSE;
545         }
547         py_retval = PyObject_CallObject(py_method, NULL);
548         if (!py_retval) {
549                 if (PyErr_Occurred())
550                         PyErr_Print();
551                 Py_DECREF(py_method);
552                 Py_DECREF(py_self);
553                 pyg_gil_state_release(__py_state);
554                 return NULL;
555         }
557         ret = _helper_unwrap_string_pylist (py_retval);
559         Py_DECREF(py_retval);
560         Py_DECREF(py_method);
561         Py_DECREF(py_self);
562         pyg_gil_state_release(__py_state);
564         return ret;
567 override RBSource__do_impl_get_search_actions
568 static PyObject *
569 _wrap_RBSource__do_impl_get_search_actions(PyObject *cls, PyObject *args, PyObject *kwargs)
571         gpointer klass;
572         static char *kwlist[] = { "self", NULL };
573         PyGObject *self;
574         GList *ret;
576         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_get_search_actions", kwlist, &PyRBSource_Type, &self))
577                 return NULL;
578         klass = g_type_class_ref(pyg_type_from_object(cls));
579         if (RB_SOURCE_CLASS(klass)->impl_get_search_actions)
580                 ret = RB_SOURCE_CLASS(klass)->impl_get_search_actions(RB_SOURCE(self->obj));
581         else {
582                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_get_search_actions not implemented");
583                 g_type_class_unref(klass);
584                 return NULL;
585         }
586         g_type_class_unref(klass);
587         return _helper_wrap_string_glist (ret);
590 override RBSource__proxy_do_impl_get_search_actions
591 static GList *
592 _wrap_RBSource__proxy_do_impl_get_search_actions (RBSource *self)
594         PyGILState_STATE __py_state;
595         PyObject *py_self;
596         PyObject *py_method;
597         PyObject *py_retval;
598         GList *ret = NULL;
600         __py_state = pyg_gil_state_ensure();
601         py_self = pygobject_new((GObject *)self);
602         if (!py_self) {
603                 if (PyErr_Occurred())
604                         PyErr_Print();
605                 pyg_gil_state_release(__py_state);
606                 return NULL;
607         }
609         py_method = PyObject_GetAttrString(py_self, "do_impl_get_search_actions");
610         if (!py_method) {
611                 if (PyErr_Occurred())
612                         PyErr_Print();
613                 Py_DECREF(py_self);
614                 pyg_gil_state_release(__py_state);
615                 return FALSE;
616         }
618         py_retval = PyObject_CallObject(py_method, NULL);
619         if (!py_retval) {
620                 if (PyErr_Occurred())
621                         PyErr_Print();
622                 Py_DECREF(py_method);
623                 Py_DECREF(py_self);
624                 pyg_gil_state_release(__py_state);
625                 return NULL;
626         }
628         ret = _helper_unwrap_string_pylist (py_retval);
630         Py_DECREF(py_retval);
631         Py_DECREF(py_method);
632         Py_DECREF(py_self);
633         pyg_gil_state_release(__py_state);
635         return ret;
638 override rb_shell_player_get_playback_state noargs
639 static PyObject *
640 _wrap_rb_shell_player_get_playback_state(PyGObject *self)
642     gboolean shuffle = FALSE;
643     gboolean repeat = FALSE;
645     if (!rb_shell_player_get_playback_state(RB_SHELL_PLAYER(self->obj), &shuffle, &repeat))
646         return NULL;
648     return Py_BuildValue ("bb", shuffle, repeat);
651 override rb_entry_view_get_sorting_order noargs
652 static PyObject *
653 _wrap_rb_entry_view_get_sorting_order(PyGObject *self)
655     char *column = NULL;
656     gint order = 0;
657     PyObject *object;
659     rb_entry_view_get_sorting_order(RB_ENTRY_VIEW(self->obj), &column, &order);
660     object = Py_BuildValue ("si", column, order);
661     g_free (column);
663     return object;
666 override rb_entry_view_set_fixed_column_width kwargs
667 static PyObject *
668 _wrap_rb_entry_view_set_fixed_column_width(PyGObject *self, PyObject *args, PyObject *kwargs)
670         static char *kwlist[] = { "column", "renderer", "strings", NULL };
671         PyGObject *py_column = NULL;
672         PyGObject *py_renderer = NULL;
673         PyObject *py_strings = NULL;
674         const char **strings;
675         int length, i;
677         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:RBEntryView.set_fixed_column_width", kwlist,
678             &py_column, &py_renderer, &py_strings))
679                 return NULL;
681         /* build the string list */
682         length = PySequence_Length (py_strings);
683         if (length < 0)
684                 return NULL;
685         strings = g_new0(const char*, length);
686         for (i = 0; i < length; i++) {
687                 PyObject *o;
689                 o = PySequence_GetItem (py_strings, i);
690                 strings[i] = PyString_AsString (o);
691                 Py_DECREF (o);
692         }
694         rb_entry_view_set_fixed_column_width (RB_ENTRY_VIEW (self->obj),
695                                               GTK_TREE_VIEW_COLUMN (py_column->obj),
696                                               GTK_CELL_RENDERER (py_renderer->obj),
697                                               strings);
698         g_free (strings);
700         Py_INCREF(Py_None);
701         return Py_None;
704 override RBSource__do_impl_paste
705 static PyObject *
706 _wrap_RBSource__do_impl_paste(PyObject *cls, PyObject *args, PyObject *kwargs)
708         gpointer klass;
709         static char *kwlist[] = { "self", "entries",NULL };
710         PyGObject *self;
711         PyObject *py_entries;
712         GList *entries;
714         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:RBSource.impl_paste", kwlist, &PyRBSource_Type, &self, &py_entries))
715                 return NULL;
717         entries = _helper_unwrap_pointer_pylist (py_entries, RHYTHMDB_TYPE_ENTRY);
719         klass = g_type_class_ref(pyg_type_from_object(cls));
720         if (RB_SOURCE_CLASS(klass)->impl_paste)
721                 RB_SOURCE_CLASS(klass)->impl_paste(RB_SOURCE(self->obj), entries);
722         else {
723                 PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_paste not implemented");
724                 g_type_class_unref(klass);
725                 return NULL;
726         }
727         g_type_class_unref(klass);
729         g_list_free (entries);
731         Py_INCREF(Py_None);
732         return Py_None;
735 override RBSource__proxy_do_impl_paste
736 static void
737 _wrap_RBSource__proxy_do_impl_paste(RBSource *self, GList *entries)
739     PyGILState_STATE __py_state;
740     PyObject *py_self;
741     PyObject *py_entries;
742     PyObject *py_retval;
743     PyObject *py_args;
744     PyObject *py_method;
746     __py_state = pyg_gil_state_ensure();
747     py_self = pygobject_new((GObject *) self);
748     if (!py_self) {
749         if (PyErr_Occurred())
750             PyErr_Print();
751         pyg_gil_state_release(__py_state);
752         return;
753     }
754     py_entries = _helper_wrap_pointer_glist (entries, RHYTHMDB_TYPE_ENTRY);
756     py_args = PyTuple_New(1);
757     Py_INCREF(py_entries);
758     PyTuple_SET_ITEM(py_args, 0, py_entries);
760     py_method = PyObject_GetAttrString(py_self, "do_impl_paste");
761     if (!py_method) {
762         if (PyErr_Occurred())
763             PyErr_Print();
764         Py_DECREF(py_args);
765         Py_DECREF(py_self);
766         pyg_gil_state_release(__py_state);
767         return;
768     }
769     py_retval = PyObject_CallObject(py_method, py_args);
770     if (!py_retval) {
771         if (PyErr_Occurred())
772             PyErr_Print();
773         Py_DECREF(py_method);
774         Py_DECREF(py_args);
775         Py_DECREF(py_self);
776         pyg_gil_state_release(__py_state);
777         return;
778     }
779     if (py_retval != Py_None) {
780         if (PyErr_Occurred())
781             PyErr_Print();
782         PyErr_SetString(PyExc_TypeError, "retval should be None");
783         Py_DECREF(py_retval);
784         Py_DECREF(py_method);
785         Py_DECREF(py_args);
786         Py_DECREF(py_self);
787         pyg_gil_state_release(__py_state);
788         return;
789     }
791     Py_DECREF(py_retval);
792     Py_DECREF(py_method);
793     Py_DECREF(py_args);
794     Py_DECREF(py_self);
795     pyg_gil_state_release(__py_state);
799 override rb_library_browser_get_property_views noargs
800 static PyObject *
801 _wrap_rb_library_browser_get_property_views(PyGObject *self)
803         PyObject *py_list;
804         GList *list;
806         list = rb_library_browser_get_property_views (RB_LIBRARY_BROWSER(self->obj));
807         py_list = _helper_wrap_gobject_glist (list);
808         g_list_free (list);
810         return py_list;
814 override rb_library_browser_set_selection kwargs
815 static PyObject *
816 _wrap_rb_library_browser_set_selection(PyGObject *self, PyObject *args, PyObject *kwargs)
818     static char *kwlist[] = { "type", "keys", NULL };
819     PyObject *py_keys = NULL;
820     PyObject *py_propid = NULL;
821     RhythmDBPropType propid;
822     GList *keys;
824     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:RBLibraryBrowser.set_selection", kwlist, &py_propid, &py_keys))
825         return NULL;
826     if (pyg_enum_get_value(RHYTHMDB_TYPE_PROP_TYPE, py_propid, (gint *)&propid))
827         return NULL;
829     keys = _helper_unwrap_string_pylist (py_keys);
830     rb_library_browser_set_selection (RB_LIBRARY_BROWSER(self->obj), propid, keys);
831     rb_list_deep_free (keys);
833     Py_INCREF(Py_None);
834     return Py_None;
838 override rb_source_get_status noargs
839 static PyObject *
840 _wrap_rb_source_get_status(PyGObject *self)
842     char *status_text = NULL;
843     char *progress_text = NULL;
844     float progress = 0.0f;
845     PyObject *tuple;
847     rb_source_get_status (RB_SOURCE (self->obj), &status_text, &progress_text, &progress);
848     tuple = Py_BuildValue ("ssf", status_text, progress_text, progress);
849     g_free (status_text);
850     g_free (progress_text);
851     return tuple;
855 override RBSource__proxy_do_impl_get_status
856 static void
857 _wrap_RBSource__proxy_do_impl_get_status(RBSource *self, char **status_text, char **progress_text, float *progress)
859     PyGILState_STATE __py_state;
860     PyObject *py_self;
861     PyObject *py_retval;
862     PyObject *py_method;
863     const char *st, *pt;
865     __py_state = pyg_gil_state_ensure();
866     py_self = pygobject_new((GObject *) self);
867     if (!py_self) {
868         if (PyErr_Occurred())
869             PyErr_Print();
870         pyg_gil_state_release(__py_state);
871         return;
872     }
874     py_method = PyObject_GetAttrString(py_self, "do_impl_get_status");
875     if (!py_method) {
876         if (PyErr_Occurred())
877             PyErr_Print();
878         Py_DECREF(py_self);
879         pyg_gil_state_release(__py_state);
880         return;
881     }
882     py_retval = PyObject_CallObject(py_method, NULL);
883     if (!py_retval) {
884         if (PyErr_Occurred())
885             PyErr_Print();
886         Py_DECREF(py_method);
887         Py_DECREF(py_self);
888         pyg_gil_state_release(__py_state);
889         return;
890     }
891     if (py_retval == Py_None) {
892         if (PyErr_Occurred())
893             PyErr_Print();
894         PyErr_SetString(PyExc_TypeError, "retval was None");
895         Py_DECREF(py_retval);
896         Py_DECREF(py_method);
897         Py_DECREF(py_self);
898         pyg_gil_state_release(__py_state);
899         return;
900     }
902     PyArg_ParseTuple (py_retval, "zzf", &st, &pt, progress);
903     if (st)
904       *status_text = g_strdup (st);
905     if (pt)
906       *progress_text = g_strdup (pt);
908     Py_DECREF(py_retval);
909     Py_DECREF(py_method);
910     Py_DECREF(py_self);
911     pyg_gil_state_release(__py_state);
915 override RBSource__do_impl_get_status
916 static PyObject *
917 _wrap_RBSource__do_impl_get_status(PyObject *cls, PyObject *args, PyObject *kwargs)
919     gpointer klass;
920     static char *kwlist[] = { "self", NULL };
921     PyGObject *self;
922     PyObject *tuple;
923     char *status_text = NULL;
924     char *progress_text = NULL;
925     float progress = 0.0f;
927     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBSource.impl_get_status", kwlist, &PyRBSource_Type, &self))
928         return NULL;
930     klass = g_type_class_ref(pyg_type_from_object(cls));
931     if (RB_SOURCE_CLASS(klass)->impl_get_status) {
932         RB_SOURCE_CLASS(klass)->impl_get_status(RB_SOURCE(self->obj), &status_text, &progress_text, &progress);
933     } else {
934         PyErr_SetString(PyExc_NotImplementedError, "virtual method RBSource.impl_get_status not implemented");
935         g_type_class_unref(klass);
936         return NULL;
937     }
938     g_type_class_unref(klass);
940     tuple = Py_BuildValue ("(ssf)", status_text, progress_text, progress);
941     g_free (status_text);
942     g_free (progress_text);
943     return tuple;
946 override rb_debug_real kwargs
948 static PyObject *
949 _wrap_rb_debug_real(PyObject *self, PyObject *args, PyObject *kwargs)
951     static char *kwlist[] = { "function", "file", "line", "newline", "str", NULL };
952     char *function, *file, *str;
953     int line, newline;
955     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ssiis:debug_real", kwlist, &function, &file, &line, &newline, &str))
956         return NULL;
957     rb_debug_real(function, file, line, (newline != 0), "%s", str);
958     Py_INCREF(Py_None);
959     return Py_None;