X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6056257ab676ea10a51ef96e19b1f1092f95b40..a2615ebc22a402b1badb46475f94ab6aa3a64018:/wxPython/src/mac/windows3.cpp?ds=sidebyside diff --git a/wxPython/src/mac/windows3.cpp b/wxPython/src/mac/windows3.cpp index e1f6c69388..57b3492278 100644 --- a/wxPython/src/mac/windows3.cpp +++ b/wxPython/src/mac/windows3.cpp @@ -60,6 +60,7 @@ extern PyObject *SWIG_newvarlink(void); #include #ifndef __WXMAC__ #include +#include #endif @@ -89,11 +90,11 @@ 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 + // Put some wx default wxChar* values into wxStrings. + static const wxChar* wxSashNameStr = wxT("sashWindow"); + DECLARE_DEF_STRING(SashNameStr); + static const wxChar* wxSashLayoutNameStr = wxT("layoutWindow"); + DECLARE_DEF_STRING(SashLayoutNameStr); #ifdef __cplusplus extern "C" { #endif @@ -134,10 +135,10 @@ static PyObject *_wrap_new_wxSashEvent(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxSashEvent",_kwnames,&_arg0,&_arg1)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashEvent_p"); @@ -168,10 +169,10 @@ static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashEvent_SetEdge(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashEvent_SetEdge(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -197,10 +198,10 @@ static PyObject *_wrap_wxSashEvent_GetEdge(PyObject *self, PyObject *args, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -232,10 +233,10 @@ static PyObject *_wrap_wxSashEvent_SetDragRect(PyObject *self, PyObject *args, P return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashEvent_SetDragRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashEvent_SetDragRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -262,10 +263,10 @@ static PyObject *_wrap_wxSashEvent_GetDragRect(PyObject *self, PyObject *args, P } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -291,10 +292,10 @@ static PyObject *_wrap_wxSashEvent_SetDragStatus(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashEvent_SetDragStatus(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashEvent_SetDragStatus(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -320,10 +321,10 @@ static PyObject *_wrap_wxSashEvent_GetDragStatus(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -362,17 +363,18 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg5 = (char *) "sashWindow"; + wxString * _arg5 = (wxString *) &wxPySashNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSashWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxSashWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -392,12 +394,18 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject _arg3 = &temp0; if (! wxSize_helper(_obj3, &_arg3)) return NULL; +} + if (_obj5) +{ + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) + return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashWindow_p"); @@ -406,6 +414,10 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -420,10 +432,10 @@ static PyObject *_wrap_new_wxPreSashWindow(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSashWindow",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashWindow *)new_wxPreSashWindow(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashWindow *)new_wxPreSashWindow(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashWindow_p"); @@ -445,17 +457,18 @@ static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObj wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg6 = (char *) "sashWindow"; + wxString * _arg6 = (wxString *) &wxPySashNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxSashWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -483,13 +496,23 @@ static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObj if (! wxSize_helper(_obj4, &_arg4)) return NULL; } + if (_obj6) { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -513,10 +536,10 @@ static PyObject *_wrap_wxSashWindow_GetSashVisible(PyObject *self, PyObject *arg } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -541,10 +564,10 @@ static PyObject *_wrap_wxSashWindow_GetDefaultBorderSize(PyObject *self, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -570,10 +593,10 @@ static PyObject *_wrap_wxSashWindow_GetEdgeMargin(PyObject *self, PyObject *args } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -598,10 +621,10 @@ static PyObject *_wrap_wxSashWindow_GetExtraBorderSize(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -626,10 +649,10 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeX(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -654,10 +677,10 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeY(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -682,10 +705,10 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeX(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -710,10 +733,10 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeY(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -739,10 +762,10 @@ static PyObject *_wrap_wxSashWindow_HasBorder(PyObject *self, PyObject *args, Py } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -767,10 +790,10 @@ static PyObject *_wrap_wxSashWindow_SetDefaultBorderSize(PyObject *self, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -796,10 +819,10 @@ static PyObject *_wrap_wxSashWindow_SetExtraBorderSize(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetExtraBorderSize(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetExtraBorderSize(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -825,10 +848,10 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeX(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetMaximumSizeX(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetMaximumSizeX(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -854,10 +877,10 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeY(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetMaximumSizeY(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetMaximumSizeY(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -883,10 +906,10 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeX(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetMinimumSizeX(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetMinimumSizeX(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -912,10 +935,10 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeY(PyObject *self, PyObject *ar } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetMinimumSizeY(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetMinimumSizeY(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -944,10 +967,10 @@ static PyObject *_wrap_wxSashWindow_SetSashVisible(PyObject *self, PyObject *arg } _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -976,10 +999,10 @@ static PyObject *_wrap_wxSashWindow_SetSashBorder(PyObject *self, PyObject *args } _arg2 = (bool ) tempbool2; { - wxPy_BEGIN_ALLOW_THREADS; - wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1014,10 +1037,10 @@ static PyObject *_wrap_new_wxQueryLayoutInfoEvent(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxQueryLayoutInfoEvent",_kwnames,&_arg0)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxQueryLayoutInfoEvent_p"); @@ -1048,10 +1071,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, } } { - wxPy_BEGIN_ALLOW_THREADS; - wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1077,10 +1100,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetRequestedLength(PyObject *self, } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1105,10 +1128,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetFlags(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1134,10 +1157,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetFlags(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1169,10 +1192,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetSize(PyObject *self, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1199,10 +1222,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetSize(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1228,10 +1251,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetOrientation(PyObject *self, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1257,10 +1280,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetOrientation(PyObject *self, PyO } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1285,10 +1308,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetAlignment(PyObject *self, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1314,10 +1337,10 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetAlignment(PyObject *self, PyObj } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1351,10 +1374,10 @@ static PyObject *_wrap_new_wxCalculateLayoutEvent(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxCalculateLayoutEvent",_kwnames,&_arg0)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxCalculateLayoutEvent_p"); @@ -1385,10 +1408,10 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1414,10 +1437,10 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetFlags(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1449,10 +1472,10 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetRect(PyObject *self, PyObject * return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1479,10 +1502,10 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetRect(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } SWIG_MakePtr(_ptemp, (void *) _result,"_wxRect_p"); _resultobj = Py_BuildValue("s",_ptemp); @@ -1530,17 +1553,18 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg5 = (char *) "layoutWindow"; + wxString * _arg5 = (wxString *) &wxPySashLayoutNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSashLayoutWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxSashLayoutWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1560,12 +1584,18 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py _arg3 = &temp0; if (! wxSize_helper(_obj3, &_arg3)) return NULL; +} + if (_obj5) +{ + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) + return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashLayoutWindow_p"); @@ -1574,6 +1604,10 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -1588,10 +1622,10 @@ static PyObject *_wrap_new_wxPreSashLayoutWindow(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreSashLayoutWindow",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxSashLayoutWindow_p"); @@ -1613,17 +1647,18 @@ static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg6 = (char *) "layoutWindow"; + wxString * _arg6 = (wxString *) &wxPySashLayoutNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashLayoutWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxSashLayoutWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1651,13 +1686,23 @@ static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, if (! wxSize_helper(_obj4, &_arg4)) return NULL; } + if (_obj6) { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -1680,10 +1725,10 @@ static PyObject *_wrap_wxSashLayoutWindow_GetAlignment(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1708,10 +1753,10 @@ static PyObject *_wrap_wxSashLayoutWindow_GetOrientation(PyObject *self, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1736,10 +1781,10 @@ static PyObject *_wrap_wxSashLayoutWindow_SetAlignment(PyObject *self, PyObject } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashLayoutWindow_SetAlignment(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashLayoutWindow_SetAlignment(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1772,10 +1817,10 @@ static PyObject *_wrap_wxSashLayoutWindow_SetDefaultSize(PyObject *self, PyObjec return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1801,10 +1846,10 @@ static PyObject *_wrap_wxSashLayoutWindow_SetOrientation(PyObject *self, PyObjec } } { - wxPy_BEGIN_ALLOW_THREADS; - wxSashLayoutWindow_SetOrientation(_arg0,_arg1); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSashLayoutWindow_SetOrientation(_arg0,_arg1); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1830,10 +1875,10 @@ static PyObject *_wrap_new_wxLayoutAlgorithm(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxLayoutAlgorithm",_kwnames)) return NULL; { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } if (_result) { SWIG_MakePtr(_ptemp, (char *) _result,"_wxLayoutAlgorithm_p"); @@ -1863,10 +1908,10 @@ static PyObject *_wrap_delete_wxLayoutAlgorithm(PyObject *self, PyObject *args, } } { - wxPy_BEGIN_ALLOW_THREADS; - delete_wxLayoutAlgorithm(_arg0); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxLayoutAlgorithm(_arg0); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; @@ -1910,10 +1955,10 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutMDIFrame(PyObject *self, PyObject return NULL; } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -1956,10 +2001,10 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutFrame(PyObject *self, PyObject *a } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj; @@ -2002,10 +2047,10 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutWindow(PyObject *self, PyObject * } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); - wxPy_END_ALLOW_THREADS; + wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); return _resultobj;