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

#include "sipAPI_core.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>


PyDoc_STRVAR(doc_wxWindowBase_AddChild, "AddChild(child) -> None");

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

    {
        ::wxWindowBase* child;
        ::wxWindowBase *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxWindowBase, &sipCpp, sipType_wxWindowBase, &child))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxWindowBase::AddChild(child) : sipCpp->AddChild(child));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_WindowBase, sipName_AddChild, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxWindowBase_RemoveChild, "RemoveChild(child) -> None");

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

    {
        ::wxWindowBase* child;
        ::wxWindowBase *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxWindowBase, &sipCpp, sipType_wxWindowBase, &child))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::wxWindowBase::RemoveChild(child) : sipCpp->RemoveChild(child));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_WindowBase, sipName_RemoveChild, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxWindowBase)
        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_wxWindowBase(void *, int);}
static void release_wxWindowBase(void *sipCppV, int)
{
    Py_BEGIN_ALLOW_THREADS

    delete reinterpret_cast< ::wxWindowBase *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void dealloc_wxWindowBase(sipSimpleWrapper *);}
static void dealloc_wxWindowBase(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxWindowBase(sipGetAddress(sipSelf), 0);
    }
}


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


static PyMethodDef methods_wxWindowBase[] = {
    {sipName_AddChild, SIP_MLMETH_CAST(meth_wxWindowBase_AddChild), METH_VARARGS|METH_KEYWORDS, doc_wxWindowBase_AddChild},
    {sipName_RemoveChild, SIP_MLMETH_CAST(meth_wxWindowBase_RemoveChild), METH_VARARGS|METH_KEYWORDS, doc_wxWindowBase_RemoveChild}
};

PyDoc_STRVAR(doc_wxWindowBase, "");


sipClassTypeDef sipTypeDef__core_wxWindowBase = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxWindowBase,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_WindowBase,
        {0, 0, 1},
        2, methods_wxWindowBase,
        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_wxWindowBase,
    -1,
    -1,
    supers_wxWindowBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxWindowBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxWindowBase,
    cast_wxWindowBase,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
