X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/49348d874d7485d91a2813c1cd76684f19bd3741..f29c177351d7b4f44b9bfab25866495ba8d7fe39:/wxPython/src/gtk/misc.cpp diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 57a58a1855..07f36a4733 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -60,25 +60,6 @@ extern PyObject *SWIG_newvarlink(void); #include #include -static PyObject* l_output_helper(PyObject* target, PyObject* o) { - PyObject* o2; - if (!target) { - target = o; - } else if (target == Py_None) { - Py_DECREF(Py_None); - target = o; - } else { - if (!PyList_Check(target)) { - o2 = target; - target = PyList_New(0); - PyList_Append(target, o2); - Py_XDECREF(o2); - } - PyList_Append(target,o); - Py_XDECREF(o); - } - return target; -} static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -106,10 +87,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; - - static wxString wxPyEmptyStr(""); - PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); @@ -120,21 +97,22 @@ static char* wxStringErrorMsg = "string type is required for parameter"; dest = reg1.GetBox(); if (dest != wxRect(0,0,0,0)) { - bool doSave = wxPyRestoreThread(); + wxPyBeginBlockThreads(); wxRect* newRect = new wxRect(dest); obj = wxPyConstructObject((void*)newRect, "wxRect"); PyObject* one = PyInt_FromLong(1); PyObject_SetAttrString(obj, "thisown", one); Py_DECREF(one); - wxPySaveThread(doSave); + wxPyEndBlockThreads(); return obj; } Py_INCREF(Py_None); 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 = wxEmptyString) { + wxChar * retval; wxGetResource(section, entry, &retval, file); return retval; } @@ -172,10 +150,11 @@ static PyObject *_wrap_wxIntersectRect(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxIntersectRect(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxIntersectRect(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; } @@ -191,10 +170,11 @@ static PyObject *_wrap_wxNewId(PyObject *self, PyObject *args, PyObject *kwargs) if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxNewId",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxNewId(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxNewId(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -208,10 +188,11 @@ static PyObject *_wrap_wxRegisterId(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxRegisterId",_kwnames,&_arg0)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxRegisterId(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRegisterId(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -226,10 +207,11 @@ static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) { if(!PyArg_ParseTupleAndKeywords(args,kwargs,":NewId",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxNewId(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxNewId(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -243,10 +225,11 @@ static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:RegisterId",_kwnames,&_arg0)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxRegisterId(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRegisterId(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -261,10 +244,11 @@ static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetCurrentId",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxGetCurrentId(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxGetCurrentId(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -277,10 +261,11 @@ static PyObject *_wrap_wxBell(PyObject *self, PyObject *args, PyObject *kwargs) if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxBell",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxBell(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBell(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -294,10 +279,11 @@ static PyObject *_wrap_wxEndBusyCursor(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxEndBusyCursor",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxEndBusyCursor(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxEndBusyCursor(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -315,10 +301,11 @@ static PyObject *_wrap_wxGetElapsedTime(PyObject *self, PyObject *args, PyObject return NULL; _arg0 = (bool ) tempbool0; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxGetElapsedTime(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxGetElapsedTime(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -341,10 +328,11 @@ static PyObject *_wrap_wxGetMousePosition(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetMousePosition",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxGetMousePosition(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGetMousePosition(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; { @@ -369,10 +357,11 @@ static PyObject *_wrap_wxIsBusy(PyObject *self, PyObject *args, PyObject *kwargs if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxIsBusy",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxIsBusy(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxIsBusy(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -386,12 +375,17 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxNow",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxNow()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxNow()); - wxPy_END_ALLOW_THREADS; + 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; @@ -402,7 +396,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 *) &wxEmptyString; PyObject * _obj0 = 0; char *_kwnames[] = { "command", NULL }; @@ -411,28 +405,16 @@ 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, "String or Unicode type required"); + _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 } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxShell(*_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxShell(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { if (_obj0) @@ -449,10 +431,11 @@ static PyObject *_wrap_wxStartTimer(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxStartTimer",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxStartTimer(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStartTimer(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -477,10 +460,11 @@ static PyObject *_wrap_wxGetOsVersion(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetOsVersion",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGetOsVersion(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGetOsVersion(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { PyObject *o; @@ -504,12 +488,17 @@ static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetOsDescription",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetOsDescription()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetOsDescription()); - wxPy_END_ALLOW_THREADS; + 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; @@ -526,10 +515,11 @@ static PyObject *_wrap_wxSleep(PyObject *self, PyObject *args, PyObject *kwargs) if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxSleep",_kwnames,&_arg0)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxSleep(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSleep(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -544,10 +534,11 @@ static PyObject *_wrap_wxUsleep(PyObject *self, PyObject *args, PyObject *kwargs if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxUsleep",_kwnames,&_arg0)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - wxUsleep(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxUsleep(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -562,10 +553,11 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYield",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxYield(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxYield(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -579,10 +571,11 @@ static PyObject *_wrap_wxYieldIfNeeded(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxYieldIfNeeded",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxYieldIfNeeded(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxYieldIfNeeded(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -598,10 +591,11 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P return NULL; _arg0 = (bool ) tempbool0; { - wxPy_BEGIN_ALLOW_THREADS; - wxEnableTopLevelWindows(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxEnableTopLevelWindows(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -609,21 +603,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 *) &wxEmptyString; + 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; +} { - wxPy_BEGIN_ALLOW_THREADS; - _result = (char *)wxGetResource(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetResource(*_arg0,*_arg1,*_arg2)); - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("s", _result); + 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; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + delete _result; +} return _resultobj; } @@ -638,30 +673,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, "String or Unicode type required"); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) 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 } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxStripMenuCodes(*_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxStripMenuCodes(*_arg0)); - wxPy_END_ALLOW_THREADS; + 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) @@ -682,12 +709,17 @@ static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetEmailAddress",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetEmailAddress()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetEmailAddress()); - wxPy_END_ALLOW_THREADS; + 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; @@ -704,12 +736,17 @@ static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHostName",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetHostName()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetHostName()); - wxPy_END_ALLOW_THREADS; + 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; @@ -726,12 +763,17 @@ static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetFullHostName",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetFullHostName()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetFullHostName()); - wxPy_END_ALLOW_THREADS; + 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; @@ -748,12 +790,17 @@ static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserId",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetUserId()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetUserId()); - wxPy_END_ALLOW_THREADS; + 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; @@ -770,12 +817,17 @@ static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetUserName",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetUserName()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetUserName()); - wxPy_END_ALLOW_THREADS; + 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; @@ -792,12 +844,45 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetHomeDir",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxGetHomeDir()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _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; +} + return _resultobj; +} + +static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char * _arg0 = (char *) ""; + char *_kwnames[] = { "user", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetUserHome(_arg0)); - wxPy_END_ALLOW_THREADS; + 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; @@ -817,28 +902,16 @@ 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, "String or Unicode type required"); - 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 } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxAcceleratorEntry *)wxGetAccelFromString(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -868,6 +941,75 @@ static PyObject *_wrap_wxNullAcceleratorTable_get() { return pyobj; } +static wxString wxObject_GetClassName(wxObject *self) { + return self->GetClassInfo()->GetClassName(); + } +static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxObject_GetClassName",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxObject_GetClassName. Expected _wxObject_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxObject_GetClassName(_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 +} +{ + delete _result; +} + return _resultobj; +} + +static void wxObject_Destroy(wxObject *self) { + delete self; + } +static PyObject *_wrap_wxObject_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxObject * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxObject_Destroy",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxObject_Destroy. Expected _wxObject_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxObject_Destroy(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSize_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -887,10 +1029,11 @@ static PyObject *_wrap_wxSize_x_set(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_x_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_x_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -913,10 +1056,11 @@ static PyObject *_wrap_wxSize_x_get(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_x_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_x_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -940,10 +1084,11 @@ static PyObject *_wrap_wxSize_y_set(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_y_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_y_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -966,10 +1111,11 @@ static PyObject *_wrap_wxSize_y_get(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_y_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_y_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -987,10 +1133,11 @@ static PyObject *_wrap_new_wxSize(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ll:new_wxSize",_kwnames,&_arg0,&_arg1)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSize *)new_wxSize(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSize *)new_wxSize(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1018,10 +1165,11 @@ static PyObject *_wrap_delete_wxSize(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1046,10 +1194,11 @@ static PyObject *_wrap_wxSize_Set(PyObject *self, PyObject *args, PyObject *kwar return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxSize_Set(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSize_Set(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1073,10 +1222,11 @@ static PyObject *_wrap_wxSize_GetX(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_GetX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_GetX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1099,10 +1249,11 @@ static PyObject *_wrap_wxSize_GetY(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_GetY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_GetY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1125,10 +1276,11 @@ static PyObject *_wrap_wxSize_GetWidth(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_GetWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_GetWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1151,10 +1303,11 @@ static PyObject *_wrap_wxSize_GetHeight(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxSize_GetHeight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxSize_GetHeight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1177,10 +1330,11 @@ static PyObject *_wrap_wxSize_SetWidth(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxSize_SetWidth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSize_SetWidth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1204,10 +1358,11 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxSize_SetHeight(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSize_SetHeight(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1236,16 +1391,56 @@ static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxSize_asTuple(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxSize_asTuple(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; } return _resultobj; } +static int wxSize___cmp__(wxSize *self,const wxSize * sz) { + if (! sz) return 1; + if (*self == *sz) return 0; + return -1; + } +static PyObject *_wrap_wxSize___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxSize * _arg0; + wxSize * _arg1; + wxSize temp; + PyObject * _obj0 = 0; + wxSize temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","sz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSize___cmp__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxSize_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSize___cmp__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxRealPoint_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1265,10 +1460,11 @@ static PyObject *_wrap_wxRealPoint_x_set(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (double )wxRealPoint_x_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxRealPoint_x_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("d",_result); return _resultobj; } @@ -1291,10 +1487,11 @@ static PyObject *_wrap_wxRealPoint_x_get(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (double )wxRealPoint_x_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxRealPoint_x_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("d",_result); return _resultobj; } @@ -1318,10 +1515,11 @@ static PyObject *_wrap_wxRealPoint_y_set(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (double )wxRealPoint_y_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxRealPoint_y_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("d",_result); return _resultobj; } @@ -1344,10 +1542,11 @@ static PyObject *_wrap_wxRealPoint_y_get(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (double )wxRealPoint_y_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxRealPoint_y_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("d",_result); return _resultobj; } @@ -1365,10 +1564,11 @@ static PyObject *_wrap_new_wxRealPoint(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|dd:new_wxRealPoint",_kwnames,&_arg0,&_arg1)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRealPoint *)new_wxRealPoint(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRealPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1396,10 +1596,11 @@ static PyObject *_wrap_delete_wxRealPoint(PyObject *self, PyObject *args, PyObje return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRealPoint(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxRealPoint(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1427,10 +1628,11 @@ static PyObject *_wrap_wxRealPoint_Set(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRealPoint_Set(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRealPoint_Set(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1459,10 +1661,11 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxRealPoint_asTuple(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxRealPoint_asTuple(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; } @@ -1499,10 +1702,11 @@ static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -1538,18 +1742,20 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRealPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } static int wxRealPoint___cmp__(wxRealPoint *self,const wxRealPoint * p) { - if (! p) return 0; - return *self == *p; + if (! p) return 1; + if (*self == *p) return 0; + return -1; } static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1576,10 +1782,11 @@ static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRealPoint___cmp__(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1603,10 +1810,11 @@ static PyObject *_wrap_wxPoint_x_set(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxPoint_x_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPoint_x_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1629,10 +1837,11 @@ static PyObject *_wrap_wxPoint_x_get(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxPoint_x_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPoint_x_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1656,10 +1865,11 @@ static PyObject *_wrap_wxPoint_y_set(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxPoint_y_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPoint_y_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1682,10 +1892,11 @@ static PyObject *_wrap_wxPoint_y_get(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxPoint_y_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPoint_y_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; } @@ -1703,10 +1914,11 @@ static PyObject *_wrap_new_wxPoint(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ll:new_wxPoint",_kwnames,&_arg0,&_arg1)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxPoint *)new_wxPoint(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPoint *)new_wxPoint(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1734,10 +1946,11 @@ static PyObject *_wrap_delete_wxPoint(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxPoint(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxPoint(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1765,10 +1978,11 @@ static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxPoint_Set(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint_Set(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1797,10 +2011,11 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxPoint_asTuple(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxPoint_asTuple(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; } @@ -1837,10 +2052,11 @@ static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -1876,18 +2092,20 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } static int wxPoint___cmp__(wxPoint *self,const wxPoint * p) { - if (! p) return 0; - return *self == *p; + if (! p) return 1; + if (*self == *p) return 0; + return -1; } static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1914,10 +2132,11 @@ static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPoint___cmp__(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPoint___cmp__(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -1937,10 +2156,11 @@ static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxRect",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRect *)new_wxRect(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1968,10 +2188,11 @@ static PyObject *_wrap_delete_wxRect(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRect(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxRect(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -1995,10 +2216,11 @@ static PyObject *_wrap_wxRect_GetX(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2021,10 +2243,11 @@ static PyObject *_wrap_wxRect_SetX(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetX(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetX(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2048,10 +2271,11 @@ static PyObject *_wrap_wxRect_GetY(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2074,10 +2298,11 @@ static PyObject *_wrap_wxRect_SetY(PyObject *self, PyObject *args, PyObject *kwa return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetY(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetY(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2101,10 +2326,11 @@ static PyObject *_wrap_wxRect_GetWidth(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2127,10 +2353,11 @@ static PyObject *_wrap_wxRect_SetWidth(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetWidth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetWidth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2154,10 +2381,11 @@ static PyObject *_wrap_wxRect_GetHeight(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetHeight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetHeight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2180,10 +2408,11 @@ static PyObject *_wrap_wxRect_SetHeight(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetHeight(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetHeight(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2208,10 +2437,11 @@ static PyObject *_wrap_wxRect_GetPosition(PyObject *self, PyObject *args, PyObje return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxRect_GetPosition(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPoint (wxRect_GetPosition(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -2236,10 +2466,11 @@ static PyObject *_wrap_wxRect_GetSize(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxRect_GetSize(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxRect_GetSize(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; @@ -2263,10 +2494,11 @@ static PyObject *_wrap_wxRect_GetLeft(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetLeft(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetLeft(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2289,10 +2521,11 @@ static PyObject *_wrap_wxRect_GetTop(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetTop(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetTop(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2315,10 +2548,11 @@ static PyObject *_wrap_wxRect_GetBottom(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetBottom(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetBottom(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2341,10 +2575,11 @@ static PyObject *_wrap_wxRect_GetRight(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_GetRight(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_GetRight(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2367,10 +2602,11 @@ static PyObject *_wrap_wxRect_SetLeft(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetLeft(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetLeft(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2394,10 +2630,11 @@ static PyObject *_wrap_wxRect_SetRight(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetRight(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetRight(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2421,10 +2658,11 @@ static PyObject *_wrap_wxRect_SetTop(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetTop(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetTop(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2448,10 +2686,11 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_SetBottom(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_SetBottom(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2476,10 +2715,11 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxRect_Inflate(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_Inflate(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2505,10 +2745,11 @@ static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *k return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2532,10 +2773,11 @@ static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_x_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_x_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2558,10 +2800,11 @@ static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_x_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_x_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2585,10 +2828,11 @@ static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_y_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_y_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2611,10 +2855,11 @@ static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kw return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_y_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_y_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2638,10 +2883,11 @@ static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_width_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_width_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2664,10 +2910,11 @@ static PyObject *_wrap_wxRect_width_get(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_width_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_width_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2691,10 +2938,11 @@ static PyObject *_wrap_wxRect_height_set(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_height_set(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_height_set(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2717,10 +2965,11 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect_height_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_height_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -2750,10 +2999,11 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxRect_asTuple(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxRect_asTuple(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; } @@ -2790,18 +3040,20 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRect___add__(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxRect___add__(_arg0,_arg1)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } static int wxRect___cmp__(wxRect *self,const wxRect * rect) { - if (! rect) return 0; - return *self == *rect; + if (! rect) return 1; + if (*self == *rect) return 0; + return -1; } static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2828,14 +3080,23 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRect___cmp__(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect___cmp__(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } +static void *SwigwxIndividualLayoutConstraintTowxObject(void *ptr) { + wxIndividualLayoutConstraint *src; + wxObject *dest; + src = (wxIndividualLayoutConstraint *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define wxIndividualLayoutConstraint_Above(_swigobj,_swigarg0,_swigarg1) (_swigobj->Above(_swigarg0,_swigarg1)) static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2864,10 +3125,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Above(PyObject *self, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_Above(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2892,10 +3154,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Absolute(PyObject *self, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_Absolute(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2919,10 +3182,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_AsIs(PyObject *self, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_AsIs(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_AsIs(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2956,10 +3220,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Below(PyObject *self, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_Below(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -2983,10 +3248,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Unconstrained(PyObject *self } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_Unconstrained(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_Unconstrained(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -3020,10 +3286,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_LeftOf(PyObject *self, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_LeftOf(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -3058,10 +3325,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_PercentOf(PyObject *self, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_PercentOf(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -3095,10 +3363,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_RightOf(PyObject *self, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_RightOf(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -3133,10 +3402,11 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_SameAs(PyObject *self, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_SameAs(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -3173,15 +3443,24 @@ static PyObject *_wrap_wxIndividualLayoutConstraint_Set(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxIndividualLayoutConstraint_Set(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } +static void *SwigwxLayoutConstraintsTowxObject(void *ptr) { + wxLayoutConstraints *src; + wxObject *dest; + src = (wxLayoutConstraints *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxLayoutConstraints() (new wxLayoutConstraints()) static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3193,10 +3472,11 @@ static PyObject *_wrap_new_wxLayoutConstraints(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLayoutConstraints",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLayoutConstraints *)new_wxLayoutConstraints(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxLayoutConstraints_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3227,10 +3507,11 @@ static PyObject *_wrap_wxLayoutConstraints_bottom_get(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_bottom_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3261,10 +3542,11 @@ static PyObject *_wrap_wxLayoutConstraints_centreX_get(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreX_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3295,10 +3577,11 @@ static PyObject *_wrap_wxLayoutConstraints_centreY_get(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_centreY_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3329,10 +3612,11 @@ static PyObject *_wrap_wxLayoutConstraints_height_get(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_height_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3363,10 +3647,11 @@ static PyObject *_wrap_wxLayoutConstraints_left_get(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_left_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3397,10 +3682,11 @@ static PyObject *_wrap_wxLayoutConstraints_right_get(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_right_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3431,10 +3717,11 @@ static PyObject *_wrap_wxLayoutConstraints_top_get(PyObject *self, PyObject *arg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_top_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3465,10 +3752,11 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxIndividualLayoutConstraint *)wxLayoutConstraints_width_get(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxIndividualLayoutConstraint_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -3479,27 +3767,27 @@ static PyObject *_wrap_wxLayoutConstraints_width_get(PyObject *self, PyObject *a return _resultobj; } -#define new_wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxRegion(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2) (new wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegion * _result; - long _arg0 = (long ) 0; - long _arg1 = (long ) 0; - long _arg2 = (long ) 0; - long _arg3 = (long ) 0; - char *_kwnames[] = { "x","y","width","height", NULL }; + wxAcceleratorEntry * _result; + int _arg0 = (int ) 0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + char *_kwnames[] = { "flags","keyCode","cmd", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxAcceleratorEntry",_kwnames,&_arg0,&_arg1,&_arg2)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegion *)new_wxRegion(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegion_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -3508,1167 +3796,169 @@ static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define delete_wxRegion(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxAcceleratorEntry(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegion * _arg0; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxRegion",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxAcceleratorEntry",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRegion. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxAcceleratorEntry. Expected _wxAcceleratorEntry_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRegion(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxAcceleratorEntry(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } -#define wxRegion_Clear(_swigobj) (_swigobj->Clear()) -static PyObject *_wrap_wxRegion_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegion * _arg0; + wxAcceleratorEntry * _arg0; + int _arg1; + int _arg2; + int _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","flags","keyCode","Cmd", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_Clear",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxAcceleratorEntry_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Clear. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_Set. Expected _wxAcceleratorEntry_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - wxRegion_Clear(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } -#define wxRegion_Contains(_swigobj,_swigarg0,_swigarg1) (_swigobj->Contains(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_GetFlags(_swigobj) (_swigobj->GetFlags()) +static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - long _arg1; - long _arg2; + int _result; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxRegion_Contains",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetFlags",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Contains. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetFlags. Expected _wxAcceleratorEntry_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_Contains(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxAcceleratorEntry_GetFlags(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxRegion_ContainsPoint(_swigobj,_swigarg0) (_swigobj->Contains(_swigarg0)) -static PyObject *_wrap_wxRegion_ContainsPoint(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) +static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - wxPoint * _arg1; + int _result; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; - wxPoint temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","pt", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_ContainsPoint",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetKeyCode",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsPoint. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetKeyCode. Expected _wxAcceleratorEntry_p."); return NULL; } } { - _arg1 = &temp; - if (! wxPoint_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsPoint(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxRegion_ContainsRect(_swigobj,_swigarg0) (_swigobj->Contains(_swigarg0)) -static PyObject *_wrap_wxRegion_ContainsRect(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxAcceleratorEntry_GetCommand(_swigobj) (_swigobj->GetCommand()) +static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - wxRect * _arg1; + int _result; + wxAcceleratorEntry * _arg0; PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_ContainsRect",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetCommand",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsRect. Expected _wxRegion_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetCommand. Expected _wxAcceleratorEntry_p."); return NULL; } } { - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxAcceleratorEntry_GetCommand(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxRegion_ContainsRectDim(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Contains(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, PyObject *kwargs) { +static void *SwigwxAcceleratorTableTowxObject(void *ptr) { + wxAcceleratorTable *src; + wxObject *dest; + src = (wxAcceleratorTable *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxAcceleratorTable(_swigarg0,_swigarg1) (new wxAcceleratorTable(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxRegionContain _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","w","h", NULL }; + wxAcceleratorTable * _result; + int _arg0; + wxAcceleratorEntry * _arg1; + PyObject * _obj1 = 0; + char *_kwnames[] = { "choices", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_ContainsRectDim",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_ContainsRectDim. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionContain )wxRegion_ContainsRectDim(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_GetBox(_swigobj) (_swigobj->GetBox()) -static PyObject *_wrap_wxRegion_GetBox(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRect * _result; - wxRegion * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_GetBox",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_GetBox. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRegion_GetBox(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRegion_Intersect(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Intersect(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Intersect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Intersect. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Intersect(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_IntersectRect(_swigobj,_swigarg0) (_swigobj->Intersect(_swigarg0)) -static PyObject *_wrap_wxRegion_IntersectRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_IntersectRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IntersectRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IntersectRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_IntersectRegion(_swigobj,_swigarg0) (_swigobj->Intersect(_swigarg0)) -static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_IntersectRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IntersectRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_IntersectRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IntersectRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_IsEmpty(_swigobj) (_swigobj->IsEmpty()) -static PyObject *_wrap_wxRegion_IsEmpty(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegion_IsEmpty",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_IsEmpty. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_IsEmpty(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_Union(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Union(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Union",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Union. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Union(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_UnionRect(_swigobj,_swigarg0) (_swigobj->Union(_swigarg0)) -static PyObject *_wrap_wxRegion_UnionRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_UnionRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_UnionRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_UnionRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_UnionRegion(_swigobj,_swigarg0) (_swigobj->Union(_swigarg0)) -static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_UnionRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_UnionRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_UnionRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_UnionRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_Subtract(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Subtract(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Subtract",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Subtract. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Subtract(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_SubtractRect(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) -static PyObject *_wrap_wxRegion_SubtractRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_SubtractRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_SubtractRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_SubtractRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_SubtractRegion(_swigobj,_swigarg0) (_swigobj->Subtract(_swigarg0)) -static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_SubtractRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_SubtractRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_SubtractRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_SubtractRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_Xor(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->Xor(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Xor",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_Xor. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_Xor(_arg0,_arg1,_arg2,_arg3,_arg4); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_XorRect(_swigobj,_swigarg0) (_swigobj->Xor(_swigarg0)) -static PyObject *_wrap_wxRegion_XorRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRect * _arg1; - PyObject * _argo0 = 0; - wxRect temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_XorRect",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_XorRect. Expected _wxRegion_p."); - return NULL; - } - } -{ - _arg1 = &temp; - if (! wxRect_helper(_obj1, &_arg1)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_XorRect(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegion_XorRegion(_swigobj,_swigarg0) (_swigobj->Xor(_swigarg0)) -static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegion * _arg0; - wxRegion * _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","region", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRegion_XorRegion",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegion_XorRegion. Expected _wxRegion_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_XorRegion. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegion_XorRegion(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxRegionIterator(_swigarg0) (new wxRegionIterator(_swigarg0)) -static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _result; - wxRegion * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "region", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxRegionIterator",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRegionIterator. Expected _wxRegion_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRegionIterator *)new_wxRegionIterator(*_arg0); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxRegionIterator_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxRegionIterator(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxRegionIterator",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxRegionIterator. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxRegionIterator(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxRegionIterator_GetX(_swigobj) (_swigobj->GetX()) -static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetX",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetX. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetX(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetY(_swigobj) (_swigobj->GetY()) -static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetY",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetY. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetY(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetW(_swigobj) (_swigobj->GetW()) -static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetW",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetW. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetW(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetWidth(_swigobj) (_swigobj->GetWidth()) -static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetWidth",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetWidth. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetWidth(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetH(_swigobj) (_swigobj->GetH()) -static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetH",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetH. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetH(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetHeight(_swigobj) (_swigobj->GetHeight()) -static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetHeight",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetHeight. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxRegionIterator_GetHeight(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -#define wxRegionIterator_GetRect(_swigobj) (_swigobj->GetRect()) -static PyObject *_wrap_wxRegionIterator_GetRect(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRect * _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_GetRect",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_GetRect. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxRegionIterator_GetRect(_arg0)); - - wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -#define wxRegionIterator_HaveRects(_swigobj) (_swigobj->HaveRects()) -static PyObject *_wrap_wxRegionIterator_HaveRects(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_HaveRects",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_HaveRects. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRegionIterator_HaveRects(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxRegionIterator_Reset(_swigobj) (_swigobj->Reset()) -static PyObject *_wrap_wxRegionIterator_Reset(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_Reset",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_Reset. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxRegionIterator_Reset(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static void wxRegionIterator_Next(wxRegionIterator *self) { - (*self) ++; - } -static PyObject *_wrap_wxRegionIterator_Next(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxRegionIterator * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRegionIterator_Next",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegionIterator_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRegionIterator_Next. Expected _wxRegionIterator_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxRegionIterator_Next(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define new_wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2) (new wxAcceleratorEntry(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorEntry * _result; - int _arg0 = (int ) 0; - int _arg1 = (int ) 0; - int _arg2 = (int ) 0; - char *_kwnames[] = { "flags","keyCode","cmd", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iii:new_wxAcceleratorEntry",_kwnames,&_arg0,&_arg1,&_arg2)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxAcceleratorEntry *)new_wxAcceleratorEntry(_arg0,_arg1,_arg2); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorEntry_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define delete_wxAcceleratorEntry(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxAcceleratorEntry(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxAcceleratorEntry",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxAcceleratorEntry. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - delete_wxAcceleratorEntry(_arg0); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxAcceleratorEntry_Set(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->Set(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxAcceleratorEntry_Set(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorEntry * _arg0; - int _arg1; - int _arg2; - int _arg3; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","flags","keyCode","Cmd", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxAcceleratorEntry_Set",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_Set. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxAcceleratorEntry_Set(_arg0,_arg1,_arg2,_arg3); - - wxPy_END_ALLOW_THREADS; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxAcceleratorEntry_GetFlags(_swigobj) (_swigobj->GetFlags()) -static PyObject *_wrap_wxAcceleratorEntry_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetFlags",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetFlags. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxAcceleratorEntry_GetFlags(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxAcceleratorEntry_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) -static PyObject *_wrap_wxAcceleratorEntry_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetKeyCode",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetKeyCode. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxAcceleratorEntry_GetKeyCode(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxAcceleratorEntry_GetCommand(_swigobj) (_swigobj->GetCommand()) -static PyObject *_wrap_wxAcceleratorEntry_GetCommand(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxAcceleratorEntry * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxAcceleratorEntry_GetCommand",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxAcceleratorEntry_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxAcceleratorEntry_GetCommand. Expected _wxAcceleratorEntry_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxAcceleratorEntry_GetCommand(_arg0); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define new_wxAcceleratorTable(_swigarg0,_swigarg1) (new wxAcceleratorTable(_swigarg0,_swigarg1)) -static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxAcceleratorTable * _result; - int _arg0; - wxAcceleratorEntry * _arg1; - PyObject * _obj1 = 0; - char *_kwnames[] = { "choices", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxAcceleratorTable",_kwnames,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxAcceleratorTable",_kwnames,&_obj1)) return NULL; if (_obj1) { @@ -4686,10 +3976,11 @@ static PyObject *_wrap_new_wxAcceleratorTable(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxAcceleratorTable *)new_wxAcceleratorTable(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxAcceleratorTable_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -4721,15 +4012,24 @@ static PyObject *_wrap_delete_wxAcceleratorTable(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxAcceleratorTable(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxAcceleratorTable(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } +static void *SwigwxBusyInfoTowxObject(void *ptr) { + wxBusyInfo *src; + wxObject *dest; + src = (wxBusyInfo *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxBusyInfo(_swigarg0) (new wxBusyInfo(_swigarg0)) static PyObject *_wrap_new_wxBusyInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4743,28 +4043,16 @@ 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, "String or Unicode type required"); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) 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 } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBusyInfo *)new_wxBusyInfo(*_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBusyInfo_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -4797,10 +4085,11 @@ static PyObject *_wrap_delete_wxBusyInfo(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxBusyInfo(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxBusyInfo(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; @@ -4817,39 +4106,6 @@ static PyMethodDef misccMethods[] = { { "wxAcceleratorEntry_Set", (PyCFunction) _wrap_wxAcceleratorEntry_Set, METH_VARARGS | METH_KEYWORDS }, { "delete_wxAcceleratorEntry", (PyCFunction) _wrap_delete_wxAcceleratorEntry, METH_VARARGS | METH_KEYWORDS }, { "new_wxAcceleratorEntry", (PyCFunction) _wrap_new_wxAcceleratorEntry, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_Next", (PyCFunction) _wrap_wxRegionIterator_Next, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_Reset", (PyCFunction) _wrap_wxRegionIterator_Reset, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_HaveRects", (PyCFunction) _wrap_wxRegionIterator_HaveRects, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetRect", (PyCFunction) _wrap_wxRegionIterator_GetRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetHeight", (PyCFunction) _wrap_wxRegionIterator_GetHeight, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetH", (PyCFunction) _wrap_wxRegionIterator_GetH, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetWidth", (PyCFunction) _wrap_wxRegionIterator_GetWidth, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetW", (PyCFunction) _wrap_wxRegionIterator_GetW, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetY", (PyCFunction) _wrap_wxRegionIterator_GetY, METH_VARARGS | METH_KEYWORDS }, - { "wxRegionIterator_GetX", (PyCFunction) _wrap_wxRegionIterator_GetX, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxRegionIterator", (PyCFunction) _wrap_delete_wxRegionIterator, METH_VARARGS | METH_KEYWORDS }, - { "new_wxRegionIterator", (PyCFunction) _wrap_new_wxRegionIterator, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_XorRegion", (PyCFunction) _wrap_wxRegion_XorRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_XorRect", (PyCFunction) _wrap_wxRegion_XorRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Xor", (PyCFunction) _wrap_wxRegion_Xor, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_SubtractRegion", (PyCFunction) _wrap_wxRegion_SubtractRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_SubtractRect", (PyCFunction) _wrap_wxRegion_SubtractRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Subtract", (PyCFunction) _wrap_wxRegion_Subtract, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_UnionRegion", (PyCFunction) _wrap_wxRegion_UnionRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_UnionRect", (PyCFunction) _wrap_wxRegion_UnionRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Union", (PyCFunction) _wrap_wxRegion_Union, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_IsEmpty", (PyCFunction) _wrap_wxRegion_IsEmpty, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_IntersectRegion", (PyCFunction) _wrap_wxRegion_IntersectRegion, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_IntersectRect", (PyCFunction) _wrap_wxRegion_IntersectRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Intersect", (PyCFunction) _wrap_wxRegion_Intersect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_GetBox", (PyCFunction) _wrap_wxRegion_GetBox, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_ContainsRectDim", (PyCFunction) _wrap_wxRegion_ContainsRectDim, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_ContainsRect", (PyCFunction) _wrap_wxRegion_ContainsRect, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_ContainsPoint", (PyCFunction) _wrap_wxRegion_ContainsPoint, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Contains", (PyCFunction) _wrap_wxRegion_Contains, METH_VARARGS | METH_KEYWORDS }, - { "wxRegion_Clear", (PyCFunction) _wrap_wxRegion_Clear, METH_VARARGS | METH_KEYWORDS }, - { "delete_wxRegion", (PyCFunction) _wrap_delete_wxRegion, METH_VARARGS | METH_KEYWORDS }, - { "new_wxRegion", (PyCFunction) _wrap_new_wxRegion, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutConstraints_width_get", (PyCFunction) _wrap_wxLayoutConstraints_width_get, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutConstraints_top_get", (PyCFunction) _wrap_wxLayoutConstraints_top_get, METH_VARARGS | METH_KEYWORDS }, { "wxLayoutConstraints_right_get", (PyCFunction) _wrap_wxLayoutConstraints_right_get, METH_VARARGS | METH_KEYWORDS }, @@ -4924,6 +4180,7 @@ static PyMethodDef misccMethods[] = { { "wxRealPoint_y_set", (PyCFunction) _wrap_wxRealPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_x_get", (PyCFunction) _wrap_wxRealPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_x_set", (PyCFunction) _wrap_wxRealPoint_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxSize___cmp__", (PyCFunction) _wrap_wxSize___cmp__, METH_VARARGS | METH_KEYWORDS }, { "wxSize_asTuple", (PyCFunction) _wrap_wxSize_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxSize_SetHeight", (PyCFunction) _wrap_wxSize_SetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxSize_SetWidth", (PyCFunction) _wrap_wxSize_SetWidth, METH_VARARGS | METH_KEYWORDS }, @@ -4942,7 +4199,10 @@ static PyMethodDef misccMethods[] = { { "wxSize_y_set", (PyCFunction) _wrap_wxSize_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_get", (PyCFunction) _wrap_wxSize_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxSize_x_set", (PyCFunction) _wrap_wxSize_x_set, METH_VARARGS | METH_KEYWORDS }, + { "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 }, + { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS }, @@ -4981,7 +4241,6 @@ static PyMethodDef misccMethods[] = { * This table is used by the pointer type-checker */ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { - { "_wxAcceleratorTable","_class_wxAcceleratorTable",0}, { "_signed_long","_long",0}, { "_wxPrintQuality","_wxCoord",0}, { "_wxPrintQuality","_int",0}, @@ -4992,12 +4251,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, - { "_class_wxRegionIterator","_wxRegionIterator",0}, - { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -5005,7 +4261,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, - { "_class_wxRealPoint","_wxRealPoint",0}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, { "_uint","_time_t",0}, @@ -5014,36 +4269,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_uint","_int",0}, { "_uint","_wxWindowID",0}, { "_wxChar","_char",0}, - { "_wxRect","_class_wxRect",0}, - { "_wxPoint","_class_wxPoint",0}, { "_char","_wxChar",0}, - { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, { "_EBool","_signed_int",0}, { "_EBool","_int",0}, { "_EBool","_wxWindowID",0}, - { "_class_wxRegion","_wxRegion",0}, { "_unsigned_long","_long",0}, - { "_class_wxRect","_wxRect",0}, - { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, { "_signed_int","_wxPrintQuality",0}, { "_signed_int","_EBool",0}, { "_signed_int","_wxWindowID",0}, { "_signed_int","_int",0}, - { "_wxLayoutConstraints","_class_wxLayoutConstraints",0}, { "_WXTYPE","_short",0}, { "_WXTYPE","_signed_short",0}, { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_wxBusyInfo","_class_wxBusyInfo",0}, - { "_class_wxPoint","_wxPoint",0}, - { "_wxRealPoint","_class_wxRealPoint",0}, + { "_wxObject","_wxBusyInfo",SwigwxBusyInfoTowxObject}, + { "_wxObject","_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, + { "_wxObject","_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, + { "_wxObject","_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, - { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0}, { "_unsigned_char","_byte",0}, { "_unsigned_int","_wxCoord",0}, { "_unsigned_int","_wxPrintQuality",0}, @@ -5080,9 +4328,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_time_t","_wxWindowID",0}, { "_time_t","_uint",0}, { "_time_t","_size_t",0}, - { "_wxSize","_class_wxSize",0}, - { "_wxRegionIterator","_class_wxRegionIterator",0}, - { "_class_wxLayoutConstraints","_wxLayoutConstraints",0}, { "_wxCoord","_int",0}, { "_wxCoord","_signed_int",0}, { "_wxCoord","_unsigned_int",0}, @@ -5092,9 +4337,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_size_t",0}, { "_wxCoord","_time_t",0}, { "_wxCoord","_wxPrintQuality",0}, - { "_wxRegion","_class_wxRegion",0}, - { "_class_wxBusyInfo","_wxBusyInfo",0}, - { "_class_wxSize","_wxSize",0}, {0,0,0}}; static PyObject *SWIG_globals; @@ -5125,9 +4367,6 @@ SWIGEXPORT(void) initmiscc() { PyDict_SetItemString(d,"wxRightOf", PyInt_FromLong((long) wxRightOf)); PyDict_SetItemString(d,"wxSameAs", PyInt_FromLong((long) wxSameAs)); PyDict_SetItemString(d,"wxAbsolute", PyInt_FromLong((long) wxAbsolute)); - PyDict_SetItemString(d,"wxOutRegion", PyInt_FromLong((long) wxOutRegion)); - PyDict_SetItemString(d,"wxPartRegion", PyInt_FromLong((long) wxPartRegion)); - PyDict_SetItemString(d,"wxInRegion", PyInt_FromLong((long) wxInRegion)); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxNullAcceleratorTable",_wrap_wxNullAcceleratorTable_get, _wrap_wxNullAcceleratorTable_set); {