/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 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 "sipAPIQtCore.h"

#line 254 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQTimerEvent.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbasictimer.sip"
#include <qbasictimer.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQTimerEvent.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQTimerEvent.cpp"


class sipQTimerEvent : public ::QTimerEvent
{
public:
    sipQTimerEvent(int);
    virtual ~sipQTimerEvent();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void setAccepted(bool) SIP_OVERRIDE;
    ::QTimerEvent* clone() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQTimerEvent(const sipQTimerEvent &);
    sipQTimerEvent &operator = (const sipQTimerEvent &);

    char sipPyMethods[2];
};

sipQTimerEvent::sipQTimerEvent(int a0): ::QTimerEvent(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

void sipQTimerEvent::setAccepted(bool a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_setAccepted);

    if (!sipMeth)
    {
        ::QTimerEvent::setAccepted(a0);
        return;
    }

    extern void sipVH_QtCore_51(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool);

    sipVH_QtCore_51(sipGILState, sipVEH_QtCore_PyQt6, sipPySelf, sipMeth, a0);
}

::QTimerEvent* sipQTimerEvent::clone() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_clone);

    if (!sipMeth)
        return ::QTimerEvent::clone();

    extern ::QTimerEvent* sipVH_QtCore_53(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtCore_53(sipGILState, sipVEH_QtCore_PyQt6, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QTimerEvent_timerId, "timerId(self) -> int");

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

    {
        const ::QTimerEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTimerEvent, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->timerId();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTimerEvent, sipName_timerId, doc_QTimerEvent_timerId);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTimerEvent_clone, "clone(self) -> QTimerEvent|None");

extern "C" {static PyObject *meth_QTimerEvent_clone(PyObject *, PyObject *);}
static PyObject *meth_QTimerEvent_clone(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QTimerEvent)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QTimerEvent *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp->::QTimerEvent::clone() : sipCpp->clone());

            return sipConvertFromType(sipRes, sipType_QTimerEvent, Py_None);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTimerEvent, sipName_clone, doc_QTimerEvent_clone);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTimerEvent_id, "id(self) -> int");

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

    {
        const ::QTimerEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QTimerEvent, &sipCpp))
        {
            int sipRes = 0;

#line 265 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
        sipRes = qToUnderlying<Qt::TimerId>(sipCpp->id());
#line 176 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQTimerEvent.cpp"

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTimerEvent, sipName_id, doc_QTimerEvent_id);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QTimerEvent_matches, "matches(self, timer: QBasicTimer) -> bool");

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

    {
        const ::QBasicTimer* a0;
        const ::QTimerEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QTimerEvent, &sipCpp, sipType_QBasicTimer, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->matches(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QTimerEvent, sipName_matches, doc_QTimerEvent_matches);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QTimerEvent)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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

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


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

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "i", &a0))
        {
            sipCpp = new sipQTimerEvent(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QTimerEvent[] = {{80, 255, 1}};


static PyMethodDef methods_QTimerEvent[] = {
    {sipName_clone, meth_QTimerEvent_clone, METH_VARARGS, doc_QTimerEvent_clone},
    {sipName_id, meth_QTimerEvent_id, METH_VARARGS, doc_QTimerEvent_id},
    {sipName_matches, meth_QTimerEvent_matches, METH_VARARGS, doc_QTimerEvent_matches},
    {sipName_timerId, meth_QTimerEvent_timerId, METH_VARARGS, doc_QTimerEvent_timerId}
};

PyDoc_STRVAR(doc_QTimerEvent, "\1QTimerEvent(timerId: int)");


sipClassTypeDef sipTypeDef_QtCore_QTimerEvent = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QTimerEvent,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QTimerEvent,
        {0, 0, 1},
        4, methods_QTimerEvent,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QTimerEvent,
    -1,
    -1,
    supers_QTimerEvent,
    SIP_NULLPTR,
    init_type_QTimerEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QTimerEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QTimerEvent,
    cast_QTimerEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QTimerEvent),
};
