X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35d60de2215cf90ee64055a6e2b2a2babcedb265..e5ee4c908b9dbcf07f0441aa74d8635b7343be4d:/wxPython/src/wx.i diff --git a/wxPython/src/wx.i b/wxPython/src/wx.i index 0f7cd3012e..05a1360777 100644 --- a/wxPython/src/wx.i +++ b/wxPython/src/wx.i @@ -17,6 +17,11 @@ #include "helpers.h" %} +// %pragma(python) code=" +// # This gives this module's dictionary to the C++ extension code... +// wxc._wxSetDictionary(vars()) +// " + //---------------------------------------------------------------------- // This is where we include the other wrapper definition files for SWIG //---------------------------------------------------------------------- @@ -45,6 +50,7 @@ %import sizers.i %import streams.i %import filesys.i +%import utils.i %native(_wxStart) __wxStart; %native(_wxSetDictionary) __wxSetDictionary; @@ -102,8 +108,6 @@ public: void SetVendorName(const wxString& name); void SetUseBestVisual(bool flag); wxIcon GetStdIcon(int which); - - }; %inline %{ @@ -112,6 +116,8 @@ public: } %} + + //---------------------------------------------------------------------- // this is used to cleanup after wxWindows when Python shuts down. @@ -147,6 +153,7 @@ extern "C" SWIGEXPORT(void) initsizersc(); extern "C" SWIGEXPORT(void) initclip_dndc(); extern "C" SWIGEXPORT(void) initstreamsc(); extern "C" SWIGEXPORT(void) initfilesysc(); +extern "C" SWIGEXPORT(void) initutilsc(); @@ -161,8 +168,11 @@ static wxPyCoreAPI API = { SWIG_addvarlink, SWIG_newvarlink, - wxPySaveThread, - wxPyRestoreThread, + wxPyBeginAllowThreads, + wxPyEndAllowThreads, + wxPyBeginBlockThreads, + wxPyEndBlockThreads, + wxPyConstructObject, wxPy_ConvertList, @@ -181,13 +191,21 @@ static wxPyCoreAPI API = { wxRect_helper, wxColour_helper, - wxPyCBH_setSelf, + wxPyCBH_setCallbackInfo, wxPyCBH_findCallback, wxPyCBH_callCallback, wxPyCBH_callCallbackObj, wxPyCBH_delete, + + wxPyClassExists, + wxPyMake_wxObject, + wxPyMake_wxSizer, + wxPyPtrTypeMap_Add, + wxArrayString2PyList_helper, + wxArrayInt2PyList_helper }; + %} @@ -225,6 +243,15 @@ static wxPyCoreAPI API = { initclip_dndc(); initstreamsc(); initfilesysc(); + initutilsc(); + + + PyDict_SetItemString(d,"wxMAJOR_VERSION", PyInt_FromLong((long)wxMAJOR_VERSION )); + PyDict_SetItemString(d,"wxMINOR_VERSION", PyInt_FromLong((long)wxMINOR_VERSION )); + PyDict_SetItemString(d,"wxRELEASE_NUMBER", PyInt_FromLong((long)wxRELEASE_NUMBER )); + PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER )); + PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING)); + %}