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

#include "sipAPI_richtext.h"

        
        typedef wxList wxRichTextDrawingHandlerList;
        class wxRichTextDrawingHandlerList_iterator {
        public:
            wxRichTextDrawingHandlerList_iterator(wxRichTextDrawingHandlerList::compatibility_iterator start)
                : m_node(start) {}

            wxRichTextDrawingHandler* __next__() {
                wxRichTextDrawingHandler* obj = NULL;
                if (m_node) {
                    obj = (wxRichTextDrawingHandler*) m_node->GetData();
                    m_node = m_node->GetNext();
                }
                else {
                    PyErr_SetString(PyExc_StopIteration, "");
                }
                return (wxRichTextDrawingHandler*)obj;
            }
        private:
            wxRichTextDrawingHandlerList::compatibility_iterator m_node;
        };

        #include <wx/richtext/richtextbuffer.h>


extern "C" {static PyObject *slot_wxRichTextDrawingHandlerList_iterator___next__(PyObject *);}
static PyObject *slot_wxRichTextDrawingHandlerList_iterator___next__(PyObject *sipSelf)
{
     ::wxRichTextDrawingHandlerList_iterator *sipCpp = reinterpret_cast< ::wxRichTextDrawingHandlerList_iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_wxRichTextDrawingHandlerList_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;


    {
        {
             ::wxRichTextDrawingHandler*sipRes = 0;

        sipRes = sipCpp->__next__();
        if (PyErr_Occurred())
            return NULL;

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

    return 0;
}


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

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

    Py_END_ALLOW_THREADS
}


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


/* Define this type's Python slots. */
static sipPySlotDef slots_wxRichTextDrawingHandlerList_iterator[] = {
    {(void *)slot_wxRichTextDrawingHandlerList_iterator___next__, next_slot},
    {0, (sipPySlotType)0}
};


sipClassTypeDef sipTypeDef__richtext_wxRichTextDrawingHandlerList_iterator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS,
        sipNameNr_wxRichTextDrawingHandlerList_iterator,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_RichTextDrawingHandlerList_iterator,
        {0, 0, 1},
        0, SIP_NULLPTR,
        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},
    },
    SIP_NULLPTR,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxRichTextDrawingHandlerList_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxRichTextDrawingHandlerList_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_wxRichTextDrawingHandlerList_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
