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

#line 46 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtGui/qopenglcontext.sip"
#include <qopenglcontext.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtQuick/sipQtQuickQQuickGraphicsDevice.cpp"


PyDoc_STRVAR(doc_QQuickGraphicsDevice_isNull, "isNull(self) -> bool");

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

    {
        const  ::QQuickGraphicsDevice *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QQuickGraphicsDevice, sipName_isNull, doc_QQuickGraphicsDevice_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickGraphicsDevice_fromOpenGLContext, "fromOpenGLContext(QOpenGLContext) -> QQuickGraphicsDevice");

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

    {
         ::QOpenGLContext* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "CJ8", &sipSelf, sipType_QOpenGLContext, &a0))
        {
             ::QQuickGraphicsDevice*sipRes;

            sipRes = new  ::QQuickGraphicsDevice( ::QQuickGraphicsDevice::fromOpenGLContext(a0));

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

    sipNoMethod(sipParseErr, sipName_QQuickGraphicsDevice, sipName_fromOpenGLContext, doc_QQuickGraphicsDevice_fromOpenGLContext);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QQuickGraphicsDevice* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QQuickGraphicsDevice[] = {
    {sipName_fromOpenGLContext, meth_QQuickGraphicsDevice_fromOpenGLContext, METH_VARARGS, doc_QQuickGraphicsDevice_fromOpenGLContext},
    {sipName_isNull, meth_QQuickGraphicsDevice_isNull, METH_VARARGS, doc_QQuickGraphicsDevice_isNull}
};

PyDoc_STRVAR(doc_QQuickGraphicsDevice, "\1QQuickGraphicsDevice()\n"
"QQuickGraphicsDevice(QQuickGraphicsDevice)");


sipClassTypeDef sipTypeDef_QtQuick_QQuickGraphicsDevice = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QQuickGraphicsDevice,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QQuickGraphicsDevice,
        {0, 0, 1},
        2, methods_QQuickGraphicsDevice,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QQuickGraphicsDevice,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QQuickGraphicsDevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QQuickGraphicsDevice,
    assign_QQuickGraphicsDevice,
    array_QQuickGraphicsDevice,
    copy_QQuickGraphicsDevice,
    release_QQuickGraphicsDevice,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QQuickGraphicsDevice,
    sizeof ( ::QQuickGraphicsDevice),
};
