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

#line 555 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQActionEvent.cpp"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtGui/qaction.sip"
#include <qaction.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtGui/sipQtGuiQActionEvent.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/QtGui/sipQtGuiQActionEvent.cpp"


class sipQActionEvent : public ::QActionEvent
{
public:
    sipQActionEvent(int, ::QAction*, ::QAction*);
    virtual ~sipQActionEvent();

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

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipQActionEvent::sipQActionEvent(int a0, ::QAction*a1, ::QAction*a2): ::QActionEvent(a0, a1, a2), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

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

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

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

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

    sipVH_QtGui_25(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

::QActionEvent* sipQActionEvent::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 ::QActionEvent::clone();

    extern ::QActionEvent* sipVH_QtGui_45(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtGui_45(sipGILState, sipImportedVirtErrorHandlers_QtGui_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_QActionEvent_action, "action(self) -> QAction|None");

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

    {
        const ::QActionEvent *sipCpp;

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

            sipRes = sipCpp->action();

            return sipConvertFromType(sipRes, sipType_QAction, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QActionEvent, sipName_action, doc_QActionEvent_action);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QActionEvent_before, "before(self) -> QAction|None");

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

    {
        const ::QActionEvent *sipCpp;

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

            sipRes = sipCpp->before();

            return sipConvertFromType(sipRes, sipType_QAction, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QActionEvent, sipName_before, doc_QActionEvent_before);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QActionEvent_clone, "clone(self) -> QActionEvent|None");

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

    {
        const ::QActionEvent *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QActionEvent, sipName_clone, doc_QActionEvent_clone);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QActionEvent)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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


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

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


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

    {
        int a0;
        ::QAction* a1;
        ::QAction* a2 = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "iJ8|J8", &a0, sipType_QAction, &a1, sipType_QAction, &a2))
        {
            sipCpp = new sipQActionEvent(a0, a1, a2);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QActionEvent[] = {
    {sipName_action, meth_QActionEvent_action, METH_VARARGS, doc_QActionEvent_action},
    {sipName_before, meth_QActionEvent_before, METH_VARARGS, doc_QActionEvent_before},
    {sipName_clone, meth_QActionEvent_clone, METH_VARARGS, doc_QActionEvent_clone}
};

PyDoc_STRVAR(doc_QActionEvent, "\1QActionEvent(type: int, action: QAction|None, before: QAction|None = None)");


sipClassTypeDef sipTypeDef_QtGui_QActionEvent = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QActionEvent,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QActionEvent,
        {0, 0, 1},
        3, methods_QActionEvent,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QActionEvent,
    -1,
    -1,
    supers_QActionEvent,
    SIP_NULLPTR,
    init_type_QActionEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QActionEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QActionEvent,
    cast_QActionEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QActionEvent),
};
