X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4acff284f9516e2a4f0fcfa7bcfa3f497b8005cc..4e1c35f810f574af79e649fa37171dfa7fc775ee:/wxPython/contrib/ogl/ogl.i diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index dfa1a664a2..0d66d65282 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -235,6 +235,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; +} //---------------------------------------------------------------------------