/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.7.0
 *
 * 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 "sipAPIQtOpenGL.h"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtOpenGL/qopenglversionfunctionsfactory.sip"
#include <qopenglversionfunctionsfactory.h>
#line 29 "/build/pyqt6/src/PyQt6-6.4.0/build/QtOpenGL/sipQtOpenGLQOpenGLVersionFunctionsFactory.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtOpenGL/qopenglversionprofile.sip"
#include <qopenglversionprofile.h>
#line 33 "/build/pyqt6/src/PyQt6-6.4.0/build/QtOpenGL/sipQtOpenGLQOpenGLVersionFunctionsFactory.cpp"
#line 46 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtGui/qopenglcontext.sip"
#include <qopenglcontext.h>
#line 36 "/build/pyqt6/src/PyQt6-6.4.0/build/QtOpenGL/sipQtOpenGLQOpenGLVersionFunctionsFactory.cpp"


PyDoc_STRVAR(doc_QOpenGLVersionFunctionsFactory_get, "get(versionProfile: QOpenGLVersionProfile = QOpenGLVersionProfile(), context: QOpenGLContext = None) -> QAbstractOpenGLFunctions");

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

    {
        const  ::QOpenGLVersionProfile& a0def = QOpenGLVersionProfile();
        const  ::QOpenGLVersionProfile* a0 = &a0def;
         ::QOpenGLContext* a1 = 0;
        PyObject *a1Wrapper = 0;

        static const char *sipKwdList[] = {
            sipName_versionProfile,
            sipName_context,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "C|J9@J8", &sipSelf, sipType_QOpenGLVersionProfile, &a0, &a1Wrapper, sipType_QOpenGLContext, &a1))
        {
            PyObject * sipRes = SIP_NULLPTR;

#line 32 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtOpenGL/qopenglversionfunctionsfactory.sip"
        sipRes = qpyopengl_version_functions(*a0, a1, a1Wrapper);
#line 64 "/build/pyqt6/src/PyQt6-6.4.0/build/QtOpenGL/sipQtOpenGLQOpenGLVersionFunctionsFactory.cpp"

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QOpenGLVersionFunctionsFactory, sipName_get, doc_QOpenGLVersionFunctionsFactory_get);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QOpenGLVersionFunctionsFactory(void *, int);}
static void release_QOpenGLVersionFunctionsFactory(void *sipCppV, int)
{
    delete reinterpret_cast< ::QOpenGLVersionFunctionsFactory *>(sipCppV);
}


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


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


extern "C" {static void assign_QOpenGLVersionFunctionsFactory(void *, Py_ssize_t, void *);}
static void assign_QOpenGLVersionFunctionsFactory(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QOpenGLVersionFunctionsFactory *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QOpenGLVersionFunctionsFactory *>(sipSrc);
}


extern "C" {static void *copy_QOpenGLVersionFunctionsFactory(const void *, Py_ssize_t);}
static void *copy_QOpenGLVersionFunctionsFactory(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new  ::QOpenGLVersionFunctionsFactory(reinterpret_cast<const  ::QOpenGLVersionFunctionsFactory *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_QOpenGLVersionFunctionsFactory(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QOpenGLVersionFunctionsFactory(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QOpenGLVersionFunctionsFactory *sipCpp = SIP_NULLPTR;

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

            return sipCpp;
        }
    }

    {
        const  ::QOpenGLVersionFunctionsFactory* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QOpenGLVersionFunctionsFactory, &a0))
        {
            sipCpp = new  ::QOpenGLVersionFunctionsFactory(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QOpenGLVersionFunctionsFactory[] = {
    {sipName_get, SIP_MLMETH_CAST(meth_QOpenGLVersionFunctionsFactory_get), METH_VARARGS|METH_KEYWORDS, doc_QOpenGLVersionFunctionsFactory_get}
};

PyDoc_STRVAR(doc_QOpenGLVersionFunctionsFactory, "\1QOpenGLVersionFunctionsFactory()\n"
"QOpenGLVersionFunctionsFactory(QOpenGLVersionFunctionsFactory)");


sipClassTypeDef sipTypeDef_QtOpenGL_QOpenGLVersionFunctionsFactory = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QOpenGLVersionFunctionsFactory,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QOpenGLVersionFunctionsFactory,
        {0, 0, 1},
        1, methods_QOpenGLVersionFunctionsFactory,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QOpenGLVersionFunctionsFactory,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QOpenGLVersionFunctionsFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QOpenGLVersionFunctionsFactory,
    assign_QOpenGLVersionFunctionsFactory,
    array_QOpenGLVersionFunctionsFactory,
    copy_QOpenGLVersionFunctionsFactory,
    release_QOpenGLVersionFunctionsFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QOpenGLVersionFunctionsFactory,
    sizeof ( ::QOpenGLVersionFunctionsFactory),
};
