/*
 * 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 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgrectanglenode.sip"
#include <qsgrectanglenode.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGRectangleNode.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qcolor.sip"
#include <qcolor.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGRectangleNode.cpp"
#line 164 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGRectangleNode.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/sipQtQuickQSGRectangleNode.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/sipQtQuickQSGRectangleNode.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/sipQtQuickQSGRectangleNode.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/sipQtQuickQSGRectangleNode.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/sipQtQuickQSGRectangleNode.cpp"


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

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSGRectangleNode, &sipCpp, sipType_QRectF, &a0))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QSGRectangleNode, sipName_setRect);
                return SIP_NULLPTR;
            }

            sipCpp->setRect(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGRectangleNode, sipName_setRect, doc_QSGRectangleNode_setRect);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QSGRectangleNode *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QSGRectangleNode, sipName_rect);
                return SIP_NULLPTR;
            }

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

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

    sipNoMethod(sipParseErr, sipName_QSGRectangleNode, sipName_rect, doc_QSGRectangleNode_rect);

    return SIP_NULLPTR;
}


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

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSGRectangleNode, &sipCpp, sipType_QColor, &a0, &a0State))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QSGRectangleNode, sipName_setColor);
                return SIP_NULLPTR;
            }

            sipCpp->setColor(*a0);
            sipReleaseType(const_cast< ::QColor *>(a0), sipType_QColor, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGRectangleNode, sipName_setColor, doc_QSGRectangleNode_setColor);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QSGRectangleNode *sipCpp;

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

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QSGRectangleNode, sipName_color);
                return SIP_NULLPTR;
            }

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

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

    sipNoMethod(sipParseErr, sipName_QSGRectangleNode, sipName_color, doc_QSGRectangleNode_color);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QSGRectangleNode)
        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_QSGRectangleNode(void *, int);}
static void release_QSGRectangleNode(void *sipCppV, int)
{
    delete reinterpret_cast< ::QSGRectangleNode *>(sipCppV);
}


extern "C" {static void dealloc_QSGRectangleNode(sipSimpleWrapper *);}
static void dealloc_QSGRectangleNode(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSGRectangleNode(sipGetAddress(sipSelf), 0);
    }
}


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


static PyMethodDef methods_QSGRectangleNode[] = {
    {sipName_color, meth_QSGRectangleNode_color, METH_VARARGS, doc_QSGRectangleNode_color},
    {sipName_rect, meth_QSGRectangleNode_rect, METH_VARARGS, doc_QSGRectangleNode_rect},
    {sipName_setColor, meth_QSGRectangleNode_setColor, METH_VARARGS, doc_QSGRectangleNode_setColor},
    {sipName_setRect, meth_QSGRectangleNode_setRect, METH_VARARGS, doc_QSGRectangleNode_setRect}
};


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


sipClassTypeDef sipTypeDef_QtQuick_QSGRectangleNode = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSGRectangleNode,
        SIP_NULLPTR,
        &plugin_QSGRectangleNode
    },
    {
        sipNameNr_QSGRectangleNode,
        {0, 0, 1},
        4, methods_QSGRectangleNode,
        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},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QSGRectangleNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSGRectangleNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QSGRectangleNode,
    cast_QSGRectangleNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
