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

#include "sipAPI_core.h"
    int _wxWindowIDRef_GetId(wxWindowIDRef* self)
    {
        return self->GetValue();
    }
    int _wxWindowIDRef___int__(wxWindowIDRef* self)
    {
        return self->GetValue();
    }
    int _wxWindowIDRef___index__(wxWindowIDRef* self)
    {
        return self->GetValue();
    }
    bool _wxWindowIDRef___eq__(wxWindowIDRef* self, wxWindowID id)
    {
        return self->GetValue() == id;
    }
    bool _wxWindowIDRef___ne__(wxWindowIDRef* self, wxWindowID id)
    {
        return self->GetValue() != id;
    }
    bool _wxWindowIDRef___lt__(wxWindowIDRef* self, wxWindowID id)
    {
        return self->GetValue() < id;
    }
    bool _wxWindowIDRef___gt__(wxWindowIDRef* self, wxWindowID id)
    {
        return self->GetValue() > id;
    }
    bool _wxWindowIDRef___le__(wxWindowIDRef* self, wxWindowID id)
    {
        return self->GetValue() <= id;
    }
    bool _wxWindowIDRef___ge__(wxWindowIDRef* self, wxWindowID id)
    {
        return self->GetValue() >= id;
    }


PyDoc_STRVAR(doc_wxWindowIDRef_GetValue, "GetValue() -> int\n"
"\n"
"Get the ID value");

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

    {
        ::wxWindowIDRef *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxWindowIDRef, &sipCpp))
        {
            int sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetValue();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_WindowIDRef, sipName_GetValue, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxWindowIDRef_GetId, "GetId() -> int\n"
"\n"
"Alias for GetValue allowing the IDRef to be passed as the source\n"
"parameter to :meth:`wx.EvtHandler.Bind`.");

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

    {
        ::wxWindowIDRef *sipCpp;

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

            if (sipIsErr)
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_WindowIDRef, sipName_GetId, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_wxWindowIDRef___ge__(PyObject *, PyObject *);}
static PyObject *slot_wxWindowIDRef___ge__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxWindowID id;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &id))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxWindowIDRef___ge__(sipCpp, id);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, ge_slot, sipType_wxWindowIDRef, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxWindowIDRef___le__(PyObject *, PyObject *);}
static PyObject *slot_wxWindowIDRef___le__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxWindowID id;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &id))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxWindowIDRef___le__(sipCpp, id);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, le_slot, sipType_wxWindowIDRef, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxWindowIDRef___gt__(PyObject *, PyObject *);}
static PyObject *slot_wxWindowIDRef___gt__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxWindowID id;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &id))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxWindowIDRef___gt__(sipCpp, id);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, gt_slot, sipType_wxWindowIDRef, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxWindowIDRef___lt__(PyObject *, PyObject *);}
static PyObject *slot_wxWindowIDRef___lt__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxWindowID id;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &id))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxWindowIDRef___lt__(sipCpp, id);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, lt_slot, sipType_wxWindowIDRef, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxWindowIDRef___ne__(PyObject *, PyObject *);}
static PyObject *slot_wxWindowIDRef___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxWindowID id;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &id))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxWindowIDRef___ne__(sipCpp, id);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, ne_slot, sipType_wxWindowIDRef, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxWindowIDRef___eq__(PyObject *, PyObject *);}
static PyObject *slot_wxWindowIDRef___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::wxWindowID id;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &id))
        {
            bool sipRes = 0;
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        sipRes = _wxWindowIDRef___eq__(sipCpp, id);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;

            if (sipIsErr)
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, eq_slot, sipType_wxWindowIDRef, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxWindowIDRef___index__(PyObject *);}
static PyObject *slot_wxWindowIDRef___index__(PyObject *sipSelf)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;


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

            if (sipIsErr)
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_wxWindowIDRef___int__(PyObject *);}
static PyObject *slot_wxWindowIDRef___int__(PyObject *sipSelf)
{
    ::wxWindowIDRef *sipCpp = reinterpret_cast< ::wxWindowIDRef *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxWindowIDRef));

    if (!sipCpp)
        return SIP_NULLPTR;


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

            if (sipIsErr)
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    return 0;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxWindowIDRef();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        int id;

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

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

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

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

            return sipCpp;
        }
    }

    {
        const ::wxWindowIDRef* idref;

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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxWindowIDRef(*idref);
            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_wxWindowIDRef[] = {
    {(void *)slot_wxWindowIDRef___ge__, ge_slot},
    {(void *)slot_wxWindowIDRef___le__, le_slot},
    {(void *)slot_wxWindowIDRef___gt__, gt_slot},
    {(void *)slot_wxWindowIDRef___lt__, lt_slot},
    {(void *)slot_wxWindowIDRef___ne__, ne_slot},
    {(void *)slot_wxWindowIDRef___eq__, eq_slot},
    {(void *)slot_wxWindowIDRef___index__, index_slot},
    {(void *)slot_wxWindowIDRef___int__, int_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_wxWindowIDRef[] = {
    {sipName_GetId, meth_wxWindowIDRef_GetId, METH_VARARGS, doc_wxWindowIDRef_GetId},
    {sipName_GetValue, meth_wxWindowIDRef_GetValue, METH_VARARGS, doc_wxWindowIDRef_GetValue}
};

sipVariableDef variables_wxWindowIDRef[] = {
    {PropertyVariable, sipName_Value, &methods_wxWindowIDRef[1], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Id, &methods_wxWindowIDRef[0], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxWindowIDRef, "WindowIDRef() -> None\n"
"WindowIDRef(id) -> None\n"
"WindowIDRef(idref) -> None\n"
"\n"
"A wxWindowIDRef object wraps an ID value and marks it as being in-use\n"
"until all references to that ID are gone.");


sipClassTypeDef sipTypeDef__core_wxWindowIDRef = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxWindowIDRef,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_WindowIDRef,
        {0, 0, 1},
        2, methods_wxWindowIDRef,
        0, SIP_NULLPTR,
        2, variables_wxWindowIDRef,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxWindowIDRef,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxWindowIDRef,
    init_type_wxWindowIDRef,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxWindowIDRef,
    assign_wxWindowIDRef,
    array_wxWindowIDRef,
    copy_wxWindowIDRef,
    release_wxWindowIDRef,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxWindowIDRef,
    sizeof (::wxWindowIDRef),
};
