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

#include "sipAPI_richtext.h"




PyDoc_STRVAR(doc_wxRichTextObjectPtrArrayArray_append, "append(self, obj: RichTextObjectPtrArray)");

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

    {
         ::wxRichTextObjectPtrArray* obj;
         ::wxRichTextObjectPtrArrayArray *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxRichTextObjectPtrArrayArray, &sipCpp, sipType_wxRichTextObjectPtrArray, &obj))
        {
        sipCpp->Add(*obj);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextObjectPtrArrayArray, sipName_append, doc_wxRichTextObjectPtrArrayArray_append);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextObjectPtrArrayArray_index, "index(self, obj: RichTextObjectPtrArray) -> int");

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

    {
         ::wxRichTextObjectPtrArray* obj;
         ::wxRichTextObjectPtrArrayArray *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9", &sipSelf, sipType_wxRichTextObjectPtrArrayArray, &sipCpp, sipType_wxRichTextObjectPtrArray, &obj))
        {
            int sipRes = 0;
            sipErrorState sipError = sipErrorNone;

        int idx = sipCpp->Index(*obj, false);
        if (idx == wxNOT_FOUND) {
            sipError = sipErrorFail;
            wxPyErr_SetString(PyExc_ValueError,
                              "sequence.index(x): x not in sequence");
            }
        sipRes = idx;

            if (sipError == sipErrorFail)
                return 0;

            if (sipError == sipErrorNone)
            {
            return SIPLong_FromLong(sipRes);
            }

            sipAddException(sipError, &sipParseErr);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextObjectPtrArrayArray, sipName_index, doc_wxRichTextObjectPtrArrayArray_index);

    return SIP_NULLPTR;
}


extern "C" {static int slot_wxRichTextObjectPtrArrayArray___contains__(PyObject *,PyObject *);}
static int slot_wxRichTextObjectPtrArrayArray___contains__(PyObject *sipSelf,PyObject *sipArg)
{
     ::wxRichTextObjectPtrArrayArray *sipCpp = reinterpret_cast< ::wxRichTextObjectPtrArrayArray *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRichTextObjectPtrArrayArray));

    if (!sipCpp)
        return -1;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxRichTextObjectPtrArray* obj;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxRichTextObjectPtrArray, &obj))
        {
            int sipRes = 0;

        int idx = sipCpp->Index(*obj, false);
        sipRes = idx != wxNOT_FOUND;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextObjectPtrArrayArray, sipName___contains__, SIP_NULLPTR);

    return -1;
}


extern "C" {static PyObject *slot_wxRichTextObjectPtrArrayArray___getitem__(PyObject *,PyObject *);}
static PyObject *slot_wxRichTextObjectPtrArrayArray___getitem__(PyObject *sipSelf,PyObject *sipArg)
{
     ::wxRichTextObjectPtrArrayArray *sipCpp = reinterpret_cast< ::wxRichTextObjectPtrArrayArray *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRichTextObjectPtrArrayArray));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        long index;

        if (sipParseArgs(&sipParseErr, sipArg, "1l", &index))
        {
             ::wxRichTextObjectPtrArray*sipRes = 0;
            sipErrorState sipError = sipErrorNone;

            if (0 > index)
                index += sipCpp->GetCount();

            if ((index < sipCpp->GetCount()) && (0 <= index)) {
                sipRes = &sipCpp->Item(index);
            }
            else {
                wxPyErr_SetString(PyExc_IndexError, "sequence index out of range");
                sipError = sipErrorFail;
            }

            if (sipError == sipErrorFail)
                return 0;

            if (sipError == sipErrorNone)
            {
            return sipConvertFromType(sipRes,sipType_wxRichTextObjectPtrArray,SIP_NULLPTR);
            }

            sipAddException(sipError, &sipParseErr);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextObjectPtrArrayArray, sipName___getitem__, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static SIP_SSIZE_T slot_wxRichTextObjectPtrArrayArray___len__(PyObject *);}
static SIP_SSIZE_T slot_wxRichTextObjectPtrArrayArray___len__(PyObject *sipSelf)
{
     ::wxRichTextObjectPtrArrayArray *sipCpp = reinterpret_cast< ::wxRichTextObjectPtrArrayArray *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRichTextObjectPtrArrayArray));

    if (!sipCpp)
        return 0;


    {
        {
            SIP_SSIZE_T sipRes = 0;

        sipRes = sipCpp->GetCount();

            return sipRes;
        }
    }

    return 0;
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxRichTextObjectPtrArrayArray();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const  ::wxRichTextObjectPtrArrayArray* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxRichTextObjectPtrArrayArray, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxRichTextObjectPtrArrayArray(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_wxRichTextObjectPtrArrayArray[] = {
    {(void *)slot_wxRichTextObjectPtrArrayArray___contains__, contains_slot},
    {(void *)slot_wxRichTextObjectPtrArrayArray___getitem__, getitem_slot},
    {(void *)slot_wxRichTextObjectPtrArrayArray___len__, len_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_wxRichTextObjectPtrArrayArray[] = {
    {SIP_MLNAME_CAST(sipName_append), SIP_MLMETH_CAST(meth_wxRichTextObjectPtrArrayArray_append), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextObjectPtrArrayArray_append)},
    {SIP_MLNAME_CAST(sipName_index), SIP_MLMETH_CAST(meth_wxRichTextObjectPtrArrayArray_index), METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxRichTextObjectPtrArrayArray_index)}
};

PyDoc_STRVAR(doc_wxRichTextObjectPtrArrayArray, "\1RichTextObjectPtrArrayArray()\n"
"RichTextObjectPtrArrayArray(RichTextObjectPtrArrayArray)");


sipClassTypeDef sipTypeDef__richtext_wxRichTextObjectPtrArrayArray = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxRichTextObjectPtrArrayArray,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_RichTextObjectPtrArrayArray,
        {0, 0, 1},
        2, methods_wxRichTextObjectPtrArrayArray,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxRichTextObjectPtrArrayArray,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxRichTextObjectPtrArrayArray,
    init_type_wxRichTextObjectPtrArrayArray,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxRichTextObjectPtrArrayArray,
    assign_wxRichTextObjectPtrArrayArray,
    array_wxRichTextObjectPtrArrayArray,
    copy_wxRichTextObjectPtrArrayArray,
    release_wxRichTextObjectPtrArrayArray,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
