X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/742fc581e46beca2328551cdaec38c3dfca50cb1..6824d4f9e0f6e7d97124a47ab2d75a551ed209ac:/wxPython/src/mac/controls.cpp diff --git a/wxPython/src/mac/controls.cpp b/wxPython/src/mac/controls.cpp index 56db572973..8d20ad5467 100644 --- a/wxPython/src/mac/controls.cpp +++ b/wxPython/src/mac/controls.cpp @@ -74,7 +74,6 @@ extern PyObject *SWIG_newvarlink(void); #endif - static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; @@ -100,12 +99,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } - -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif #ifdef __cplusplus extern "C" { #endif @@ -198,10 +191,10 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); @@ -224,10 +217,10 @@ static PyObject *_wrap_new_wxPreControl(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreControl",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxControl *)new_wxPreControl(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxControl *)new_wxPreControl(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p"); @@ -297,10 +290,10 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -333,10 +326,10 @@ static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxControl_Command(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControl_Command(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -362,13 +355,17 @@ static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxControl_GetLabel(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxControl_GetLabel(_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; @@ -396,28 +393,15 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxControl_SetLabel(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControl_SetLabel(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -479,10 +463,10 @@ static PyObject *_wrap_wxControlWithItems_Delete(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxControlWithItems_Delete(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_Delete(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -508,10 +492,10 @@ static PyObject *_wrap_wxControlWithItems_GetCount(PyObject *self, PyObject *arg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxControlWithItems_GetCount(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxControlWithItems_GetCount(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -537,13 +521,17 @@ static PyObject *_wrap_wxControlWithItems_GetString(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); - 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; @@ -572,28 +560,15 @@ static PyObject *_wrap_wxControlWithItems_SetString(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxControlWithItems_SetString(_arg0,_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_SetString(_arg0,_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -625,28 +600,15 @@ static PyObject *_wrap_wxControlWithItems_FindString(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -675,10 +637,10 @@ static PyObject *_wrap_wxControlWithItems_Select(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxControlWithItems_Select(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_Select(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -704,10 +666,10 @@ static PyObject *_wrap_wxControlWithItems_GetSelection(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxControlWithItems_GetSelection(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxControlWithItems_GetSelection(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -732,13 +694,17 @@ static PyObject *_wrap_wxControlWithItems_GetStringSelection(PyObject *self, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxControlWithItems_GetStringSelection(_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; @@ -774,32 +740,19 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { _arg2 = _obj2; } { - wxPy_BEGIN_ALLOW_THREADS; - wxControlWithItems_Append(_arg0,*_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_Append(_arg0,*_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -839,10 +792,10 @@ static PyObject *_wrap_wxControlWithItems_GetClientData(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -877,13 +830,67 @@ static PyObject *_wrap_wxControlWithItems_SetClientData(PyObject *self, PyObject _arg2 = _obj2; } { - wxPy_BEGIN_ALLOW_THREADS; - wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxControlWithItems_AppendItems(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) +static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxControlWithItems * _arg0; + wxArrayString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strings", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxControlWithItems_AppendItems",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxControlWithItems_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControlWithItems_AppendItems. Expected _wxControlWithItems_p."); + return NULL; + } + } +{ + if (! PySequence_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "Sequence of strings expected."); + return NULL; + } + _arg1 = new wxArrayString; + int i, len=PySequence_Length(_obj1); + for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else + PyObject* str = PyObject_Str(item); + _arg1->Add(PyString_AsString(str)); +#endif + Py_DECREF(item); + Py_DECREF(str); + } +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_AppendItems(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -952,22 +959,9 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -989,10 +983,10 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); @@ -1019,10 +1013,10 @@ static PyObject *_wrap_new_wxPreButton(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreButton",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxButton *)new_wxPreButton(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxButton *)new_wxPreButton(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxButton_p"); @@ -1075,22 +1069,9 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -1112,10 +1093,10 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -1143,10 +1124,10 @@ static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxButton_SetDefault(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxButton_SetDefault(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1179,10 +1160,10 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxButton_SetBackgroundColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxButton_SetBackgroundColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1215,10 +1196,10 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxButton_SetForegroundColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxButton_SetForegroundColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1235,10 +1216,10 @@ static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxButton_GetDefaultSize",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxButton::GetDefaultSize()); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxButton::GetDefaultSize()); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1344,10 +1325,10 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); @@ -1370,10 +1351,10 @@ static PyObject *_wrap_new_wxPreBitmapButton(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreBitmapButton",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxBitmapButton *)new_wxPreBitmapButton(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)new_wxPreBitmapButton(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); @@ -1452,10 +1433,10 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1481,19 +1462,13 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapLabel(_arg0); - _result = (wxBitmap *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1517,19 +1492,13 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapDisabled(_arg0); - _result = (wxBitmap *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1553,19 +1522,13 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapFocus(_arg0); - _result = (wxBitmap *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1589,19 +1552,13 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmap & _result_ref = wxBitmapButton_GetBitmapSelected(_arg0); - _result = (wxBitmap *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -1632,10 +1589,10 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1669,10 +1626,10 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1706,10 +1663,10 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1743,10 +1700,10 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1773,10 +1730,10 @@ static PyObject *_wrap_wxBitmapButton_SetMargins(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1802,10 +1759,10 @@ static PyObject *_wrap_wxBitmapButton_GetMarginX(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxBitmapButton_GetMarginX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBitmapButton_GetMarginX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1830,10 +1787,10 @@ static PyObject *_wrap_wxBitmapButton_GetMarginY(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxBitmapButton_GetMarginY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxBitmapButton_GetMarginY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1904,22 +1861,9 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1941,10 +1885,10 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckBox_p"); @@ -1971,10 +1915,10 @@ static PyObject *_wrap_new_wxPreCheckBox(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreCheckBox",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCheckBox *)new_wxPreCheckBox(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCheckBox *)new_wxPreCheckBox(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckBox_p"); @@ -2027,22 +1971,9 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -2064,10 +1995,10 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -2096,10 +2027,10 @@ static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCheckBox_GetValue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCheckBox_GetValue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2126,10 +2057,10 @@ static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args, PyObj } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxCheckBox_SetValue(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxCheckBox_SetValue(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2244,10 +2175,10 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxChoice_p"); @@ -2273,10 +2204,10 @@ static PyObject *_wrap_new_wxPreChoice(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreChoice",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxChoice *)new_wxPreChoice(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxChoice *)new_wxPreChoice(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxChoice_p"); @@ -2364,10 +2295,10 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -2394,10 +2325,10 @@ static PyObject *_wrap_wxChoice_Clear(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxChoice_Clear(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxChoice_Clear(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2423,10 +2354,10 @@ static PyObject *_wrap_wxChoice_GetColumns(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxChoice_GetColumns(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxChoice_GetColumns(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2451,10 +2382,10 @@ static PyObject *_wrap_wxChoice_SetColumns(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxChoice_SetColumns(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxChoice_SetColumns(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2480,10 +2411,10 @@ static PyObject *_wrap_wxChoice_SetSelection(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxChoice_SetSelection(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxChoice_SetSelection(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2510,28 +2441,15 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxChoice_SetStringSelection(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxChoice_SetStringSelection(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2563,28 +2481,15 @@ static PyObject *_wrap_wxChoice_SetString(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxChoice_SetString(_arg0,_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxChoice_SetString(_arg0,_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2712,10 +2617,10 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxComboBox_p"); @@ -2741,10 +2646,10 @@ static PyObject *_wrap_new_wxPreComboBox(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreComboBox",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxComboBox *)new_wxPreComboBox(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxComboBox *)new_wxPreComboBox(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxComboBox_p"); @@ -2833,10 +2738,10 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -2863,10 +2768,10 @@ static PyObject *_wrap_wxComboBox_Copy(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_Copy(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_Copy(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2891,10 +2796,10 @@ static PyObject *_wrap_wxComboBox_Cut(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_Cut(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_Cut(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -2920,10 +2825,10 @@ static PyObject *_wrap_wxComboBox_GetInsertionPoint(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxComboBox_GetInsertionPoint(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxComboBox_GetInsertionPoint(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -2948,10 +2853,10 @@ static PyObject *_wrap_wxComboBox_GetLastPosition(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxComboBox_GetLastPosition(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxComboBox_GetLastPosition(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -2976,13 +2881,17 @@ static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxComboBox_GetValue(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxComboBox_GetValue(_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; @@ -3008,10 +2917,10 @@ static PyObject *_wrap_wxComboBox_Paste(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_Paste(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_Paste(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3040,28 +2949,15 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3092,10 +2988,10 @@ static PyObject *_wrap_wxComboBox_Remove(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_Remove(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_Remove(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3121,10 +3017,10 @@ static PyObject *_wrap_wxComboBox_SetInsertionPoint(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_SetInsertionPoint(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_SetInsertionPoint(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3149,10 +3045,10 @@ static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_SetInsertionPointEnd(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_SetInsertionPointEnd(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3178,10 +3074,10 @@ static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_SetSelection(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_SetSelection(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3208,10 +3104,10 @@ static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_SetMark(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_SetMark(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3238,28 +3134,15 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_SetValue(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_SetValue(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3291,10 +3174,10 @@ static PyObject *_wrap_wxComboBox_SetEditable(PyObject *self, PyObject *args, Py } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxComboBox_SetEditable(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxComboBox_SetEditable(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3384,10 +3267,10 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxGauge_p"); @@ -3410,10 +3293,10 @@ static PyObject *_wrap_new_wxPreGauge(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreGauge",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxGauge *)new_wxPreGauge(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGauge *)new_wxPreGauge(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxGauge_p"); @@ -3484,10 +3367,10 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -3512,10 +3395,10 @@ static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGauge_GetBezelFace(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGauge_GetBezelFace(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -3540,10 +3423,10 @@ static PyObject *_wrap_wxGauge_GetRange(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGauge_GetRange(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGauge_GetRange(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -3568,10 +3451,10 @@ static PyObject *_wrap_wxGauge_GetShadowWidth(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGauge_GetShadowWidth(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGauge_GetShadowWidth(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -3596,10 +3479,10 @@ static PyObject *_wrap_wxGauge_GetValue(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxGauge_GetValue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGauge_GetValue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -3624,10 +3507,10 @@ static PyObject *_wrap_wxGauge_SetBezelFace(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGauge_SetBezelFace(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGauge_SetBezelFace(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3653,10 +3536,10 @@ static PyObject *_wrap_wxGauge_SetRange(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGauge_SetRange(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGauge_SetRange(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3682,10 +3565,10 @@ static PyObject *_wrap_wxGauge_SetShadowWidth(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGauge_SetShadowWidth(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGauge_SetShadowWidth(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3711,10 +3594,10 @@ static PyObject *_wrap_wxGauge_SetValue(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxGauge_SetValue(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGauge_SetValue(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -3784,22 +3667,9 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -3814,10 +3684,10 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBox_p"); @@ -3844,10 +3714,10 @@ static PyObject *_wrap_new_wxPreStaticBox(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticBox",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticBox *)new_wxPreStaticBox(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticBox *)new_wxPreStaticBox(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBox_p"); @@ -3898,22 +3768,9 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -3928,10 +3785,10 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -4014,10 +3871,10 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticLine_p"); @@ -4040,10 +3897,10 @@ static PyObject *_wrap_new_wxPreStaticLine(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticLine",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticLine *)new_wxPreStaticLine(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticLine *)new_wxPreStaticLine(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticLine_p"); @@ -4104,10 +3961,10 @@ static PyObject *_wrap_wxStaticLine_Create(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4176,22 +4033,9 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -4206,10 +4050,10 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticText_p"); @@ -4236,10 +4080,10 @@ static PyObject *_wrap_new_wxPreStaticText(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticText",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticText *)new_wxPreStaticText(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticText *)new_wxPreStaticText(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticText_p"); @@ -4290,22 +4134,9 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4320,10 +4151,10 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -4352,13 +4183,17 @@ static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxStaticText_GetLabel(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxStaticText_GetLabel(_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; @@ -4386,28 +4221,15 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxStaticText_SetLabel(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStaticText_SetLabel(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4526,10 +4348,10 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); @@ -4555,10 +4377,10 @@ static PyObject *_wrap_new_wxPreListBox(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreListBox",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxListBox *)new_wxPreListBox(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxListBox *)new_wxPreListBox(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxListBox_p"); @@ -4646,10 +4468,10 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -4676,10 +4498,10 @@ static PyObject *_wrap_wxListBox_Clear(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_Clear(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_Clear(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4705,10 +4527,10 @@ static PyObject *_wrap_wxListBox_Deselect(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_Deselect(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_Deselect(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4742,10 +4564,10 @@ static PyObject *_wrap_wxListBox_GetSelections(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (PyObject *)wxListBox_GetSelections(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxListBox_GetSelections(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ _resultobj = _result; @@ -4789,10 +4611,10 @@ static PyObject *_wrap_wxListBox_InsertItems(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4822,10 +4644,10 @@ static PyObject *_wrap_wxListBox_IsSelected(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxListBox_IsSelected(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxListBox_IsSelected(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4851,10 +4673,10 @@ static PyObject *_wrap_wxListBox_Selected(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxListBox_Selected(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxListBox_Selected(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -4896,10 +4718,10 @@ static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args, PyObject *k } } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_Set(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_Set(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4928,10 +4750,10 @@ static PyObject *_wrap_wxListBox_SetFirstItem(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_SetFirstItem(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_SetFirstItem(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -4958,28 +4780,15 @@ static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_SetFirstItemStr(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_SetFirstItemStr(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5012,10 +4821,10 @@ static PyObject *_wrap_wxListBox_SetSelection(PyObject *self, PyObject *args, Py } _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_SetSelection(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_SetSelection(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5043,28 +4852,15 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_SetString(_arg0,_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_SetString(_arg0,_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5097,29 +4893,16 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5246,10 +5029,10 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckListBox_p"); @@ -5275,10 +5058,10 @@ static PyObject *_wrap_new_wxPreCheckListBox(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreCheckListBox",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCheckListBox *)new_wxPreCheckListBox(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCheckListBox *)new_wxPreCheckListBox(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxCheckListBox_p"); @@ -5366,10 +5149,10 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -5398,10 +5181,10 @@ static PyObject *_wrap_wxCheckListBox_IsChecked(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5427,10 +5210,10 @@ static PyObject *_wrap_wxCheckListBox_Check(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxCheckListBox_Check(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxCheckListBox_Check(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5473,10 +5256,10 @@ static PyObject *_wrap_wxCheckListBox_InsertItems(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5524,10 +5307,10 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextAttr_p"); @@ -5557,10 +5340,10 @@ static PyObject *_wrap_delete_wxTextAttr(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxTextAttr(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxTextAttr(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5593,10 +5376,10 @@ static PyObject *_wrap_wxTextAttr_SetTextColour(PyObject *self, PyObject *args, return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextAttr_SetTextColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetTextColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5629,10 +5412,10 @@ static PyObject *_wrap_wxTextAttr_SetBackgroundColour(PyObject *self, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextAttr_SetBackgroundColour(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetBackgroundColour(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5666,10 +5449,10 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextAttr_SetFont(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextAttr_SetFont(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -5695,10 +5478,10 @@ static PyObject *_wrap_wxTextAttr_HasTextColour(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextAttr_HasTextColour(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasTextColour(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5723,10 +5506,10 @@ static PyObject *_wrap_wxTextAttr_HasBackgroundColour(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5751,10 +5534,10 @@ static PyObject *_wrap_wxTextAttr_HasFont(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextAttr_HasFont(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_HasFont(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -5780,19 +5563,13 @@ static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTextAttr_GetTextColour(_arg0); - _result = (wxColour *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5816,19 +5593,13 @@ static PyObject *_wrap_wxTextAttr_GetBackgroundColour(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - const wxColour & _result_ref = wxTextAttr_GetBackgroundColour(_arg0); - _result = (wxColour *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5852,19 +5623,13 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - const wxFont & _result_ref = wxTextAttr_GetFont(_arg0); - _result = (wxFont *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxFont (wxTextAttr_GetFont(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -5887,15 +5652,62 @@ static PyObject *_wrap_wxTextAttr_IsDefault(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextAttr_IsDefault(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextAttr_IsDefault(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; } +static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextAttr * _result; + wxTextAttr * _arg0; + wxTextAttr * _arg1; + wxTextCtrl * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "attr","attrDef","text", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextAttr_Combine",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_Combine. Expected _wxTextAttr_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_Combine. Expected _wxTextAttr_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTextAttr_Combine. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxTextAttr_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static void *SwigwxTextCtrlTowxControl(void *ptr) { wxTextCtrl *src; wxControl *dest; @@ -5979,10 +5791,10 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); @@ -6005,10 +5817,10 @@ static PyObject *_wrap_new_wxPreTextCtrl(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreTextCtrl",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxTextCtrl *)new_wxPreTextCtrl(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxTextCtrl *)new_wxPreTextCtrl(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); @@ -6079,10 +5891,10 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6107,13 +5919,17 @@ static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxTextCtrl_GetValue(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetValue(_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; @@ -6141,28 +5957,15 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetValue(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetValue(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6173,6 +5976,45 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxTextCtrl_GetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTextCtrl * _arg0; + long _arg1; + long _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","from","to", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_GetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetRange. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); + + 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; +} + #define wxTextCtrl_GetLineLength(_swigobj,_swigarg0) (_swigobj->GetLineLength(_swigarg0)) static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6193,10 +6035,10 @@ static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6222,13 +6064,17 @@ static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); - 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; @@ -6255,10 +6101,10 @@ static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *arg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6283,10 +6129,10 @@ static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_IsModified(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_IsModified(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6311,10 +6157,10 @@ static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_IsEditable(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_IsEditable(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6348,10 +6194,10 @@ static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6387,13 +6233,17 @@ static PyObject *_wrap_wxTextCtrl_GetStringSelection(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetStringSelection(_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; @@ -6419,10 +6269,10 @@ static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Clear(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Clear(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6451,28 +6301,15 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6503,10 +6340,10 @@ static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Remove(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Remove(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6534,28 +6371,15 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -6587,28 +6411,15 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -6636,10 +6447,10 @@ static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_DiscardEdits(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_DiscardEdits(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6665,10 +6476,10 @@ static PyObject *_wrap_wxTextCtrl_SetMaxLength(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetMaxLength(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetMaxLength(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6695,28 +6506,15 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_WriteText(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_WriteText(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6747,28 +6545,15 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_AppendText(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_AppendText(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -6809,10 +6594,10 @@ static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6846,10 +6631,10 @@ static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -6875,11 +6660,11 @@ static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); _result = (wxTextAttr *) &_result_ref; - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextAttr_p"); @@ -6912,10 +6697,10 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -6924,7 +6709,6 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P #define wxTextCtrl_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxTextCtrl * _arg0; long _arg1; long * _arg2; @@ -6951,12 +6735,13 @@ static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); @@ -6989,10 +6774,10 @@ static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_ShowPosition(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_ShowPosition(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7017,10 +6802,10 @@ static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Copy(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Copy(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7045,10 +6830,10 @@ static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Cut(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Cut(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7073,10 +6858,10 @@ static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Paste(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Paste(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7102,10 +6887,10 @@ static PyObject *_wrap_wxTextCtrl_CanCopy(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanCopy(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_CanCopy(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7130,10 +6915,10 @@ static PyObject *_wrap_wxTextCtrl_CanCut(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanCut(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_CanCut(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7158,10 +6943,10 @@ static PyObject *_wrap_wxTextCtrl_CanPaste(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanPaste(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_CanPaste(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7185,10 +6970,10 @@ static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Undo(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Undo(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7213,10 +6998,10 @@ static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_Redo(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_Redo(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7242,10 +7027,10 @@ static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanUndo(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_CanUndo(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7270,10 +7055,10 @@ static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxTextCtrl_CanRedo(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_CanRedo(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7298,10 +7083,10 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetInsertionPoint(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7326,10 +7111,10 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetInsertionPointEnd(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetInsertionPointEnd(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7355,10 +7140,10 @@ static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7383,10 +7168,10 @@ static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (long )wxTextCtrl_GetLastPosition(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxTextCtrl_GetLastPosition(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("l",_result); return _resultobj; @@ -7412,10 +7197,10 @@ static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7440,10 +7225,10 @@ static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SelectAll(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SelectAll(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7471,10 +7256,10 @@ static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, Py } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_SetEditable(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetEditable(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7503,28 +7288,15 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxTextCtrl_write(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_write(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7535,6 +7307,47 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject return _resultobj; } +static wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to) { + return self->GetValue().Mid(from, to-from); + } +static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTextCtrl * _arg0; + long _arg1; + long _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","from","to", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_GetString",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetString. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); + + 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 *SwigwxScrollBarTowxControl(void *ptr) { wxScrollBar *src; wxControl *dest; @@ -7617,10 +7430,10 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); @@ -7643,10 +7456,10 @@ static PyObject *_wrap_new_wxPreScrollBar(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreScrollBar",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxScrollBar *)new_wxPreScrollBar(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxScrollBar *)new_wxPreScrollBar(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxScrollBar_p"); @@ -7716,10 +7529,10 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7744,10 +7557,10 @@ static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxScrollBar_GetRange(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxScrollBar_GetRange(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7772,10 +7585,10 @@ static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxScrollBar_GetPageSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxScrollBar_GetPageSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7800,10 +7613,10 @@ static PyObject *_wrap_wxScrollBar_GetThumbPosition(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxScrollBar_GetThumbPosition(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxScrollBar_GetThumbPosition(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7828,10 +7641,38 @@ static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxScrollBar_GetThumbSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxScrollBar_GetThumbSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxScrollBar_IsVertical(_swigobj) (_swigobj->IsVertical()) +static PyObject *_wrap_wxScrollBar_IsVertical(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxScrollBar * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrollBar_IsVertical",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrollBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrollBar_IsVertical. Expected _wxScrollBar_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxScrollBar_IsVertical(_arg0); + + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -7856,10 +7697,10 @@ static PyObject *_wrap_wxScrollBar_SetThumbPosition(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxScrollBar_SetThumbPosition(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxScrollBar_SetThumbPosition(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7891,10 +7732,10 @@ static PyObject *_wrap_wxScrollBar_SetScrollbar(PyObject *self, PyObject *args, } _arg5 = (bool ) tempbool5; { - wxPy_BEGIN_ALLOW_THREADS; - wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -7974,10 +7815,10 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinButton_p"); @@ -8000,10 +7841,10 @@ static PyObject *_wrap_new_wxPreSpinButton(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSpinButton",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSpinButton *)new_wxPreSpinButton(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSpinButton *)new_wxPreSpinButton(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinButton_p"); @@ -8064,10 +7905,10 @@ static PyObject *_wrap_wxSpinButton_Create(PyObject *self, PyObject *args, PyObj return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8092,10 +7933,10 @@ static PyObject *_wrap_wxSpinButton_GetMax(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSpinButton_GetMax(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSpinButton_GetMax(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8120,10 +7961,10 @@ static PyObject *_wrap_wxSpinButton_GetMin(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSpinButton_GetMin(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSpinButton_GetMin(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8148,10 +7989,10 @@ static PyObject *_wrap_wxSpinButton_GetValue(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSpinButton_GetValue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSpinButton_GetValue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8177,10 +8018,10 @@ static PyObject *_wrap_wxSpinButton_SetRange(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSpinButton_SetRange(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSpinButton_SetRange(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8206,10 +8047,10 @@ static PyObject *_wrap_wxSpinButton_SetValue(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSpinButton_SetValue(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSpinButton_SetValue(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8298,10 +8139,10 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); @@ -8324,10 +8165,10 @@ static PyObject *_wrap_new_wxPreStaticBitmap(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreStaticBitmap",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxStaticBitmap_p"); @@ -8397,10 +8238,10 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -8426,19 +8267,13 @@ static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - const wxBitmap & _result_ref = wxStaticBitmap_GetBitmap(_arg0); - _result = (wxBitmap *) &_result_ref; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); return _resultobj; } @@ -8469,10 +8304,10 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxStaticBitmap_SetBitmap(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStaticBitmap_SetBitmap(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8506,10 +8341,10 @@ static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - wxStaticBitmap_SetIcon(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxStaticBitmap_SetIcon(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8585,22 +8420,9 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -8637,10 +8459,10 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioBox_p"); @@ -8670,10 +8492,10 @@ static PyObject *_wrap_new_wxPreRadioBox(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreRadioBox",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRadioBox *)new_wxPreRadioBox(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRadioBox *)new_wxPreRadioBox(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioBox_p"); @@ -8730,22 +8552,9 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -8782,10 +8591,10 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -8819,10 +8628,10 @@ static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args, PyObjec } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_Enable(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_Enable(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8851,10 +8660,10 @@ static PyObject *_wrap_wxRadioBox_EnableItem(PyObject *self, PyObject *args, PyO } _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_EnableItem(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_EnableItem(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -8882,28 +8691,15 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRadioBox_FindString(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRadioBox_FindString(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -8933,13 +8729,17 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); - 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; @@ -8968,28 +8768,15 @@ static PyObject *_wrap_wxRadioBox_SetString(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_SetString(_arg0,_arg1,*_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_SetString(_arg0,_arg1,*_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9019,10 +8806,10 @@ static PyObject *_wrap_wxRadioBox_GetColumnCount(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRadioBox_GetColumnCount(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRadioBox_GetColumnCount(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9047,10 +8834,10 @@ static PyObject *_wrap_wxRadioBox_GetRowCount(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRadioBox_GetRowCount(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRadioBox_GetRowCount(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9075,10 +8862,10 @@ static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRadioBox_GetSelection(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRadioBox_GetSelection(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9103,13 +8890,17 @@ static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxRadioBox_GetStringSelection(_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; @@ -9136,10 +8927,10 @@ static PyObject *_wrap_wxRadioBox_GetCount(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxRadioBox_GetCount(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRadioBox_GetCount(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9164,10 +8955,10 @@ static PyObject *_wrap_wxRadioBox_SetSelection(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_SetSelection(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_SetSelection(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9194,28 +8985,15 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_SetStringSelection(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_SetStringSelection(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9247,10 +9025,10 @@ static PyObject *_wrap_wxRadioBox_Show(PyObject *self, PyObject *args, PyObject } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_Show(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_Show(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9279,10 +9057,10 @@ static PyObject *_wrap_wxRadioBox_ShowItem(PyObject *self, PyObject *args, PyObj } _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioBox_ShowItem(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioBox_ShowItem(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9354,22 +9132,9 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -9391,10 +9156,10 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); @@ -9421,10 +9186,10 @@ static PyObject *_wrap_new_wxPreRadioButton(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreRadioButton",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxRadioButton *)new_wxPreRadioButton(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxRadioButton *)new_wxPreRadioButton(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxRadioButton_p"); @@ -9477,22 +9242,9 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -9514,10 +9266,10 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { @@ -9546,10 +9298,10 @@ static PyObject *_wrap_wxRadioButton_GetValue(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxRadioButton_GetValue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRadioButton_GetValue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9576,10 +9328,10 @@ static PyObject *_wrap_wxRadioButton_SetValue(PyObject *self, PyObject *args, Py } _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxRadioButton_SetValue(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRadioButton_SetValue(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9671,10 +9423,10 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSlider_p"); @@ -9697,10 +9449,10 @@ static PyObject *_wrap_new_wxPreSlider(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSlider",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSlider *)new_wxPreSlider(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSlider *)new_wxPreSlider(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSlider_p"); @@ -9773,10 +9525,10 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9800,10 +9552,10 @@ static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_ClearSel(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_ClearSel(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9828,10 +9580,10 @@ static PyObject *_wrap_wxSlider_ClearTicks(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_ClearTicks(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_ClearTicks(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -9857,10 +9609,10 @@ static PyObject *_wrap_wxSlider_GetLineSize(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetLineSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetLineSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9885,10 +9637,10 @@ static PyObject *_wrap_wxSlider_GetMax(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetMax(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetMax(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9913,10 +9665,10 @@ static PyObject *_wrap_wxSlider_GetMin(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetMin(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetMin(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9941,10 +9693,10 @@ static PyObject *_wrap_wxSlider_GetPageSize(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetPageSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetPageSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9969,10 +9721,10 @@ static PyObject *_wrap_wxSlider_GetSelEnd(PyObject *self, PyObject *args, PyObje } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetSelEnd(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetSelEnd(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -9997,10 +9749,10 @@ static PyObject *_wrap_wxSlider_GetSelStart(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetSelStart(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetSelStart(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10025,10 +9777,10 @@ static PyObject *_wrap_wxSlider_GetThumbLength(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetThumbLength(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetThumbLength(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10053,10 +9805,10 @@ static PyObject *_wrap_wxSlider_GetTickFreq(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetTickFreq(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetTickFreq(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10081,10 +9833,10 @@ static PyObject *_wrap_wxSlider_GetValue(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSlider_GetValue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSlider_GetValue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10110,10 +9862,10 @@ static PyObject *_wrap_wxSlider_SetRange(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetRange(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetRange(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10140,10 +9892,10 @@ static PyObject *_wrap_wxSlider_SetTickFreq(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetTickFreq(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetTickFreq(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10169,10 +9921,10 @@ static PyObject *_wrap_wxSlider_SetLineSize(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetLineSize(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetLineSize(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10198,10 +9950,10 @@ static PyObject *_wrap_wxSlider_SetPageSize(PyObject *self, PyObject *args, PyOb } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetPageSize(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetPageSize(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10228,10 +9980,10 @@ static PyObject *_wrap_wxSlider_SetSelection(PyObject *self, PyObject *args, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetSelection(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetSelection(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10257,10 +10009,10 @@ static PyObject *_wrap_wxSlider_SetThumbLength(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetThumbLength(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetThumbLength(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10286,10 +10038,10 @@ static PyObject *_wrap_wxSlider_SetTick(PyObject *self, PyObject *args, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetTick(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetTick(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10315,10 +10067,10 @@ static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSlider_SetValue(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSlider_SetValue(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10410,10 +10162,10 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinCtrl_p"); @@ -10436,10 +10188,10 @@ static PyObject *_wrap_new_wxPreSpinCtrl(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSpinCtrl",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSpinCtrl_p"); @@ -10504,10 +10256,10 @@ static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10532,10 +10284,10 @@ static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSpinCtrl_GetMax(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSpinCtrl_GetMax(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10560,10 +10312,10 @@ static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSpinCtrl_GetMin(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSpinCtrl_GetMin(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10588,10 +10340,10 @@ static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSpinCtrl_GetValue(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSpinCtrl_GetValue(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -10617,10 +10369,10 @@ static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10646,10 +10398,10 @@ static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSpinCtrl_SetValue(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSpinCtrl_SetValue(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -10725,6 +10477,7 @@ static PyMethodDef controlscMethods[] = { { "new_wxSpinButton", (PyCFunction) _wrap_new_wxSpinButton, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_SetScrollbar", (PyCFunction) _wrap_wxScrollBar_SetScrollbar, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_SetThumbPosition", (PyCFunction) _wrap_wxScrollBar_SetThumbPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxScrollBar_IsVertical", (PyCFunction) _wrap_wxScrollBar_IsVertical, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_GetThumbLength", (PyCFunction) _wrap_wxScrollBar_GetThumbSize, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_GetThumbSize", (PyCFunction) _wrap_wxScrollBar_GetThumbSize, METH_VARARGS | METH_KEYWORDS }, { "wxScrollBar_GetThumbPosition", (PyCFunction) _wrap_wxScrollBar_GetThumbPosition, METH_VARARGS | METH_KEYWORDS }, @@ -10733,6 +10486,7 @@ static PyMethodDef controlscMethods[] = { { "wxScrollBar_Create", (PyCFunction) _wrap_wxScrollBar_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreScrollBar", (PyCFunction) _wrap_new_wxPreScrollBar, METH_VARARGS | METH_KEYWORDS }, { "new_wxScrollBar", (PyCFunction) _wrap_new_wxScrollBar, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetString", (PyCFunction) _wrap_wxTextCtrl_GetString, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_write", (PyCFunction) _wrap_wxTextCtrl_write, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetEditable", (PyCFunction) _wrap_wxTextCtrl_SetEditable, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SelectAll", (PyCFunction) _wrap_wxTextCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS }, @@ -10773,11 +10527,13 @@ static PyMethodDef controlscMethods[] = { { "wxTextCtrl_GetNumberOfLines", (PyCFunction) _wrap_wxTextCtrl_GetNumberOfLines, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineText", (PyCFunction) _wrap_wxTextCtrl_GetLineText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineLength", (PyCFunction) _wrap_wxTextCtrl_GetLineLength, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetRange", (PyCFunction) _wrap_wxTextCtrl_GetRange, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetValue", (PyCFunction) _wrap_wxTextCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetValue", (PyCFunction) _wrap_wxTextCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreTextCtrl", (PyCFunction) _wrap_new_wxPreTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextCtrl", (PyCFunction) _wrap_new_wxTextCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxTextAttr_Combine", (PyCFunction) _wrap_wxTextAttr_Combine, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_IsDefault", (PyCFunction) _wrap_wxTextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetFont", (PyCFunction) _wrap_wxTextAttr_GetFont, METH_VARARGS | METH_KEYWORDS }, { "wxTextAttr_GetBackgroundColour", (PyCFunction) _wrap_wxTextAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, @@ -10885,6 +10641,7 @@ static PyMethodDef controlscMethods[] = { { "wxButton_Create", (PyCFunction) _wrap_wxButton_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreButton", (PyCFunction) _wrap_new_wxPreButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxButton", (PyCFunction) _wrap_new_wxButton, METH_VARARGS | METH_KEYWORDS }, + { "wxControlWithItems_AppendItems", (PyCFunction) _wrap_wxControlWithItems_AppendItems, METH_VARARGS | METH_KEYWORDS }, { "wxControlWithItems_SetClientData", (PyCFunction) _wrap_wxControlWithItems_SetClientData, METH_VARARGS | METH_KEYWORDS }, { "wxControlWithItems_GetClientData", (PyCFunction) _wrap_wxControlWithItems_GetClientData, METH_VARARGS | METH_KEYWORDS }, { "wxControlWithItems_Append", (PyCFunction) _wrap_wxControlWithItems_Append, METH_VARARGS | METH_KEYWORDS },