/*
 * FILE : ../_gdkimlibmodule.c
 * 
 * This file was automatically generated by :
 * Simplified Wrapper and Interface Generator (SWIG)
 * Version 1.1 (Patch 2)
 * 
 * Portions Copyright (c) 1995-1997
 * The University of Utah and The Regents of the University of California.
 * Permission is granted to distribute this file in any manner provided
 * this notice remains intact.
 * 
 * Do not make changes to this file--changes will be lost!
 *
 */


#define SWIGCODE
/* Implementation : PYTHON */

#define SWIGPYTHON
#include <string.h>
#include <stdlib.h>
/***********************************************************************
 * $Header:$
 * swig_lib/python/python.cfg
 *
 * This file contains coded needed to add variable linking to the
 * Python interpreter.   C variables are added as a new kind of Python
 * datatype.
 *
 * Also contains supporting code for building python under Windows
 * and things like that.
 *
 * $Log:$
 ************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif
#include "Python.h"
#ifdef __cplusplus
}
#endif

/* Definitions for Windows/Unix exporting */
#if defined(__WIN32__)
#   if defined(_MSC_VER)
#	define SWIGEXPORT(a,b) __declspec(dllexport) a b
#   else
#	if defined(__BORLANDC__)
#	    define SWIGEXPORT(a,b) a _export b
#	else
#	    define SWIGEXPORT(a,b) a b
#	endif
#   endif
#else
#   define SWIGEXPORT(a,b) a b
#endif

#ifdef SWIG_GLOBAL
#ifdef __cplusplus
#define SWIGSTATIC extern "C"
#else
#define SWIGSTATIC
#endif
#endif

#ifndef SWIGSTATIC
#define SWIGSTATIC static
#endif

typedef struct {
  char  *name;
  PyObject *(*get_attr)(void);
  int (*set_attr)(PyObject *);
} swig_globalvar;

typedef struct swig_varlinkobject {
  PyObject_HEAD
  swig_globalvar **vars;
  int      nvars;
  int      maxvars;
} swig_varlinkobject;

/* ----------------------------------------------------------------------
   swig_varlink_repr()

   Function for python repr method
   ---------------------------------------------------------------------- */

static PyObject *
swig_varlink_repr(swig_varlinkobject *v)
{
  v = v;
  return PyString_FromString("<Global variables>");
}

/* ---------------------------------------------------------------------
   swig_varlink_print()

   Print out all of the global variable names
   --------------------------------------------------------------------- */

static int
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags)
{

  int i = 0;
  flags = flags;
  fprintf(fp,"Global variables { ");
  while (v->vars[i]) {
    fprintf(fp,"%s", v->vars[i]->name);
    i++;
    if (v->vars[i]) fprintf(fp,", ");
  }
  fprintf(fp," }\n");
  return 0;
}

/* --------------------------------------------------------------------
   swig_varlink_getattr
 
   This function gets the value of a variable and returns it as a
   PyObject.   In our case, we'll be looking at the datatype and
   converting into a number or string
   -------------------------------------------------------------------- */

static PyObject *
swig_varlink_getattr(swig_varlinkobject *v, char *n)
{
  int i = 0;
  char temp[128];

  while (v->vars[i]) {
    if (strcmp(v->vars[i]->name,n) == 0) {
      return (*v->vars[i]->get_attr)();
    }
    i++;
  }
  sprintf(temp,"C global variable %s not found.", n);
  PyErr_SetString(PyExc_NameError,temp);
  return NULL;
}

/* -------------------------------------------------------------------
   swig_varlink_setattr()

   This function sets the value of a variable.
   ------------------------------------------------------------------- */

static int
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
{
  char temp[128];
  int i = 0;
  while (v->vars[i]) {
    if (strcmp(v->vars[i]->name,n) == 0) {
      return (*v->vars[i]->set_attr)(p);
    }
    i++;
  }
  sprintf(temp,"C global variable %s not found.", n);
  PyErr_SetString(PyExc_NameError,temp);
  return 1;
}

statichere PyTypeObject varlinktype = {
/*  PyObject_HEAD_INIT(&PyType_Type)  Note : This doesn't work on some machines */
  PyObject_HEAD_INIT(0)              
  0,
  "varlink",                          /* Type name    */
  sizeof(swig_varlinkobject),         /* Basic size   */
  0,                                  /* Itemsize     */
  0,                                  /* Deallocator  */ 
  (printfunc) swig_varlink_print,     /* Print        */
  (getattrfunc) swig_varlink_getattr, /* get attr     */
  (setattrfunc) swig_varlink_setattr, /* Set attr     */
  0,                                  /* tp_compare   */
  (reprfunc) swig_varlink_repr,       /* tp_repr      */    
  0,                                  /* tp_as_number */
  0,                                  /* tp_as_mapping*/
  0,                                  /* tp_hash      */
};

/* Create a variable linking object for use later */

SWIGSTATIC PyObject *
SWIG_newvarlink(void)
{
  swig_varlinkobject *result = 0;
  result = PyMem_NEW(swig_varlinkobject,1);
  varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
  result->ob_type = &varlinktype;
  /*  _Py_NewReference(result);  Does not seem to be necessary */
  result->nvars = 0;
  result->maxvars = 64;
  result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *));
  result->vars[0] = 0;
  Py_XINCREF((PyObject *) result);
  return ((PyObject*) result);
}

SWIGSTATIC void
SWIG_addvarlink(PyObject *p, char *name,
	   PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p))
{
  swig_varlinkobject *v;
  v= (swig_varlinkobject *) p;
	
  if (v->nvars >= v->maxvars -1) {
    v->maxvars = 2*v->maxvars;
    v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *));
    if (v->vars == NULL) {
      fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n");
      exit(1);
    }
  }
  v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1);
  strcpy(v->vars[v->nvars]->name,name);
  v->vars[v->nvars]->get_attr = get_attr;
  v->vars[v->nvars]->set_attr = set_attr;
  v->nvars++;
  v->vars[v->nvars] = 0;
}



/* remove swig pointer handling code */
#define SWIG_RegisterMapping(o,n,f)
#define SWIG_MakePtr(b,p,t)
#define SWIG_GetPtr(b,p,t) NULL

#define SWIG_init    init_gdkimlib

#define SWIG_name    "_gdkimlib"

#include <gtk/gtk.h>
#include <gdk_imlib.h>


typedef struct {
  PyObject_HEAD
  GtkObject *go;
} PyGtk_Object;
PyTypeObject *PyGtk_Type;
#define PyGtk_Check(op) ((op)->ob_type == PyGtk_Type)

static PyObject *
PyGtk_New(GtkObject *go) {
  PyGtk_Object *self;

  self = (PyGtk_Object *)PyObject_NEW(PyGtk_Object, PyGtk_Type);
  if (self == NULL)
    return NULL;
  self->go = go;
  gtk_object_ref(self->go);
  return (PyObject *)self;
}

static PyObject * gdk__imlib_init(PyObject *self, PyObject *args) {
  static called = 0;
  PyObject *gtk_mod, *dict, *func, *types;

  if (called) {
    Py_INCREF(Py_None);
    return Py_None;
  }
  called = 1;
  if (!PyArg_ParseTuple(args, ":gdk_imlib_init"))
    return NULL;

  
  gtk_mod = PyImport_ImportModule("gtk");
  dict = PyModule_GetDict(gtk_mod);
  Py_DECREF(gtk_mod);
  /* make sure gtk_init was called */
  func = PyDict_GetItemString(dict, "gtk_init");
  types = PyObject_CallObject(func, NULL);
  Py_DECREF(types);

  func = PyDict_GetItemString(dict, "_get_types");
  types = PyObject_CallObject(func, NULL);

  /* actually get the GtkObject python type, so it can be used in this mod */
  PyGtk_Type = (PyTypeObject *)PyDict_GetItemString(types, "GtkObject");
  Py_INCREF(PyGtk_Type);
  Py_DECREF(types);

  /* now actually initialise imlib */
  gdk_imlib_init();

  Py_INCREF(Py_None);
  return Py_None;
}


typedef struct {
	PyObject_HEAD
	GdkImlibImage *obj;
} PyGdkImlibImage_Object;

staticforward PyTypeObject PyGdkImlibImage_Type;
#define PyGdkImlibImage_Check(ob) ((ob)->ob_type == &PyGdkImlibImage_Type)
#define PyGdkImlibImage_Get(ob) (((PyGdkImlibImage_Object *)(ob))->obj)

static PyObject *
PyGdkImlibImage_New(GdkImlibImage *obj) {
  PyGdkImlibImage_Object *self;

  self = (PyGdkImlibImage_Object *)PyObject_NEW(PyGdkImlibImage_Object,
						&PyGdkImlibImage_Type);
  if (self == NULL)
    return NULL;
  self->obj = obj;
  return (PyObject *)self;
}

static void
PyGdkImlibImage_Dealloc(PyGdkImlibImage_Object *self) {
  gdk_imlib_destroy_image(self->obj); 
  PyMem_DEL(self);
}

static int
PyGdkImlibImage_Compare(PyGdkImlibImage_Object *self,
			PyGdkImlibImage_Object *v) {
  if (self->obj == v->obj) return 0;
  if (self->obj > v->obj) return -1;
  return 1;
}

static PyTypeObject PyGdkImlibImage_Type = {
  PyObject_HEAD_INIT(&PyType_Type)
  0,
  "GdkImlibImage",
  sizeof(PyGdkImlibImage_Object),
  0,
  (destructor)PyGdkImlibImage_Dealloc,
  (printfunc)0,
  (getattrfunc)0,
  (setattrfunc)0,
  (cmpfunc)PyGdkImlibImage_Compare,
  (reprfunc)0,
  0,
  0,
  0,
  (hashfunc)0,
  (ternaryfunc)0,
  (reprfunc)0,
  0L,0L,0L,0L,
  NULL
};


static PyObject *gdk__imlib_best_color_match(PyObject *self, PyObject *args) {
  int r, g, b;
  if (!PyArg_ParseTuple(args, "iii:gdk_imlib_best_color_match", &r, &g, &b))
    return NULL;
  gdk_imlib_best_color_match(&r, &g, &b);
  return Py_BuildValue("(iii)", r, g, b);
}

static PyObject *gdk__imlib_make_pixmap(PyObject *self, PyObject *args) {
  GtkWidget *w;
  GdkPixmap *p;
  GdkBitmap *b;
  PyGdkImlibImage_Object *o;
  PyObject *ret;
  if (!PyArg_ParseTuple(args, "O!:gdk_imlib_make_pixmap",
			&PyGdkImlibImage_Type, &o))
    return NULL;
  p = gdk_imlib_move_image(PyGdkImlibImage_Get(o));
  b = gdk_imlib_move_mask(PyGdkImlibImage_Get(o));

  /* make the pixmap widget use imlib's visual and colormap */
  gtk_widget_push_visual(gdk_imlib_get_visual());
  gtk_widget_push_colormap(gdk_imlib_get_colormap());

  w = gtk_pixmap_new(p, b);

  /* pop imlib's visual and colormap */
  gtk_widget_pop_visual();
  gtk_widget_pop_colormap();

  gdk_imlib_free_pixmap(p);
  ret = PyGtk_New(GTK_OBJECT(w));
  if (ret == NULL)
    gtk_widget_unref(w);
  return ret;
}

#define gdk_imlib_get_rgb_width(im)  ((im)->rgb_width)
#define gdk_imlib_get_rgb_height(im) ((im)->rgb_height)
#define gdk_imlib_get_filename(im)   ((im)->filename)

static PyObject *_wrap_gdk_imlib_get_render_type(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":gdk_imlib_get_render_type")) 
        return NULL;
    _result = (int )gdk_imlib_get_render_type();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_render_type(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:gdk_imlib_set_render_type",&_arg0)) 
        return NULL;
    gdk_imlib_set_render_type(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_load_colors(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    char * _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:gdk_imlib_load_colors",&_arg0)) 
        return NULL;
    _result = (int )gdk_imlib_load_colors(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_load_image(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _result;
    char * _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:gdk_imlib_load_image",&_arg0)) 
        return NULL;
    _result = (GdkImlibImage *)gdk_imlib_load_image(_arg0);
{
  if (_result == NULL) {
    PyErr_SetString(PyExc_RuntimeError, "return value is NULL");
    return NULL;
  }
  _resultobj = PyGdkImlibImage_New(_result);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_render(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GdkImlibImage * _arg0;
    int  _arg1;
    int  _arg2;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"Oii:gdk_imlib_render",&_obj0,&_arg1,&_arg2)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (int )gdk_imlib_render(_arg0,_arg1,_arg2);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_free_colors(PyObject *self, PyObject *args) {
    PyObject * _resultobj;

    self = self;
    if(!PyArg_ParseTuple(args,":gdk_imlib_free_colors")) 
        return NULL;
    gdk_imlib_free_colors();
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_border(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibBorder * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = malloc(sizeof(GdkImlibColor));
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_border",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_border(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  _resultobj = Py_BuildValue("(iii)", _arg1->left, _arg1->right,
			  _arg1->top, _arg1->bottom);
}
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_border(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibBorder * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_border",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  if (!PyTuple_Check(_obj1)) {
    PyErr_SetString(PyExc_TypeError, "not a tuple");
    return NULL;
  }
  _arg1 = malloc(sizeof(GdkImlibBorder));
  if (!PyArg_ParseTuple(_obj1, "iiii", &(_arg1->left), &(_arg1->right),
			&(_arg1->top), &(_arg1->bottom))) {
    free(_arg1);
    return NULL;
  }
}
    gdk_imlib_set_image_border(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_shape(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColor * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = malloc(sizeof(GdkImlibColor));
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_shape",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_shape(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  _resultobj = Py_BuildValue("(iii)", _arg1->r, _arg1->g, _arg1->b);
}
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_shape(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColor * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_shape",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  if (!PyTuple_Check(_obj1)) {
    PyErr_SetString(PyExc_TypeError, "not a tuple");
    return NULL;
  }
  _arg1 = malloc(sizeof(GdkImlibColor));
  if (!PyArg_ParseTuple(_obj1, "iii", &(_arg1->r), &(_arg1->g), &(_arg1->b))) {
    free(_arg1);
    return NULL;
  }
}
    gdk_imlib_set_image_shape(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_save_image_to_eim(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"Os:gdk_imlib_save_image_to_eim",&_obj0,&_arg1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (int )gdk_imlib_save_image_to_eim(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_add_image_to_eim(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"Os:gdk_imlib_add_image_to_eim",&_obj0,&_arg1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (int )gdk_imlib_add_image_to_eim(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_save_image_to_ppm(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"Os:gdk_imlib_save_image_to_ppm",&_obj0,&_arg1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (int )gdk_imlib_save_image_to_ppm(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_modifier",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  if (!PyTuple_Check(_obj1)) {
    PyErr_SetString(PyExc_TypeError, "not a tuple");
    return NULL;
  }
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
  if (!PyArg_ParseTuple(_obj1, "iii", &(_arg1->gamma),
			&(_arg1->brightness), &(_arg1->contrast))) {
    free(_arg1);
    return NULL;
  }
}
    gdk_imlib_set_image_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_red_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_red_modifier",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  if (!PyTuple_Check(_obj1)) {
    PyErr_SetString(PyExc_TypeError, "not a tuple");
    return NULL;
  }
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
  if (!PyArg_ParseTuple(_obj1, "iii", &(_arg1->gamma),
			&(_arg1->brightness), &(_arg1->contrast))) {
    free(_arg1);
    return NULL;
  }
}
    gdk_imlib_set_image_red_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_green_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_green_modifier",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  if (!PyTuple_Check(_obj1)) {
    PyErr_SetString(PyExc_TypeError, "not a tuple");
    return NULL;
  }
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
  if (!PyArg_ParseTuple(_obj1, "iii", &(_arg1->gamma),
			&(_arg1->brightness), &(_arg1->contrast))) {
    free(_arg1);
    return NULL;
  }
}
    gdk_imlib_set_image_green_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_blue_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_blue_modifier",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  if (!PyTuple_Check(_obj1)) {
    PyErr_SetString(PyExc_TypeError, "not a tuple");
    return NULL;
  }
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
  if (!PyArg_ParseTuple(_obj1, "iii", &(_arg1->gamma),
			&(_arg1->brightness), &(_arg1->contrast))) {
    free(_arg1);
    return NULL;
  }
}
    gdk_imlib_set_image_blue_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_modifier",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  _resultobj = Py_BuildValue("(iii)", _arg1->gamma, _arg1->brightness,
			  _arg1->contrast);
}
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_red_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_red_modifier",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_red_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  _resultobj = Py_BuildValue("(iii)", _arg1->gamma, _arg1->brightness,
			  _arg1->contrast);
}
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_green_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_green_modifier",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_green_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  _resultobj = Py_BuildValue("(iii)", _arg1->gamma, _arg1->brightness,
			  _arg1->contrast);
}
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_blue_modifier(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    GdkImlibColorModifier * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = malloc(sizeof(GdkImlibColorModifier));
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_blue_modifier",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_blue_modifier(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  _resultobj = Py_BuildValue("(iii)", _arg1->gamma, _arg1->brightness,
			  _arg1->contrast);
}
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_red_curve(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_red_curve",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  int i;
  PyObject *item;
  if (!PySequence_Check(_obj1) || PySequence_Length(_obj1) < 256) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    return NULL;
  }
  _arg1 = malloc(256 * sizeof(char));
  for (i = 0; i < 256; i++) {
    item = PySequence_GetItem(_obj1, i);
    if (!PyInt_Check(item)) {
      PyErr_SetString(PyExc_TypeError, "item of sequence not an integer");
      free(_arg1);
      return NULL;
    }
    _arg1[i] = PyInt_AsLong(item);
  }
}
    gdk_imlib_set_image_red_curve(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_green_curve(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_green_curve",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  int i;
  PyObject *item;
  if (!PySequence_Check(_obj1) || PySequence_Length(_obj1) < 256) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    return NULL;
  }
  _arg1 = malloc(256 * sizeof(char));
  for (i = 0; i < 256; i++) {
    item = PySequence_GetItem(_obj1, i);
    if (!PyInt_Check(item)) {
      PyErr_SetString(PyExc_TypeError, "item of sequence not an integer");
      free(_arg1);
      return NULL;
    }
    _arg1[i] = PyInt_AsLong(item);
  }
}
    gdk_imlib_set_image_green_curve(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_image_blue_curve(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;
    PyObject * _obj1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"OO:gdk_imlib_set_image_blue_curve",&_obj0,&_obj1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
{
  int i;
  PyObject *item;
  if (!PySequence_Check(_obj1) || PySequence_Length(_obj1) < 256) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    return NULL;
  }
  _arg1 = malloc(256 * sizeof(char));
  for (i = 0; i < 256; i++) {
    item = PySequence_GetItem(_obj1, i);
    if (!PyInt_Check(item)) {
      PyErr_SetString(PyExc_TypeError, "item of sequence not an integer");
      free(_arg1);
      return NULL;
    }
    _arg1[i] = PyInt_AsLong(item);
  }
}
    gdk_imlib_set_image_blue_curve(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_red_curve(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = g_new(char, 256);
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_red_curve",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_red_curve(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  int i;
  _resultobj = PyList_New(256);
  for (i = 0; i < 256; i++)
    PyList_SetItem(_resultobj, i, PyInt_FromLong(_arg1[i]));
}
{
  g_free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_green_curve(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = g_new(char, 256);
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_green_curve",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_green_curve(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  int i;
  _resultobj = PyList_New(256);
  for (i = 0; i < 256; i++)
    PyList_SetItem(_resultobj, i, PyInt_FromLong(_arg1[i]));
}
{
  g_free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_image_blue_curve(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    char * _arg1;
    PyObject * _obj0 = 0;

    self = self;
{
  _arg1 = g_new(char, 256);
}
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_image_blue_curve",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_get_image_blue_curve(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
{
  int i;
  _resultobj = PyList_New(256);
  for (i = 0; i < 256; i++)
    PyList_SetItem(_resultobj, i, PyInt_FromLong(_arg1[i]));
}
{
  g_free(_arg1);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_apply_modifiers_to_rgb(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_apply_modifiers_to_rgb",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_apply_modifiers_to_rgb(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_changed_image(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_changed_image",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_changed_image(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_flip_image_horizontal(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_flip_image_horizontal",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_flip_image_horizontal(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_flip_image_vertical(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_flip_image_vertical",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_flip_image_vertical(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_rotate_image(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _arg0;
    int  _arg1;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"Oi:gdk_imlib_rotate_image",&_obj0,&_arg1)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    gdk_imlib_rotate_image(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_clone_image(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _result;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_clone_image",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (GdkImlibImage *)gdk_imlib_clone_image(_arg0);
{
  if (_result == NULL) {
    PyErr_SetString(PyExc_RuntimeError, "return value is NULL");
    return NULL;
  }
  _resultobj = PyGdkImlibImage_New(_result);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_clone_scaled_image(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GdkImlibImage * _result;
    GdkImlibImage * _arg0;
    int  _arg1;
    int  _arg2;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"Oii:gdk_imlib_clone_scaled_image",&_obj0,&_arg1,&_arg2)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (GdkImlibImage *)gdk_imlib_clone_scaled_image(_arg0,_arg1,_arg2);
{
  if (_result == NULL) {
    PyErr_SetString(PyExc_RuntimeError, "return value is NULL");
    return NULL;
  }
  _resultobj = PyGdkImlibImage_New(_result);
}
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_fallback(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":gdk_imlib_get_fallback")) 
        return NULL;
    _result = (int )gdk_imlib_get_fallback();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_set_fallback(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:gdk_imlib_set_fallback",&_arg0)) 
        return NULL;
    gdk_imlib_set_fallback(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_sysconfig(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;

    self = self;
    if(!PyArg_ParseTuple(args,":gdk_imlib_get_sysconfig")) 
        return NULL;
    _result = (char *)gdk_imlib_get_sysconfig();
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_rgb_width(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_rgb_width",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (int )gdk_imlib_get_rgb_width(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_rgb_height(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_rgb_height",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (int )gdk_imlib_get_rgb_height(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_gdk_imlib_get_filename(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GdkImlibImage * _arg0;
    PyObject * _obj0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"O:gdk_imlib_get_filename",&_obj0)) 
        return NULL;
{
  if (PyGdkImlibImage_Check(_obj0))
    _arg0 = PyGdkImlibImage_Get(_obj0);
  else {
    PyErr_SetString(PyExc_TypeError, "object not an Imlib image");
    return NULL;
  }
}
    _result = (char *)gdk_imlib_get_filename(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyMethodDef _gdkimlibMethods[] = {
	 { "gdk_imlib_get_filename", _wrap_gdk_imlib_get_filename, 1 },
	 { "gdk_imlib_get_rgb_height", _wrap_gdk_imlib_get_rgb_height, 1 },
	 { "gdk_imlib_get_rgb_width", _wrap_gdk_imlib_get_rgb_width, 1 },
	 { "gdk_imlib_make_pixmap", gdk__imlib_make_pixmap, 1 },
	 { "gdk_imlib_best_color_match", gdk__imlib_best_color_match, 1 },
	 { "gdk_imlib_get_sysconfig", _wrap_gdk_imlib_get_sysconfig, 1 },
	 { "gdk_imlib_set_fallback", _wrap_gdk_imlib_set_fallback, 1 },
	 { "gdk_imlib_get_fallback", _wrap_gdk_imlib_get_fallback, 1 },
	 { "gdk_imlib_clone_scaled_image", _wrap_gdk_imlib_clone_scaled_image, 1 },
	 { "gdk_imlib_clone_image", _wrap_gdk_imlib_clone_image, 1 },
	 { "gdk_imlib_rotate_image", _wrap_gdk_imlib_rotate_image, 1 },
	 { "gdk_imlib_flip_image_vertical", _wrap_gdk_imlib_flip_image_vertical, 1 },
	 { "gdk_imlib_flip_image_horizontal", _wrap_gdk_imlib_flip_image_horizontal, 1 },
	 { "gdk_imlib_changed_image", _wrap_gdk_imlib_changed_image, 1 },
	 { "gdk_imlib_apply_modifiers_to_rgb", _wrap_gdk_imlib_apply_modifiers_to_rgb, 1 },
	 { "gdk_imlib_get_image_blue_curve", _wrap_gdk_imlib_get_image_blue_curve, 1 },
	 { "gdk_imlib_get_image_green_curve", _wrap_gdk_imlib_get_image_green_curve, 1 },
	 { "gdk_imlib_get_image_red_curve", _wrap_gdk_imlib_get_image_red_curve, 1 },
	 { "gdk_imlib_set_image_blue_curve", _wrap_gdk_imlib_set_image_blue_curve, 1 },
	 { "gdk_imlib_set_image_green_curve", _wrap_gdk_imlib_set_image_green_curve, 1 },
	 { "gdk_imlib_set_image_red_curve", _wrap_gdk_imlib_set_image_red_curve, 1 },
	 { "gdk_imlib_get_image_blue_modifier", _wrap_gdk_imlib_get_image_blue_modifier, 1 },
	 { "gdk_imlib_get_image_green_modifier", _wrap_gdk_imlib_get_image_green_modifier, 1 },
	 { "gdk_imlib_get_image_red_modifier", _wrap_gdk_imlib_get_image_red_modifier, 1 },
	 { "gdk_imlib_get_image_modifier", _wrap_gdk_imlib_get_image_modifier, 1 },
	 { "gdk_imlib_set_image_blue_modifier", _wrap_gdk_imlib_set_image_blue_modifier, 1 },
	 { "gdk_imlib_set_image_green_modifier", _wrap_gdk_imlib_set_image_green_modifier, 1 },
	 { "gdk_imlib_set_image_red_modifier", _wrap_gdk_imlib_set_image_red_modifier, 1 },
	 { "gdk_imlib_set_image_modifier", _wrap_gdk_imlib_set_image_modifier, 1 },
	 { "gdk_imlib_save_image_to_ppm", _wrap_gdk_imlib_save_image_to_ppm, 1 },
	 { "gdk_imlib_add_image_to_eim", _wrap_gdk_imlib_add_image_to_eim, 1 },
	 { "gdk_imlib_save_image_to_eim", _wrap_gdk_imlib_save_image_to_eim, 1 },
	 { "gdk_imlib_set_image_shape", _wrap_gdk_imlib_set_image_shape, 1 },
	 { "gdk_imlib_get_image_shape", _wrap_gdk_imlib_get_image_shape, 1 },
	 { "gdk_imlib_set_image_border", _wrap_gdk_imlib_set_image_border, 1 },
	 { "gdk_imlib_get_image_border", _wrap_gdk_imlib_get_image_border, 1 },
	 { "gdk_imlib_free_colors", _wrap_gdk_imlib_free_colors, 1 },
	 { "gdk_imlib_render", _wrap_gdk_imlib_render, 1 },
	 { "gdk_imlib_load_image", _wrap_gdk_imlib_load_image, 1 },
	 { "gdk_imlib_load_colors", _wrap_gdk_imlib_load_colors, 1 },
	 { "gdk_imlib_set_render_type", _wrap_gdk_imlib_set_render_type, 1 },
	 { "gdk_imlib_get_render_type", _wrap_gdk_imlib_get_render_type, 1 },
	 { "gdk_imlib_init", gdk__imlib_init, 1 },
	 { NULL, NULL }
};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT(void,init_gdkimlib)() {
	 PyObject *m, *d;
	 SWIG_globals = SWIG_newvarlink();
	 m = Py_InitModule("_gdkimlib", _gdkimlibMethods);
	 d = PyModule_GetDict(m);
/*
 * These are the pointer type-equivalency mappings. 
 * (Used by the SWIG pointer type-checker).
 */
	 SWIG_RegisterMapping("_signed_long","_long",0);
	 SWIG_RegisterMapping("_long","_unsigned_long",0);
	 SWIG_RegisterMapping("_long","_signed_long",0);
	 SWIG_RegisterMapping("_unsigned_long","_long",0);
	 SWIG_RegisterMapping("_signed_int","_int",0);
	 SWIG_RegisterMapping("_unsigned_short","_short",0);
	 SWIG_RegisterMapping("_signed_short","_short",0);
	 SWIG_RegisterMapping("_unsigned_int","_int",0);
	 SWIG_RegisterMapping("_short","_unsigned_short",0);
	 SWIG_RegisterMapping("_short","_signed_short",0);
	 SWIG_RegisterMapping("_int","_unsigned_int",0);
	 SWIG_RegisterMapping("_int","_signed_int",0);
}
