Back to index

gcompris  8.2.2
Functions | Variables
py-mod-skin.c File Reference
#include <Python.h>
#include <pygobject.h>
#include "gcompris/gcompris.h"
#include "py-mod-skin.h"
#include "py-gcompris-board.h"

Go to the source code of this file.

Functions

static PyObject * py_gc_skin_image_get (PyObject *self, PyObject *args)
static PyObject * py_gc_skin_pixmap_load (PyObject *self, PyObject *args)
static PyObject * py_gc_skin_get_color_default (PyObject *self, PyObject *args)
static PyObject * py_gc_skin_get_font_default (PyObject *self, PyObject *args)
static PyObject * py_gc_skin_get_color (PyObject *self, PyObject *args)
static PyObject * py_gc_skin_get_font (PyObject *self, PyObject *args)
void python_gc_skin_module_init (void)

Variables

static PyMethodDef PythonGcomprisSkinModule []

Function Documentation

static PyObject* py_gc_skin_get_color ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 102 of file py-mod-skin.c.

{
  gchar* id;
  guint32 result;

  /* Parse arguments */
  if(!PyArg_ParseTuple(args, "s:gc_skin_get_color", &id))
    return NULL;

  /* Call the corresponding C function */
  result = gc_skin_get_color(id);

  /* Create and return the result */
  return PyLong_FromUnsignedLong(result);
}
static PyObject* py_gc_skin_get_color_default ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 62 of file py-mod-skin.c.

{
  gchar* id;
  guint32 def;
  guint32 result;

  /* Parse arguments */
  if(!PyArg_ParseTuple(args, "sl:gc_skin_get_color_default", &id, &def))
    return NULL;

  /* Call the corresponding C function */
  result = gc_skin_get_color_default(id, def);

  /* Create and return the result */
  return PyLong_FromUnsignedLong(result);
}

Here is the call graph for this function:

static PyObject* py_gc_skin_get_font ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 121 of file py-mod-skin.c.

{
  gchar* id;
  gchar* result;

  /* Parse arguments */
  if(!PyArg_ParseTuple(args, "s:gc_skin_get_font_default", &id))
    return NULL;

  /* Call the corresponding C function */
  result = gc_skin_get_font(id);

  /* Create and return the result */
  return Py_BuildValue("s", result);
}
static PyObject* py_gc_skin_get_font_default ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 82 of file py-mod-skin.c.

{
  gchar* id;
  gchar* def;
  gchar* result;

  /* Parse arguments */
  if(!PyArg_ParseTuple(args, "ss:gc_skin_get_font_default", &id, &def))
    return NULL;

  /* Call the corresponding C function */
  result = gc_skin_get_font_default(id, def);

  /* Create and return the result */
  return Py_BuildValue("s", result);
}

Here is the call graph for this function:

static PyObject* py_gc_skin_image_get ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 15 of file py-mod-skin.c.

{
  gchar* imagename;
  gchar* result;
  PyObject* pyresult;
  /* Parse arguments */
  if(!PyArg_ParseTuple(args, "s:gc_skin_image_get", &imagename))
    return NULL;

  /* Call the corresponding C function */
  result = gc_skin_image_get(imagename);

  /* Create and return the result */
  pyresult = Py_BuildValue("s", result);

  g_free(result);

  return(pyresult);
}

Here is the call graph for this function:

static PyObject* py_gc_skin_pixmap_load ( PyObject *  self,
PyObject *  args 
) [static]

Definition at line 38 of file py-mod-skin.c.

{
  char* pixmapfile;
  GdkPixbuf* result;
  PyObject* pyresult;

  /* Parse arguments */
  if(!PyArg_ParseTuple(args, "s:gc_skin_pixmap_load", &pixmapfile))
    return NULL;

  /* Call the corresponding C function */
  result = gc_skin_pixmap_load(pixmapfile);

  /* Create and return the result */
  pyresult = (PyObject*) pygobject_new((GObject*) result);

  gdk_pixbuf_unref(result);

  return(pyresult);
}

Here is the call graph for this function:

void python_gc_skin_module_init ( void  )

Definition at line 153 of file py-mod-skin.c.

{
  PyObject* module;
  module = Py_InitModule("_gcompris_skin", PythonGcomprisSkinModule);
}

Here is the caller graph for this function:


Variable Documentation

PyMethodDef PythonGcomprisSkinModule[] [static]
Initial value:
 {
  { "image_to_skin",  py_gc_skin_image_get, METH_VARARGS, "gc_skin_image_get" },
  { "load_pixmap",  py_gc_skin_pixmap_load, METH_VARARGS, "gc_skin_pixmap_load" },
  { "get_color_default",  py_gc_skin_get_color_default, METH_VARARGS,
    "gc_skin_get_color_default" },
  { "get_font_default",  py_gc_skin_get_font_default, METH_VARARGS,
    "gc_skin_get_font_default" },
  { "get_color",  py_gc_skin_get_color, METH_VARARGS,
    "gc_skin_get_color" },
  { "get_font",  py_gc_skin_get_font, METH_VARARGS,
    "gc_skin_get_font" },
  { NULL, NULL, 0, NULL}
}

Definition at line 138 of file py-mod-skin.c.