/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 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 438 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQCloseEvent.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtGui/sipQtGuiQCloseEvent.cpp"


class sipQCloseEvent : public ::QCloseEvent
{
public:
    sipQCloseEvent();
    sipQCloseEvent(const ::QCloseEvent&);
    ~sipQCloseEvent();

public:
    sipSimpleWrapper *sipPySelf;

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

sipQCloseEvent::sipQCloseEvent(): ::QCloseEvent(), sipPySelf(SIP_NULLPTR)
{
}

sipQCloseEvent::sipQCloseEvent(const ::QCloseEvent& a0): ::QCloseEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

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


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

    if (targetType == sipType_QCloseEvent)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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


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


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


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


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

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


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

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QCloseEvent* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

PyDoc_STRVAR(doc_QCloseEvent, "\1QCloseEvent()\n"
"QCloseEvent(a0: QCloseEvent)");


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


sipClassTypeDef sipTypeDef_QtGui_QCloseEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QCloseEvent,
        SIP_NULLPTR,
        &plugin_QCloseEvent,
    },
    {
        sipNameNr_QCloseEvent,
        {0, 0, 1},
        0, SIP_NULLPTR,
        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_QCloseEvent,
    -1,
    -1,
    supers_QCloseEvent,
    SIP_NULLPTR,
    init_type_QCloseEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QCloseEvent,
    assign_QCloseEvent,
    array_QCloseEvent,
    copy_QCloseEvent,
    release_QCloseEvent,
    cast_QCloseEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QCloseEvent,
    sizeof (::QCloseEvent),
};
