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

#include "sipAPI_core.h"

        #include <wx/object.h>

        #include <wx/object.h>
        #include <wx/object.h>
    const wxChar* _wxObject_GetClassName(wxObject* self)
    {
        return self->GetClassInfo()->GetClassName();
    }
    void _wxObject_Destroy(wxObject* self)
    {
        delete self;
    }


PyDoc_STRVAR(doc_wxObject_GetClassInfo, "GetClassInfo() -> ClassInfo\n"
"\n"
"This virtual function is redefined for every class that requires run-\n"
"time type information, when using the wxDECLARE_CLASS macro (or\n"
"similar).");

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

    {
        const  ::wxObject *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetClassInfo();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_GetRefData, "GetRefData() -> ObjectRefData\n"
"\n"
"Returns the wxObject::m_refData pointer, i.e. the data referenced by\n"
"this object.");

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

    {
        const  ::wxObject *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetRefData();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_IsSameAs, "IsSameAs(obj) -> bool\n"
"\n"
"Returns true if this object has the same data pointer as obj.");

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

    {
        const  ::wxObject* obj;
        const  ::wxObject *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxObject, &obj))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->IsSameAs(*obj);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_Ref, "Ref(clone)\n"
"\n"
"Makes this object refer to the data in clone.");

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

    {
        const  ::wxObject* clone;
         ::wxObject *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxObject, &clone))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Ref(*clone);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_SetRefData, "SetRefData(data)\n"
"\n"
"Sets the wxObject::m_refData pointer.");

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

    {
         ::wxObjectRefData* data;
         ::wxObject *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxRefCounter, &data))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetRefData(data);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_UnRef, "UnRef()\n"
"\n"
"Decrements the reference count in the associated data, and if it is\n"
"zero, deletes the data.");

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

    {
         ::wxObject *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->UnRef();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_UnShare, "UnShare()\n"
"\n"
"This is the same of AllocExclusive() but this method is public.");

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

    {
         ::wxObject *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp->UnShare();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_GetClassName, "GetClassName() -> Char\n"
"\n"
"Returns the class name of the C++ class using wxRTTI.");

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

    {
         ::wxObject *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxObject, &sipCpp))
        {
            const  ::wxChar*sipRes = 0;
            int sipIsErr = 0;

        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxObject_GetClassName(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            if (sipRes == SIP_NULLPTR)
            {
                Py_INCREF(Py_None);
                return Py_None;
            }

            return PyUnicode_FromWideChar(sipRes,(SIP_SSIZE_T)wcslen(sipRes));
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxObject_Destroy, "Destroy()\n"
"\n"
"Deletes the C++ object this Python object is a proxy for.");

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

    {
         ::wxObject *sipCpp;

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

        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxObject_Destroy(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            sipTransferTo(sipSelf, SIP_NULLPTR);

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

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

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_wxObject(void *, SIP_SSIZE_T, void *);}
static void assign_wxObject(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxObject *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxObject *>(sipSrc);
}


extern "C" {static void *array_wxObject(SIP_SSIZE_T);}
static void *array_wxObject(SIP_SSIZE_T sipNrElem)
{
    return new  ::wxObject[sipNrElem];
}


extern "C" {static void *copy_wxObject(const void *, SIP_SSIZE_T);}
static void *copy_wxObject(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::wxObject(reinterpret_cast<const  ::wxObject *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_wxObject(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxObject(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::wxObject *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxObject();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        const  ::wxObject* other;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxObject, &other))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxObject(*other);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxObject[] = {
    {SIP_MLNAME_CAST(sipName_Destroy), meth_wxObject_Destroy, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_Destroy)},
    {SIP_MLNAME_CAST(sipName_GetClassInfo), meth_wxObject_GetClassInfo, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_GetClassInfo)},
    {SIP_MLNAME_CAST(sipName_GetClassName), meth_wxObject_GetClassName, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_GetClassName)},
    {SIP_MLNAME_CAST(sipName_GetRefData), meth_wxObject_GetRefData, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_GetRefData)},
    {SIP_MLNAME_CAST(sipName_IsSameAs), SIP_MLMETH_CAST(meth_wxObject_IsSameAs), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_IsSameAs)},
    {SIP_MLNAME_CAST(sipName_Ref), SIP_MLMETH_CAST(meth_wxObject_Ref), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_Ref)},
    {SIP_MLNAME_CAST(sipName_SetRefData), SIP_MLMETH_CAST(meth_wxObject_SetRefData), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_SetRefData)},
    {SIP_MLNAME_CAST(sipName_UnRef), meth_wxObject_UnRef, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_UnRef)},
    {SIP_MLNAME_CAST(sipName_UnShare), meth_wxObject_UnShare, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_UnShare)}
};

sipVariableDef variables_wxObject[] = {
    {PropertyVariable, sipName_RefData, &methods_wxObject[3], &methods_wxObject[6], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ClassName, &methods_wxObject[2], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_ClassInfo, &methods_wxObject[1], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxObject, "Object()\n"
"Object(other)\n"
"\n"
"This is the root class of many of the wxWidgets classes.");


sipClassTypeDef sipTypeDef__core_wxObject = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxObject,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_Object,
        {0, 0, 1},
        9, methods_wxObject,
        0, SIP_NULLPTR,
        3, variables_wxObject,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxObject,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxObject,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxObject,
    assign_wxObject,
    array_wxObject,
    copy_wxObject,
    release_wxObject,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
