/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.8.6
 *
 * Copyright (c) 2023 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 901 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 29 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQPlatformSurfaceEvent.cpp"

#line 26 "/usr/src/debug/python3-pyqt5/5.15.10/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 33 "/usr/src/debug/python3-pyqt5/5.15.10/QtGui/sipQtGuiQPlatformSurfaceEvent.cpp"


class sipQPlatformSurfaceEvent : public ::QPlatformSurfaceEvent
{
public:
    sipQPlatformSurfaceEvent(::QPlatformSurfaceEvent::SurfaceEventType);
    sipQPlatformSurfaceEvent(const ::QPlatformSurfaceEvent&);
    ~sipQPlatformSurfaceEvent();

public:
    sipSimpleWrapper *sipPySelf;

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

sipQPlatformSurfaceEvent::sipQPlatformSurfaceEvent(::QPlatformSurfaceEvent::SurfaceEventType a0): ::QPlatformSurfaceEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

sipQPlatformSurfaceEvent::sipQPlatformSurfaceEvent(const ::QPlatformSurfaceEvent& a0): ::QPlatformSurfaceEvent(a0), sipPySelf(SIP_NULLPTR)
{
}

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


PyDoc_STRVAR(doc_QPlatformSurfaceEvent_surfaceEventType, "surfaceEventType(self) -> QPlatformSurfaceEvent.SurfaceEventType");

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

    {
        const ::QPlatformSurfaceEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPlatformSurfaceEvent, &sipCpp))
        {
            ::QPlatformSurfaceEvent::SurfaceEventType sipRes;

            sipRes = sipCpp->surfaceEventType();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPlatformSurfaceEvent_SurfaceEventType);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPlatformSurfaceEvent, sipName_surfaceEventType, doc_QPlatformSurfaceEvent_surfaceEventType);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QPlatformSurfaceEvent)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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


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


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

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


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

    {
        ::QPlatformSurfaceEvent::SurfaceEventType a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "E", sipType_QPlatformSurfaceEvent_SurfaceEventType, &a0))
        {
            sipCpp = new sipQPlatformSurfaceEvent(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QPlatformSurfaceEvent* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QPlatformSurfaceEvent[] = {
    {sipName_surfaceEventType, meth_QPlatformSurfaceEvent_surfaceEventType, METH_VARARGS, doc_QPlatformSurfaceEvent_surfaceEventType}
};

static sipEnumMemberDef enummembers_QPlatformSurfaceEvent[] = {
    {sipName_SurfaceAboutToBeDestroyed, static_cast<int>(::QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed), 242},
    {sipName_SurfaceCreated, static_cast<int>(::QPlatformSurfaceEvent::SurfaceCreated), 242},
};

PyDoc_STRVAR(doc_QPlatformSurfaceEvent, "\1QPlatformSurfaceEvent(surfaceEventType: QPlatformSurfaceEvent.SurfaceEventType)\n"
"QPlatformSurfaceEvent(a0: QPlatformSurfaceEvent)");


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


sipClassTypeDef sipTypeDef_QtGui_QPlatformSurfaceEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPlatformSurfaceEvent,
        SIP_NULLPTR,
        &plugin_QPlatformSurfaceEvent,
    },
    {
        sipNameNr_QPlatformSurfaceEvent,
        {0, 0, 1},
        1, methods_QPlatformSurfaceEvent,
        2, enummembers_QPlatformSurfaceEvent,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QPlatformSurfaceEvent,
    -1,
    -1,
    supers_QPlatformSurfaceEvent,
    SIP_NULLPTR,
    init_type_QPlatformSurfaceEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPlatformSurfaceEvent,
    assign_QPlatformSurfaceEvent,
    SIP_NULLPTR,
    copy_QPlatformSurfaceEvent,
    release_QPlatformSurfaceEvent,
    cast_QPlatformSurfaceEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QPlatformSurfaceEvent),
};
