/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * 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 270 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 29 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterial.sip"
#include <qsgmaterial.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsggeometry.sip"
#include <qsggeometry.h>
#line 36 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 39 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgnode.sip"
#include <qsgnode.h>
#line 42 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 45 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"


class sipQSGGeometryNode : public  ::QSGGeometryNode
{
public:
    sipQSGGeometryNode();
    virtual ~sipQSGGeometryNode();

    /*
     * 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:
    sipQSGGeometryNode(const sipQSGGeometryNode &);
    sipQSGGeometryNode &operator = (const sipQSGGeometryNode &);

    char sipPyMethods[2];
};

sipQSGGeometryNode::sipQSGGeometryNode():  ::QSGGeometryNode(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

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

    if (!sipMeth)
    {
         ::QSGGeometryNode::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 sipQSGGeometryNode::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  ::QSGGeometryNode::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_QSGGeometryNode_setMaterial, "setMaterial(self, QSGMaterial)");

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

    {
         ::QSGMaterial* a0;
        PyObject *a0Wrapper;
         ::QSGGeometryNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QSGGeometryNode, &sipCpp, &a0Wrapper, sipType_QSGMaterial, &a0))
        {
#line 278 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgnode.sip"
        sipCpp->setMaterial(a0);
        
        if (sipCpp->flags() & QSGNode::OwnsMaterial)
            sipTransferTo(a0Wrapper, sipSelf);
#line 136 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGGeometryNode, sipName_setMaterial, doc_QSGGeometryNode_setMaterial);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGGeometryNode_material, "material(self) -> QSGMaterial");

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

    {
        const  ::QSGGeometryNode *sipCpp;

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

            sipRes = sipCpp->material();

            return sipConvertFromType(sipRes,sipType_QSGMaterial,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGGeometryNode, sipName_material, doc_QSGGeometryNode_material);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGGeometryNode_setOpaqueMaterial, "setOpaqueMaterial(self, QSGMaterial)");

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

    {
         ::QSGMaterial* a0;
        PyObject *a0Wrapper;
         ::QSGGeometryNode *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QSGGeometryNode, &sipCpp, &a0Wrapper, sipType_QSGMaterial, &a0))
        {
#line 287 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgnode.sip"
        sipCpp->setOpaqueMaterial(a0);
        
        if (sipCpp->flags() & QSGNode::OwnsOpaqueMaterial)
            sipTransferTo(a0Wrapper, sipSelf);
#line 196 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGGeometryNode.cpp"

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGGeometryNode, sipName_setOpaqueMaterial, doc_QSGGeometryNode_setOpaqueMaterial);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGGeometryNode_opaqueMaterial, "opaqueMaterial(self) -> QSGMaterial");

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

    {
        const  ::QSGGeometryNode *sipCpp;

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

            sipRes = sipCpp->opaqueMaterial();

            return sipConvertFromType(sipRes,sipType_QSGMaterial,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGGeometryNode, sipName_opaqueMaterial, doc_QSGGeometryNode_opaqueMaterial);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QSGGeometryNode)
        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_QSGGeometryNode(void *, int);}
static void release_QSGGeometryNode(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQSGGeometryNode *>(sipCppV);
    else
        delete reinterpret_cast< ::QSGGeometryNode *>(sipCppV);
}


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QSGGeometryNode[] = {
    {sipName_material, meth_QSGGeometryNode_material, METH_VARARGS, doc_QSGGeometryNode_material},
    {sipName_opaqueMaterial, meth_QSGGeometryNode_opaqueMaterial, METH_VARARGS, doc_QSGGeometryNode_opaqueMaterial},
    {sipName_setMaterial, meth_QSGGeometryNode_setMaterial, METH_VARARGS, doc_QSGGeometryNode_setMaterial},
    {sipName_setOpaqueMaterial, meth_QSGGeometryNode_setOpaqueMaterial, METH_VARARGS, doc_QSGGeometryNode_setOpaqueMaterial}
};

PyDoc_STRVAR(doc_QSGGeometryNode, "\1QSGGeometryNode()");


sipClassTypeDef sipTypeDef_QtQuick_QSGGeometryNode = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSGGeometryNode,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QSGGeometryNode,
        {0, 0, 1},
        4, methods_QSGGeometryNode,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSGGeometryNode,
    -1,
    -1,
    supers_QSGGeometryNode,
    SIP_NULLPTR,
    init_type_QSGGeometryNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSGGeometryNode,
    SIP_NULLPTR,
    array_QSGGeometryNode,
    SIP_NULLPTR,
    release_QSGGeometryNode,
    cast_QSGGeometryNode,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSGGeometryNode,
    sizeof ( ::QSGGeometryNode),
};
