X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4acff284f9516e2a4f0fcfa7bcfa3f497b8005cc..4101db8100f956b8ad2ea2d5f9e329134a6cce89:/wxPython/contrib/ogl/ogl.cpp diff --git a/wxPython/contrib/ogl/ogl.cpp b/wxPython/contrib/ogl/ogl.cpp index 3c74a41f61..abd1f2f04e 100644 --- a/wxPython/contrib/ogl/ogl.cpp +++ b/wxPython/contrib/ogl/ogl.cpp @@ -186,6 +186,25 @@ PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { return target; } +//--------------------------------------------------------------------------- + +PyObject* wxPy_ConvertShapeList(wxListBase* list, const char* className) { + PyObject* pyList; + PyObject* pyObj; + wxObject* wxObj; + wxNode* node = list->First(); + + wxPyBeginBlockThreads(); + pyList = PyList_New(0); + while (node) { + wxObj = node->Data(); + pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj); + PyList_Append(pyList, pyObj); + node = node->Next(); + } + wxPyEndBlockThreads(); + return pyList; +} //---------------------------------------------------------------------------