]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/ogl.cpp
Fixed GetShapeList and similar methods to use OOR.
[wxWidgets.git] / wxPython / contrib / ogl / ogl.cpp
index 3c74a41f61012dae2df035a54d413111a3e59148..abd1f2f04e1caf52a4dc1bb251fdab9541e1c5d4 100644 (file)
@@ -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;
+}
 
 
 //---------------------------------------------------------------------------