#include #define NO_IMPORT_PYGOBJECT 1 #include #include #include "gcompris/gcompris.h" #include "py-mod-sound.h" #include "py-gcompris-board.h" /* All functions provided by this python module * wraps a gcompris function. Each "py_*" function wraps the * "*" C function. */ /*void gc_sound_play_ogg_list( GList* files ); */ static PyObject* py_gc_sound_play_ogg_list(PyObject* self, PyObject* args) { GList* list; PyObject* pylist; /* Parse arguments */ if(!PyArg_ParseTuple(args, "O:gc_sound_play_ogg_list", &pylist)) return NULL; list = (GList*) pygobject_get(pylist); /* Call the corresponding C function */ gc_sound_play_ogg_list(list); /* Create and return the result */ Py_INCREF(Py_None); return Py_None; } /* void gc_sound_play_ogg(char *, ...); The method: gc_sound_play_ogg_list( GList* ) is used to perform the core call. (Because there's no way to construct a variable argument function call. */ static PyObject* py_gc_sound_play_ogg(PyObject* self, PyObject* args) { PyObject* item; GList* list = NULL; int i, length; /* Parse arguments */ length = PyTuple_Size(args); if(length<1) return NULL; for(i=0; i