X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4acff284f9516e2a4f0fcfa7bcfa3f497b8005cc..084db46c8b4f3f8d5e6a5f55e09e04f5a680c8a5:/wxPython/contrib/ogl/ogl.i diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index dfa1a664a2..3a226865f2 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -14,7 +14,7 @@ %module ogl %{ -#include "export.h" +#include "wxPython.h" #include "oglhelpers.h" %} @@ -235,6 +235,26 @@ PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { return target; } +//--------------------------------------------------------------------------- + +PyObject* wxPy_ConvertShapeList(wxListBase* listbase, const char* className) { + wxList* list = (wxList*)listbase; + PyObject* pyList; + PyObject* pyObj; + wxObject* wxObj; + wxNode* node = list->GetFirst(); + + wxPyBeginBlockThreads(); + pyList = PyList_New(0); + while (node) { + wxObj = node->GetData(); + pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj); + PyList_Append(pyList, pyObj); + node = node->GetNext(); + } + wxPyEndBlockThreads(); + return pyList; +} //---------------------------------------------------------------------------