X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6c593e88d75fe89320eafddeb547b3c058c34d8..a4353f07c6b37712634d4b2d86527b647a08044f:/wxPython/src/msw/misc.cpp diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index a7f7c62e53..e601f3767a 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -87,13 +87,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif - - static wxString wxPyEmptyStr(""); + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyEmptyString(wxT("")); PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); @@ -118,8 +113,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return Py_None; } - char* wxGetResource(char *section, char *entry, char *file = NULL) { - char * retval; + wxString wxGetResource(const wxString& section, const wxString& entry, + const wxString& file = wxPyEmptyString) { + wxChar * retval; wxGetResource(section, entry, &retval, file); return retval; } @@ -158,7 +154,7 @@ static PyObject *_wrap_wxIntersectRect(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxIntersectRect(_arg0,_arg1); + _result = (PyObject *)wxIntersectRect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -178,7 +174,7 @@ static PyObject *_wrap_wxNewId(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); + _result = (long )wxNewId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -196,7 +192,7 @@ static PyObject *_wrap_wxRegisterId(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); + wxRegisterId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -215,7 +211,7 @@ static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) { return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); + _result = (long )wxNewId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -233,7 +229,7 @@ static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); + wxRegisterId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -252,7 +248,7 @@ static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetCurrentId(); + _result = (long )wxGetCurrentId(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -269,7 +265,7 @@ static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBell(); + wxBell(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -287,7 +283,7 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEndBusyCursor(); + wxEndBusyCursor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -309,7 +305,7 @@ static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetElapsedTime(_arg0); + _result = (long )wxGetElapsedTime(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -327,7 +323,7 @@ static PyObject *_wrap_wxGetFreeMemory(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxGetFreeMemory(); + _result = (long )wxGetFreeMemory(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -354,7 +350,7 @@ static PyObject *_wrap_wxGetMousePosition(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGetMousePosition(_arg0,_arg1); + wxGetMousePosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -383,7 +379,7 @@ static PyObject *_wrap_wxIsBusy(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxIsBusy(); + _result = (bool )wxIsBusy(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -401,12 +397,16 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNow()); + _result = new wxString (wxNow()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -417,7 +417,7 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg0 = (wxString *) &wxPyEmptyString; PyObject * _obj0 = 0; char *_kwnames[] = { "command", NULL }; @@ -426,26 +426,13 @@ static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; if (_obj0) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxShell(*_arg0); + _result = (bool )wxShell(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -466,7 +453,7 @@ static PyObject *_wrap_wxStartTimer(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStartTimer(); + wxStartTimer(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -495,7 +482,7 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGetOsVersion(_arg0,_arg1); + _result = (int )wxGetOsVersion(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -523,12 +510,16 @@ static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetOsDescription()); + _result = new wxString (wxGetOsDescription()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -536,6 +527,25 @@ static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObje return _resultobj; } +static PyObject *_wrap_wxShutdown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxShutdownFlags _arg0; + char *_kwnames[] = { "wFlags", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxShutdown",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxShutdown(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _arg0; @@ -546,7 +556,7 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSleep(_arg0); + wxSleep(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -565,7 +575,7 @@ static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxUsleep(_arg0); + wxUsleep(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -584,7 +594,7 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxYield(); + _result = (bool )wxYield(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -602,7 +612,7 @@ static PyObject *_wrap_wxYieldIfNeeded(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxYieldIfNeeded(); + _result = (bool )wxYieldIfNeeded(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -622,7 +632,7 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P _arg0 = (bool ) tempbool0; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxEnableTopLevelWindows(_arg0); + wxEnableTopLevelWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -633,22 +643,62 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; - char * _arg0; - char * _arg1; - char * _arg2 = (char *) NULL; + wxString * _result; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyString; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "section","entry","file", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ss|s:wxGetResource",_kwnames,&_arg0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxGetResource",_kwnames,&_obj0,&_obj1,&_obj2)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxGetResource(_arg0,_arg1,_arg2); + _result = new wxString (wxGetResource(*_arg0,*_arg1,*_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} return _resultobj; } @@ -663,31 +713,22 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxStripMenuCodes",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStripMenuCodes(*_arg0)); + _result = new wxString (wxStripMenuCodes(*_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { if (_obj0) @@ -709,12 +750,16 @@ static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetEmailAddress()); + _result = new wxString (wxGetEmailAddress()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -732,12 +777,16 @@ static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetHostName()); + _result = new wxString (wxGetHostName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -755,12 +804,16 @@ static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetFullHostName()); + _result = new wxString (wxGetFullHostName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -778,12 +831,16 @@ static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserId()); + _result = new wxString (wxGetUserId()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -801,12 +858,16 @@ static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *k return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserName()); + _result = new wxString (wxGetUserName()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -824,12 +885,16 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetHomeDir()); + _result = new wxString (wxGetHomeDir()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -840,20 +905,35 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; - char * _arg0 = (char *) ""; + wxString * _arg0 = (wxString *) &wxPyEmptyString; + PyObject * _obj0 = 0; char *_kwnames[] = { "user", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxGetUserHome",_kwnames,&_obj0)) return NULL; + if (_obj0) +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetUserHome(_arg0)); + _result = new wxString (wxGetUserHome(*_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + if (_obj0) + delete _arg0; } { delete _result; @@ -861,6 +941,24 @@ static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +static PyObject *_wrap_wxGetProcessId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetProcessId",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (unsigned long )wxGetProcessId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxAcceleratorEntry * _result; @@ -873,26 +971,13 @@ static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetAccelFromString",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -925,12 +1010,12 @@ static PyObject *_wrap_wxNullAcceleratorTable_get() { return pyobj; } -static const char * wxObject_GetClassName(wxObject *self) { +static wxString wxObject_GetClassName(wxObject *self) { return self->GetClassInfo()->GetClassName(); } static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - char * _result; + wxString * _result; wxObject * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -947,11 +1032,20 @@ static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (char *)wxObject_GetClassName(_arg0); + _result = new wxString (wxObject_GetClassName(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("s", _result); +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } @@ -976,7 +1070,7 @@ static PyObject *_wrap_wxObject_Destroy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxObject_Destroy(_arg0); + wxObject_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1005,7 +1099,7 @@ static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_x_set(_arg0,_arg1); + _result = (long )wxSize_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1032,7 +1126,7 @@ static PyObject *_wrap_wxSize_x_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_x_get(_arg0); + _result = (long )wxSize_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1060,7 +1154,7 @@ static PyObject *_wrap_wxSize_y_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_y_set(_arg0,_arg1); + _result = (long )wxSize_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1087,7 +1181,7 @@ static PyObject *_wrap_wxSize_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_y_get(_arg0); + _result = (long )wxSize_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1109,7 +1203,7 @@ static PyObject *_wrap_new_wxSize(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSize *)new_wxSize(_arg0,_arg1); + _result = (wxSize *)new_wxSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1141,7 +1235,7 @@ static PyObject *_wrap_delete_wxSize(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxSize(_arg0); + delete_wxSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1170,7 +1264,7 @@ static PyObject *_wrap_wxSize_Set(PyObject *self, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_Set(_arg0,_arg1,_arg2); + wxSize_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1198,7 +1292,7 @@ static PyObject *_wrap_wxSize_GetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetX(_arg0); + _result = (long )wxSize_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1225,7 +1319,7 @@ static PyObject *_wrap_wxSize_GetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetY(_arg0); + _result = (long )wxSize_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1252,7 +1346,7 @@ static PyObject *_wrap_wxSize_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetWidth(_arg0); + _result = (long )wxSize_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1279,7 +1373,7 @@ static PyObject *_wrap_wxSize_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxSize_GetHeight(_arg0); + _result = (long )wxSize_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1306,7 +1400,7 @@ static PyObject *_wrap_wxSize_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_SetWidth(_arg0,_arg1); + wxSize_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1334,7 +1428,7 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSize_SetHeight(_arg0,_arg1); + wxSize_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1344,9 +1438,11 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject } static PyObject * wxSize_asTuple(wxSize *self) { + wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); + wxPyEndBlockThreads(); return tup; } static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1367,7 +1463,7 @@ static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSize_asTuple(_arg0); + _result = (PyObject *)wxSize_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1408,7 +1504,7 @@ static PyObject *_wrap_wxSize___cmp__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSize___cmp__(_arg0,_arg1); + _result = (int )wxSize___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1436,7 +1532,7 @@ static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_x_set(_arg0,_arg1); + _result = (double )wxRealPoint_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1463,7 +1559,7 @@ static PyObject *_wrap_wxRealPoint_x_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_x_get(_arg0); + _result = (double )wxRealPoint_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1491,7 +1587,7 @@ static PyObject *_wrap_wxRealPoint_y_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_y_set(_arg0,_arg1); + _result = (double )wxRealPoint_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1518,7 +1614,7 @@ static PyObject *_wrap_wxRealPoint_y_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxRealPoint_y_get(_arg0); + _result = (double )wxRealPoint_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1540,7 +1636,7 @@ static PyObject *_wrap_new_wxRealPoint(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); + _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1572,7 +1668,7 @@ static PyObject *_wrap_delete_wxRealPoint(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRealPoint(_arg0); + delete_wxRealPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1604,7 +1700,7 @@ static PyObject *_wrap_wxRealPoint_Set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRealPoint_Set(_arg0,_arg1,_arg2); + wxRealPoint_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1614,9 +1710,11 @@ static PyObject *_wrap_wxRealPoint_Set(PyObject *self, PyObject *args, PyObject } static PyObject * wxRealPoint_asTuple(wxRealPoint *self) { + wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x)); PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y)); + wxPyEndBlockThreads(); return tup; } static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1637,7 +1735,7 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxRealPoint_asTuple(_arg0); + _result = (PyObject *)wxRealPoint_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1678,7 +1776,7 @@ static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1718,7 +1816,7 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1758,7 +1856,7 @@ static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1786,7 +1884,7 @@ static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_x_set(_arg0,_arg1); + _result = (long )wxPoint_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1813,7 +1911,7 @@ static PyObject *_wrap_wxPoint_x_get(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_x_get(_arg0); + _result = (long )wxPoint_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1841,7 +1939,7 @@ static PyObject *_wrap_wxPoint_y_set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_y_set(_arg0,_arg1); + _result = (long )wxPoint_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1868,7 +1966,7 @@ static PyObject *_wrap_wxPoint_y_get(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPoint_y_get(_arg0); + _result = (long )wxPoint_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1890,7 +1988,7 @@ static PyObject *_wrap_new_wxPoint(PyObject *self, PyObject *args, PyObject *kwa return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPoint *)new_wxPoint(_arg0,_arg1); + _result = (wxPoint *)new_wxPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1922,7 +2020,7 @@ static PyObject *_wrap_delete_wxPoint(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPoint(_arg0); + delete_wxPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1954,7 +2052,7 @@ static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPoint_Set(_arg0,_arg1,_arg2); + wxPoint_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1964,9 +2062,11 @@ static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args, PyObject *kwa } static PyObject * wxPoint_asTuple(wxPoint *self) { + wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); + wxPyEndBlockThreads(); return tup; } static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -1987,7 +2087,7 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxPoint_asTuple(_arg0); + _result = (PyObject *)wxPoint_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2028,7 +2128,7 @@ static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2068,7 +2168,7 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2108,7 +2208,7 @@ static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPoint___cmp__(_arg0,_arg1); + _result = (int )wxPoint___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2132,7 +2232,7 @@ static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); + _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2164,7 +2264,7 @@ static PyObject *_wrap_delete_wxRect(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxRect(_arg0); + delete_wxRect(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2192,7 +2292,7 @@ static PyObject *_wrap_wxRect_GetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetX(_arg0); + _result = (int )wxRect_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2219,7 +2319,7 @@ static PyObject *_wrap_wxRect_SetX(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetX(_arg0,_arg1); + wxRect_SetX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2247,7 +2347,7 @@ static PyObject *_wrap_wxRect_GetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetY(_arg0); + _result = (int )wxRect_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2274,7 +2374,7 @@ static PyObject *_wrap_wxRect_SetY(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetY(_arg0,_arg1); + wxRect_SetY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2302,7 +2402,7 @@ static PyObject *_wrap_wxRect_GetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetWidth(_arg0); + _result = (int )wxRect_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2329,7 +2429,7 @@ static PyObject *_wrap_wxRect_SetWidth(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetWidth(_arg0,_arg1); + wxRect_SetWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2357,7 +2457,7 @@ static PyObject *_wrap_wxRect_GetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetHeight(_arg0); + _result = (int )wxRect_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2384,7 +2484,7 @@ static PyObject *_wrap_wxRect_SetHeight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetHeight(_arg0,_arg1); + wxRect_SetHeight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2413,7 +2513,7 @@ static PyObject *_wrap_wxRect_GetPosition(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxRect_GetPosition(_arg0)); + _result = new wxPoint (wxRect_GetPosition(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2442,7 +2542,7 @@ static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxRect_GetSize(_arg0)); + _result = new wxSize (wxRect_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2451,6 +2551,76 @@ static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxRect_SetPosition(_swigobj,_swigarg0) (_swigobj->SetPosition(_swigarg0)) +static PyObject *_wrap_wxRect_SetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _arg0; + wxPoint * _arg1; + wxRect temp; + PyObject * _obj0 = 0; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","p", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_SetPosition",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetPosition(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRect_SetSize(_swigobj,_swigarg0) (_swigobj->SetSize(_swigarg0)) +static PyObject *_wrap_wxRect_SetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _arg0; + wxSize * _arg1; + wxRect temp; + PyObject * _obj0 = 0; + wxSize temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","s", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_SetSize",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetSize(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxRect_GetLeft(_swigobj) (_swigobj->GetLeft()) static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2470,7 +2640,7 @@ static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetLeft(_arg0); + _result = (int )wxRect_GetLeft(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2497,7 +2667,7 @@ static PyObject *_wrap_wxRect_GetTop(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetTop(_arg0); + _result = (int )wxRect_GetTop(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2524,7 +2694,7 @@ static PyObject *_wrap_wxRect_GetBottom(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetBottom(_arg0); + _result = (int )wxRect_GetBottom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2551,7 +2721,7 @@ static PyObject *_wrap_wxRect_GetRight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_GetRight(_arg0); + _result = (int )wxRect_GetRight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2578,7 +2748,7 @@ static PyObject *_wrap_wxRect_SetLeft(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetLeft(_arg0,_arg1); + wxRect_SetLeft(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2606,7 +2776,7 @@ static PyObject *_wrap_wxRect_SetRight(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetRight(_arg0,_arg1); + wxRect_SetRight(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2634,7 +2804,7 @@ static PyObject *_wrap_wxRect_SetTop(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetTop(_arg0,_arg1); + wxRect_SetTop(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2662,7 +2832,7 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_SetBottom(_arg0,_arg1); + wxRect_SetBottom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2691,7 +2861,7 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_Inflate(_arg0,_arg1,_arg2); + wxRect_Inflate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2721,7 +2891,7 @@ static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2749,7 +2919,7 @@ static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_set(_arg0,_arg1); + _result = (int )wxRect_x_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2776,7 +2946,7 @@ static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_get(_arg0); + _result = (int )wxRect_x_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2804,7 +2974,7 @@ static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_set(_arg0,_arg1); + _result = (int )wxRect_y_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2831,7 +3001,7 @@ static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_get(_arg0); + _result = (int )wxRect_y_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2859,7 +3029,7 @@ static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_width_set(_arg0,_arg1); + _result = (int )wxRect_width_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2886,7 +3056,7 @@ static PyObject *_wrap_wxRect_width_get(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_width_get(_arg0); + _result = (int )wxRect_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2914,7 +3084,7 @@ static PyObject *_wrap_wxRect_height_set(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_height_set(_arg0,_arg1); + _result = (int )wxRect_height_set(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2941,7 +3111,7 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_height_get(_arg0); + _result = (int )wxRect_height_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2950,11 +3120,13 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec } static PyObject * wxRect_asTuple(wxRect *self) { + wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(4); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x)); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y)); PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width)); PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height)); + wxPyEndBlockThreads(); return tup; } static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -2975,7 +3147,7 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxRect_asTuple(_arg0); + _result = (PyObject *)wxRect_asTuple(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3016,7 +3188,7 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRect___add__(_arg0,_arg1)); + _result = new wxRect (wxRect___add__(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3056,7 +3228,7 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect___cmp__(_arg0,_arg1); + _result = (int )wxRect___cmp__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3101,7 +3273,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3130,7 +3302,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Absolute(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); + wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3158,7 +3330,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_AsIs(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_AsIs(_arg0); + wxIndividualLayoutConstraint_AsIs(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3196,7 +3368,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Below(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3224,7 +3396,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Unconstrained(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Unconstrained(_arg0); + wxIndividualLayoutConstraint_Unconstrained(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3262,7 +3434,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_LeftOf(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3301,7 +3473,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_PercentOf(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); + wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3339,7 +3511,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_RightOf(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); + wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3378,7 +3550,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_SameAs(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); + wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3419,7 +3591,7 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3448,7 +3620,7 @@ static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); + _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3483,7 +3655,7 @@ static PyObject *_wrap_wxLayoutConstraints_bottom_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3518,7 +3690,7 @@ static PyObject *_wrap_wxLayoutConstraints_centreX_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3553,7 +3725,7 @@ static PyObject *_wrap_wxLayoutConstraints_centreY_get(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3588,7 +3760,7 @@ static PyObject *_wrap_wxLayoutConstraints_height_get(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3623,7 +3795,7 @@ static PyObject *_wrap_wxLayoutConstraints_left_get(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3658,7 +3830,7 @@ static PyObject *_wrap_wxLayoutConstraints_right_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3693,7 +3865,7 @@ static PyObject *_wrap_wxLayoutConstraints_top_get(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3728,7 +3900,7 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3757,7 +3929,7 @@ static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, Py return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); + _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3790,7 +3962,7 @@ static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxAcceleratorEntry(_arg0); + delete_wxAcceleratorEntry(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3821,7 +3993,7 @@ static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); + wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3850,7 +4022,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetFlags(_arg0); + _result = (int )wxAcceleratorEntry_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3878,7 +4050,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); + _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3906,7 +4078,7 @@ static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxAcceleratorEntry_GetCommand(_arg0); + _result = (int )wxAcceleratorEntry_GetCommand(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3952,7 +4124,7 @@ static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); + _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3988,7 +4160,7 @@ static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxAcceleratorTable(_arg0); + delete_wxAcceleratorTable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4018,26 +4190,13 @@ static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxBusyInfo",_kwnames,&_obj0)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); + _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4074,7 +4233,7 @@ static PyObject *_wrap_delete_wxBusyInfo(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxBusyInfo(_arg0); + delete_wxBusyInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4134,6 +4293,8 @@ static PyMethodDef misccMethods[] = { { "wxRect_GetBottom", (PyCFunction) _wrap_wxRect_GetBottom, METH_VARARGS | METH_KEYWORDS }, { "wxRect_GetTop", (PyCFunction) _wrap_wxRect_GetTop, METH_VARARGS | METH_KEYWORDS }, { "wxRect_GetLeft", (PyCFunction) _wrap_wxRect_GetLeft, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_SetSize", (PyCFunction) _wrap_wxRect_SetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_SetPosition", (PyCFunction) _wrap_wxRect_SetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxRect_GetSize", (PyCFunction) _wrap_wxRect_GetSize, METH_VARARGS | METH_KEYWORDS }, { "wxRect_GetPosition", (PyCFunction) _wrap_wxRect_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetHeight", (PyCFunction) _wrap_wxRect_SetHeight, METH_VARARGS | METH_KEYWORDS }, @@ -4190,6 +4351,7 @@ static PyMethodDef misccMethods[] = { { "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetProcessId", (PyCFunction) _wrap_wxGetProcessId, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, @@ -4204,6 +4366,7 @@ static PyMethodDef misccMethods[] = { { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, + { "wxShutdown", (PyCFunction) _wrap_wxShutdown, METH_VARARGS | METH_KEYWORDS }, { "wxGetOsDescription", (PyCFunction) _wrap_wxGetOsDescription, METH_VARARGS | METH_KEYWORDS }, { "wxGetOsVersion", (PyCFunction) _wrap_wxGetOsVersion, METH_VARARGS | METH_KEYWORDS }, { "wxStartTimer", (PyCFunction) _wrap_wxStartTimer, METH_VARARGS | METH_KEYWORDS }, @@ -4337,6 +4500,8 @@ SWIGEXPORT(void) initmiscc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("miscc", misccMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxSHUTDOWN_POWEROFF", PyInt_FromLong((long) wxSHUTDOWN_POWEROFF)); + PyDict_SetItemString(d,"wxSHUTDOWN_REBOOT", PyInt_FromLong((long) wxSHUTDOWN_REBOOT)); PyDict_SetItemString(d,"wxLeft", PyInt_FromLong((long) wxLeft)); PyDict_SetItemString(d,"wxTop", PyInt_FromLong((long) wxTop)); PyDict_SetItemString(d,"wxRight", PyInt_FromLong((long) wxRight));