X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a9b33dbf8f387320488fc642ea0fa0086c98db3..7cdecac3b7597a3cbb9155d5ee46b852293d8c26:/wxPython/src/gtk/wx.cpp diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index fcf5367522..a7e57d41c5 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -643,6 +643,8 @@ static wxPyCoreAPI API = { SWIG_addvarlink, SWIG_newvarlink, + wxPyBeginAllowThreads, + wxPyEndAllowThreads, wxPyBeginBlockThreads, wxPyEndBlockThreads, @@ -674,6 +676,7 @@ static wxPyCoreAPI API = { wxPyMake_wxObject, wxPyMake_wxSizer, wxPyPtrTypeMap_Add, + wxArrayString2PyList_helper }; @@ -695,10 +698,10 @@ static PyObject *_wrap_ptrcast(PyObject *self, PyObject *args, PyObject *kwargs) _arg0 = _obj0; } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (PyObject *)ptrcast(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -722,10 +725,10 @@ static PyObject *_wrap_ptrvalue(PyObject *self, PyObject *args, PyObject *kwargs _arg0 = _obj0; } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (PyObject *)ptrvalue(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -754,10 +757,10 @@ static PyObject *_wrap_ptrset(PyObject *self, PyObject *args, PyObject *kwargs) _arg1 = _obj1; } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (PyObject *)ptrset(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -782,10 +785,10 @@ static PyObject *_wrap_ptrcreate(PyObject *self, PyObject *args, PyObject *kwarg _arg1 = _obj1; } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (PyObject *)ptrcreate(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -807,10 +810,10 @@ static PyObject *_wrap_ptrfree(PyObject *self, PyObject *args, PyObject *kwargs) _arg0 = _obj0; } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (PyObject *)ptrfree(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -833,10 +836,10 @@ static PyObject *_wrap_ptradd(PyObject *self, PyObject *args, PyObject *kwargs) _arg0 = _obj0; } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (PyObject *)ptradd(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -854,10 +857,10 @@ static PyObject *_wrap_ptrmap(PyObject *self, PyObject *args, PyObject *kwargs) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ss:ptrmap",_kwnames,&_arg0,&_arg1)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); ptrmap(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -904,10 +907,11 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (wxPyApp *)wxGetApp(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -926,10 +930,11 @@ static PyObject *_wrap_wxApp_CleanUp(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxApp_CleanUp",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxApp_CleanUp(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -966,10 +971,11 @@ static PyObject *_wrap_new_wxPyApp(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyApp",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (wxPyApp *)new_wxPyApp(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -998,10 +1004,11 @@ static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); delete_wxPyApp(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1026,10 +1033,11 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = new wxString (wxPyApp_GetAppName(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } @@ -1058,10 +1066,11 @@ static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = new wxString (wxPyApp_GetClassName(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } @@ -1090,10 +1099,11 @@ static PyObject *_wrap_wxPyApp_GetExitOnFrameDelete(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (bool )wxPyApp_GetExitOnFrameDelete(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1117,10 +1127,11 @@ static PyObject *_wrap_wxPyApp_GetPrintMode(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (int )wxPyApp_GetPrintMode(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1144,10 +1155,11 @@ static PyObject *_wrap_wxPyApp_GetTopWindow(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (wxWindow *)wxPyApp_GetTopWindow(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1171,10 +1183,11 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = new wxString (wxPyApp_GetVendorName(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); } @@ -1203,10 +1216,11 @@ static PyObject *_wrap_wxPyApp_GetUseBestVisual(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (bool )wxPyApp_GetUseBestVisual(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1229,10 +1243,11 @@ static PyObject *_wrap_wxPyApp_Dispatch(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_Dispatch(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1256,10 +1271,11 @@ static PyObject *_wrap_wxPyApp_ExitMainLoop(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_ExitMainLoop(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1284,10 +1300,11 @@ static PyObject *_wrap_wxPyApp_Initialized(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (bool )wxPyApp_Initialized(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1311,10 +1328,11 @@ static PyObject *_wrap_wxPyApp_MainLoop(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (int )wxPyApp_MainLoop(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1338,10 +1356,11 @@ static PyObject *_wrap_wxPyApp_Pending(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (bool )wxPyApp_Pending(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1365,10 +1384,11 @@ static PyObject *_wrap_wxPyApp_ProcessIdle(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = (bool )wxPyApp_ProcessIdle(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1411,10 +1431,11 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args, PyObje #endif } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetAppName(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; { @@ -1462,10 +1483,11 @@ static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args, PyOb #endif } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetClassName(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; { @@ -1496,10 +1518,11 @@ static PyObject *_wrap_wxPyApp_SetExitOnFrameDelete(PyObject *self, PyObject *ar } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetExitOnFrameDelete(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1524,10 +1547,11 @@ static PyObject *_wrap_wxPyApp_SetPrintMode(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetPrintMode(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1560,10 +1584,11 @@ static PyObject *_wrap_wxPyApp_SetTopWindow(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetTopWindow(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1607,10 +1632,11 @@ static PyObject *_wrap_wxPyApp_SetVendorName(PyObject *self, PyObject *args, PyO #endif } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetVendorName(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; { @@ -1641,10 +1667,11 @@ static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args, } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp_SetUseBestVisual(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1671,10 +1698,11 @@ static PyObject *_wrap_wxPyApp_GetStdIcon(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; + PyThreadState* __tstate = wxPyBeginAllowThreads(); _result = new wxIcon (wxPyApp_GetStdIcon(_arg0,_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -2117,6 +2145,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY)); PyDict_SetItemString(d,"wxWS_EX_BLOCK_EVENTS", PyInt_FromLong((long) wxWS_EX_BLOCK_EVENTS)); + PyDict_SetItemString(d,"wxWS_EX_TRANSIENT", PyInt_FromLong((long) wxWS_EX_TRANSIENT)); PyDict_SetItemString(d,"wxMM_TEXT", PyInt_FromLong((long) wxMM_TEXT)); PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC)); PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC)); @@ -2448,6 +2477,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_COMMAND_TOOL_ENTER", PyInt_FromLong((long) wxEVT_COMMAND_TOOL_ENTER)); PyDict_SetItemString(d,"wxEVT_SET_FOCUS", PyInt_FromLong((long) wxEVT_SET_FOCUS)); PyDict_SetItemString(d,"wxEVT_KILL_FOCUS", PyInt_FromLong((long) wxEVT_KILL_FOCUS)); + PyDict_SetItemString(d,"wxEVT_CHILD_FOCUS", PyInt_FromLong((long) wxEVT_CHILD_FOCUS)); PyDict_SetItemString(d,"wxEVT_MOUSEWHEEL", PyInt_FromLong((long) wxEVT_MOUSEWHEEL)); PyDict_SetItemString(d,"wxEVT_LEFT_DOWN", PyInt_FromLong((long) wxEVT_LEFT_DOWN)); PyDict_SetItemString(d,"wxEVT_LEFT_UP", PyInt_FromLong((long) wxEVT_LEFT_UP));