/src/plugins/python/pythonbind.cpp
C++ | 6438 lines | 5490 code | 858 blank | 90 comment | 271 complexity | 9abae927ce5454da570c81400fda84c9 MD5 | raw file
Possible License(s): Apache-2.0, GPL-2.0, AGPL-1.0
Large files files are truncated, but you can click here to view the full file
- /* This file was generated by PyBindGen 0.16.0 */
- #define PY_SSIZE_T_CLEAN
- #include <Python.h>
- #include <stddef.h>
- #if PY_VERSION_HEX < 0x020400F0
- #define PyEval_ThreadsInitialized() 1
- #define Py_CLEAR(op) \
- do { \
- if (op) { \
- PyObject *tmp = (PyObject *)(op); \
- (op) = NULL; \
- Py_DECREF(tmp); \
- } \
- } while (0)
- #define Py_VISIT(op) \
- do { \
- if (op) { \
- int vret = visit((PyObject *)(op), arg); \
- if (vret) \
- return vret; \
- } \
- } while (0)
- #endif
- #if PY_VERSION_HEX < 0x020500F0
- typedef int Py_ssize_t;
- # define PY_SSIZE_T_MAX INT_MAX
- # define PY_SSIZE_T_MIN INT_MIN
- typedef inquiry lenfunc;
- typedef intargfunc ssizeargfunc;
- typedef intobjargproc ssizeobjargproc;
- #endif
- #if __GNUC__ > 2
- # define PYBINDGEN_UNUSED(param) param __attribute__((__unused__))
- #elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- # define PYBINDGEN_UNUSED(param) __attribute__((__unused__)) param
- #else
- # define PYBINDGEN_UNUSED(param) param
- #endif /* !__GNUC__ */
- typedef enum _PyBindGenWrapperFlags {
- PYBINDGEN_WRAPPER_FLAG_NONE = 0,
- PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED = (1<<0),
- } PyBindGenWrapperFlags;
- #include "pythonplugin.h"
- #include "map.h"
- #include "layer.h"
- #include "tile.h"
- #include "mapobject.h"
- #include "imagelayer.h"
- #include "tilelayer.h"
- #include "objectgroup.h"
- #include "tileset.h"
- #include <QImage>
- #include <QFileDialog>
- #include <QWidget>
- #include <QFlags>
- /* --- forward declarations --- */
- typedef struct {
- PyObject_HEAD
- Python::PythonScript *obj;
- PyObject *inst_dict;
- PyBindGenWrapperFlags flags:8;
- } PyPythonPythonScript;
- extern PyTypeObject PyPythonPythonScript_Type;
- /* --- forward declarations --- */
- typedef struct {
- PyObject_HEAD
- QPointF *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQPointF;
- extern PyTypeObject PyQPointF_Type;
- typedef struct {
- PyObject_HEAD
- QSizeF *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQSizeF;
- extern PyTypeObject PyQSizeF_Type;
- typedef struct {
- PyObject_HEAD
- QRgb *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQRgb;
- extern PyTypeObject PyQRgb_Type;
- typedef struct {
- PyObject_HEAD
- QColor *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQColor;
- extern PyTypeObject PyQColor_Type;
- typedef struct {
- PyObject_HEAD
- QImage *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQImage;
- extern PyTypeObject PyQImage_Type;
- typedef struct {
- PyObject_HEAD
- QPixmap *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQPixmap;
- extern PyTypeObject PyQPixmap_Type;
- typedef struct {
- PyObject_HEAD
- QWidget *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQWidget;
- extern PyTypeObject PyQWidget_Type;
- typedef struct {
- PyObject_HEAD
- QFileDialog *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQFileDialog;
- extern PyTypeObject PyQFileDialog_Type;
- typedef struct {
- PyObject_HEAD
- QVector<QRgb> *obj;
- } PyQVector__lt__QRgb__gt__;
- typedef struct {
- PyObject_HEAD
- PyQVector__lt__QRgb__gt__ *container;
- QVector<QRgb>::iterator *iterator;
- } PyQVector__lt__QRgb__gt__Iter;
- extern PyTypeObject PyQVector__lt__QRgb__gt___Type;
- extern PyTypeObject PyQVector__lt__QRgb__gt__Iter_Type;
- int _wrap_convert_py2c__QVector__lt___QRgb___gt__(PyObject *arg, QVector<QRgb> *container);
- typedef struct {
- PyObject_HEAD
- QList<QString> *obj;
- } PyQList__lt__QString__gt__;
- typedef struct {
- PyObject_HEAD
- PyQList__lt__QString__gt__ *container;
- QList<QString>::iterator *iterator;
- } PyQList__lt__QString__gt__Iter;
- extern PyTypeObject PyQList__lt__QString__gt___Type;
- extern PyTypeObject PyQList__lt__QString__gt__Iter_Type;
- int _wrap_convert_py2c__QList__lt___QString___gt__(PyObject *arg, QList<QString> *container);
- /* --- forward declarations --- */
- typedef struct {
- PyObject_HEAD
- Tiled::Tile *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledTile;
- extern PyTypeObject PyTiledTile_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Tileset *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledTileset;
- extern PyTypeObject PyTiledTileset_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Layer *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledLayer;
- extern PyTypeObject PyTiledLayer_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Properties *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledProperties;
- extern PyTypeObject PyTiledProperties_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Map *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledMap;
- extern PyTypeObject PyTiledMap_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Cell *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledCell;
- extern PyTypeObject PyTiledCell_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::TileLayer *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledTileLayer;
- extern PyTypeObject PyTiledTileLayer_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::ImageLayer *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledImageLayer;
- extern PyTypeObject PyTiledImageLayer_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Object *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledObject;
- extern PyTypeObject PyTiledObject_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::MapObject *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledMapObject;
- extern PyTypeObject PyTiledMapObject_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::ObjectGroup *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledObjectGroup;
- extern PyTypeObject PyTiledObjectGroup_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::LoggingInterface *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledLoggingInterface;
- extern PyTypeObject PyTiledLoggingInterface_Type;
- #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
- int _wrap_convert_py2c__QRgb(PyObject *value, QRgb *address);
- int _wrap_convert_py2c__QString(PyObject *value, QString *address);
- static PyMethodDef tiled_qt_functions[] = {
- {NULL, NULL, 0, NULL}
- };
- /* --- classes --- */
- static int
- _wrap_PyQPointF__tp_init(PyQPointF *self, PyObject *args, PyObject *kwargs)
- {
- float x;
- float y;
- const char *keywords[] = {"x", "y", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ff", (char **) keywords, &x, &y)) {
- return -1;
- }
- self->obj = new QPointF(x, y);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- PyObject *
- _wrap_PyQPointF_y(PyQPointF *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->y();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQPointF_x(PyQPointF *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->x();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQPointF_setX(PyQPointF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int x;
- const char *keywords[] = {"x", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i", (char **) keywords, &x)) {
- return NULL;
- }
- self->obj->setX(x);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQPointF_setY(PyQPointF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int y;
- const char *keywords[] = {"y", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i", (char **) keywords, &y)) {
- return NULL;
- }
- self->obj->setY(y);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- static PyMethodDef PyQPointF_methods[] = {
- {(char *) "y", (PyCFunction) _wrap_PyQPointF_y, METH_NOARGS, NULL },
- {(char *) "x", (PyCFunction) _wrap_PyQPointF_x, METH_NOARGS, NULL },
- {(char *) "setX", (PyCFunction) _wrap_PyQPointF_setX, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "setY", (PyCFunction) _wrap_PyQPointF_setY, METH_KEYWORDS|METH_VARARGS, NULL },
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQPointF__tp_dealloc(PyQPointF *self)
- {
- QPointF *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQPointF__tp_richcompare (PyQPointF *PYBINDGEN_UNUSED(self), PyQPointF *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQPointF_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQPointF_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QPointF", /* tp_name */
- sizeof(PyQPointF), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQPointF__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /* tp_compare */
- (reprfunc)NULL, /* tp_repr */
- (PyNumberMethods*)NULL, /* tp_as_number */
- (PySequenceMethods*)NULL, /* tp_as_sequence */
- (PyMappingMethods*)NULL, /* tp_as_mapping */
- (hashfunc)NULL, /* tp_hash */
- (ternaryfunc)NULL, /* tp_call */
- (reprfunc)NULL, /* tp_str */
- (getattrofunc)NULL, /* tp_getattro */
- (setattrofunc)NULL, /* tp_setattro */
- (PyBufferProcs*)NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)_wrap_PyQPointF__tp_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQPointF_methods, /* tp_methods */
- (struct PyMemberDef*)0, /* tp_members */
- 0, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- (descrgetfunc)NULL, /* tp_descr_get */
- (descrsetfunc)NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)_wrap_PyQPointF__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- (inquiry)NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor) NULL /* tp_del */
- };
- static int
- _wrap_PyQSizeF__tp_init(PyQSizeF *self, PyObject *args, PyObject *kwargs)
- {
- float w;
- float h;
- const char *keywords[] = {"w", "h", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ff", (char **) keywords, &w, &h)) {
- return -1;
- }
- self->obj = new QSizeF(w, h);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- PyObject *
- _wrap_PyQSizeF_setHeight(PyQSizeF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int h;
- const char *keywords[] = {"h", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i", (char **) keywords, &h)) {
- return NULL;
- }
- self->obj->setHeight(h);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQSizeF_width(PyQSizeF *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->width();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQSizeF_setWidth(PyQSizeF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int w;
- const char *keywords[] = {"w", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i", (char **) keywords, &w)) {
- return NULL;
- }
- self->obj->setWidth(w);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQSizeF_height(PyQSizeF *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->height();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- static PyMethodDef PyQSizeF_methods[] = {
- {(char *) "setHeight", (PyCFunction) _wrap_PyQSizeF_setHeight, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "width", (PyCFunction) _wrap_PyQSizeF_width, METH_NOARGS, NULL },
- {(char *) "setWidth", (PyCFunction) _wrap_PyQSizeF_setWidth, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "height", (PyCFunction) _wrap_PyQSizeF_height, METH_NOARGS, NULL },
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQSizeF__tp_dealloc(PyQSizeF *self)
- {
- QSizeF *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQSizeF__tp_richcompare (PyQSizeF *PYBINDGEN_UNUSED(self), PyQSizeF *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQSizeF_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQSizeF_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QSizeF", /* tp_name */
- sizeof(PyQSizeF), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQSizeF__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /* tp_compare */
- (reprfunc)NULL, /* tp_repr */
- (PyNumberMethods*)NULL, /* tp_as_number */
- (PySequenceMethods*)NULL, /* tp_as_sequence */
- (PyMappingMethods*)NULL, /* tp_as_mapping */
- (hashfunc)NULL, /* tp_hash */
- (ternaryfunc)NULL, /* tp_call */
- (reprfunc)NULL, /* tp_str */
- (getattrofunc)NULL, /* tp_getattro */
- (setattrofunc)NULL, /* tp_setattro */
- (PyBufferProcs*)NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)_wrap_PyQSizeF__tp_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQSizeF_methods, /* tp_methods */
- (struct PyMemberDef*)0, /* tp_members */
- 0, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- (descrgetfunc)NULL, /* tp_descr_get */
- (descrsetfunc)NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)_wrap_PyQSizeF__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- (inquiry)NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor) NULL /* tp_del */
- };
- static int
- _wrap_PyQRgb__tp_init(void)
- {
- PyErr_SetString(PyExc_TypeError, "class 'QRgb' cannot be constructed ()");
- return -1;
- }
- static PyMethodDef PyQRgb_methods[] = {
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQRgb__tp_dealloc(PyQRgb *self)
- {
- QRgb *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQRgb__tp_richcompare (PyQRgb *PYBINDGEN_UNUSED(self), PyQRgb *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQRgb_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQRgb_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QRgb", /* tp_name */
- sizeof(PyQRgb), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQRgb__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /* tp_compare */
- (reprfunc)NULL, /* tp_repr */
- (PyNumberMethods*)NULL, /* tp_as_number */
- (PySequenceMethods*)NULL, /* tp_as_sequence */
- (PyMappingMethods*)NULL, /* tp_as_mapping */
- (hashfunc)NULL, /* tp_hash */
- (ternaryfunc)NULL, /* tp_call */
- (reprfunc)NULL, /* tp_str */
- (getattrofunc)NULL, /* tp_getattro */
- (setattrofunc)NULL, /* tp_setattro */
- (PyBufferProcs*)NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)_wrap_PyQRgb__tp_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQRgb_methods, /* tp_methods */
- (struct PyMemberDef*)0, /* tp_members */
- 0, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- (descrgetfunc)NULL, /* tp_descr_get */
- (descrsetfunc)NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)_wrap_PyQRgb__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- (inquiry)NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor) NULL /* tp_del */
- };
- static int
- _wrap_PyQColor__tp_init__0(PyQColor *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQRgb *col;
- const char *keywords[] = {"col", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQRgb_Type, &col)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QColor(*((PyQRgb *) col)->obj);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQColor__tp_init__1(PyQColor *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- int r;
- int g;
- int b;
- const char *keywords[] = {"r", "g", "b", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "iii", (char **) keywords, &r, &g, &b)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QColor(r, g, b);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQColor__tp_init__2(PyQColor *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- int r;
- int g;
- int b;
- int a;
- const char *keywords[] = {"r", "g", "b", "a", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "iiii", (char **) keywords, &r, &g, &b, &a)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QColor(r, g, b, a);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- int _wrap_PyQColor__tp_init(PyQColor *self, PyObject *args, PyObject *kwargs)
- {
- int retval;
- PyObject *error_list;
- PyObject *exceptions[3] = {0,};
- retval = _wrap_PyQColor__tp_init__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQColor__tp_init__1(self, args, kwargs, &exceptions[1]);
- if (!exceptions[1]) {
- Py_DECREF(exceptions[0]);
- return retval;
- }
- retval = _wrap_PyQColor__tp_init__2(self, args, kwargs, &exceptions[2]);
- if (!exceptions[2]) {
- Py_DECREF(exceptions[0]);
- Py_DECREF(exceptions[1]);
- return retval;
- }
- error_list = PyList_New(3);
- PyList_SET_ITEM(error_list, 0, PyObject_Str(exceptions[0]));
- Py_DECREF(exceptions[0]);
- PyList_SET_ITEM(error_list, 1, PyObject_Str(exceptions[1]));
- Py_DECREF(exceptions[1]);
- PyList_SET_ITEM(error_list, 2, PyObject_Str(exceptions[2]));
- Py_DECREF(exceptions[2]);
- PyErr_SetObject(PyExc_TypeError, error_list);
- Py_DECREF(error_list);
- return -1;
- }
- PyObject *
- _wrap_PyQColor_rgb(PyQColor *self)
- {
- PyObject *py_retval;
- PyQRgb *py_QRgb;
- QRgb retval = self->obj->rgb();
- py_QRgb = PyObject_New(PyQRgb, &PyQRgb_Type);
- py_QRgb->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- py_QRgb->obj = new QRgb(retval);
- py_retval = Py_BuildValue((char *) "N", py_QRgb);
- return py_retval;
- }
- PyObject *
- _wrap_PyQColor_rgba(PyQColor *self)
- {
- PyObject *py_retval;
- PyQRgb *py_QRgb;
- QRgb retval = self->obj->rgba();
- py_QRgb = PyObject_New(PyQRgb, &PyQRgb_Type);
- py_QRgb->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- py_QRgb->obj = new QRgb(retval);
- py_retval = Py_BuildValue((char *) "N", py_QRgb);
- return py_retval;
- }
- static PyMethodDef PyQColor_methods[] = {
- {(char *) "rgb", (PyCFunction) _wrap_PyQColor_rgb, METH_NOARGS, NULL },
- {(char *) "rgba", (PyCFunction) _wrap_PyQColor_rgba, METH_NOARGS, NULL },
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQColor__tp_dealloc(PyQColor *self)
- {
- QColor *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQColor__tp_richcompare (PyQColor *PYBINDGEN_UNUSED(self), PyQColor *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQColor_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQColor_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QColor", /* tp_name */
- sizeof(PyQColor), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQColor__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /* tp_compare */
- (reprfunc)NULL, /* tp_repr */
- (PyNumberMethods*)NULL, /* tp_as_number */
- (PySequenceMethods*)NULL, /* tp_as_sequence */
- (PyMappingMethods*)NULL, /* tp_as_mapping */
- (hashfunc)NULL, /* tp_hash */
- (ternaryfunc)NULL, /* tp_call */
- (reprfunc)NULL, /* tp_str */
- (getattrofunc)NULL, /* tp_getattro */
- (setattrofunc)NULL, /* tp_setattro */
- (PyBufferProcs*)NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)_wrap_PyQColor__tp_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQColor_methods, /* tp_methods */
- (struct PyMemberDef*)0, /* tp_members */
- 0, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- (descrgetfunc)NULL, /* tp_descr_get */
- (descrsetfunc)NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)_wrap_PyQColor__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- (inquiry)NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor) NULL /* tp_del */
- };
- static int
- _wrap_PyQImage__tp_init__0(PyQImage *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- const char *keywords[] = {NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "", (char **) keywords)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QImage();
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQImage__tp_init__1(PyQImage *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- int w;
- int h;
- QImage::Format f;
- const char *keywords[] = {"w", "h", "f", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "iii", (char **) keywords, &w, &h, &f)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QImage(w, h, f);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- int _wrap_PyQImage__tp_init(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- int retval;
- PyObject *error_list;
- PyObject *exceptions[2] = {0,};
- retval = _wrap_PyQImage__tp_init__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQImage__tp_init__1(self, args, kwargs, &exceptions[1]);
- if (!exceptions[1]) {
- Py_DECREF(exceptions[0]);
- return retval;
- }
- error_list = PyList_New(2);
- PyList_SET_ITEM(error_list, 0, PyObject_Str(exceptions[0]));
- Py_DECREF(exceptions[0]);
- PyList_SET_ITEM(error_list, 1, PyObject_Str(exceptions[1]));
- Py_DECREF(exceptions[1]);
- PyErr_SetObject(PyExc_TypeError, error_list);
- Py_DECREF(error_list);
- return -1;
- }
- PyObject *
- _wrap_PyQImage_load(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- bool retval;
- const char *fileName;
- Py_ssize_t fileName_len;
- char *fmt;
- const char *keywords[] = {"fileName", "fmt", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "s#s", (char **) keywords, &fileName, &fileName_len, &fmt)) {
- return NULL;
- }
- retval = self->obj->load(QString::fromUtf8(fileName), fmt);
- py_retval = Py_BuildValue((char *) "N", PyBool_FromLong(retval));
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_setColor(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int i;
- PyQRgb *c;
- const char *keywords[] = {"i", "c", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "iO!", (char **) keywords, &i, &PyQRgb_Type, &c)) {
- return NULL;
- }
- self->obj->setColor(i, *((PyQRgb *) c)->obj);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_color(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int i;
- const char *keywords[] = {"i", NULL};
- PyQRgb *py_QRgb;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i", (char **) keywords, &i)) {
- return NULL;
- }
- QRgb retval = self->obj->color(i);
- py_QRgb = PyObject_New(PyQRgb, &PyQRgb_Type);
- py_QRgb->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- py_QRgb->obj = new QRgb(retval);
- py_retval = Py_BuildValue((char *) "N", py_QRgb);
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_mirrored(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- bool horiz;
- PyObject *py_horiz;
- bool vert;
- PyObject *py_vert;
- const char *keywords[] = {"horiz", "vert", NULL};
- PyQImage *py_QImage;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "OO", (char **) keywords, &py_horiz, &py_vert)) {
- return NULL;
- }
- horiz = (bool) PyObject_IsTrue(py_horiz);
- vert = (bool) PyObject_IsTrue(py_vert);
- QImage const & retval = self->obj->mirrored(horiz, vert);
- py_QImage = PyObject_New(PyQImage, &PyQImage_Type);
- py_QImage->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- py_QImage->obj = new QImage(retval);
- py_retval = Py_BuildValue((char *) "N", py_QImage);
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_height(PyQImage *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->height();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_setPixel__0(PyQImage *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyObject *py_retval;
- int x;
- int y;
- unsigned int color;
- const char *keywords[] = {"x", "y", "color", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "iiI", (char **) keywords, &x, &y, &color)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return NULL;
- }
- self->obj->setPixel(x, y, color);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_setPixel__1(PyQImage *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyObject *py_retval;
- int x;
- int y;
- PyQRgb *color;
- const char *keywords[] = {"x", "y", "color", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "iiO!", (char **) keywords, &x, &y, &PyQRgb_Type, &color)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return NULL;
- }
- self->obj->setPixel(x, y, *((PyQRgb *) color)->obj);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject * _wrap_PyQImage_setPixel(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject * retval;
- PyObject *error_list;
- PyObject *exceptions[2] = {0,};
- retval = _wrap_PyQImage_setPixel__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQImage_setPixel__1(self, args, kwargs, &exceptions[1]);
- if (!exceptions[1]) {
- Py_DECREF(exceptions[0]);
- return retval;
- }
- error_list = PyList_New(2);
- PyList_SET_ITEM(error_list, 0, PyObject_Str(exceptions[0]));
- Py_DECREF(exceptions[0]);
- PyList_SET_ITEM(error_list, 1, PyObject_Str(exceptions[1]));
- Py_DECREF(exceptions[1]);
- PyErr_SetObject(PyExc_TypeError, error_list);
- Py_DECREF(error_list);
- return NULL;
- }
- PyObject *
- _wrap_PyQImage_width(PyQImage *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->width();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_colorTable(PyQImage *self)
- {
- PyObject *py_retval;
- QVector< QRgb > retval;
- PyQVector__lt__QRgb__gt__ *py_QVector__lt__QRgb__gt__;
- retval = self->obj->colorTable();
- py_QVector__lt__QRgb__gt__ = PyObject_New(PyQVector__lt__QRgb__gt__, &PyQVector__lt__QRgb__gt___Type);
- py_QVector__lt__QRgb__gt__->obj = new QVector<QRgb>(retval);
- py_retval = Py_BuildValue((char *) "N", py_QVector__lt__QRgb__gt__);
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_setColorTable(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- QVector<QRgb> colors_value;
- const char *keywords[] = {"colors", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O&", (char **) keywords, _wrap_convert_py2c__QVector__lt___QRgb___gt__, &colors_value)) {
- return NULL;
- }
- self->obj->setColorTable(colors_value);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQImage_fill(PyQImage *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- int color;
- const char *keywords[] = {"color", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "i", (char **) keywords, &color)) {
- return NULL;
- }
- self->obj->fill(color);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- static PyMethodDef PyQImage_methods[] = {
- {(char *) "load", (PyCFunction) _wrap_PyQImage_load, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "setColor", (PyCFunction) _wrap_PyQImage_setColor, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "color", (PyCFunction) _wrap_PyQImage_color, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "mirrored", (PyCFunction) _wrap_PyQImage_mirrored, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "height", (PyCFunction) _wrap_PyQImage_height, METH_NOARGS, NULL },
- {(char *) "setPixel", (PyCFunction) _wrap_PyQImage_setPixel, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "width", (PyCFunction) _wrap_PyQImage_width, METH_NOARGS, NULL },
- {(char *) "colorTable", (PyCFunction) _wrap_PyQImage_colorTable, METH_NOARGS, NULL },
- {(char *) "setColorTable", (PyCFunction) _wrap_PyQImage_setColorTable, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "fill", (PyCFunction) _wrap_PyQImage_fill, METH_KEYWORDS|METH_VARARGS, NULL },
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQImage__tp_dealloc(PyQImage *self)
- {
- QImage *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQImage__tp_richcompare (PyQImage *PYBINDGEN_UNUSED(self), PyQImage *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQImage_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQImage_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QImage", /* tp_name */
- sizeof(PyQImage), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQImage__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /* tp_compare */
- (reprfunc)NULL, /* tp_repr */
- (PyNumberMethods*)NULL, /* tp_as_number */
- (PySequenceMethods*)NULL, /* tp_as_sequence */
- (PyMappingMethods*)NULL, /* tp_as_mapping */
- (hashfunc)NULL, /* tp_hash */
- (ternaryfunc)NULL, /* tp_call */
- (reprfunc)NULL, /* tp_str */
- (getattrofunc)NULL, /* tp_getattro */
- (setattrofunc)NULL, /* tp_setattro */
- (PyBufferProcs*)NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)_wrap_PyQImage__tp_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQImage_methods, /* tp_methods */
- (struct PyMemberDef*)0, /* tp_members */
- 0, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- (descrgetfunc)NULL, /* tp_descr_get */
- (descrsetfunc)NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)_wrap_PyQImage__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- (inquiry)NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor) NULL /* tp_del */
- };
- static int
- _wrap_PyQPixmap__tp_init(void)
- {
- PyErr_SetString(PyExc_TypeError, "class 'QPixmap' cannot be constructed ()");
- return -1;
- }
- PyObject *
- _wrap_PyQPixmap_convertFromImage(PyQPixmap *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- PyQImage *image;
- const char *keywords[] = {"image", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQImage_Type, &image)) {
- return NULL;
- }
- self->obj->convertFromImage(*((PyQImage *) image)->obj);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQPixmap_width(PyQPixmap *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->width();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQPixmap_toImage(PyQPixmap *self)
- {
- PyObject *py_retval;
- PyQImage *py_QImage;
- QImage const & retval = self->obj->toImage();
- py_QImage = PyObject_New(PyQImage, &PyQImage_Type);
- py_QImage->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- py_QImage->obj = new QImage(retval);
- py_retval = Py_BuildValue((char *) "N", py_QImage);
- return py_retval;
- }
- PyObject *
- _wrap_PyQPixmap_fromImage(PyQPixmap *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- PyQImage *image;
- const char *keywords[] = {"image", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQImage_Type, &image)) {
- return NULL;
- }
- self->obj->fromImage(*((PyQImage *) image)->obj);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQPixmap_height(PyQPixmap *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->height();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- static PyMethodDef PyQPixmap_methods[] = {
- {(char *) "convertFromImage", (PyCFunction) _wrap_PyQPixmap_convertFromImage, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "width", (PyCFunction) _wrap_PyQPixmap_width, METH_NOARGS, NULL },
- {(char *) "toImage", (PyCFunction) _wrap_PyQPixmap_toImage, METH_NOARGS, NULL },
- {(char *) "fromImage", (PyCFunction) _wrap_PyQPixmap_fromImage, METH_KEYWORDS|METH_VARARGS, NULL },
- {(char *) "height", (PyCFunction) _wrap_PyQPixmap_height, METH_NOARGS, NULL },
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQPixmap__tp_dealloc(PyQPixmap *self)
- {
- QPixmap *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQPixmap__tp_richcompare (PyQPixmap *PYBINDGEN_UNUSED(self), PyQPixmap *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQPixmap_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQPixmap_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QPixmap", /* tp_name */
- sizeof(PyQPixmap), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQPixmap__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /* tp_compare */
- (reprfunc)NULL, /* tp_repr */
- (PyNumberMethods*)NULL, /* tp_as_number */
- (PySequenceMethods*)NULL, /* tp_as_sequence */
- (PyMappingMethods*)NULL, /* tp_as_mapping */
- (hashfunc)NULL, /* tp_hash */
- (ternaryfunc)NULL, /* tp_call */
- (reprfunc)NULL, /* tp_str */
- (getattrofunc)NULL, /* tp_getattro */
- (setattrofunc)NULL, /* tp_setattro */
- (PyBufferProcs*)NULL, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- NULL, /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)_wrap_PyQPixmap__tp_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQPixmap_methods, /* tp_methods */
- (struct PyMemberDef*)0, /* tp_members */
- 0, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- (descrgetfunc)NULL, /* tp_descr_get */
- (descrsetfunc)NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)_wrap_PyQPixmap__tp_init, /* tp_init */
- (allocfunc)PyType_GenericAlloc, /* tp_alloc */
- (newfunc)PyType_GenericNew, /* tp_new */
- (freefunc)0, /* tp_free */
- (inquiry)NULL, /* tp_is_gc */
- NULL, /* tp_bases */
- NULL, /* tp_mro */
- NULL, /* tp_cache */
- NULL, /* tp_subclasses */
- NULL, /* tp_weaklist */
- (destructor) NULL /* tp_del */
- };
- static int
- _wrap_PyQWidget__tp_init(void)
- {
- PyErr_SetString(PyExc_TypeError, "class 'QWidget' cannot be constructed ()");
- return -1;
- }
- static PyMethodDef PyQWidget_methods[] = {
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQWidget__tp_dealloc(PyQWidget *self)
- {
- QWidget *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- self->ob_type->tp_free((PyObject*)self);
- }
- static PyObject*
- _wrap_PyQWidget__tp_richcompare (PyQWidget *PYBINDGEN_UNUSED(self), PyQWidget *other, int opid)
- {
- if (!PyObject_IsInstance((PyObject*) other, (PyObject*) &PyQWidget_Type)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- switch (opid)
- {
- case Py_LT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_LE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_EQ:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_NE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GE:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- case Py_GT:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- } /* closes switch (opid) */
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
- PyTypeObject PyQWidget_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /* ob_size */
- (char *) "tiled.qt.QWidget", /* tp_name */
- sizeof(PyQWidget), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQWidget__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- (cmpfunc)NULL, /*…
Large files files are truncated, but you can click here to view the full file