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

#include "sipAPI_grid.h"
        #include <wx/grid.h>
        #include <wx/grid.h>


PyDoc_STRVAR(doc_wxGridTableMessage_SetTableObject, "SetTableObject(table) -> None\n"
"\n"
"Sets the table object.");

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

    {
        ::wxGridTableBase* table;
        ::wxGridTableMessage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxGridTableMessage, &sipCpp, sipType_wxGridTableBase, &table))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetTableObject(table);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_SetTableObject, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetTableObject, "GetTableObject() -> GridTableBase\n"
"\n"
"Gets the table object.");

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

    {
        const ::wxGridTableMessage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetTableObject();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_GetTableObject, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_SetId, "SetId(id) -> None\n"
"\n"
"Sets an id.");

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

    {
        int id;
        ::wxGridTableMessage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxGridTableMessage, &sipCpp, &id))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetId(id);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_SetId, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetId, "GetId() -> int\n"
"\n"
"Gets an id.");

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

    {
        const ::wxGridTableMessage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetId();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_GetId, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_SetCommandInt, "SetCommandInt(comInt1) -> None\n"
"\n"
"Set the position after which the insertion/deletion occur.");

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

    {
        int comInt1;
        ::wxGridTableMessage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxGridTableMessage, &sipCpp, &comInt1))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetCommandInt(comInt1);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_SetCommandInt, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetCommandInt, "GetCommandInt() -> int\n"
"\n"
"Get the position after which the insertion/deletion occur.");

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

    {
        const ::wxGridTableMessage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetCommandInt();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_GetCommandInt, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_SetCommandInt2, "SetCommandInt2(comInt2) -> None\n"
"\n"
"Set the number of rows to be inserted/deleted.");

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

    {
        int comInt2;
        ::wxGridTableMessage *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi", &sipSelf, sipType_wxGridTableMessage, &sipCpp, &comInt2))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetCommandInt2(comInt2);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_SetCommandInt2, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetCommandInt2, "GetCommandInt2() -> int\n"
"\n"
"Get the number of rows to be inserted/deleted.");

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

    {
        const ::wxGridTableMessage *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetCommandInt2();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_GridTableMessage, sipName_GetCommandInt2, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxGridTableMessage();
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    {
        ::wxGridTableBase* table;
        int id;
        int comInt1 = -1;
        int comInt2 = -1;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J8i|ii", sipType_wxGridTableBase, &table, &id, &comInt1, &comInt2))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxGridTableMessage(table, id, comInt1, comInt2);
            Py_END_ALLOW_THREADS

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxGridTableMessage[] = {
    {sipName_GetCommandInt, meth_wxGridTableMessage_GetCommandInt, METH_VARARGS, doc_wxGridTableMessage_GetCommandInt},
    {sipName_GetCommandInt2, meth_wxGridTableMessage_GetCommandInt2, METH_VARARGS, doc_wxGridTableMessage_GetCommandInt2},
    {sipName_GetId, meth_wxGridTableMessage_GetId, METH_VARARGS, doc_wxGridTableMessage_GetId},
    {sipName_GetTableObject, meth_wxGridTableMessage_GetTableObject, METH_VARARGS, doc_wxGridTableMessage_GetTableObject},
    {sipName_SetCommandInt, SIP_MLMETH_CAST(meth_wxGridTableMessage_SetCommandInt), METH_VARARGS|METH_KEYWORDS, doc_wxGridTableMessage_SetCommandInt},
    {sipName_SetCommandInt2, SIP_MLMETH_CAST(meth_wxGridTableMessage_SetCommandInt2), METH_VARARGS|METH_KEYWORDS, doc_wxGridTableMessage_SetCommandInt2},
    {sipName_SetId, SIP_MLMETH_CAST(meth_wxGridTableMessage_SetId), METH_VARARGS|METH_KEYWORDS, doc_wxGridTableMessage_SetId},
    {sipName_SetTableObject, SIP_MLMETH_CAST(meth_wxGridTableMessage_SetTableObject), METH_VARARGS|METH_KEYWORDS, doc_wxGridTableMessage_SetTableObject}
};

sipVariableDef variables_wxGridTableMessage[] = {
    {PropertyVariable, sipName_TableObject, &methods_wxGridTableMessage[3], &methods_wxGridTableMessage[7], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Id, &methods_wxGridTableMessage[2], &methods_wxGridTableMessage[6], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_CommandInt2, &methods_wxGridTableMessage[1], &methods_wxGridTableMessage[5], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_CommandInt, &methods_wxGridTableMessage[0], &methods_wxGridTableMessage[4], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxGridTableMessage, "GridTableMessage() -> None\n"
"GridTableMessage(table, id, comInt1=-1, comInt2=-1) -> None\n"
"\n"
"Message class used by the grid table to send requests and\n"
"notifications to the grid view.");


sipClassTypeDef sipTypeDef__grid_wxGridTableMessage = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxGridTableMessage,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_GridTableMessage,
        {0, 0, 1},
        8, methods_wxGridTableMessage,
        0, SIP_NULLPTR,
        4, variables_wxGridTableMessage,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxGridTableMessage,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxGridTableMessage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxGridTableMessage,
    SIP_NULLPTR,
    array_wxGridTableMessage,
    SIP_NULLPTR,
    release_wxGridTableMessage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxGridTableMessage,
    sizeof (::wxGridTableMessage),
};
