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

#include "sipAPI_adv.h"
        #include <wx/taskbar.h>
        #include <wx/menu.h>
        #include <wx/bmpbndl.h>
        #include <wx/event.h>
        #include <wx/eventfilter.h>
        #include <wx/event.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>
    bool _wxTaskBarIcon_ShowBalloon(wxTaskBarIcon* self, const wxString* title, const wxString* text, unsigned msec, int flags)
    {
        #ifdef __WXMSW__
            return self->ShowBalloon(*title, *text, msec, flags);
        #else
            return false;
        #endif
    }


class sipwxTaskBarIcon : public  ::wxTaskBarIcon
{
public:
    sipwxTaskBarIcon( ::wxTaskBarIconType);
    virtual ~sipwxTaskBarIcon();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    bool sipProtectVirt_TryBefore(bool, ::wxEvent&);
    bool sipProtectVirt_TryAfter(bool, ::wxEvent&);
     ::wxMenu* sipProtectVirt_CreatePopupMenu(bool);
     ::wxMenu* sipProtectVirt_GetPopupMenu(bool);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::wxMenu* GetPopupMenu() SIP_OVERRIDE;
     ::wxMenu* CreatePopupMenu() SIP_OVERRIDE;
    bool SetIcon(const  ::wxBitmapBundle&,const  ::wxString&) SIP_OVERRIDE;
    bool RemoveIcon() SIP_OVERRIDE;
    bool PopupMenu( ::wxMenu*) SIP_OVERRIDE;
    bool ProcessEvent( ::wxEvent&) SIP_OVERRIDE;
    bool TryBefore( ::wxEvent&) SIP_OVERRIDE;
    bool TryAfter( ::wxEvent&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[8];
};

sipwxTaskBarIcon::sipwxTaskBarIcon( ::wxTaskBarIconType iconType):  ::wxTaskBarIcon(iconType), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

 ::wxMenu* sipwxTaskBarIcon::GetPopupMenu()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return  ::wxTaskBarIcon::GetPopupMenu();

    extern  ::wxMenu* sipVH__adv_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

 ::wxMenu* sipwxTaskBarIcon::CreatePopupMenu()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_CreatePopupMenu);

    if (!sipMeth)
        return  ::wxTaskBarIcon::CreatePopupMenu();

    extern  ::wxMenu* sipVH__adv_32(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxTaskBarIcon::SetIcon(const  ::wxBitmapBundle& icon,const  ::wxString& tooltip)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_SetIcon);

    if (!sipMeth)
        return  ::wxTaskBarIcon::SetIcon(icon,tooltip);

    extern bool sipVH__adv_31(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::wxBitmapBundle&,const  ::wxString&);

    return sipVH__adv_31(sipGILState, 0, sipPySelf, sipMeth, icon, tooltip);
}

bool sipwxTaskBarIcon::RemoveIcon()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_RemoveIcon);

    if (!sipMeth)
        return  ::wxTaskBarIcon::RemoveIcon();

    extern bool sipVH__adv_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

bool sipwxTaskBarIcon::PopupMenu( ::wxMenu*menu)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_PopupMenu);

    if (!sipMeth)
        return  ::wxTaskBarIcon::PopupMenu(menu);

    extern bool sipVH__adv_30(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxMenu*);

    return sipVH__adv_30(sipGILState, 0, sipPySelf, sipMeth, menu);
}

bool sipwxTaskBarIcon::ProcessEvent( ::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_ProcessEvent);

    if (!sipMeth)
        return  ::wxTaskBarIcon::ProcessEvent(event);

    extern bool sipVH__adv_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxEvent&);

    return sipVH__adv_13(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxTaskBarIcon::TryBefore( ::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_TryBefore);

    if (!sipMeth)
        return  ::wxTaskBarIcon::TryBefore(event);

    extern bool sipVH__adv_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxEvent&);

    return sipVH__adv_13(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxTaskBarIcon::TryAfter( ::wxEvent& event)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_TryAfter);

    if (!sipMeth)
        return  ::wxTaskBarIcon::TryAfter(event);

    extern bool sipVH__adv_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::wxEvent&);

    return sipVH__adv_13(sipGILState, 0, sipPySelf, sipMeth, event);
}

bool sipwxTaskBarIcon::sipProtectVirt_TryBefore(bool sipSelfWasArg, ::wxEvent& event)
{
    return (sipSelfWasArg ?  ::wxEvtHandler::TryBefore(event) : TryBefore(event));
}

bool sipwxTaskBarIcon::sipProtectVirt_TryAfter(bool sipSelfWasArg, ::wxEvent& event)
{
    return (sipSelfWasArg ?  ::wxEvtHandler::TryAfter(event) : TryAfter(event));
}

 ::wxMenu* sipwxTaskBarIcon::sipProtectVirt_CreatePopupMenu(bool sipSelfWasArg)
{
    return (sipSelfWasArg ?  ::wxTaskBarIcon::CreatePopupMenu() : CreatePopupMenu());
}

 ::wxMenu* sipwxTaskBarIcon::sipProtectVirt_GetPopupMenu(bool sipSelfWasArg)
{
    return (sipSelfWasArg ?  ::wxTaskBarIcon::GetPopupMenu() : GetPopupMenu());
}


PyDoc_STRVAR(doc_wxTaskBarIcon_TryBefore, "TryBefore(event) -> bool\n"
"\n"
"Method called by ProcessEvent() before examining this object event\n"
"tables.");

extern "C" {static PyObject *meth_wxTaskBarIcon_TryBefore(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxTaskBarIcon_TryBefore(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::wxEvent* event;
        sipwxTaskBarIcon *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxTaskBarIcon, &sipCpp, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_TryBefore(sipSelfWasArg,*event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_TryBefore, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_TryAfter, "TryAfter(event) -> bool\n"
"\n"
"Method called by ProcessEvent() as last resort.");

extern "C" {static PyObject *meth_wxTaskBarIcon_TryAfter(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxTaskBarIcon_TryAfter(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::wxEvent* event;
        sipwxTaskBarIcon *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxTaskBarIcon, &sipCpp, sipType_wxEvent, &event))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_TryAfter(sipSelfWasArg,*event);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_TryAfter, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_Destroy, "Destroy()\n"
"\n"
"This method is similar to wxWindow::Destroy and can be used to\n"
"schedule the task bar icon object for the delayed destruction: it will\n"
"be deleted during the next event loop iteration, which allows the task\n"
"bar icon to process any pending events for it before being destroyed.");

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

    {
         ::wxTaskBarIcon *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxTaskBarIcon, &sipCpp))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Destroy();
            Py_END_ALLOW_THREADS

            sipTransferTo(sipSelf, SIP_NULLPTR);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_Destroy, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_IsIconInstalled, "IsIconInstalled() -> bool\n"
"\n"
"Returns true if SetIcon() was called with no subsequent RemoveIcon().");

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

    {
        const  ::wxTaskBarIcon *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxTaskBarIcon, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsIconInstalled();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_IsIconInstalled, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_IsOk, "IsOk() -> bool\n"
"\n"
"Returns true if the object initialized successfully.");

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

    {
        const  ::wxTaskBarIcon *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxTaskBarIcon, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsOk();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_IsOk, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_PopupMenu, "PopupMenu(menu) -> bool\n"
"\n"
"Pops up a menu at the current mouse position.");

extern "C" {static PyObject *meth_wxTaskBarIcon_PopupMenu(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxTaskBarIcon_PopupMenu(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::wxMenu* menu;
         ::wxTaskBarIcon *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxTaskBarIcon, &sipCpp, sipType_wxMenu, &menu))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxTaskBarIcon::PopupMenu(menu) : sipCpp->PopupMenu(menu));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_PopupMenu, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_RemoveIcon, "RemoveIcon() -> bool\n"
"\n"
"Removes the icon previously set with SetIcon().");

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

    {
         ::wxTaskBarIcon *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxTaskBarIcon, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxTaskBarIcon::RemoveIcon() : sipCpp->RemoveIcon());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_RemoveIcon, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_SetIcon, "SetIcon(icon, tooltip=wx.EmptyString) -> bool\n"
"\n"
"Sets the icon, and optional tooltip text.");

extern "C" {static PyObject *meth_wxTaskBarIcon_SetIcon(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxTaskBarIcon_SetIcon(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::wxBitmapBundle* icon;
        int iconState = 0;
        const  ::wxString& tooltipdef = wxEmptyString;
        const  ::wxString* tooltip = &tooltipdef;
        int tooltipState = 0;
         ::wxTaskBarIcon *sipCpp;

        static const char *sipKwdList[] = {
            sipName_icon,
            sipName_tooltip,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J1", &sipSelf, sipType_wxTaskBarIcon, &sipCpp, sipType_wxBitmapBundle, &icon, &iconState, sipType_wxString, &tooltip, &tooltipState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp-> ::wxTaskBarIcon::SetIcon(*icon,*tooltip) : sipCpp->SetIcon(*icon,*tooltip));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxBitmapBundle *>(icon), sipType_wxBitmapBundle, iconState);
            sipReleaseType(const_cast< ::wxString *>(tooltip), sipType_wxString, tooltipState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_SetIcon, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_IsAvailable, "IsAvailable() -> bool\n"
"\n"
"Returns true if system tray is available in the desktop environment\n"
"the app runs under.");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes =  ::wxTaskBarIcon::IsAvailable();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_IsAvailable, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_ShowBalloon, "ShowBalloon(title, text, msec=0, flags=0) -> bool\n"
"\n"
"Show a balloon notification (the icon must have been already\n"
"initialized using SetIcon).  Only implemented for Windows.\n"
"\n"
"The ``title`` and ``text`` parameters are limited to 63 and 255\n"
"characters respectively, ``msec`` is the timeout, in milliseconds,\n"
"before the balloon disappears (will be clamped down to the allowed\n"
"10-30s range by Windows if it's outside it) and ``flags`` can\n"
"include wxICON_ERROR/INFO/WARNING to show a corresponding icon.\n"
"\n"
"Returns ``True`` if balloon was shown, ``False`` on error (incorrect\n"
"parameters or function unsupported by OS).");

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

    {
        const  ::wxString* title;
        int titleState = 0;
        const  ::wxString* text;
        int textState = 0;
        uint msec = 0;
        int flags = 0;
         ::wxTaskBarIcon *sipCpp;

        static const char *sipKwdList[] = {
            sipName_title,
            sipName_text,
            sipName_msec,
            sipName_flags,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J1|ui", &sipSelf, sipType_wxTaskBarIcon, &sipCpp, sipType_wxString, &title, &titleState, sipType_wxString, &text, &textState, &msec, &flags))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxTaskBarIcon_ShowBalloon(sipCpp, title, text, msec, flags);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;
            sipReleaseType(const_cast< ::wxString *>(title), sipType_wxString, titleState);
            sipReleaseType(const_cast< ::wxString *>(text), sipType_wxString, textState);

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_ShowBalloon, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_CreatePopupMenu, "CreatePopupMenu() -> wx.Menu\n"
"\n"
"Called by the library when the user requests popup menu if\n"
"GetPopupMenu() is not overridden.");

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

    {
        sipwxTaskBarIcon *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_CreatePopupMenu(sipSelfWasArg);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes,sipType_wxMenu,sipSelf);
        }
    }

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_CreatePopupMenu, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxTaskBarIcon_GetPopupMenu, "GetPopupMenu() -> wx.Menu\n"
"\n"
"Called by the library when the user requests popup menu.");

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

    {
        sipwxTaskBarIcon *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_GetPopupMenu(sipSelfWasArg);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_TaskBarIcon, sipName_GetPopupMenu, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxTaskBarIcon)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_wxEvtHandler)->ctd_cast(static_cast< ::wxEvtHandler *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxTaskBarIcon *>(sipCppV);
    else
        delete reinterpret_cast< ::wxTaskBarIcon *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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

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


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

    {
         ::wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|E", sipType_wxTaskBarIconType, &iconType))
        {
        if (!wxPyCheckForApp()) return NULL;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxTaskBarIcon(iconType);
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxTaskBarIcon[] = {
    {sipName_CreatePopupMenu, meth_wxTaskBarIcon_CreatePopupMenu, METH_VARARGS, doc_wxTaskBarIcon_CreatePopupMenu},
    {sipName_Destroy, meth_wxTaskBarIcon_Destroy, METH_VARARGS, doc_wxTaskBarIcon_Destroy},
    {sipName_GetPopupMenu, meth_wxTaskBarIcon_GetPopupMenu, METH_VARARGS, doc_wxTaskBarIcon_GetPopupMenu},
    {sipName_IsAvailable, meth_wxTaskBarIcon_IsAvailable, METH_VARARGS, doc_wxTaskBarIcon_IsAvailable},
    {sipName_IsIconInstalled, meth_wxTaskBarIcon_IsIconInstalled, METH_VARARGS, doc_wxTaskBarIcon_IsIconInstalled},
    {sipName_IsOk, meth_wxTaskBarIcon_IsOk, METH_VARARGS, doc_wxTaskBarIcon_IsOk},
    {sipName_PopupMenu, SIP_MLMETH_CAST(meth_wxTaskBarIcon_PopupMenu), METH_VARARGS|METH_KEYWORDS, doc_wxTaskBarIcon_PopupMenu},
    {sipName_RemoveIcon, meth_wxTaskBarIcon_RemoveIcon, METH_VARARGS, doc_wxTaskBarIcon_RemoveIcon},
    {sipName_SetIcon, SIP_MLMETH_CAST(meth_wxTaskBarIcon_SetIcon), METH_VARARGS|METH_KEYWORDS, doc_wxTaskBarIcon_SetIcon},
    {sipName_ShowBalloon, SIP_MLMETH_CAST(meth_wxTaskBarIcon_ShowBalloon), METH_VARARGS|METH_KEYWORDS, doc_wxTaskBarIcon_ShowBalloon},
    {sipName_TryAfter, SIP_MLMETH_CAST(meth_wxTaskBarIcon_TryAfter), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_TryBefore, SIP_MLMETH_CAST(meth_wxTaskBarIcon_TryBefore), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR}
};

PyDoc_STRVAR(doc_wxTaskBarIcon, "TaskBarIcon(iconType=TBI_DEFAULT_TYPE)\n"
"\n"
"This class represents a taskbar icon.");


sipClassTypeDef sipTypeDef__adv_wxTaskBarIcon = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxTaskBarIcon,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_TaskBarIcon,
        {0, 0, 1},
        12, methods_wxTaskBarIcon,
        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_wxTaskBarIcon,
    -1,
    -1,
    supers_wxTaskBarIcon,
    SIP_NULLPTR,
    init_type_wxTaskBarIcon,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxTaskBarIcon,
    SIP_NULLPTR,
    array_wxTaskBarIcon,
    SIP_NULLPTR,
    release_wxTaskBarIcon,
    cast_wxTaskBarIcon,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
};
