/*
 * 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 299 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGClipNode.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/sipQtQuickQSGClipNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsggeometry.sip"
#include <qsggeometry.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGClipNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGClipNode.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQuick/sipQtQuickQSGClipNode.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/sipQtQuickQSGClipNode.cpp"


class sipQSGClipNode : public  ::QSGClipNode
{
public:
    sipQSGClipNode();
    virtual ~sipQSGClipNode();

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQSGClipNode::sipQSGClipNode():  ::QSGClipNode(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

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

    if (!sipMeth)
    {
         ::QSGClipNode::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);
}

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

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

    if (!sipMeth)
        return  ::QSGClipNode::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);
}


PyDoc_STRVAR(doc_QSGClipNode_setIsRectangular, "setIsRectangular(self, bool)");

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

    {
        bool a0;
         ::QSGClipNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSGClipNode, &sipCpp, &a0))
        {
            sipCpp->setIsRectangular(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGClipNode, sipName_setIsRectangular, doc_QSGClipNode_setIsRectangular);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGClipNode_isRectangular, "isRectangular(self) -> bool");

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

    {
        const  ::QSGClipNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSGClipNode, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isRectangular();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGClipNode, sipName_isRectangular, doc_QSGClipNode_isRectangular);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGClipNode_setClipRect, "setClipRect(self, QRectF)");

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

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

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGClipNode, sipName_setClipRect, doc_QSGClipNode_setClipRect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGClipNode_clipRect, "clipRect(self) -> QRectF");

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

    {
        const  ::QSGClipNode *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QSGClipNode, sipName_clipRect, doc_QSGClipNode_clipRect);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QSGClipNode)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QSGClipNode[] = {
    {sipName_clipRect, meth_QSGClipNode_clipRect, METH_VARARGS, doc_QSGClipNode_clipRect},
    {sipName_isRectangular, meth_QSGClipNode_isRectangular, METH_VARARGS, doc_QSGClipNode_isRectangular},
    {sipName_setClipRect, meth_QSGClipNode_setClipRect, METH_VARARGS, doc_QSGClipNode_setClipRect},
    {sipName_setIsRectangular, meth_QSGClipNode_setIsRectangular, METH_VARARGS, doc_QSGClipNode_setIsRectangular}
};

PyDoc_STRVAR(doc_QSGClipNode, "\1QSGClipNode()");


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


sipClassTypeDef sipTypeDef_QtQuick_QSGClipNode = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSGClipNode,
        SIP_NULLPTR,
        &plugin_QSGClipNode
    },
    {
        sipNameNr_QSGClipNode,
        {0, 0, 1},
        4, methods_QSGClipNode,
        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_QSGClipNode,
    -1,
    -1,
    supers_QSGClipNode,
    SIP_NULLPTR,
    init_type_QSGClipNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSGClipNode,
    SIP_NULLPTR,
    array_QSGClipNode,
    SIP_NULLPTR,
    release_QSGClipNode,
    cast_QSGClipNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSGClipNode,
    sizeof ( ::QSGClipNode),
};
