X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ef5a0b05eb0a79ea3d0c94c67f47ceb3ad49898..c751d1d73157299da3e2091ed2701d53512b0620:/wxPython/contrib/ogl/ogl.i?ds=inline diff --git a/wxPython/contrib/ogl/ogl.i b/wxPython/contrib/ogl/ogl.i index e8bca42799..45e7595d0a 100644 --- a/wxPython/contrib/ogl/ogl.i +++ b/wxPython/contrib/ogl/ogl.i @@ -14,7 +14,8 @@ "The Object Graphics Library provides for simple drawing and manipulation of 2D objects. (This version is deprecated, please use wx.lib.ogl instead.)" %enddef -%module(docstring=DOCSTRING) ogl + +%module(package="wx", docstring=DOCSTRING) ogl %{ #include "wx/wxPython/wxPython.h" @@ -38,8 +39,6 @@ of 2D objects. (This version is deprecated, please use wx.lib.ogl instead.)" MAKE_CONST_WXSTRING_NOSWIG(EmptyString); -%include _ogl_rename.i - %include _ogldefs.i %include _oglbasic.i %include _oglshapes.i @@ -170,7 +169,7 @@ void wxOGLCleanUp(); // work for any class for the VERY generic cases, but beyond that the helper // needs to know more about the type. wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className) { - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (!PyList_Check(pyList)) { PyErr_SetString(PyExc_TypeError, "Expected a list object."); wxPyEndBlockThreads(blocked); @@ -203,7 +202,7 @@ wxList* wxPy_wxListHelper(PyObject* pyList, const wxChar* className) { //--------------------------------------------------------------------------- wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); if (!PyList_Check(pyList)) { PyErr_SetString(PyExc_TypeError, "Expected a list object."); wxPyEndBlockThreads(blocked); @@ -244,7 +243,7 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) { //--------------------------------------------------------------------------- -PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { +PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source, bool setThisOwn) { PyObject* target = NULL; if (source && wxIsKindOf(source, wxShapeEvtHandler)) { @@ -259,7 +258,7 @@ PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) { } } if (! target) { - target = wxPyMake_wxObject2(source, FALSE); + target = wxPyMake_wxObject2(source, setThisOwn, false); if (target != Py_None) ((wxShapeEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target)); } @@ -275,7 +274,7 @@ PyObject* wxPy_ConvertRealPointList(wxListBase* listbase) { wxObject* wxObj; wxNode* node = list->GetFirst(); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); pyList = PyList_New(0); while (node) { wxObj = node->GetData(); @@ -296,11 +295,11 @@ PyObject* wxPy_ConvertShapeList(wxListBase* listbase) { wxObject* wxObj; wxNode* node = list->GetFirst(); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); pyList = PyList_New(0); while (node) { wxObj = node->GetData(); - pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj); + pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj, false); PyList_Append(pyList, pyObj); node = node->GetNext(); }