/src/plugins/python/pythonbind.cpp
C++ | 8025 lines | 6790 code | 1121 blank | 114 comment | 294 complexity | 066bf7b2c10cc0ae8e4f27c2d90a2a8c MD5 | raw file
Possible License(s): Apache-2.0, GPL-2.0, LGPL-2.1, AGPL-1.0
Large files files are truncated, but you can click here to view the full file
- #ifdef __MINGW32__
- #include <cmath> // included before Python.h to fix ::hypot not declared issue
- #endif
- /* This file was generated by PyBindGen 0.0.0.0 */
- #define PY_SSIZE_T_CLEAN
- #include <Python.h>
- #include <stddef.h>
- #if PY_VERSION_HEX >= 0x03000000
- #if PY_VERSION_HEX >= 0x03050000
- typedef PyAsyncMethods* cmpfunc;
- #else
- typedef void* cmpfunc;
- #endif
- #define PyCObject_FromVoidPtr(a, b) PyCapsule_New(a, NULL, b)
- #define PyCObject_AsVoidPtr(a) PyCapsule_GetPointer(a, NULL)
- #define PyString_FromString(a) PyBytes_FromString(a)
- #define Py_TPFLAGS_CHECKTYPES 0 /* this flag doesn't exist in python 3 */
- #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__ */
- #ifndef _PyBindGenWrapperFlags_defined_
- #define _PyBindGenWrapperFlags_defined_
- typedef enum _PyBindGenWrapperFlags {
- PYBINDGEN_WRAPPER_FLAG_NONE = 0,
- PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED = (1<<0),
- } PyBindGenWrapperFlags;
- #endif
- #include "pythonplugin.h"
- #include "grouplayer.h"
- #include "imagelayer.h"
- #include "layer.h"
- #include "logginginterface.h"
- #include "map.h"
- #include "mapobject.h"
- #include "objectgroup.h"
- #include "tile.h"
- #include "tilelayer.h"
- #include "tileset.h"
- #include "tilesetmanager.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
- QPoint *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQPoint;
- extern PyTypeObject PyQPoint_Type;
- typedef struct {
- PyObject_HEAD
- QPointF *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQPointF;
- extern PyTypeObject PyQPointF_Type;
- typedef struct {
- PyObject_HEAD
- QSize *obj;
- PyBindGenWrapperFlags flags:8;
- } PyQSize;
- extern PyTypeObject PyQSize_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::Properties *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledProperties;
- extern PyTypeObject PyTiledProperties_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Object *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledObject;
- extern PyTypeObject PyTiledObject_Type;
- 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::SharedTileset *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledSharedTileset;
- extern PyTypeObject PyTiledSharedTileset_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::Layer *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledLayer;
- extern PyTypeObject PyTiledLayer_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::GroupLayer *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledGroupLayer;
- extern PyTypeObject PyTiledGroupLayer_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::ObjectGroup *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledObjectGroup;
- extern PyTypeObject PyTiledObjectGroup_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::MapObject *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledMapObject;
- extern PyTypeObject PyTiledMapObject_Type;
- typedef struct {
- PyObject_HEAD
- Tiled::LoggingInterface *obj;
- PyBindGenWrapperFlags flags:8;
- } PyTiledLoggingInterface;
- extern PyTypeObject PyTiledLoggingInterface_Type;
- #ifndef _MSC_VER
- #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
- #endif
- 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_PyQPoint__tp_init__0(PyQPoint *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQPoint *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQPoint_Type, &ctor_arg)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QPoint(*((PyQPoint *) ctor_arg)->obj);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQPoint__tp_init__1(PyQPoint *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- int x;
- int y;
- const char *keywords[] = {"x", "y", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ii", (char **) keywords, &x, &y)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QPoint(x, y);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- int _wrap_PyQPoint__tp_init(PyQPoint *self, PyObject *args, PyObject *kwargs)
- {
- int retval;
- PyObject *error_list;
- PyObject *exceptions[2] = {0,};
- retval = _wrap_PyQPoint__tp_init__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQPoint__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_PyQPoint_setX(PyQPoint *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_PyQPoint_setY(PyQPoint *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;
- }
- PyObject *
- _wrap_PyQPoint_x(PyQPoint *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->x();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQPoint_y(PyQPoint *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->y();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- static PyObject*
- _wrap_PyQPoint__copy__(PyQPoint *self)
- {
- PyQPoint *py_copy;
- py_copy = PyObject_New(PyQPoint, &PyQPoint_Type);
- py_copy->obj = new QPoint(*self->obj);
- py_copy->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return (PyObject*) py_copy;
- }
- static PyMethodDef PyQPoint_methods[] = {
- {(char *) "setX", (PyCFunction) _wrap_PyQPoint_setX, METH_KEYWORDS|METH_VARARGS, "setX(x)\n\ntype: x: int" },
- {(char *) "setY", (PyCFunction) _wrap_PyQPoint_setY, METH_KEYWORDS|METH_VARARGS, "setY(y)\n\ntype: y: int" },
- {(char *) "x", (PyCFunction) _wrap_PyQPoint_x, METH_NOARGS, "x()\n\n" },
- {(char *) "y", (PyCFunction) _wrap_PyQPoint_y, METH_NOARGS, "y()\n\n" },
- {(char *) "__copy__", (PyCFunction) _wrap_PyQPoint__copy__, METH_NOARGS, NULL},
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQPoint__tp_dealloc(PyQPoint *self)
- {
- QPoint *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
- PyTypeObject PyQPoint_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- (char *) "tiled.qt.QPoint", /* tp_name */
- sizeof(PyQPoint), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQPoint__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- #if PY_MAJOR_VERSION >= 3
- NULL,
- #else
- (cmpfunc)NULL, /* tp_compare */
- #endif
- (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 */
- "QPoint(ctor_arg)\nQPoint(x, y)", /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQPoint_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_PyQPoint__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_PyQPointF__tp_init__0(PyQPointF *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQPointF *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQPointF_Type, &ctor_arg)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QPointF(*((PyQPointF *) ctor_arg)->obj);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQPointF__tp_init__1(PyQPointF *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- double x;
- double y;
- const char *keywords[] = {"x", "y", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "dd", (char **) keywords, &x, &y)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QPointF(x, y);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- int _wrap_PyQPointF__tp_init(PyQPointF *self, PyObject *args, PyObject *kwargs)
- {
- int retval;
- PyObject *error_list;
- PyObject *exceptions[2] = {0,};
- retval = _wrap_PyQPointF__tp_init__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQPointF__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_PyQPointF_setX(PyQPointF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- double x;
- const char *keywords[] = {"x", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "d", (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;
- double y;
- const char *keywords[] = {"y", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "d", (char **) keywords, &y)) {
- return NULL;
- }
- self->obj->setY(y);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQPointF_x(PyQPointF *self)
- {
- PyObject *py_retval;
- double retval;
- retval = self->obj->x();
- py_retval = Py_BuildValue((char *) "d", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQPointF_y(PyQPointF *self)
- {
- PyObject *py_retval;
- double retval;
- retval = self->obj->y();
- py_retval = Py_BuildValue((char *) "d", retval);
- return py_retval;
- }
- static PyObject*
- _wrap_PyQPointF__copy__(PyQPointF *self)
- {
- PyQPointF *py_copy;
- py_copy = PyObject_New(PyQPointF, &PyQPointF_Type);
- py_copy->obj = new QPointF(*self->obj);
- py_copy->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return (PyObject*) py_copy;
- }
- static PyMethodDef PyQPointF_methods[] = {
- {(char *) "setX", (PyCFunction) _wrap_PyQPointF_setX, METH_KEYWORDS|METH_VARARGS, "setX(x)\n\ntype: x: double" },
- {(char *) "setY", (PyCFunction) _wrap_PyQPointF_setY, METH_KEYWORDS|METH_VARARGS, "setY(y)\n\ntype: y: double" },
- {(char *) "x", (PyCFunction) _wrap_PyQPointF_x, METH_NOARGS, "x()\n\n" },
- {(char *) "y", (PyCFunction) _wrap_PyQPointF_y, METH_NOARGS, "y()\n\n" },
- {(char *) "__copy__", (PyCFunction) _wrap_PyQPointF__copy__, METH_NOARGS, 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;
- }
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
- PyTypeObject PyQPointF_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- (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 */
- #if PY_MAJOR_VERSION >= 3
- NULL,
- #else
- (cmpfunc)NULL, /* tp_compare */
- #endif
- (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 */
- "QPointF(ctor_arg)\nQPointF(x, y)", /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)NULL, /* 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_PyQSize__tp_init__0(PyQSize *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQSize *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQSize_Type, &ctor_arg)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QSize(*((PyQSize *) ctor_arg)->obj);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQSize__tp_init__1(PyQSize *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- int w;
- int h;
- const char *keywords[] = {"w", "h", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ii", (char **) keywords, &w, &h)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QSize(w, h);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- int _wrap_PyQSize__tp_init(PyQSize *self, PyObject *args, PyObject *kwargs)
- {
- int retval;
- PyObject *error_list;
- PyObject *exceptions[2] = {0,};
- retval = _wrap_PyQSize__tp_init__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQSize__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_PyQSize_height(PyQSize *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->height();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQSize_setHeight(PyQSize *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_PyQSize_setWidth(PyQSize *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_PyQSize_width(PyQSize *self)
- {
- PyObject *py_retval;
- int retval;
- retval = self->obj->width();
- py_retval = Py_BuildValue((char *) "i", retval);
- return py_retval;
- }
- static PyObject*
- _wrap_PyQSize__copy__(PyQSize *self)
- {
- PyQSize *py_copy;
- py_copy = PyObject_New(PyQSize, &PyQSize_Type);
- py_copy->obj = new QSize(*self->obj);
- py_copy->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return (PyObject*) py_copy;
- }
- static PyMethodDef PyQSize_methods[] = {
- {(char *) "height", (PyCFunction) _wrap_PyQSize_height, METH_NOARGS, "height()\n\n" },
- {(char *) "setHeight", (PyCFunction) _wrap_PyQSize_setHeight, METH_KEYWORDS|METH_VARARGS, "setHeight(h)\n\ntype: h: int" },
- {(char *) "setWidth", (PyCFunction) _wrap_PyQSize_setWidth, METH_KEYWORDS|METH_VARARGS, "setWidth(w)\n\ntype: w: int" },
- {(char *) "width", (PyCFunction) _wrap_PyQSize_width, METH_NOARGS, "width()\n\n" },
- {(char *) "__copy__", (PyCFunction) _wrap_PyQSize__copy__, METH_NOARGS, NULL},
- {NULL, NULL, 0, NULL}
- };
- static void
- _wrap_PyQSize__tp_dealloc(PyQSize *self)
- {
- QSize *tmp = self->obj;
- self->obj = NULL;
- if (!(self->flags&PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED)) {
- delete tmp;
- }
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
- PyTypeObject PyQSize_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- (char *) "tiled.qt.QSize", /* tp_name */
- sizeof(PyQSize), /* tp_basicsize */
- 0, /* tp_itemsize */
- /* methods */
- (destructor)_wrap_PyQSize__tp_dealloc, /* tp_dealloc */
- (printfunc)0, /* tp_print */
- (getattrfunc)NULL, /* tp_getattr */
- (setattrfunc)NULL, /* tp_setattr */
- #if PY_MAJOR_VERSION >= 3
- NULL,
- #else
- (cmpfunc)NULL, /* tp_compare */
- #endif
- (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 */
- "QSize(ctor_arg)\nQSize(w, h)", /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- (getiterfunc)NULL, /* tp_iter */
- (iternextfunc)NULL, /* tp_iternext */
- (struct PyMethodDef*)PyQSize_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_PyQSize__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__0(PyQSizeF *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQSizeF *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQSizeF_Type, &ctor_arg)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QSizeF(*((PyQSizeF *) ctor_arg)->obj);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static int
- _wrap_PyQSizeF__tp_init__1(PyQSizeF *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- double w;
- double h;
- const char *keywords[] = {"w", "h", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "dd", (char **) keywords, &w, &h)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QSizeF(w, h);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- int _wrap_PyQSizeF__tp_init(PyQSizeF *self, PyObject *args, PyObject *kwargs)
- {
- int retval;
- PyObject *error_list;
- PyObject *exceptions[2] = {0,};
- retval = _wrap_PyQSizeF__tp_init__0(self, args, kwargs, &exceptions[0]);
- if (!exceptions[0]) {
- return retval;
- }
- retval = _wrap_PyQSizeF__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_PyQSizeF_height(PyQSizeF *self)
- {
- PyObject *py_retval;
- double retval;
- retval = self->obj->height();
- py_retval = Py_BuildValue((char *) "d", retval);
- return py_retval;
- }
- PyObject *
- _wrap_PyQSizeF_setHeight(PyQSizeF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- double h;
- const char *keywords[] = {"h", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "d", (char **) keywords, &h)) {
- return NULL;
- }
- self->obj->setHeight(h);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQSizeF_setWidth(PyQSizeF *self, PyObject *args, PyObject *kwargs)
- {
- PyObject *py_retval;
- double w;
- const char *keywords[] = {"w", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "d", (char **) keywords, &w)) {
- return NULL;
- }
- self->obj->setWidth(w);
- Py_INCREF(Py_None);
- py_retval = Py_None;
- return py_retval;
- }
- PyObject *
- _wrap_PyQSizeF_width(PyQSizeF *self)
- {
- PyObject *py_retval;
- double retval;
- retval = self->obj->width();
- py_retval = Py_BuildValue((char *) "d", retval);
- return py_retval;
- }
- static PyObject*
- _wrap_PyQSizeF__copy__(PyQSizeF *self)
- {
- PyQSizeF *py_copy;
- py_copy = PyObject_New(PyQSizeF, &PyQSizeF_Type);
- py_copy->obj = new QSizeF(*self->obj);
- py_copy->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return (PyObject*) py_copy;
- }
- static PyMethodDef PyQSizeF_methods[] = {
- {(char *) "height", (PyCFunction) _wrap_PyQSizeF_height, METH_NOARGS, "height()\n\n" },
- {(char *) "setHeight", (PyCFunction) _wrap_PyQSizeF_setHeight, METH_KEYWORDS|METH_VARARGS, "setHeight(h)\n\ntype: h: double" },
- {(char *) "setWidth", (PyCFunction) _wrap_PyQSizeF_setWidth, METH_KEYWORDS|METH_VARARGS, "setWidth(w)\n\ntype: w: double" },
- {(char *) "width", (PyCFunction) _wrap_PyQSizeF_width, METH_NOARGS, "width()\n\n" },
- {(char *) "__copy__", (PyCFunction) _wrap_PyQSizeF__copy__, 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;
- }
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
- PyTypeObject PyQSizeF_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- (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 */
- #if PY_MAJOR_VERSION >= 3
- NULL,
- #else
- (cmpfunc)NULL, /* tp_compare */
- #endif
- (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 */
- "QSizeF(ctor_arg)\nQSizeF(w, h)", /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)NULL, /* 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(PyQRgb *self, PyObject *args, PyObject *kwargs)
- {
- PyQRgb *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQRgb_Type, &ctor_arg)) {
- return -1;
- }
- self->obj = new QRgb(*((PyQRgb *) ctor_arg)->obj);
- self->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return 0;
- }
- static PyObject*
- _wrap_PyQRgb__copy__(PyQRgb *self)
- {
- PyQRgb *py_copy;
- py_copy = PyObject_New(PyQRgb, &PyQRgb_Type);
- py_copy->obj = new QRgb(*self->obj);
- py_copy->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return (PyObject*) py_copy;
- }
- static PyMethodDef PyQRgb_methods[] = {
- {(char *) "__copy__", (PyCFunction) _wrap_PyQRgb__copy__, METH_NOARGS, NULL},
- {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;
- }
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
- PyTypeObject PyQRgb_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- (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 */
- #if PY_MAJOR_VERSION >= 3
- NULL,
- #else
- (cmpfunc)NULL, /* tp_compare */
- #endif
- (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 */
- "QRgb(ctor_arg)", /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)NULL, /* 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;
- }
- static int
- _wrap_PyQColor__tp_init__3(PyQColor *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQColor *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQColor_Type, &ctor_arg)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QColor(*((PyQColor *) ctor_arg)->obj);
- 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[4] = {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;
- }
- retval = _wrap_PyQColor__tp_init__3(self, args, kwargs, &exceptions[3]);
- if (!exceptions[3]) {
- Py_DECREF(exceptions[0]);
- Py_DECREF(exceptions[1]);
- Py_DECREF(exceptions[2]);
- return retval;
- }
- error_list = PyList_New(4);
- 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]);
- PyList_SET_ITEM(error_list, 3, PyObject_Str(exceptions[3]));
- Py_DECREF(exceptions[3]);
- 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 PyObject*
- _wrap_PyQColor__copy__(PyQColor *self)
- {
- PyQColor *py_copy;
- py_copy = PyObject_New(PyQColor, &PyQColor_Type);
- py_copy->obj = new QColor(*self->obj);
- py_copy->flags = PYBINDGEN_WRAPPER_FLAG_NONE;
- return (PyObject*) py_copy;
- }
- static PyMethodDef PyQColor_methods[] = {
- {(char *) "rgb", (PyCFunction) _wrap_PyQColor_rgb, METH_NOARGS, "rgb()\n\n" },
- {(char *) "rgba", (PyCFunction) _wrap_PyQColor_rgba, METH_NOARGS, "rgba()\n\n" },
- {(char *) "__copy__", (PyCFunction) _wrap_PyQColor__copy__, 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;
- }
- Py_TYPE(self)->tp_free((PyObject*)self);
- }
- PyTypeObject PyQColor_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- (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 */
- #if PY_MAJOR_VERSION >= 3
- NULL,
- #else
- (cmpfunc)NULL, /* tp_compare */
- #endif
- (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 */
- "QColor(r, g, b, a)\nQColor(ctor_arg)\nQColor(r, g, b)\nQColor(col)", /* Documentation string */
- (traverseproc)NULL, /* tp_traverse */
- (inquiry)NULL, /* tp_clear */
- (richcmpfunc)NULL, /* 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;
- }
- static int
- _wrap_PyQImage__tp_init__2(PyQImage *self, PyObject *args, PyObject *kwargs, PyObject **return_exception)
- {
- PyQImage *ctor_arg;
- const char *keywords[] = {"ctor_arg", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "O!", (char **) keywords, &PyQImage_Type, &ctor_arg)) {
- {
- PyObject *exc_type, *traceback;
- PyErr_Fetch(&exc_type, return_exception, &traceback);
- Py_XDECREF(exc_type);
- Py_XDECREF(traceback);
- }
- return -1;
- }
- self->obj = new QImage(*((PyQImage *) ctor_arg)->obj);
- 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[3] = {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;
- }
- retval = _wrap_PyQImage__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_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_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_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;
- }
- 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_PyQ…
Large files files are truncated, but you can click here to view the full file