/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 "sipAPIQtGui.h"

#line 398 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPaintEvent.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qregion.sip"
#include <qregion.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPaintEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPaintEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPaintEvent.cpp"


class sipQPaintEvent : public  ::QPaintEvent
{
public:
    sipQPaintEvent(const  ::QRegion&);
    sipQPaintEvent(const  ::QRect&);
    sipQPaintEvent(const  ::QPaintEvent&);
    ~sipQPaintEvent();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQPaintEvent(const sipQPaintEvent &);
    sipQPaintEvent &operator = (const sipQPaintEvent &);
};

sipQPaintEvent::sipQPaintEvent(const  ::QRegion& a0):  ::QPaintEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

sipQPaintEvent::sipQPaintEvent(const  ::QRect& a0):  ::QPaintEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

sipQPaintEvent::sipQPaintEvent(const  ::QPaintEvent& a0):  ::QPaintEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_QPaintEvent_rect, "rect(self) -> QRect");

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

    {
        const  ::QPaintEvent *sipCpp;

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

            sipRes = new  ::QRect(sipCpp->rect());

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

    sipNoMethod(sipParseErr, sipName_QPaintEvent, sipName_rect, doc_QPaintEvent_rect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPaintEvent_region, "region(self) -> QRegion");

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

    {
        const  ::QPaintEvent *sipCpp;

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

            sipRes = new  ::QRegion(sipCpp->region());

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

    sipNoMethod(sipParseErr, sipName_QPaintEvent, sipName_region, doc_QPaintEvent_region);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QPaintEvent)
        return sipCppV;

    if (targetType == sipType_QEvent)
        return static_cast< ::QEvent *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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

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


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

    {
        const  ::QRegion* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QRect* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QPaintEvent* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QPaintEvent[] = {{6, 0, 1}};


static PyMethodDef methods_QPaintEvent[] = {
    {sipName_rect, meth_QPaintEvent_rect, METH_VARARGS, doc_QPaintEvent_rect},
    {sipName_region, meth_QPaintEvent_region, METH_VARARGS, doc_QPaintEvent_region}
};

PyDoc_STRVAR(doc_QPaintEvent, "\1QPaintEvent(QRegion)\n"
"QPaintEvent(QRect)\n"
"QPaintEvent(QPaintEvent)");


static pyqt5ClassPluginDef plugin_QPaintEvent = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QPaintEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPaintEvent,
        SIP_NULLPTR,
        &plugin_QPaintEvent
    },
    {
        sipNameNr_QPaintEvent,
        {0, 0, 1},
        2, methods_QPaintEvent,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QPaintEvent,
    -1,
    -1,
    supers_QPaintEvent,
    SIP_NULLPTR,
    init_type_QPaintEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPaintEvent,
    assign_QPaintEvent,
    SIP_NULLPTR,
    copy_QPaintEvent,
    release_QPaintEvent,
    cast_QPaintEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QPaintEvent),
};
