/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.16
 *
 *     Copyright: (c) 2018 by Total Control Software
 *     License:   wxWindows License
 */

#include "sipAPI_aui.h"

        #include <wx/aui/auibook.h>

        #include <wx/event.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxAuiNotebookEvent : public  ::wxAuiNotebookEvent
{
public:
    sipwxAuiNotebookEvent( ::wxEventType,int);
    sipwxAuiNotebookEvent(const  ::wxAuiNotebookEvent&);
    virtual ~sipwxAuiNotebookEvent();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::wxEventCategory GetEventCategory() const SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[1];
};

sipwxAuiNotebookEvent::sipwxAuiNotebookEvent( ::wxEventType command_type,int win_id):  ::wxAuiNotebookEvent(command_type,win_id), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxAuiNotebookEvent::sipwxAuiNotebookEvent(const  ::wxAuiNotebookEvent& a0):  ::wxAuiNotebookEvent(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

 ::wxEventCategory sipwxAuiNotebookEvent::GetEventCategory() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,SIP_NULLPTR,sipName_GetEventCategory);

    if (!sipMeth)
        return  ::wxAuiNotebookEvent::GetEventCategory();

    extern  ::wxEventCategory sipVH__aui_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__aui_4(sipGILState, 0, sipPySelf, sipMeth);
}


PyDoc_STRVAR(doc_wxAuiNotebookEvent_Clone, "Clone() -> wx.Event");

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

    {
         ::wxAuiNotebookEvent *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->Clone();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_AuiNotebookEvent, sipName_Clone, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxBookCtrlEvent)
        return static_cast< ::wxBookCtrlEvent *>(sipCpp);

    if (targetType == sipType_wxNotifyEvent)
        return static_cast< ::wxNotifyEvent *>(sipCpp);

    if (targetType == sipType_wxCommandEvent)
        return static_cast< ::wxCommandEvent *>(sipCpp);

    if (targetType == sipType_wxEvent)
        return static_cast< ::wxEvent *>(sipCpp);

    if (targetType == sipType_wxObject)
        return static_cast< ::wxObject *>(sipCpp);

    return sipCppV;
}


/* Call the instance's destructor. */
extern "C" {static void release_wxAuiNotebookEvent(void *, int);}
static void release_wxAuiNotebookEvent(void *sipCppV, int sipState)
{
    Py_BEGIN_ALLOW_THREADS

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxAuiNotebookEvent *>(sipCppV);
    else
        delete reinterpret_cast< ::wxAuiNotebookEvent *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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

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


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

    {
         ::wxEventType command_type = wxEVT_NULL;
        int win_id = 0;

        static const char *sipKwdList[] = {
            sipName_command_type,
            sipName_win_id,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|ii", &command_type, &win_id))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxAuiNotebookEvent(command_type,win_id);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::wxAuiNotebookEvent* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxAuiNotebookEvent, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxAuiNotebookEvent(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxAuiNotebookEvent[] = {
    {SIP_MLNAME_CAST(sipName_Clone), meth_wxAuiNotebookEvent_Clone, METH_VARARGS, SIP_MLDOC_CAST(doc_wxAuiNotebookEvent_Clone)}
};

PyDoc_STRVAR(doc_wxAuiNotebookEvent, "AuiNotebookEvent(command_type=wx.wxEVT_NULL, win_id=0)\n"
"\n"
"This class is used by the events generated by wxAuiNotebook.");


sipClassTypeDef sipTypeDef__aui_wxAuiNotebookEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxAuiNotebookEvent,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_AuiNotebookEvent,
        {0, 0, 1},
        1, methods_wxAuiNotebookEvent,
        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_wxAuiNotebookEvent,
    -1,
    -1,
    supers_wxAuiNotebookEvent,
    SIP_NULLPTR,
    init_type_wxAuiNotebookEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxAuiNotebookEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxAuiNotebookEvent,
    cast_wxAuiNotebookEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
