/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtQuick.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgsimplerectnode.sip"
#include <qsgsimplerectnode.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"

#line 164 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"
#line 183 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgmaterial.sip"
#include <qsgmaterial.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsggeometry.sip"
#include <qsggeometry.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGSimpleRectNode.cpp"


class sipQSGSimpleRectNode : public  ::QSGSimpleRectNode
{
public:
    sipQSGSimpleRectNode(const  ::QRectF&,const  ::QColor&);
    sipQSGSimpleRectNode();
    virtual ~sipQSGSimpleRectNode();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool isSubtreeBlocked() const SIP_OVERRIDE;
    void preprocess() SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQSGSimpleRectNode(const sipQSGSimpleRectNode &);
    sipQSGSimpleRectNode &operator = (const sipQSGSimpleRectNode &);

    char sipPyMethods[2];
};

sipQSGSimpleRectNode::sipQSGSimpleRectNode(const  ::QRectF& a0,const  ::QColor& a1):  ::QSGSimpleRectNode(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSGSimpleRectNode::sipQSGSimpleRectNode():  ::QSGSimpleRectNode(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSGSimpleRectNode::~sipQSGSimpleRectNode()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

bool sipQSGSimpleRectNode::isSubtreeBlocked() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_isSubtreeBlocked);

    if (!sipMeth)
        return  ::QSGSimpleRectNode::isSubtreeBlocked();

    extern bool sipVH_QtQuick_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtQuick_9(sipGILState, sipImportedVirtErrorHandlers_QtQuick_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipQSGSimpleRectNode::preprocess()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_preprocess);

    if (!sipMeth)
    {
         ::QSGSimpleRectNode::preprocess();
        return;
    }

    extern void sipVH_QtQuick_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_QtQuick_6(sipGILState, sipImportedVirtErrorHandlers_QtQuick_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QSGSimpleRectNode_setRect, "setRect(self, QRectF)\n"
"setRect(self, float, float, float, float)");

extern "C" {static PyObject *meth_QSGSimpleRectNode_setRect(PyObject *, PyObject *);}
static PyObject *meth_QSGSimpleRectNode_setRect(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QRectF* a0;
         ::QSGSimpleRectNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSGSimpleRectNode, &sipCpp, sipType_QRectF, &a0))
        {
            sipCpp->setRect(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::qreal a0;
         ::qreal a1;
         ::qreal a2;
         ::qreal a3;
         ::QSGSimpleRectNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bdddd", &sipSelf, sipType_QSGSimpleRectNode, &sipCpp, &a0, &a1, &a2, &a3))
        {
            sipCpp->setRect(a0,a1,a2,a3);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGSimpleRectNode, sipName_setRect, doc_QSGSimpleRectNode_setRect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGSimpleRectNode_rect, "rect(self) -> QRectF");

extern "C" {static PyObject *meth_QSGSimpleRectNode_rect(PyObject *, PyObject *);}
static PyObject *meth_QSGSimpleRectNode_rect(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSGSimpleRectNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSGSimpleRectNode, &sipCpp))
        {
             ::QRectF*sipRes;

            sipRes = new  ::QRectF(sipCpp->rect());

            return sipConvertFromNewType(sipRes,sipType_QRectF,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGSimpleRectNode, sipName_rect, doc_QSGSimpleRectNode_rect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGSimpleRectNode_setColor, "setColor(self, Union[QColor, Qt.GlobalColor])");

extern "C" {static PyObject *meth_QSGSimpleRectNode_setColor(PyObject *, PyObject *);}
static PyObject *meth_QSGSimpleRectNode_setColor(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QColor* a0;
        int a0State = 0;
         ::QSGSimpleRectNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSGSimpleRectNode, &sipCpp, sipType_QColor, &a0, &a0State))
        {
            sipCpp->setColor(*a0);
            sipReleaseType(const_cast< ::QColor *>(a0), sipType_QColor, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGSimpleRectNode, sipName_setColor, doc_QSGSimpleRectNode_setColor);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGSimpleRectNode_color, "color(self) -> QColor");

extern "C" {static PyObject *meth_QSGSimpleRectNode_color(PyObject *, PyObject *);}
static PyObject *meth_QSGSimpleRectNode_color(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QSGSimpleRectNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSGSimpleRectNode, &sipCpp))
        {
             ::QColor*sipRes;

            sipRes = new  ::QColor(sipCpp->color());

            return sipConvertFromNewType(sipRes,sipType_QColor,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGSimpleRectNode, sipName_color, doc_QSGSimpleRectNode_color);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QSGSimpleRectNode(void *, const sipTypeDef *);}
static void *cast_QSGSimpleRectNode(void *sipCppV, const sipTypeDef *targetType)
{
     ::QSGSimpleRectNode *sipCpp = reinterpret_cast< ::QSGSimpleRectNode *>(sipCppV);

    if (targetType == sipType_QSGSimpleRectNode)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QSGGeometryNode)->ctd_cast(static_cast< ::QSGGeometryNode *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSGSimpleRectNode(void *, int);}
static void release_QSGSimpleRectNode(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQSGSimpleRectNode *>(sipCppV);
    else
        delete reinterpret_cast< ::QSGSimpleRectNode *>(sipCppV);
}


extern "C" {static void *array_QSGSimpleRectNode(Py_ssize_t);}
static void *array_QSGSimpleRectNode(Py_ssize_t sipNrElem)
{
    return new  ::QSGSimpleRectNode[sipNrElem];
}


extern "C" {static void array_delete_QSGSimpleRectNode(void *);}
static void array_delete_QSGSimpleRectNode(void *sipCpp)
{
    delete[] reinterpret_cast< ::QSGSimpleRectNode *>(sipCpp);
}


extern "C" {static void dealloc_QSGSimpleRectNode(sipSimpleWrapper *);}
static void dealloc_QSGSimpleRectNode(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQSGSimpleRectNode *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSGSimpleRectNode(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QSGSimpleRectNode(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QSGSimpleRectNode(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQSGSimpleRectNode *sipCpp = SIP_NULLPTR;

    {
        const  ::QRectF* a0;
        const  ::QColor* a1;
        int a1State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9J1", sipType_QRectF, &a0, sipType_QColor, &a1, &a1State))
        {
            sipCpp = new sipQSGSimpleRectNode(*a0,*a1);
            sipReleaseType(const_cast< ::QColor *>(a1), sipType_QColor, a1State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new sipQSGSimpleRectNode();

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QSGSimpleRectNode[] = {{54, 255, 1}};


static PyMethodDef methods_QSGSimpleRectNode[] = {
    {sipName_color, meth_QSGSimpleRectNode_color, METH_VARARGS, doc_QSGSimpleRectNode_color},
    {sipName_rect, meth_QSGSimpleRectNode_rect, METH_VARARGS, doc_QSGSimpleRectNode_rect},
    {sipName_setColor, meth_QSGSimpleRectNode_setColor, METH_VARARGS, doc_QSGSimpleRectNode_setColor},
    {sipName_setRect, meth_QSGSimpleRectNode_setRect, METH_VARARGS, doc_QSGSimpleRectNode_setRect}
};

PyDoc_STRVAR(doc_QSGSimpleRectNode, "\1QSGSimpleRectNode(QRectF, Union[QColor, Qt.GlobalColor])\n"
"QSGSimpleRectNode()");


static pyqt5ClassPluginDef plugin_QSGSimpleRectNode = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtQuick_QSGSimpleRectNode = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSGSimpleRectNode,
        SIP_NULLPTR,
        &plugin_QSGSimpleRectNode
    },
    {
        sipNameNr_QSGSimpleRectNode,
        {0, 0, 1},
        4, methods_QSGSimpleRectNode,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSGSimpleRectNode,
    -1,
    -1,
    supers_QSGSimpleRectNode,
    SIP_NULLPTR,
    init_type_QSGSimpleRectNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSGSimpleRectNode,
    SIP_NULLPTR,
    array_QSGSimpleRectNode,
    SIP_NULLPTR,
    release_QSGSimpleRectNode,
    cast_QSGSimpleRectNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSGSimpleRectNode,
    sizeof ( ::QSGSimpleRectNode),
};
