/*
 * 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 "sipAPIQtQuick.h"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtQuick/qquickrendertarget.sip"
#include <qquickrendertarget.h>
#line 29 "/build/pyqt6/src/PyQt6-6.4.0/build/QtQuick/sipQtQuickQQuickRenderTarget.cpp"

#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtGui/qpaintdevice.sip"
#include <qpaintdevice.h>
#line 33 "/build/pyqt6/src/PyQt6-6.4.0/build/QtQuick/sipQtQuickQQuickRenderTarget.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 36 "/build/pyqt6/src/PyQt6-6.4.0/build/QtQuick/sipQtQuickQQuickRenderTarget.cpp"


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

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

    {
        const  ::QQuickRenderTarget *sipCpp;

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

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_isNull, doc_QQuickRenderTarget_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_fromOpenGLTexture, "fromOpenGLTexture(int, QSize, sampleCount: int = 1) -> QQuickRenderTarget\n"
"fromOpenGLTexture(int, int, QSize, sampleCount: int = 1) -> QQuickRenderTarget");

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

    {
         ::uint a0;
        const  ::QSize* a1;
        int a2 = 1;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "CuJ9|i", &sipSelf, &a0, sipType_QSize, &a1, &a2))
        {
             ::QQuickRenderTarget*sipRes;

            sipRes = new  ::QQuickRenderTarget( ::QQuickRenderTarget::fromOpenGLTexture(a0,*a1,a2));

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

    {
         ::uint a0;
         ::uint a1;
        const  ::QSize* a2;
        int a3 = 1;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "CuuJ9|i", &sipSelf, &a0, &a1, sipType_QSize, &a2, &a3))
        {
             ::QQuickRenderTarget*sipRes;

            sipRes = new  ::QQuickRenderTarget( ::QQuickRenderTarget::fromOpenGLTexture(a0,a1,*a2,a3));

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

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_fromOpenGLTexture, doc_QQuickRenderTarget_fromOpenGLTexture);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_fromOpenGLRenderBuffer, "fromOpenGLRenderBuffer(int, QSize, sampleCount: int = 1) -> QQuickRenderTarget");

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

    {
         ::uint a0;
        const  ::QSize* a1;
        int a2 = 1;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "CuJ9|i", &sipSelf, &a0, sipType_QSize, &a1, &a2))
        {
             ::QQuickRenderTarget*sipRes;

            sipRes = new  ::QQuickRenderTarget( ::QQuickRenderTarget::fromOpenGLRenderBuffer(a0,*a1,a2));

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

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_fromOpenGLRenderBuffer, doc_QQuickRenderTarget_fromOpenGLRenderBuffer);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_fromPaintDevice, "fromPaintDevice(QPaintDevice) -> QQuickRenderTarget");

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

    {
         ::QPaintDevice* a0;

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

            sipRes = new  ::QQuickRenderTarget( ::QQuickRenderTarget::fromPaintDevice(a0));

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

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_fromPaintDevice, doc_QQuickRenderTarget_fromPaintDevice);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_devicePixelRatio, "devicePixelRatio(self) -> float");

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

    {
        const  ::QQuickRenderTarget *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QQuickRenderTarget, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->devicePixelRatio();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_devicePixelRatio, doc_QQuickRenderTarget_devicePixelRatio);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_setDevicePixelRatio, "setDevicePixelRatio(self, float)");

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

    {
         ::qreal a0;
         ::QQuickRenderTarget *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QQuickRenderTarget, &sipCpp, &a0))
        {
            sipCpp->setDevicePixelRatio(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_setDevicePixelRatio, doc_QQuickRenderTarget_setDevicePixelRatio);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_mirrorVertically, "mirrorVertically(self) -> bool");

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

    {
        const  ::QQuickRenderTarget *sipCpp;

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

            sipRes = sipCpp->mirrorVertically();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_mirrorVertically, doc_QQuickRenderTarget_mirrorVertically);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QQuickRenderTarget_setMirrorVertically, "setMirrorVertically(self, bool)");

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

    {
        bool a0;
         ::QQuickRenderTarget *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QQuickRenderTarget, sipName_setMirrorVertically, doc_QQuickRenderTarget_setMirrorVertically);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QQuickRenderTarget___eq__(PyObject *,PyObject *);}
static PyObject *slot_QQuickRenderTarget___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QQuickRenderTarget *sipCpp = reinterpret_cast< ::QQuickRenderTarget *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QQuickRenderTarget));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QQuickRenderTarget* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QQuickRenderTarget, &a0))
        {
            bool sipRes;

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtQuick, eq_slot, sipType_QQuickRenderTarget, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QQuickRenderTarget___ne__(PyObject *,PyObject *);}
static PyObject *slot_QQuickRenderTarget___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QQuickRenderTarget *sipCpp = reinterpret_cast< ::QQuickRenderTarget *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QQuickRenderTarget));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QQuickRenderTarget* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QQuickRenderTarget, &a0))
        {
            bool sipRes;

            sipRes = operator!=((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtQuick, ne_slot, sipType_QQuickRenderTarget, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QQuickRenderTarget* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QQuickRenderTarget[] = {
    {(void *)slot_QQuickRenderTarget___eq__, eq_slot},
    {(void *)slot_QQuickRenderTarget___ne__, ne_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QQuickRenderTarget[] = {
    {sipName_devicePixelRatio, meth_QQuickRenderTarget_devicePixelRatio, METH_VARARGS, doc_QQuickRenderTarget_devicePixelRatio},
    {sipName_fromOpenGLRenderBuffer, SIP_MLMETH_CAST(meth_QQuickRenderTarget_fromOpenGLRenderBuffer), METH_VARARGS|METH_KEYWORDS, doc_QQuickRenderTarget_fromOpenGLRenderBuffer},
    {sipName_fromOpenGLTexture, SIP_MLMETH_CAST(meth_QQuickRenderTarget_fromOpenGLTexture), METH_VARARGS|METH_KEYWORDS, doc_QQuickRenderTarget_fromOpenGLTexture},
    {sipName_fromPaintDevice, meth_QQuickRenderTarget_fromPaintDevice, METH_VARARGS, doc_QQuickRenderTarget_fromPaintDevice},
    {sipName_isNull, meth_QQuickRenderTarget_isNull, METH_VARARGS, doc_QQuickRenderTarget_isNull},
    {sipName_mirrorVertically, meth_QQuickRenderTarget_mirrorVertically, METH_VARARGS, doc_QQuickRenderTarget_mirrorVertically},
    {sipName_setDevicePixelRatio, meth_QQuickRenderTarget_setDevicePixelRatio, METH_VARARGS, doc_QQuickRenderTarget_setDevicePixelRatio},
    {sipName_setMirrorVertically, meth_QQuickRenderTarget_setMirrorVertically, METH_VARARGS, doc_QQuickRenderTarget_setMirrorVertically}
};

PyDoc_STRVAR(doc_QQuickRenderTarget, "\1QQuickRenderTarget()\n"
"QQuickRenderTarget(QQuickRenderTarget)");


sipClassTypeDef sipTypeDef_QtQuick_QQuickRenderTarget = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QQuickRenderTarget,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QQuickRenderTarget,
        {0, 0, 1},
        8, methods_QQuickRenderTarget,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QQuickRenderTarget,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QQuickRenderTarget,
    init_type_QQuickRenderTarget,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QQuickRenderTarget,
    assign_QQuickRenderTarget,
    array_QQuickRenderTarget,
    copy_QQuickRenderTarget,
    release_QQuickRenderTarget,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QQuickRenderTarget,
    sizeof ( ::QQuickRenderTarget),
};
