/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.16
 *
 *     Copyright: (c) 2018 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)");

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;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetTableObject, "GetTableObject() -> GridTableBase");

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);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_SetId, "SetId(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;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetId, "GetId() -> int");

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

    {
         ::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 SIPLong_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_SetCommandInt, "SetCommandInt(comInt1)");

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;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetCommandInt, "GetCommandInt() -> int");

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

    {
         ::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 SIPLong_FromLong(sipRes);
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_SetCommandInt2, "SetCommandInt2(comInt2)");

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;
        }
    }

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

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridTableMessage_GetCommandInt2, "GetCommandInt2() -> int");

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

    {
         ::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 SIPLong_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    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 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[] = {
    {SIP_MLNAME_CAST(sipName_GetCommandInt), meth_wxGridTableMessage_GetCommandInt, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridTableMessage_GetCommandInt)},
    {SIP_MLNAME_CAST(sipName_GetCommandInt2), meth_wxGridTableMessage_GetCommandInt2, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridTableMessage_GetCommandInt2)},
    {SIP_MLNAME_CAST(sipName_GetId), meth_wxGridTableMessage_GetId, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridTableMessage_GetId)},
    {SIP_MLNAME_CAST(sipName_GetTableObject), meth_wxGridTableMessage_GetTableObject, METH_VARARGS, SIP_MLDOC_CAST(doc_wxGridTableMessage_GetTableObject)},
    {SIP_MLNAME_CAST(sipName_SetCommandInt), SIP_MLMETH_CAST(meth_wxGridTableMessage_SetCommandInt), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridTableMessage_SetCommandInt)},
    {SIP_MLNAME_CAST(sipName_SetCommandInt2), SIP_MLMETH_CAST(meth_wxGridTableMessage_SetCommandInt2), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridTableMessage_SetCommandInt2)},
    {SIP_MLNAME_CAST(sipName_SetId), SIP_MLMETH_CAST(meth_wxGridTableMessage_SetId), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxGridTableMessage_SetId)},
    {SIP_MLNAME_CAST(sipName_SetTableObject), SIP_MLMETH_CAST(meth_wxGridTableMessage_SetTableObject), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(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()\n"
"GridTableMessage(table, id, comInt1=-1, comInt2=-1)\n"
"\n"
"A simple class used to pass messages from the table to the grid.");


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,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxGridTableMessage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxGridTableMessage,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
