/*
 * 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 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterialshader.sip"
#include <qsgmaterialshader.h>
#line 29 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"

#line 24 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 36 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterialshader.sip"
#include <qsgmaterialshader.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterialshader.sip"
#include <qsgmaterialshader.h>
#line 41 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterialshader.sip"
#include <qsgmaterialshader.h>
#line 63 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterialshader.sip"
#include <qsgmaterialshader.h>
#line 46 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgmaterial.sip"
#include <qsgmaterial.h>
#line 49 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtQuick/qsgtexture.sip"
#include <qsgtexture.h>
#line 52 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQSGMaterialShader.cpp"


class sipQSGMaterialShader : public  ::QSGMaterialShader
{
public:
    sipQSGMaterialShader();
    virtual ~sipQSGMaterialShader();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool updateGraphicsPipelineState( ::QSGMaterialShader::RenderState&, ::QSGMaterialShader::GraphicsPipelineState*, ::QSGMaterial*, ::QSGMaterial*) SIP_OVERRIDE;
    void updateSampledImage( ::QSGMaterialShader::RenderState&,int, ::QSGTexture**, ::QSGMaterial*, ::QSGMaterial*) SIP_OVERRIDE;
    bool updateUniformData( ::QSGMaterialShader::RenderState&, ::QSGMaterial*, ::QSGMaterial*) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[3];
};

sipQSGMaterialShader::sipQSGMaterialShader():  ::QSGMaterialShader(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

bool sipQSGMaterialShader::updateGraphicsPipelineState( ::QSGMaterialShader::RenderState& a0, ::QSGMaterialShader::GraphicsPipelineState*a1, ::QSGMaterial*a2, ::QSGMaterial*a3)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::QSGMaterialShader::updateGraphicsPipelineState(a0,a1,a2,a3);

    extern bool sipVH_QtQuick_71(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QSGMaterialShader::RenderState&, ::QSGMaterialShader::GraphicsPipelineState*, ::QSGMaterial*, ::QSGMaterial*);

    return sipVH_QtQuick_71(sipGILState, sipImportedVirtErrorHandlers_QtQuick_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3);
}

void sipQSGMaterialShader::updateSampledImage( ::QSGMaterialShader::RenderState& a0,int a1, ::QSGTexture**a2, ::QSGMaterial*a3, ::QSGMaterial*a4)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
    {
         ::QSGMaterialShader::updateSampledImage(a0,a1,a2,a3,a4);
        return;
    }

    extern void sipVH_QtQuick_70(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QSGMaterialShader::RenderState&,int, ::QSGTexture**, ::QSGMaterial*, ::QSGMaterial*);

    sipVH_QtQuick_70(sipGILState, sipImportedVirtErrorHandlers_QtQuick_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2, a3, a4);
}

bool sipQSGMaterialShader::updateUniformData( ::QSGMaterialShader::RenderState& a0, ::QSGMaterial*a1, ::QSGMaterial*a2)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_updateUniformData);

    if (!sipMeth)
        return  ::QSGMaterialShader::updateUniformData(a0,a1,a2);

    extern bool sipVH_QtQuick_69(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QSGMaterialShader::RenderState&, ::QSGMaterial*, ::QSGMaterial*);

    return sipVH_QtQuick_69(sipGILState, sipImportedVirtErrorHandlers_QtQuick_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1, a2);
}


PyDoc_STRVAR(doc_QSGMaterialShader_updateUniformData, "updateUniformData(self, QSGMaterialShader.RenderState, QSGMaterial, QSGMaterial) -> bool");

extern "C" {static PyObject *meth_QSGMaterialShader_updateUniformData(PyObject *, PyObject *);}
static PyObject *meth_QSGMaterialShader_updateUniformData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSGMaterialShader)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QSGMaterialShader::RenderState* a0;
         ::QSGMaterial* a1;
         ::QSGMaterial* a2;
         ::QSGMaterialShader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J8J8", &sipSelf, sipType_QSGMaterialShader, &sipCpp, sipType_QSGMaterialShader_RenderState, &a0, sipType_QSGMaterial, &a1, sipType_QSGMaterial, &a2))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSGMaterialShader::updateUniformData(*a0,a1,a2) : sipCpp->updateUniformData(*a0,a1,a2));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_updateUniformData, doc_QSGMaterialShader_updateUniformData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGMaterialShader_updateSampledImage, "updateSampledImage(self, QSGMaterialShader.RenderState, int, QSGMaterial, QSGMaterial) -> QSGTexture");

extern "C" {static PyObject *meth_QSGMaterialShader_updateSampledImage(PyObject *, PyObject *);}
static PyObject *meth_QSGMaterialShader_updateSampledImage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSGMaterialShader)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QSGMaterialShader::RenderState* a0;
        int a1;
         ::QSGTexture* a2;
         ::QSGMaterial* a3;
         ::QSGMaterial* a4;
         ::QSGMaterialShader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9iJ8J8", &sipSelf, sipType_QSGMaterialShader, &sipCpp, sipType_QSGMaterialShader_RenderState, &a0, &a1, sipType_QSGMaterial, &a3, sipType_QSGMaterial, &a4))
        {
            (sipSelfWasArg ? sipCpp-> ::QSGMaterialShader::updateSampledImage(*a0,a1,&a2,a3,a4) : sipCpp->updateSampledImage(*a0,a1,&a2,a3,a4));

            return sipConvertFromType(a2,sipType_QSGTexture,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_updateSampledImage, doc_QSGMaterialShader_updateSampledImage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGMaterialShader_updateGraphicsPipelineState, "updateGraphicsPipelineState(self, QSGMaterialShader.RenderState, QSGMaterialShader.GraphicsPipelineState, QSGMaterial, QSGMaterial) -> bool");

extern "C" {static PyObject *meth_QSGMaterialShader_updateGraphicsPipelineState(PyObject *, PyObject *);}
static PyObject *meth_QSGMaterialShader_updateGraphicsPipelineState(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSGMaterialShader)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QSGMaterialShader::RenderState* a0;
         ::QSGMaterialShader::GraphicsPipelineState* a1;
         ::QSGMaterial* a2;
         ::QSGMaterial* a3;
         ::QSGMaterialShader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J8J8J8", &sipSelf, sipType_QSGMaterialShader, &sipCpp, sipType_QSGMaterialShader_RenderState, &a0, sipType_QSGMaterialShader_GraphicsPipelineState, &a1, sipType_QSGMaterial, &a2, sipType_QSGMaterial, &a3))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QSGMaterialShader::updateGraphicsPipelineState(*a0,a1,a2,a3) : sipCpp->updateGraphicsPipelineState(*a0,a1,a2,a3));

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_updateGraphicsPipelineState, doc_QSGMaterialShader_updateGraphicsPipelineState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGMaterialShader_flags, "flags(self) -> QSGMaterialShader.Flag");

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

    {
        const  ::QSGMaterialShader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSGMaterialShader, &sipCpp))
        {
             ::QSGMaterialShader::Flags*sipRes;

            sipRes = new  ::QSGMaterialShader::Flags(sipCpp->flags());

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

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_flags, doc_QSGMaterialShader_flags);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGMaterialShader_setFlag, "setFlag(self, QSGMaterialShader.Flag, on: bool = True)");

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

    {
         ::QSGMaterialShader::Flags* a0;
        int a0State = 0;
        bool a1 = 1;
         ::QSGMaterialShader *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_on,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|b", &sipSelf, sipType_QSGMaterialShader, &sipCpp, sipType_QFlags_0100QSGMaterialShader_Flag, &a0, &a0State, &a1))
        {
            sipCpp->setFlag(*a0,a1);
            sipReleaseType(a0, sipType_QFlags_0100QSGMaterialShader_Flag, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_setFlag, doc_QSGMaterialShader_setFlag);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGMaterialShader_setFlags, "setFlags(self, QSGMaterialShader.Flag)");

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

    {
         ::QSGMaterialShader::Flags* a0;
        int a0State = 0;
         ::QSGMaterialShader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSGMaterialShader, &sipCpp, sipType_QFlags_0100QSGMaterialShader_Flag, &a0, &a0State))
        {
            sipCpp->setFlags(*a0);
            sipReleaseType(a0, sipType_QFlags_0100QSGMaterialShader_Flag, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_setFlags, doc_QSGMaterialShader_setFlags);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSGMaterialShader_setShaderFileName, "setShaderFileName(self, QSGMaterialShader.Stage, str)");

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

    {
         ::QSGMaterialShader::Stage a0;
        const  ::QString* a1;
        int a1State = 0;
         ::QSGMaterialShader *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pEJ1", &sipSelf, sipType_QSGMaterialShader, &sipCpp, sipType_QSGMaterialShader_Stage, &a0, sipType_QString, &a1, &a1State))
        {
            sipCpp->setShaderFileName(a0,*a1);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSGMaterialShader, sipName_setShaderFileName, doc_QSGMaterialShader_setShaderFileName);

    return SIP_NULLPTR;
}


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


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QSGMaterialShader[] = {
    {sipName_flags, meth_QSGMaterialShader_flags, METH_VARARGS, doc_QSGMaterialShader_flags},
    {sipName_setFlag, SIP_MLMETH_CAST(meth_QSGMaterialShader_setFlag), METH_VARARGS|METH_KEYWORDS, doc_QSGMaterialShader_setFlag},
    {sipName_setFlags, meth_QSGMaterialShader_setFlags, METH_VARARGS, doc_QSGMaterialShader_setFlags},
    {sipName_setShaderFileName, meth_QSGMaterialShader_setShaderFileName, METH_VARARGS, doc_QSGMaterialShader_setShaderFileName},
    {sipName_updateGraphicsPipelineState, meth_QSGMaterialShader_updateGraphicsPipelineState, METH_VARARGS, doc_QSGMaterialShader_updateGraphicsPipelineState},
    {sipName_updateSampledImage, meth_QSGMaterialShader_updateSampledImage, METH_VARARGS, doc_QSGMaterialShader_updateSampledImage},
    {sipName_updateUniformData, meth_QSGMaterialShader_updateUniformData, METH_VARARGS, doc_QSGMaterialShader_updateUniformData}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QSGMaterialShader[] = {
    {sipName_UpdatesGraphicsPipelineState, static_cast<int>( ::QSGMaterialShader::UpdatesGraphicsPipelineState)},
    {sipName_VertexStage, static_cast<int>( ::QSGMaterialShader::VertexStage)},
    {sipName_FragmentStage, static_cast<int>( ::QSGMaterialShader::FragmentStage)},
    {0, 0}
};

PyDoc_STRVAR(doc_QSGMaterialShader, "\1QSGMaterialShader()");


sipClassTypeDef sipTypeDef_QtQuick_QSGMaterialShader = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSGMaterialShader,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QSGMaterialShader,
        {0, 0, 1},
        7, methods_QSGMaterialShader,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QSGMaterialShader, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSGMaterialShader,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QSGMaterialShader,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSGMaterialShader,
    SIP_NULLPTR,
    array_QSGMaterialShader,
    SIP_NULLPTR,
    release_QSGMaterialShader,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSGMaterialShader,
    sizeof ( ::QSGMaterialShader),
};
