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

#include "sipAPI_dataview.h"
        #include <wx/dataview.h>
    int _wxDataViewItem___nonzero__(wxDataViewItem* self)
    {
        return self->IsOk();
    }
    int _wxDataViewItem___bool__(wxDataViewItem* self)
    {
        return self->IsOk();
    }
    long _wxDataViewItem___hash__(wxDataViewItem* self)
    {
        return (long)(intptr_t)self->GetID();
    }
    bool _wxDataViewItem___eq__(wxDataViewItem* self, wxDataViewItem* other)
    {
        return other ? (self->GetID() == other->GetID()) : false;
    }
    bool _wxDataViewItem___ne__(wxDataViewItem* self, wxDataViewItem* other)
    {
        return other ? (self->GetID() != other->GetID()) : true;
    }


PyDoc_STRVAR(doc_wxDataViewItem_GetID, "GetID() -> Any\n"
"\n"
"Returns the ID.");

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

    {
        const ::wxDataViewItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewItem, &sipCpp))
        {
            void*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetID();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromVoidPtr(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewItem, sipName_GetID, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewItem_IsOk, "IsOk() -> bool\n"
"\n"
"Returns true if the ID is not NULL.");

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

    {
        const ::wxDataViewItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewItem, &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_DataViewItem, sipName_IsOk, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxDataViewItem___nonzero__, "__nonzero__() -> bool");

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

    {
        ::wxDataViewItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxDataViewItem, &sipCpp))
        {
            int sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxDataViewItem___nonzero__(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_DataViewItem, sipName___nonzero__, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_wxDataViewItem___ne__(PyObject *, PyObject *);}
static PyObject *slot_wxDataViewItem___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxDataViewItem *sipCpp = reinterpret_cast< ::wxDataViewItem *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxDataViewItem));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxDataViewItem* other;

        if (sipParseArgs(&sipParseErr, sipArg, "1J8", sipType_wxDataViewItem, &other))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxDataViewItem___ne__(sipCpp, other);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__dataview, ne_slot, sipType_wxDataViewItem, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxDataViewItem___eq__(PyObject *, PyObject *);}
static PyObject *slot_wxDataViewItem___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxDataViewItem *sipCpp = reinterpret_cast< ::wxDataViewItem *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxDataViewItem));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxDataViewItem* other;

        if (sipParseArgs(&sipParseErr, sipArg, "1J8", sipType_wxDataViewItem, &other))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxDataViewItem___eq__(sipCpp, other);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__dataview, eq_slot, sipType_wxDataViewItem, sipSelf, sipArg);
}


extern "C" {static long slot_wxDataViewItem___hash__(PyObject *);}
static long slot_wxDataViewItem___hash__(PyObject *sipSelf)
{
    ::wxDataViewItem *sipCpp = reinterpret_cast< ::wxDataViewItem *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxDataViewItem));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxDataViewItem___hash__(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return -1;

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_wxDataViewItem___bool__(PyObject *);}
static int slot_wxDataViewItem___bool__(PyObject *sipSelf)
{
    ::wxDataViewItem *sipCpp = reinterpret_cast< ::wxDataViewItem *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxDataViewItem));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxDataViewItem___bool__(sipCpp);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return -1;

            return sipRes;
        }
    }

    return 0;
}


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

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

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void array_delete_wxDataViewItem(void *);}
static void array_delete_wxDataViewItem(void *sipCpp)
{
    delete[] reinterpret_cast< ::wxDataViewItem *>(sipCpp);
}


extern "C" {static void assign_wxDataViewItem(void *, Py_ssize_t, void *);}
static void assign_wxDataViewItem(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxDataViewItem *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxDataViewItem *>(sipSrc);
}


extern "C" {static void *copy_wxDataViewItem(const void *, Py_ssize_t);}
static void *copy_wxDataViewItem(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::wxDataViewItem(reinterpret_cast<const ::wxDataViewItem *>(sipSrc)[sipSrcIdx]);
}


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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxDataViewItem();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        const ::wxDataViewItem* item;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxDataViewItem(*item);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        void* id;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "v", &id))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxDataViewItem(id);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_wxDataViewItem[] = {
    {(void *)slot_wxDataViewItem___ne__, ne_slot},
    {(void *)slot_wxDataViewItem___eq__, eq_slot},
    {(void *)slot_wxDataViewItem___hash__, hash_slot},
    {(void *)slot_wxDataViewItem___bool__, bool_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_wxDataViewItem[] = {
    {sipName_GetID, meth_wxDataViewItem_GetID, METH_VARARGS, doc_wxDataViewItem_GetID},
    {sipName_IsOk, meth_wxDataViewItem_IsOk, METH_VARARGS, doc_wxDataViewItem_IsOk},
    {sipName___nonzero__, meth_wxDataViewItem___nonzero__, METH_VARARGS, doc_wxDataViewItem___nonzero__}
};

sipVariableDef variables_wxDataViewItem[] = {
    {PropertyVariable, sipName_ID, &methods_wxDataViewItem[0], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxDataViewItem, "DataViewItem() -> None\n"
"DataViewItem(item) -> None\n"
"DataViewItem(id) -> None\n"
"\n"
"wxDataViewItem is a small opaque class that represents an item in a\n"
"wxDataViewCtrl in a persistent way, i.e.");


sipClassTypeDef sipTypeDef__dataview_wxDataViewItem = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxDataViewItem,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_DataViewItem,
        {0, 0, 1},
        3, methods_wxDataViewItem,
        0, SIP_NULLPTR,
        1, variables_wxDataViewItem,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxDataViewItem,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxDataViewItem,
    init_type_wxDataViewItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxDataViewItem,
    assign_wxDataViewItem,
    array_wxDataViewItem,
    copy_wxDataViewItem,
    release_wxDataViewItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxDataViewItem,
    sizeof (::wxDataViewItem),
};
