X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da32eb53cbe7947f3f4599d7b6b5caa21a68d27f..96cadce3c8d4a52143a7ba7eac747c0ce5a19109:/wxPython/contrib/ogl/ogl.i diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index 1e91d0af7e..b0fe5ede3a 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -10,8 +10,11 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// - -%module ogl +%define DOCSTRING +"The Object Graphics Library provides for simple drawing and manipulation +of 2D objects." +%enddef +%module(docstring=DOCSTRING) ogl %{ #include "wx/wxPython/wxPython.h" @@ -23,7 +26,8 @@ //--------------------------------------------------------------------------- %import windows.i -%pythoncode { wx = core } +%pythoncode { wx = _core } +%pythoncode { __docfilter__ = wx.__DocFilter(globals()) } MAKE_CONST_WXSTRING_NOSWIG(EmptyString); @@ -255,6 +259,27 @@ PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { //--------------------------------------------------------------------------- +PyObject* wxPy_ConvertRealPointList(wxListBase* listbase) { + wxList* list = (wxList*)listbase; + PyObject* pyList; + PyObject* pyObj; + wxObject* wxObj; + wxNode* node = list->GetFirst(); + + bool blocked = wxPyBeginBlockThreads(); + pyList = PyList_New(0); + while (node) { + wxObj = node->GetData(); + pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0); + PyList_Append(pyList, pyObj); + node = node->GetNext(); + } + wxPyEndBlockThreads(blocked); + return pyList; +} + +//--------------------------------------------------------------------------- + PyObject* wxPy_ConvertShapeList(wxListBase* listbase) { wxList* list = (wxList*)listbase; PyObject* pyList;