From 83448d71476c44b449f09395cda06fa72b19a50e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 23 Jan 2004 22:52:06 +0000 Subject: [PATCH] reSWIGged for new runtime, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/msw/gizmos_wrap.cpp | 399 ++++-- wxPython/contrib/glcanvas/msw/glcanvas.py | 6 +- .../contrib/glcanvas/msw/glcanvas_wrap.cpp | 188 ++- wxPython/contrib/iewin/iewin_wrap.cpp | 194 ++- wxPython/contrib/ogl/msw/ogl_wrap.cpp | 1040 +++++++++++----- wxPython/src/msw/calendar_wrap.cpp | 236 +++- wxPython/src/msw/controls.py | 12 +- wxPython/src/msw/controls_wrap.cpp | 517 ++++++-- wxPython/src/msw/core.py | 118 +- wxPython/src/msw/core_wrap.cpp | 1103 ++++++++++++----- wxPython/src/msw/gdi.py | 86 +- wxPython/src/msw/gdi_wrap.cpp | 432 +++++-- wxPython/src/msw/grid_wrap.cpp | 644 +++++++--- wxPython/src/msw/html.py | 6 +- wxPython/src/msw/html_wrap.cpp | 202 ++- wxPython/src/msw/misc.py | 181 +-- wxPython/src/msw/misc_wrap.cpp | 770 +++++++++--- wxPython/src/msw/windows.py | 2 +- wxPython/src/msw/windows_wrap.cpp | 530 ++++++-- wxPython/src/msw/wizard.py | 2 +- wxPython/src/msw/wizard_wrap.cpp | 188 ++- 21 files changed, 5279 insertions(+), 1577 deletions(-) diff --git a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp index 5d2b2a0010..d43ea3e0e0 100644 --- a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -1809,8 +1981,10 @@ static PyObject *_wrap_LEDNumberCtrl_SetAlignment(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:LEDNumberCtrl_SetAlignment",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLEDNumberCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1840,12 +2014,16 @@ static PyObject *_wrap_LEDNumberCtrl_SetDrawFaded(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:LEDNumberCtrl_SetDrawFaded",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLEDNumberCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; + { + arg2 = (bool) SPyObj_AsBool(obj1); if (PyErr_Occurred()) SWIG_fail; } + if (obj2) { + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDrawFaded(arg2,arg3); @@ -1881,8 +2059,10 @@ static PyObject *_wrap_LEDNumberCtrl_SetValue(PyObject *self, PyObject *args, Py temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1937,8 +2117,10 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2086,7 +2268,7 @@ static PyObject *_wrap_TreeListColumnInfo_GetWidth(PyObject *self, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2220,8 +2402,10 @@ static PyObject *_wrap_TreeListColumnInfo_SetWidth(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListColumnInfo_SetWidth",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTreeListColumnInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetWidth(arg2); @@ -2466,7 +2650,7 @@ static PyObject *_wrap_TreeListCtrl_GetCount(PyObject *self, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2491,7 +2675,7 @@ static PyObject *_wrap_TreeListCtrl_GetIndent(PyObject *self, PyObject *args, Py wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2510,8 +2694,10 @@ static PyObject *_wrap_TreeListCtrl_SetIndent(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetIndent",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetIndent(arg2); @@ -2544,7 +2730,7 @@ static PyObject *_wrap_TreeListCtrl_GetSpacing(PyObject *self, PyObject *args, P wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2563,8 +2749,10 @@ static PyObject *_wrap_TreeListCtrl_SetSpacing(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetSpacing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSpacing(arg2); @@ -2597,7 +2785,7 @@ static PyObject *_wrap_TreeListCtrl_GetLineSpacing(PyObject *self, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2616,8 +2804,10 @@ static PyObject *_wrap_TreeListCtrl_SetLineSpacing(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetLineSpacing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetLineSpacing(arg2); @@ -2960,8 +3150,10 @@ static PyObject *_wrap_TreeListCtrl_InsertColumn(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_InsertColumn",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -3003,8 +3195,10 @@ static PyObject *_wrap_TreeListCtrl_InsertColumnInfo(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_InsertColumnInfo",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxTreeListColumnInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (arg3 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; @@ -3035,8 +3229,10 @@ static PyObject *_wrap_TreeListCtrl_RemoveColumn(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_RemoveColumn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->RemoveColumn(arg2); @@ -3069,7 +3265,7 @@ static PyObject *_wrap_TreeListCtrl_GetColumnCount(PyObject *self, PyObject *arg wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -3090,10 +3286,14 @@ static PyObject *_wrap_TreeListCtrl_SetColumnWidth(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetColumnWidth",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetColumnWidth(arg2,arg3); @@ -3121,8 +3321,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnWidth(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnWidth",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)((wxPyTreeListCtrl const *)arg1)->GetColumnWidth(arg2); @@ -3149,8 +3351,10 @@ static PyObject *_wrap_TreeListCtrl_SetMainColumn(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetMainColumn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetMainColumn(arg2); @@ -3183,7 +3387,7 @@ static PyObject *_wrap_TreeListCtrl_GetMainColumn(PyObject *self, PyObject *args wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -3205,8 +3409,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumnText(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetColumnText",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -3247,8 +3453,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnText(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnText",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxPyTreeListCtrl const *)arg1)->GetColumnText(arg2); @@ -3283,8 +3491,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumn(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetColumn",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxTreeListColumnInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (arg3 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; @@ -3316,8 +3526,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumn(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); { @@ -3348,8 +3560,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumnAlignment(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:TreeListCtrl_SetColumnAlignment",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetColumnAlignment(arg2,(wxTreeListColumnAlign )arg3); @@ -3377,8 +3591,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnAlignment(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnAlignment",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)((wxPyTreeListCtrl const *)arg1)->GetColumnAlignment(arg2); @@ -3406,8 +3622,10 @@ static PyObject *_wrap_TreeListCtrl_SetColumnImage(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:TreeListCtrl_SetColumnImage",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetColumnImage(arg2,arg3); @@ -3435,8 +3653,10 @@ static PyObject *_wrap_TreeListCtrl_GetColumnImage(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetColumnImage",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)((wxPyTreeListCtrl const *)arg1)->GetColumnImage(arg2); @@ -3749,8 +3969,10 @@ static PyObject *_wrap_TreeListCtrl_SetItemHasChildren(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3785,8 +4007,10 @@ static PyObject *_wrap_TreeListCtrl_SetItemBold(PyObject *self, PyObject *args, PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4223,8 +4447,10 @@ static PyObject *_wrap_TreeListCtrl_GetChildrenCount(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4233,7 +4459,7 @@ static PyObject *_wrap_TreeListCtrl_GetChildrenCount(PyObject *self, PyObject *a wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -4860,8 +5086,10 @@ static PyObject *_wrap_TreeListCtrl_InsertItemBefore(PyObject *self, PyObject *a if (arg2 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -5257,12 +5485,16 @@ static PyObject *_wrap_TreeListCtrl_SelectItem(PyObject *self, PyObject *args, P PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5408,8 +5640,10 @@ static PyObject *_wrap_TreeListCtrl_GetBoundingRect(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6355,6 +6589,9 @@ static void *_p_wxScrollWinEventTo_p_wxEvent(void *x) { static void *_p_wxTaskBarIconEventTo_p_wxEvent(void *x) { return (void *)((wxEvent *) ((wxTaskBarIconEvent *) x)); } +static void *_p_wxSpinEventTo_p_wxEvent(void *x) { + return (void *)((wxEvent *) (wxCommandEvent *)(wxNotifyEvent *) ((wxSpinEvent *) x)); +} static void *_p_wxScrollBarTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *)(wxControl *) ((wxScrollBar *) x)); } @@ -6814,12 +7051,12 @@ static void *_p_wxSplitterScrolledWindowTo_p_wxObject(void *x) { static void *_p_wxSpinCtrlTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *)(wxControl *) ((wxSpinCtrl *) x)); } -static void *_p_wxListbookEventTo_p_wxObject(void *x) { - return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *)(wxNotifyEvent *)(wxBookCtrlEvent *) ((wxListbookEvent *) x)); -} static void *_p_wxNotebookEventTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *)(wxNotifyEvent *)(wxBookCtrlEvent *) ((wxNotebookEvent *) x)); } +static void *_p_wxListbookEventTo_p_wxObject(void *x) { + return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *)(wxNotifyEvent *)(wxBookCtrlEvent *) ((wxListbookEvent *) x)); +} static void *_p_wxBookCtrlSizerTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxSizer *) ((wxBookCtrlSizer *) x)); } @@ -6874,6 +7111,9 @@ static void *_p_wxHelpEventTo_p_wxObject(void *x) { static void *_p_wxPanelTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvtHandler *)(wxWindow *) ((wxPanel *) x)); } +static void *_p_wxSpinEventTo_p_wxObject(void *x) { + return (void *)((wxObject *) (wxEvent *)(wxCommandEvent *)(wxNotifyEvent *) ((wxSpinEvent *) x)); +} static void *_p_wxTaskBarIconEventTo_p_wxObject(void *x) { return (void *)((wxObject *) (wxEvent *) ((wxTaskBarIconEvent *) x)); } @@ -7231,6 +7471,9 @@ static void *_p_wxDynamicSashSplitEventTo_p_wxCommandEvent(void *x) { static void *_p_wxTreeEventTo_p_wxCommandEvent(void *x) { return (void *)((wxCommandEvent *) (wxNotifyEvent *) ((wxTreeEvent *) x)); } +static void *_p_wxSpinEventTo_p_wxCommandEvent(void *x) { + return (void *)((wxCommandEvent *) (wxNotifyEvent *) ((wxSpinEvent *) x)); +} static void *_p_wxHelpEventTo_p_wxCommandEvent(void *x) { return (void *)((wxCommandEvent *) ((wxHelpEvent *) x)); } @@ -7247,7 +7490,7 @@ static void *_p_wxUpdateUIEventTo_p_wxCommandEvent(void *x) { return (void *)((wxCommandEvent *) ((wxUpdateUIEvent *) x)); } static swig_type_info _swigt__p_wxEditableListBox[] = {{"_p_wxEditableListBox", 0, "wxEditableListBox *", 0},{"_p_wxEditableListBox"},{0}}; -static swig_type_info _swigt__p_wxObject[] = {{"_p_wxObject", 0, "wxObject *", 0},{"_p_wxScrollBar", _p_wxScrollBarTo_p_wxObject},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxObject},{"_p_wxPreviewCanvas", _p_wxPreviewCanvasTo_p_wxObject},{"_p_wxEvent", _p_wxEventTo_p_wxObject},{"_p_wxBookCtrl", _p_wxBookCtrlTo_p_wxObject},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxObject},{"_p_wxInitDialogEvent", _p_wxInitDialogEventTo_p_wxObject},{"_p_wxIndividualLayoutConstraint", _p_wxIndividualLayoutConstraintTo_p_wxObject},{"_p_wxPyPreviewFrame", _p_wxPyPreviewFrameTo_p_wxObject},{"_p_wxPreviewFrame", _p_wxPreviewFrameTo_p_wxObject},{"_p_wxToolBarBase", _p_wxToolBarBaseTo_p_wxObject},{"_p_wxMenuItem", _p_wxMenuItemTo_p_wxObject},{"_p_wxImage", _p_wxImageTo_p_wxObject},{"_p_wxPySizer", _p_wxPySizerTo_p_wxObject},{"_p_wxGenericDragImage", _p_wxGenericDragImageTo_p_wxObject},{"_p_wxStaticBitmap", _p_wxStaticBitmapTo_p_wxObject},{"_p_wxComboBox", _p_wxComboBoxTo_p_wxObject},{"_p_wxLayoutAlgorithm", _p_wxLayoutAlgorithmTo_p_wxObject},{"_p_wxTaskBarIcon", _p_wxTaskBarIconTo_p_wxObject},{"_p_wxPyApp", _p_wxPyAppTo_p_wxObject},{"_p_wxNotebook", _p_wxNotebookTo_p_wxObject},{"_p_wxListItem", _p_wxListItemTo_p_wxObject},{"_p_wxNotebookSizer", _p_wxNotebookSizerTo_p_wxObject},{"_p_wxRemotelyScrolledTreeCtrl", _p_wxRemotelyScrolledTreeCtrlTo_p_wxObject},{"_p_wxPyTreeCtrl", _p_wxPyTreeCtrlTo_p_wxObject},{"_p_wxPyPreviewControlBar", _p_wxPyPreviewControlBarTo_p_wxObject},{"_p_wxPreviewControlBar", _p_wxPreviewControlBarTo_p_wxObject},{"_p_wxFindReplaceData", _p_wxFindReplaceDataTo_p_wxObject},{"_p_wxStaticLine", _p_wxStaticLineTo_p_wxObject},{"_p_wxValidator", _p_wxValidatorTo_p_wxObject},{"_p_wxPyValidator", _p_wxPyValidatorTo_p_wxObject},{"_p_wxCloseEvent", _p_wxCloseEventTo_p_wxObject},{"_p_wxMouseEvent", _p_wxMouseEventTo_p_wxObject},{"_p_wxEraseEvent", _p_wxEraseEventTo_p_wxObject},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxObject},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxObject},{"_p_wxTextUrlEvent", _p_wxTextUrlEventTo_p_wxObject},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxObject},{"_p_wxPageSetupDialogData", _p_wxPageSetupDialogDataTo_p_wxObject},{"_p_wxPrintDialogData", _p_wxPrintDialogDataTo_p_wxObject},{"_p_wxPrinter", _p_wxPrinterTo_p_wxObject},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxObject},{"_p_wxObject"},{"_p_wxRadioBox", _p_wxRadioBoxTo_p_wxObject},{"_p_wxFlexGridSizer", _p_wxFlexGridSizerTo_p_wxObject},{"_p_wxGridSizer", _p_wxGridSizerTo_p_wxObject},{"_p_wxTreeListColumnInfo", _p_wxTreeListColumnInfoTo_p_wxObject},{"_p_wxAcceleratorTable", _p_wxAcceleratorTableTo_p_wxObject},{"_p_wxPyControl", _p_wxPyControlTo_p_wxObject},{"_p_wxControl", _p_wxControlTo_p_wxObject},{"_p_wxContextHelp", _p_wxContextHelpTo_p_wxObject},{"_p_wxColourData", _p_wxColourDataTo_p_wxObject},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxObject},{"_p_wxQueryNewPaletteEvent", _p_wxQueryNewPaletteEventTo_p_wxObject},{"_p_wxMaximizeEvent", _p_wxMaximizeEventTo_p_wxObject},{"_p_wxIconizeEvent", _p_wxIconizeEventTo_p_wxObject},{"_p_wxActivateEvent", _p_wxActivateEventTo_p_wxObject},{"_p_wxSizeEvent", _p_wxSizeEventTo_p_wxObject},{"_p_wxMoveEvent", _p_wxMoveEventTo_p_wxObject},{"_p_wxIdleEvent", _p_wxIdleEventTo_p_wxObject},{"_p_wxStaticText", _p_wxStaticTextTo_p_wxObject},{"_p_wxCalculateLayoutEvent", _p_wxCalculateLayoutEventTo_p_wxObject},{"_p_wxListEvent", _p_wxListEventTo_p_wxObject},{"_p_wxDynamicSashSplitEvent", _p_wxDynamicSashSplitEventTo_p_wxObject},{"_p_wxPyPrintout", _p_wxPyPrintoutTo_p_wxObject},{"_p_wxGauge", _p_wxGaugeTo_p_wxObject},{"_p_wxMDIChildFrame", _p_wxMDIChildFrameTo_p_wxObject},{"_p_wxChoice", _p_wxChoiceTo_p_wxObject},{"_p_wxMenu", _p_wxMenuTo_p_wxObject},{"_p_wxBitmapButton", _p_wxBitmapButtonTo_p_wxObject},{"_p_wxButton", _p_wxButtonTo_p_wxObject},{"_p_wxContextHelpButton", _p_wxContextHelpButtonTo_p_wxObject},{"_p_wxSpinButton", _p_wxSpinButtonTo_p_wxObject},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxObject},{"_p_wxNavigationKeyEvent", _p_wxNavigationKeyEventTo_p_wxObject},{"_p_wxKeyEvent", _p_wxKeyEventTo_p_wxObject},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxObject},{"_p_wxPyHtmlListBox", _p_wxPyHtmlListBoxTo_p_wxObject},{"_p_wxPyVListBox", _p_wxPyVListBoxTo_p_wxObject},{"_p_wxEditableListBox", _p_wxEditableListBoxTo_p_wxObject},{"_p_wxListBox", _p_wxListBoxTo_p_wxObject},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxObject},{"_p_wxPrintData", _p_wxPrintDataTo_p_wxObject},{"_p_wxFontData", _p_wxFontDataTo_p_wxObject},{"_p_wxMiniFrame", _p_wxMiniFrameTo_p_wxObject},{"_p_wxListbook", _p_wxListbookTo_p_wxObject},{"_p_wxFrame", _p_wxFrameTo_p_wxObject},{"_p_wxPyPanel", _p_wxPyPanelTo_p_wxObject},{"_p_wxStaticBox", _p_wxStaticBoxTo_p_wxObject},{"_p_wxQueryLayoutInfoEvent", _p_wxQueryLayoutInfoEventTo_p_wxObject},{"_p_wxSplashScreen", _p_wxSplashScreenTo_p_wxObject},{"_p_wxFileSystem", _p_wxFileSystemTo_p_wxObject},{"_p_wxPyPrintPreview", _p_wxPyPrintPreviewTo_p_wxObject},{"_p_wxPrintPreview", _p_wxPrintPreviewTo_p_wxObject},{"_p_wxListView", _p_wxListViewTo_p_wxObject},{"_p_wxPyTreeListCtrl", _p_wxPyTreeListCtrlTo_p_wxObject},{"_p_wxPyListCtrl", _p_wxPyListCtrlTo_p_wxObject},{"_p_wxDirFilterListCtrl", _p_wxDirFilterListCtrlTo_p_wxObject},{"_p_wxLayoutConstraints", _p_wxLayoutConstraintsTo_p_wxObject},{"_p_wxSizer", _p_wxSizerTo_p_wxObject},{"_p_wxBoxSizer", _p_wxBoxSizerTo_p_wxObject},{"_p_wxStaticBoxSizer", _p_wxStaticBoxSizerTo_p_wxObject},{"_p_wxGridBagSizer", _p_wxGridBagSizerTo_p_wxObject},{"_p_wxNcPaintEvent", _p_wxNcPaintEventTo_p_wxObject},{"_p_wxPaintEvent", _p_wxPaintEventTo_p_wxObject},{"_p_wxFSFile", _p_wxFSFileTo_p_wxObject},{"_p_wxSetCursorEvent", _p_wxSetCursorEventTo_p_wxObject},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxObject},{"_p_wxTextCtrl", _p_wxTextCtrlTo_p_wxObject},{"_p_wxRadioButton", _p_wxRadioButtonTo_p_wxObject},{"_p_wxToggleButton", _p_wxToggleButtonTo_p_wxObject},{"_p_wxSizerItem", _p_wxSizerItemTo_p_wxObject},{"_p_wxGBSizerItem", _p_wxGBSizerItemTo_p_wxObject},{"_p_wxPrintDialog", _p_wxPrintDialogTo_p_wxObject},{"_p_wxPageSetupDialog", _p_wxPageSetupDialogTo_p_wxObject},{"_p_wxFontDialog", _p_wxFontDialogTo_p_wxObject},{"_p_wxDirDialog", _p_wxDirDialogTo_p_wxObject},{"_p_wxColourDialog", _p_wxColourDialogTo_p_wxObject},{"_p_wxDialog", _p_wxDialogTo_p_wxObject},{"_p_wxPyEvent", _p_wxPyEventTo_p_wxObject},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxObject},{"_p_wxDynamicSashUnifyEvent", _p_wxDynamicSashUnifyEventTo_p_wxObject},{"_p_wxGenericDirCtrl", _p_wxGenericDirCtrlTo_p_wxObject},{"_p_wxEvtHandler", _p_wxEvtHandlerTo_p_wxObject},{"_p_wxTIFFHandler", _p_wxTIFFHandlerTo_p_wxObject},{"_p_wxImageHandler", _p_wxImageHandlerTo_p_wxObject},{"_p_wxBMPHandler", _p_wxBMPHandlerTo_p_wxObject},{"_p_wxICOHandler", _p_wxICOHandlerTo_p_wxObject},{"_p_wxCURHandler", _p_wxCURHandlerTo_p_wxObject},{"_p_wxANIHandler", _p_wxANIHandlerTo_p_wxObject},{"_p_wxPNGHandler", _p_wxPNGHandlerTo_p_wxObject},{"_p_wxGIFHandler", _p_wxGIFHandlerTo_p_wxObject},{"_p_wxPCXHandler", _p_wxPCXHandlerTo_p_wxObject},{"_p_wxJPEGHandler", _p_wxJPEGHandlerTo_p_wxObject},{"_p_wxPNMHandler", _p_wxPNMHandlerTo_p_wxObject},{"_p_wxXPMHandler", _p_wxXPMHandlerTo_p_wxObject},{"_p_wxShowEvent", _p_wxShowEventTo_p_wxObject},{"_p_wxThinSplitterWindow", _p_wxThinSplitterWindowTo_p_wxObject},{"_p_wxPyTreeCompanionWindow", _p_wxPyTreeCompanionWindowTo_p_wxObject},{"_p_wxDynamicSashWindow", _p_wxDynamicSashWindowTo_p_wxObject},{"_p_wxPyVScrolledWindow", _p_wxPyVScrolledWindowTo_p_wxObject},{"_p_wxTipWindow", _p_wxTipWindowTo_p_wxObject},{"_p_wxPyPopupTransientWindow", _p_wxPyPopupTransientWindowTo_p_wxObject},{"_p_wxPopupWindow", _p_wxPopupWindowTo_p_wxObject},{"_p_wxSashLayoutWindow", _p_wxSashLayoutWindowTo_p_wxObject},{"_p_wxSashWindow", _p_wxSashWindowTo_p_wxObject},{"_p_wxSplitterWindow", _p_wxSplitterWindowTo_p_wxObject},{"_p_wxSplashScreenWindow", _p_wxSplashScreenWindowTo_p_wxObject},{"_p_wxWindow", _p_wxWindowTo_p_wxObject},{"_p_wxSplitterScrolledWindow", _p_wxSplitterScrolledWindowTo_p_wxObject},{"_p_wxMDIClientWindow", _p_wxMDIClientWindowTo_p_wxObject},{"_p_wxScrolledWindow", _p_wxScrolledWindowTo_p_wxObject},{"_p_wxTopLevelWindow", _p_wxTopLevelWindowTo_p_wxObject},{"_p_wxSpinCtrl", _p_wxSpinCtrlTo_p_wxObject},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxObject},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxObject},{"_p_wxBookCtrlSizer", _p_wxBookCtrlSizerTo_p_wxObject},{"_p_wxTextEntryDialog", _p_wxTextEntryDialogTo_p_wxObject},{"_p_wxFindReplaceDialog", _p_wxFindReplaceDialogTo_p_wxObject},{"_p_wxProgressDialog", _p_wxProgressDialogTo_p_wxObject},{"_p_wxMessageDialog", _p_wxMessageDialogTo_p_wxObject},{"_p_wxFileDialog", _p_wxFileDialogTo_p_wxObject},{"_p_wxMultiChoiceDialog", _p_wxMultiChoiceDialogTo_p_wxObject},{"_p_wxSingleChoiceDialog", _p_wxSingleChoiceDialogTo_p_wxObject},{"_p_wxToolBarToolBase", _p_wxToolBarToolBaseTo_p_wxObject},{"_p_wxSlider", _p_wxSliderTo_p_wxObject},{"_p_wxPyWindow", _p_wxPyWindowTo_p_wxObject},{"_p_wxPaletteChangedEvent", _p_wxPaletteChangedEventTo_p_wxObject},{"_p_wxDisplayChangedEvent", _p_wxDisplayChangedEventTo_p_wxObject},{"_p_wxMouseCaptureChangedEvent", _p_wxMouseCaptureChangedEventTo_p_wxObject},{"_p_wxSysColourChangedEvent", _p_wxSysColourChangedEventTo_p_wxObject},{"_p_wxCheckBox", _p_wxCheckBoxTo_p_wxObject},{"_p_wxHelpEvent", _p_wxHelpEventTo_p_wxObject},{"_p_wxPanel", _p_wxPanelTo_p_wxObject},{"_p_wxScrollWinEvent", _p_wxScrollWinEventTo_p_wxObject},{"_p_wxTaskBarIconEvent", _p_wxTaskBarIconEventTo_p_wxObject},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxObject},{"_p_wxMenuEvent", _p_wxMenuEventTo_p_wxObject},{"_p_wxLEDNumberCtrl", _p_wxLEDNumberCtrlTo_p_wxObject},{"_p_wxToolBar", _p_wxToolBarTo_p_wxObject},{"_p_wxCommandEvent", _p_wxCommandEventTo_p_wxObject},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxObject},{"_p_wxStatusBar", _p_wxStatusBarTo_p_wxObject},{"_p_wxDropFilesEvent", _p_wxDropFilesEventTo_p_wxObject},{"_p_wxFocusEvent", _p_wxFocusEventTo_p_wxObject},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxObject},{"_p_wxMDIParentFrame", _p_wxMDIParentFrameTo_p_wxObject},{"_p_wxMenuBar", _p_wxMenuBarTo_p_wxObject},{0}}; +static swig_type_info _swigt__p_wxObject[] = {{"_p_wxObject", 0, "wxObject *", 0},{"_p_wxScrollBar", _p_wxScrollBarTo_p_wxObject},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxObject},{"_p_wxPreviewCanvas", _p_wxPreviewCanvasTo_p_wxObject},{"_p_wxEvent", _p_wxEventTo_p_wxObject},{"_p_wxBookCtrl", _p_wxBookCtrlTo_p_wxObject},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxObject},{"_p_wxInitDialogEvent", _p_wxInitDialogEventTo_p_wxObject},{"_p_wxIndividualLayoutConstraint", _p_wxIndividualLayoutConstraintTo_p_wxObject},{"_p_wxPyPreviewFrame", _p_wxPyPreviewFrameTo_p_wxObject},{"_p_wxPreviewFrame", _p_wxPreviewFrameTo_p_wxObject},{"_p_wxToolBarBase", _p_wxToolBarBaseTo_p_wxObject},{"_p_wxMenuItem", _p_wxMenuItemTo_p_wxObject},{"_p_wxImage", _p_wxImageTo_p_wxObject},{"_p_wxPySizer", _p_wxPySizerTo_p_wxObject},{"_p_wxGenericDragImage", _p_wxGenericDragImageTo_p_wxObject},{"_p_wxStaticBitmap", _p_wxStaticBitmapTo_p_wxObject},{"_p_wxComboBox", _p_wxComboBoxTo_p_wxObject},{"_p_wxLayoutAlgorithm", _p_wxLayoutAlgorithmTo_p_wxObject},{"_p_wxTaskBarIcon", _p_wxTaskBarIconTo_p_wxObject},{"_p_wxPyApp", _p_wxPyAppTo_p_wxObject},{"_p_wxNotebook", _p_wxNotebookTo_p_wxObject},{"_p_wxListItem", _p_wxListItemTo_p_wxObject},{"_p_wxNotebookSizer", _p_wxNotebookSizerTo_p_wxObject},{"_p_wxRemotelyScrolledTreeCtrl", _p_wxRemotelyScrolledTreeCtrlTo_p_wxObject},{"_p_wxPyTreeCtrl", _p_wxPyTreeCtrlTo_p_wxObject},{"_p_wxPyPreviewControlBar", _p_wxPyPreviewControlBarTo_p_wxObject},{"_p_wxPreviewControlBar", _p_wxPreviewControlBarTo_p_wxObject},{"_p_wxFindReplaceData", _p_wxFindReplaceDataTo_p_wxObject},{"_p_wxStaticLine", _p_wxStaticLineTo_p_wxObject},{"_p_wxValidator", _p_wxValidatorTo_p_wxObject},{"_p_wxPyValidator", _p_wxPyValidatorTo_p_wxObject},{"_p_wxCloseEvent", _p_wxCloseEventTo_p_wxObject},{"_p_wxMouseEvent", _p_wxMouseEventTo_p_wxObject},{"_p_wxEraseEvent", _p_wxEraseEventTo_p_wxObject},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxObject},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxObject},{"_p_wxTextUrlEvent", _p_wxTextUrlEventTo_p_wxObject},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxObject},{"_p_wxPageSetupDialogData", _p_wxPageSetupDialogDataTo_p_wxObject},{"_p_wxPrintDialogData", _p_wxPrintDialogDataTo_p_wxObject},{"_p_wxPrinter", _p_wxPrinterTo_p_wxObject},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxObject},{"_p_wxObject"},{"_p_wxRadioBox", _p_wxRadioBoxTo_p_wxObject},{"_p_wxFlexGridSizer", _p_wxFlexGridSizerTo_p_wxObject},{"_p_wxGridSizer", _p_wxGridSizerTo_p_wxObject},{"_p_wxTreeListColumnInfo", _p_wxTreeListColumnInfoTo_p_wxObject},{"_p_wxAcceleratorTable", _p_wxAcceleratorTableTo_p_wxObject},{"_p_wxPyControl", _p_wxPyControlTo_p_wxObject},{"_p_wxControl", _p_wxControlTo_p_wxObject},{"_p_wxContextHelp", _p_wxContextHelpTo_p_wxObject},{"_p_wxColourData", _p_wxColourDataTo_p_wxObject},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxObject},{"_p_wxQueryNewPaletteEvent", _p_wxQueryNewPaletteEventTo_p_wxObject},{"_p_wxMaximizeEvent", _p_wxMaximizeEventTo_p_wxObject},{"_p_wxIconizeEvent", _p_wxIconizeEventTo_p_wxObject},{"_p_wxActivateEvent", _p_wxActivateEventTo_p_wxObject},{"_p_wxSizeEvent", _p_wxSizeEventTo_p_wxObject},{"_p_wxMoveEvent", _p_wxMoveEventTo_p_wxObject},{"_p_wxIdleEvent", _p_wxIdleEventTo_p_wxObject},{"_p_wxStaticText", _p_wxStaticTextTo_p_wxObject},{"_p_wxCalculateLayoutEvent", _p_wxCalculateLayoutEventTo_p_wxObject},{"_p_wxListEvent", _p_wxListEventTo_p_wxObject},{"_p_wxDynamicSashSplitEvent", _p_wxDynamicSashSplitEventTo_p_wxObject},{"_p_wxPyPrintout", _p_wxPyPrintoutTo_p_wxObject},{"_p_wxGauge", _p_wxGaugeTo_p_wxObject},{"_p_wxMDIChildFrame", _p_wxMDIChildFrameTo_p_wxObject},{"_p_wxChoice", _p_wxChoiceTo_p_wxObject},{"_p_wxMenu", _p_wxMenuTo_p_wxObject},{"_p_wxBitmapButton", _p_wxBitmapButtonTo_p_wxObject},{"_p_wxButton", _p_wxButtonTo_p_wxObject},{"_p_wxContextHelpButton", _p_wxContextHelpButtonTo_p_wxObject},{"_p_wxSpinButton", _p_wxSpinButtonTo_p_wxObject},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxObject},{"_p_wxNavigationKeyEvent", _p_wxNavigationKeyEventTo_p_wxObject},{"_p_wxKeyEvent", _p_wxKeyEventTo_p_wxObject},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxObject},{"_p_wxPyHtmlListBox", _p_wxPyHtmlListBoxTo_p_wxObject},{"_p_wxPyVListBox", _p_wxPyVListBoxTo_p_wxObject},{"_p_wxEditableListBox", _p_wxEditableListBoxTo_p_wxObject},{"_p_wxListBox", _p_wxListBoxTo_p_wxObject},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxObject},{"_p_wxPrintData", _p_wxPrintDataTo_p_wxObject},{"_p_wxFontData", _p_wxFontDataTo_p_wxObject},{"_p_wxMiniFrame", _p_wxMiniFrameTo_p_wxObject},{"_p_wxListbook", _p_wxListbookTo_p_wxObject},{"_p_wxFrame", _p_wxFrameTo_p_wxObject},{"_p_wxPyPanel", _p_wxPyPanelTo_p_wxObject},{"_p_wxStaticBox", _p_wxStaticBoxTo_p_wxObject},{"_p_wxQueryLayoutInfoEvent", _p_wxQueryLayoutInfoEventTo_p_wxObject},{"_p_wxSplashScreen", _p_wxSplashScreenTo_p_wxObject},{"_p_wxFileSystem", _p_wxFileSystemTo_p_wxObject},{"_p_wxPyPrintPreview", _p_wxPyPrintPreviewTo_p_wxObject},{"_p_wxPrintPreview", _p_wxPrintPreviewTo_p_wxObject},{"_p_wxListView", _p_wxListViewTo_p_wxObject},{"_p_wxPyTreeListCtrl", _p_wxPyTreeListCtrlTo_p_wxObject},{"_p_wxPyListCtrl", _p_wxPyListCtrlTo_p_wxObject},{"_p_wxDirFilterListCtrl", _p_wxDirFilterListCtrlTo_p_wxObject},{"_p_wxLayoutConstraints", _p_wxLayoutConstraintsTo_p_wxObject},{"_p_wxSizer", _p_wxSizerTo_p_wxObject},{"_p_wxBoxSizer", _p_wxBoxSizerTo_p_wxObject},{"_p_wxStaticBoxSizer", _p_wxStaticBoxSizerTo_p_wxObject},{"_p_wxGridBagSizer", _p_wxGridBagSizerTo_p_wxObject},{"_p_wxNcPaintEvent", _p_wxNcPaintEventTo_p_wxObject},{"_p_wxPaintEvent", _p_wxPaintEventTo_p_wxObject},{"_p_wxFSFile", _p_wxFSFileTo_p_wxObject},{"_p_wxSetCursorEvent", _p_wxSetCursorEventTo_p_wxObject},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxObject},{"_p_wxTextCtrl", _p_wxTextCtrlTo_p_wxObject},{"_p_wxRadioButton", _p_wxRadioButtonTo_p_wxObject},{"_p_wxToggleButton", _p_wxToggleButtonTo_p_wxObject},{"_p_wxSizerItem", _p_wxSizerItemTo_p_wxObject},{"_p_wxGBSizerItem", _p_wxGBSizerItemTo_p_wxObject},{"_p_wxPrintDialog", _p_wxPrintDialogTo_p_wxObject},{"_p_wxPageSetupDialog", _p_wxPageSetupDialogTo_p_wxObject},{"_p_wxFontDialog", _p_wxFontDialogTo_p_wxObject},{"_p_wxDirDialog", _p_wxDirDialogTo_p_wxObject},{"_p_wxColourDialog", _p_wxColourDialogTo_p_wxObject},{"_p_wxDialog", _p_wxDialogTo_p_wxObject},{"_p_wxPyEvent", _p_wxPyEventTo_p_wxObject},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxObject},{"_p_wxDynamicSashUnifyEvent", _p_wxDynamicSashUnifyEventTo_p_wxObject},{"_p_wxGenericDirCtrl", _p_wxGenericDirCtrlTo_p_wxObject},{"_p_wxTIFFHandler", _p_wxTIFFHandlerTo_p_wxObject},{"_p_wxImageHandler", _p_wxImageHandlerTo_p_wxObject},{"_p_wxBMPHandler", _p_wxBMPHandlerTo_p_wxObject},{"_p_wxICOHandler", _p_wxICOHandlerTo_p_wxObject},{"_p_wxCURHandler", _p_wxCURHandlerTo_p_wxObject},{"_p_wxANIHandler", _p_wxANIHandlerTo_p_wxObject},{"_p_wxPNGHandler", _p_wxPNGHandlerTo_p_wxObject},{"_p_wxGIFHandler", _p_wxGIFHandlerTo_p_wxObject},{"_p_wxPCXHandler", _p_wxPCXHandlerTo_p_wxObject},{"_p_wxJPEGHandler", _p_wxJPEGHandlerTo_p_wxObject},{"_p_wxPNMHandler", _p_wxPNMHandlerTo_p_wxObject},{"_p_wxXPMHandler", _p_wxXPMHandlerTo_p_wxObject},{"_p_wxShowEvent", _p_wxShowEventTo_p_wxObject},{"_p_wxEvtHandler", _p_wxEvtHandlerTo_p_wxObject},{"_p_wxThinSplitterWindow", _p_wxThinSplitterWindowTo_p_wxObject},{"_p_wxPyTreeCompanionWindow", _p_wxPyTreeCompanionWindowTo_p_wxObject},{"_p_wxDynamicSashWindow", _p_wxDynamicSashWindowTo_p_wxObject},{"_p_wxPyVScrolledWindow", _p_wxPyVScrolledWindowTo_p_wxObject},{"_p_wxTipWindow", _p_wxTipWindowTo_p_wxObject},{"_p_wxPyPopupTransientWindow", _p_wxPyPopupTransientWindowTo_p_wxObject},{"_p_wxPopupWindow", _p_wxPopupWindowTo_p_wxObject},{"_p_wxSashLayoutWindow", _p_wxSashLayoutWindowTo_p_wxObject},{"_p_wxSashWindow", _p_wxSashWindowTo_p_wxObject},{"_p_wxSplitterWindow", _p_wxSplitterWindowTo_p_wxObject},{"_p_wxSplashScreenWindow", _p_wxSplashScreenWindowTo_p_wxObject},{"_p_wxWindow", _p_wxWindowTo_p_wxObject},{"_p_wxSplitterScrolledWindow", _p_wxSplitterScrolledWindowTo_p_wxObject},{"_p_wxMDIClientWindow", _p_wxMDIClientWindowTo_p_wxObject},{"_p_wxScrolledWindow", _p_wxScrolledWindowTo_p_wxObject},{"_p_wxTopLevelWindow", _p_wxTopLevelWindowTo_p_wxObject},{"_p_wxSpinCtrl", _p_wxSpinCtrlTo_p_wxObject},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxObject},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxObject},{"_p_wxBookCtrlSizer", _p_wxBookCtrlSizerTo_p_wxObject},{"_p_wxTextEntryDialog", _p_wxTextEntryDialogTo_p_wxObject},{"_p_wxFindReplaceDialog", _p_wxFindReplaceDialogTo_p_wxObject},{"_p_wxProgressDialog", _p_wxProgressDialogTo_p_wxObject},{"_p_wxMessageDialog", _p_wxMessageDialogTo_p_wxObject},{"_p_wxFileDialog", _p_wxFileDialogTo_p_wxObject},{"_p_wxMultiChoiceDialog", _p_wxMultiChoiceDialogTo_p_wxObject},{"_p_wxSingleChoiceDialog", _p_wxSingleChoiceDialogTo_p_wxObject},{"_p_wxToolBarToolBase", _p_wxToolBarToolBaseTo_p_wxObject},{"_p_wxSlider", _p_wxSliderTo_p_wxObject},{"_p_wxPyWindow", _p_wxPyWindowTo_p_wxObject},{"_p_wxPaletteChangedEvent", _p_wxPaletteChangedEventTo_p_wxObject},{"_p_wxDisplayChangedEvent", _p_wxDisplayChangedEventTo_p_wxObject},{"_p_wxMouseCaptureChangedEvent", _p_wxMouseCaptureChangedEventTo_p_wxObject},{"_p_wxSysColourChangedEvent", _p_wxSysColourChangedEventTo_p_wxObject},{"_p_wxCheckBox", _p_wxCheckBoxTo_p_wxObject},{"_p_wxHelpEvent", _p_wxHelpEventTo_p_wxObject},{"_p_wxPanel", _p_wxPanelTo_p_wxObject},{"_p_wxSpinEvent", _p_wxSpinEventTo_p_wxObject},{"_p_wxScrollWinEvent", _p_wxScrollWinEventTo_p_wxObject},{"_p_wxTaskBarIconEvent", _p_wxTaskBarIconEventTo_p_wxObject},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxObject},{"_p_wxMenuEvent", _p_wxMenuEventTo_p_wxObject},{"_p_wxLEDNumberCtrl", _p_wxLEDNumberCtrlTo_p_wxObject},{"_p_wxToolBar", _p_wxToolBarTo_p_wxObject},{"_p_wxCommandEvent", _p_wxCommandEventTo_p_wxObject},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxObject},{"_p_wxStatusBar", _p_wxStatusBarTo_p_wxObject},{"_p_wxDropFilesEvent", _p_wxDropFilesEventTo_p_wxObject},{"_p_wxFocusEvent", _p_wxFocusEventTo_p_wxObject},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxObject},{"_p_wxMDIParentFrame", _p_wxMDIParentFrameTo_p_wxObject},{"_p_wxMenuBar", _p_wxMenuBarTo_p_wxObject},{0}}; static swig_type_info _swigt__p_wxColour[] = {{"_p_wxColour", 0, "wxColour *", 0},{"_p_wxColour"},{0}}; static swig_type_info _swigt__p_wxPyTreeCtrl[] = {{"_p_wxPyTreeCtrl", 0, "wxPyTreeCtrl *", 0},{"_p_wxPyTreeCtrl"},{"_p_wxRemotelyScrolledTreeCtrl", _p_wxRemotelyScrolledTreeCtrlTo_p_wxPyTreeCtrl},{0}}; static swig_type_info _swigt__p_wxRemotelyScrolledTreeCtrl[] = {{"_p_wxRemotelyScrolledTreeCtrl", 0, "wxRemotelyScrolledTreeCtrl *", 0},{"_p_wxRemotelyScrolledTreeCtrl"},{0}}; @@ -7263,7 +7506,7 @@ static swig_type_info _swigt__p_wxPyTreeCompanionWindow[] = {{"_p_wxPyTreeCompan static swig_type_info _swigt__p_wxThinSplitterWindow[] = {{"_p_wxThinSplitterWindow", 0, "wxThinSplitterWindow *", 0},{"_p_wxThinSplitterWindow"},{0}}; static swig_type_info _swigt__p_wxSplitterScrolledWindow[] = {{"_p_wxSplitterScrolledWindow", 0, "wxSplitterScrolledWindow *", 0},{"_p_wxSplitterScrolledWindow"},{0}}; static swig_type_info _swigt__p_wxValidator[] = {{"_p_wxValidator", 0, "wxValidator *", 0},{"_p_wxValidator"},{"_p_wxPyValidator", _p_wxPyValidatorTo_p_wxValidator},{0}}; -static swig_type_info _swigt__p_wxCommandEvent[] = {{"_p_wxCommandEvent", 0, "wxCommandEvent *", 0},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxCommandEvent},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxCommandEvent},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxCommandEvent},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxCommandEvent},{"_p_wxTextUrlEvent", _p_wxTextUrlEventTo_p_wxCommandEvent},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxCommandEvent},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxCommandEvent},{"_p_wxCommandEvent"},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxCommandEvent},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxCommandEvent},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxCommandEvent},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxCommandEvent},{"_p_wxListEvent", _p_wxListEventTo_p_wxCommandEvent},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxCommandEvent},{"_p_wxDynamicSashSplitEvent", _p_wxDynamicSashSplitEventTo_p_wxCommandEvent},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxCommandEvent},{"_p_wxHelpEvent", _p_wxHelpEventTo_p_wxCommandEvent},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxCommandEvent},{"_p_wxDynamicSashUnifyEvent", _p_wxDynamicSashUnifyEventTo_p_wxCommandEvent},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxCommandEvent},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxCommandEvent},{0}}; +static swig_type_info _swigt__p_wxCommandEvent[] = {{"_p_wxCommandEvent", 0, "wxCommandEvent *", 0},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxCommandEvent},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxCommandEvent},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxCommandEvent},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxCommandEvent},{"_p_wxTextUrlEvent", _p_wxTextUrlEventTo_p_wxCommandEvent},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxCommandEvent},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxCommandEvent},{"_p_wxCommandEvent"},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxCommandEvent},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxCommandEvent},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxCommandEvent},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxCommandEvent},{"_p_wxListEvent", _p_wxListEventTo_p_wxCommandEvent},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxCommandEvent},{"_p_wxDynamicSashSplitEvent", _p_wxDynamicSashSplitEventTo_p_wxCommandEvent},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxCommandEvent},{"_p_wxSpinEvent", _p_wxSpinEventTo_p_wxCommandEvent},{"_p_wxHelpEvent", _p_wxHelpEventTo_p_wxCommandEvent},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxCommandEvent},{"_p_wxDynamicSashUnifyEvent", _p_wxDynamicSashUnifyEventTo_p_wxCommandEvent},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxCommandEvent},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxCommandEvent},{0}}; static swig_type_info _swigt__p_wxArrayString[] = {{"_p_wxArrayString", 0, "wxArrayString *", 0},{"_p_wxArrayString"},{0}}; static swig_type_info _swigt__p_wxLEDNumberCtrl[] = {{"_p_wxLEDNumberCtrl", 0, "wxLEDNumberCtrl *", 0},{"_p_wxLEDNumberCtrl"},{0}}; static swig_type_info _swigt__p_wxDynamicSashSplitEvent[] = {{"_p_wxDynamicSashSplitEvent", 0, "wxDynamicSashSplitEvent *", 0},{"_p_wxDynamicSashSplitEvent"},{0}}; @@ -7275,7 +7518,7 @@ static swig_type_info _swigt__p_wxDynamicSashUnifyEvent[] = {{"_p_wxDynamicSashU static swig_type_info _swigt__p_wxControl[] = {{"_p_wxControl", 0, "wxControl *", 0},{"_p_wxBookCtrl", _p_wxBookCtrlTo_p_wxControl},{"_p_wxToolBar", _p_wxToolBarTo_p_wxControl},{"_p_wxToggleButton", _p_wxToggleButtonTo_p_wxControl},{"_p_wxRadioButton", _p_wxRadioButtonTo_p_wxControl},{"_p_wxLEDNumberCtrl", _p_wxLEDNumberCtrlTo_p_wxControl},{"_p_wxControl"},{"_p_wxPyControl", _p_wxPyControlTo_p_wxControl},{"_p_wxToolBarBase", _p_wxToolBarBaseTo_p_wxControl},{"_p_wxDirFilterListCtrl", _p_wxDirFilterListCtrlTo_p_wxControl},{"_p_wxPyListCtrl", _p_wxPyListCtrlTo_p_wxControl},{"_p_wxPyTreeListCtrl", _p_wxPyTreeListCtrlTo_p_wxControl},{"_p_wxComboBox", _p_wxComboBoxTo_p_wxControl},{"_p_wxGenericDirCtrl", _p_wxGenericDirCtrlTo_p_wxControl},{"_p_wxScrollBar", _p_wxScrollBarTo_p_wxControl},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxControl},{"_p_wxGauge", _p_wxGaugeTo_p_wxControl},{"_p_wxStaticLine", _p_wxStaticLineTo_p_wxControl},{"_p_wxListbook", _p_wxListbookTo_p_wxControl},{"_p_wxRemotelyScrolledTreeCtrl", _p_wxRemotelyScrolledTreeCtrlTo_p_wxControl},{"_p_wxPyTreeCtrl", _p_wxPyTreeCtrlTo_p_wxControl},{"_p_wxCheckBox", _p_wxCheckBoxTo_p_wxControl},{"_p_wxRadioBox", _p_wxRadioBoxTo_p_wxControl},{"_p_wxChoice", _p_wxChoiceTo_p_wxControl},{"_p_wxListBox", _p_wxListBoxTo_p_wxControl},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxControl},{"_p_wxListView", _p_wxListViewTo_p_wxControl},{"_p_wxNotebook", _p_wxNotebookTo_p_wxControl},{"_p_wxStaticBitmap", _p_wxStaticBitmapTo_p_wxControl},{"_p_wxSpinCtrl", _p_wxSpinCtrlTo_p_wxControl},{"_p_wxStaticText", _p_wxStaticTextTo_p_wxControl},{"_p_wxStaticBox", _p_wxStaticBoxTo_p_wxControl},{"_p_wxSlider", _p_wxSliderTo_p_wxControl},{"_p_wxContextHelpButton", _p_wxContextHelpButtonTo_p_wxControl},{"_p_wxSpinButton", _p_wxSpinButtonTo_p_wxControl},{"_p_wxButton", _p_wxButtonTo_p_wxControl},{"_p_wxBitmapButton", _p_wxBitmapButtonTo_p_wxControl},{"_p_wxTextCtrl", _p_wxTextCtrlTo_p_wxControl},{0}}; static swig_type_info _swigt__p_wxPanel[] = {{"_p_wxPanel", 0, "wxPanel *", 0},{"_p_wxPanel"},{"_p_wxScrolledWindow", _p_wxScrolledWindowTo_p_wxPanel},{"_p_wxSplitterScrolledWindow", _p_wxSplitterScrolledWindowTo_p_wxPanel},{"_p_wxPyVScrolledWindow", _p_wxPyVScrolledWindowTo_p_wxPanel},{"_p_wxPyVListBox", _p_wxPyVListBoxTo_p_wxPanel},{"_p_wxPyHtmlListBox", _p_wxPyHtmlListBoxTo_p_wxPanel},{"_p_wxPyPanel", _p_wxPyPanelTo_p_wxPanel},{"_p_wxEditableListBox", _p_wxEditableListBoxTo_p_wxPanel},{"_p_wxPreviewCanvas", _p_wxPreviewCanvasTo_p_wxPanel},{"_p_wxPreviewControlBar", _p_wxPreviewControlBarTo_p_wxPanel},{"_p_wxPyPreviewControlBar", _p_wxPyPreviewControlBarTo_p_wxPanel},{0}}; static swig_type_info _swigt__p_wxPyTreeItemData[] = {{"_p_wxPyTreeItemData", 0, "wxPyTreeItemData *", 0},{"_p_wxPyTreeItemData"},{0}}; -static swig_type_info _swigt__p_wxEvent[] = {{"_p_wxEvent", 0, "wxEvent *", 0},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxEvent},{"_p_wxMenuEvent", _p_wxMenuEventTo_p_wxEvent},{"_p_wxCloseEvent", _p_wxCloseEventTo_p_wxEvent},{"_p_wxMouseEvent", _p_wxMouseEventTo_p_wxEvent},{"_p_wxEraseEvent", _p_wxEraseEventTo_p_wxEvent},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxEvent},{"_p_wxSetCursorEvent", _p_wxSetCursorEventTo_p_wxEvent},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxEvent},{"_p_wxInitDialogEvent", _p_wxInitDialogEventTo_p_wxEvent},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxEvent},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxEvent},{"_p_wxTextUrlEvent", _p_wxTextUrlEventTo_p_wxEvent},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxEvent},{"_p_wxPyEvent", _p_wxPyEventTo_p_wxEvent},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxEvent},{"_p_wxDynamicSashUnifyEvent", _p_wxDynamicSashUnifyEventTo_p_wxEvent},{"_p_wxCalculateLayoutEvent", _p_wxCalculateLayoutEventTo_p_wxEvent},{"_p_wxListEvent", _p_wxListEventTo_p_wxEvent},{"_p_wxDynamicSashSplitEvent", _p_wxDynamicSashSplitEventTo_p_wxEvent},{"_p_wxHelpEvent", _p_wxHelpEventTo_p_wxEvent},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxEvent},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxEvent},{"_p_wxEvent"},{"_p_wxIdleEvent", _p_wxIdleEventTo_p_wxEvent},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxEvent},{"_p_wxQueryNewPaletteEvent", _p_wxQueryNewPaletteEventTo_p_wxEvent},{"_p_wxMaximizeEvent", _p_wxMaximizeEventTo_p_wxEvent},{"_p_wxIconizeEvent", _p_wxIconizeEventTo_p_wxEvent},{"_p_wxActivateEvent", _p_wxActivateEventTo_p_wxEvent},{"_p_wxSizeEvent", _p_wxSizeEventTo_p_wxEvent},{"_p_wxMoveEvent", _p_wxMoveEventTo_p_wxEvent},{"_p_wxPaintEvent", _p_wxPaintEventTo_p_wxEvent},{"_p_wxNcPaintEvent", _p_wxNcPaintEventTo_p_wxEvent},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxEvent},{"_p_wxPaletteChangedEvent", _p_wxPaletteChangedEventTo_p_wxEvent},{"_p_wxDisplayChangedEvent", _p_wxDisplayChangedEventTo_p_wxEvent},{"_p_wxMouseCaptureChangedEvent", _p_wxMouseCaptureChangedEventTo_p_wxEvent},{"_p_wxSysColourChangedEvent", _p_wxSysColourChangedEventTo_p_wxEvent},{"_p_wxDropFilesEvent", _p_wxDropFilesEventTo_p_wxEvent},{"_p_wxFocusEvent", _p_wxFocusEventTo_p_wxEvent},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxEvent},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxEvent},{"_p_wxQueryLayoutInfoEvent", _p_wxQueryLayoutInfoEventTo_p_wxEvent},{"_p_wxShowEvent", _p_wxShowEventTo_p_wxEvent},{"_p_wxCommandEvent", _p_wxCommandEventTo_p_wxEvent},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxEvent},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxEvent},{"_p_wxNavigationKeyEvent", _p_wxNavigationKeyEventTo_p_wxEvent},{"_p_wxKeyEvent", _p_wxKeyEventTo_p_wxEvent},{"_p_wxScrollWinEvent", _p_wxScrollWinEventTo_p_wxEvent},{"_p_wxTaskBarIconEvent", _p_wxTaskBarIconEventTo_p_wxEvent},{0}}; +static swig_type_info _swigt__p_wxEvent[] = {{"_p_wxEvent", 0, "wxEvent *", 0},{"_p_wxContextMenuEvent", _p_wxContextMenuEventTo_p_wxEvent},{"_p_wxMenuEvent", _p_wxMenuEventTo_p_wxEvent},{"_p_wxCloseEvent", _p_wxCloseEventTo_p_wxEvent},{"_p_wxMouseEvent", _p_wxMouseEventTo_p_wxEvent},{"_p_wxEraseEvent", _p_wxEraseEventTo_p_wxEvent},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxEvent},{"_p_wxSetCursorEvent", _p_wxSetCursorEventTo_p_wxEvent},{"_p_wxSplitterEvent", _p_wxSplitterEventTo_p_wxEvent},{"_p_wxInitDialogEvent", _p_wxInitDialogEventTo_p_wxEvent},{"_p_wxFindDialogEvent", _p_wxFindDialogEventTo_p_wxEvent},{"_p_wxScrollEvent", _p_wxScrollEventTo_p_wxEvent},{"_p_wxTextUrlEvent", _p_wxTextUrlEventTo_p_wxEvent},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxEvent},{"_p_wxPyEvent", _p_wxPyEventTo_p_wxEvent},{"_p_wxNotifyEvent", _p_wxNotifyEventTo_p_wxEvent},{"_p_wxDynamicSashUnifyEvent", _p_wxDynamicSashUnifyEventTo_p_wxEvent},{"_p_wxCalculateLayoutEvent", _p_wxCalculateLayoutEventTo_p_wxEvent},{"_p_wxListEvent", _p_wxListEventTo_p_wxEvent},{"_p_wxDynamicSashSplitEvent", _p_wxDynamicSashSplitEventTo_p_wxEvent},{"_p_wxHelpEvent", _p_wxHelpEventTo_p_wxEvent},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxEvent},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxEvent},{"_p_wxEvent"},{"_p_wxIdleEvent", _p_wxIdleEventTo_p_wxEvent},{"_p_wxWindowCreateEvent", _p_wxWindowCreateEventTo_p_wxEvent},{"_p_wxQueryNewPaletteEvent", _p_wxQueryNewPaletteEventTo_p_wxEvent},{"_p_wxMaximizeEvent", _p_wxMaximizeEventTo_p_wxEvent},{"_p_wxIconizeEvent", _p_wxIconizeEventTo_p_wxEvent},{"_p_wxActivateEvent", _p_wxActivateEventTo_p_wxEvent},{"_p_wxSizeEvent", _p_wxSizeEventTo_p_wxEvent},{"_p_wxMoveEvent", _p_wxMoveEventTo_p_wxEvent},{"_p_wxPaintEvent", _p_wxPaintEventTo_p_wxEvent},{"_p_wxNcPaintEvent", _p_wxNcPaintEventTo_p_wxEvent},{"_p_wxUpdateUIEvent", _p_wxUpdateUIEventTo_p_wxEvent},{"_p_wxPaletteChangedEvent", _p_wxPaletteChangedEventTo_p_wxEvent},{"_p_wxDisplayChangedEvent", _p_wxDisplayChangedEventTo_p_wxEvent},{"_p_wxMouseCaptureChangedEvent", _p_wxMouseCaptureChangedEventTo_p_wxEvent},{"_p_wxSysColourChangedEvent", _p_wxSysColourChangedEventTo_p_wxEvent},{"_p_wxDropFilesEvent", _p_wxDropFilesEventTo_p_wxEvent},{"_p_wxFocusEvent", _p_wxFocusEventTo_p_wxEvent},{"_p_wxChildFocusEvent", _p_wxChildFocusEventTo_p_wxEvent},{"_p_wxSashEvent", _p_wxSashEventTo_p_wxEvent},{"_p_wxQueryLayoutInfoEvent", _p_wxQueryLayoutInfoEventTo_p_wxEvent},{"_p_wxShowEvent", _p_wxShowEventTo_p_wxEvent},{"_p_wxCommandEvent", _p_wxCommandEventTo_p_wxEvent},{"_p_wxPyCommandEvent", _p_wxPyCommandEventTo_p_wxEvent},{"_p_wxWindowDestroyEvent", _p_wxWindowDestroyEventTo_p_wxEvent},{"_p_wxNavigationKeyEvent", _p_wxNavigationKeyEventTo_p_wxEvent},{"_p_wxKeyEvent", _p_wxKeyEventTo_p_wxEvent},{"_p_wxSpinEvent", _p_wxSpinEventTo_p_wxEvent},{"_p_wxScrollWinEvent", _p_wxScrollWinEventTo_p_wxEvent},{"_p_wxTaskBarIconEvent", _p_wxTaskBarIconEventTo_p_wxEvent},{0}}; static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0},{"_p_int"},{0}}; static swig_type_info *swig_types_initial[] = { diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.py b/wxPython/contrib/glcanvas/msw/glcanvas.py index bf1df18410..7b4865a3a1 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.py +++ b/wxPython/contrib/glcanvas/msw/glcanvas.py @@ -120,14 +120,14 @@ class GLCanvasPtr(GLCanvas): self.__class__ = GLCanvas _glcanvas.GLCanvas_swigregister(GLCanvasPtr) -def wxGLCanvasWithContext(*args, **kwargs): +def GLCanvasWithContext(*args, **kwargs): """ - wxGLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, + GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=GLCanvasNameStr, int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas """ - val = _glcanvas.new_wxGLCanvasWithContext(*args, **kwargs) + val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs) val.thisown = 1 val._setOORInfo(val) return val diff --git a/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp index 75ad22b8fd..f554e1c587 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -277,8 +449,10 @@ static PyObject *_wrap_new_GLContext(PyObject *self, PyObject *args, PyObject *k }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:new_GLContext",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGLCanvas,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxPalette,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -547,7 +721,7 @@ static PyObject *_wrap_new_GLCanvas(PyObject *self, PyObject *args, PyObject *kw } -static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_GLCanvasWithContext(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; wxGLContext *arg2 = (wxGLContext *) NULL ; @@ -578,7 +752,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, (char *) "parent",(char *) "shared",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name",(char *) "attribList",(char *) "palette", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OiOOlOOO:new_wxGLCanvasWithContext",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&arg6,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OiOOlOOO:new_GLCanvasWithContext",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&arg6,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGLContext,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -910,7 +1084,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"GLContext_GetWindow", (PyCFunction) _wrap_GLContext_GetWindow, METH_VARARGS | METH_KEYWORDS }, { (char *)"GLContext_swigregister", GLContext_swigregister, METH_VARARGS }, { (char *)"new_GLCanvas", (PyCFunction) _wrap_new_GLCanvas, METH_VARARGS | METH_KEYWORDS }, - { (char *)"new_wxGLCanvasWithContext", (PyCFunction) _wrap_new_wxGLCanvasWithContext, METH_VARARGS | METH_KEYWORDS }, + { (char *)"new_GLCanvasWithContext", (PyCFunction) _wrap_new_GLCanvasWithContext, METH_VARARGS | METH_KEYWORDS }, { (char *)"GLCanvas_SetCurrent", (PyCFunction) _wrap_GLCanvas_SetCurrent, METH_VARARGS | METH_KEYWORDS }, { (char *)"GLCanvas_SetColour", (PyCFunction) _wrap_GLCanvas_SetColour, METH_VARARGS | METH_KEYWORDS }, { (char *)"GLCanvas_SwapBuffers", (PyCFunction) _wrap_GLCanvas_SwapBuffers, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/contrib/iewin/iewin_wrap.cpp b/wxPython/contrib/iewin/iewin_wrap.cpp index 68b751eb53..3555495d9f 100644 --- a/wxPython/contrib/iewin/iewin_wrap.cpp +++ b/wxPython/contrib/iewin/iewin_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -587,8 +759,10 @@ static PyObject *_wrap_IEHtmlWin_SetEditMode(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IEHtmlWin_SetEditMode",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIEHtmlWin,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetEditMode(arg2); @@ -642,8 +816,10 @@ static PyObject *_wrap_IEHtmlWin_GetStringSelection(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:IEHtmlWin_GetStringSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIEHtmlWin,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -679,8 +855,10 @@ static PyObject *_wrap_IEHtmlWin_GetText(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:IEHtmlWin_GetText",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIEHtmlWin,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); diff --git a/wxPython/contrib/ogl/msw/ogl_wrap.cpp b/wxPython/contrib/ogl/msw/ogl_wrap.cpp index 5457033f2c..d3fa2c8cba 100644 --- a/wxPython/contrib/ogl/msw/ogl_wrap.cpp +++ b/wxPython/contrib/ogl/msw/ogl_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -2018,8 +2190,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDrawBranches(PyObject *self, PyO PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2289,8 +2463,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMovePre(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2329,8 +2505,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMovePost(PyObject *self, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2362,8 +2540,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDragLeft(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShapeEvtHandler_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -2450,8 +2630,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDragRight(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShapeEvtHandler_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -2635,8 +2817,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMoveLink(PyObject *self, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2671,8 +2855,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnSizingDragLeft(PyObject *self, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyShapeEvtHandler_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -3368,8 +3554,10 @@ static PyObject *_wrap_PyShape_SetDrawHandles(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetDrawHandles",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDrawHandles(arg2); @@ -3652,8 +3840,10 @@ static PyObject *_wrap_PyShape_Select(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_Select",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -3687,12 +3877,16 @@ static PyObject *_wrap_PyShape_SetHighlight(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_SetHighlight",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3797,8 +3991,10 @@ static PyObject *_wrap_PyShape_SetSensitivityFilter(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:PyShape_SetSensitivityFilter",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3853,12 +4049,16 @@ static PyObject *_wrap_PyShape_SetDraggable(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyShape_SetDraggable",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; + { + arg2 = (bool) SPyObj_AsBool(obj1); if (PyErr_Occurred()) SWIG_fail; } + if (obj2) { + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDraggable(arg2,arg3); @@ -3887,10 +4087,14 @@ static PyObject *_wrap_PyShape_SetFixedSize(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyShape_SetFixedSize",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetFixedSize(arg2,arg3); @@ -4005,8 +4209,10 @@ static PyObject *_wrap_PyShape_SetSpaceAttachments(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetSpaceAttachments",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSpaceAttachments(arg2); @@ -4060,8 +4266,10 @@ static PyObject *_wrap_PyShape_SetShadowMode(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:PyShape_SetShadowMode",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4155,8 +4363,10 @@ static PyObject *_wrap_PyShape_SetCentreResize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetCentreResize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCentreResize(arg2); @@ -4208,8 +4418,10 @@ static PyObject *_wrap_PyShape_SetMaintainAspectRatio(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetMaintainAspectRatio",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetMaintainAspectRatio(arg2); @@ -4286,8 +4498,10 @@ static PyObject *_wrap_PyShape_SetDisableLabel(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetDisableLabel",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDisableLabel(arg2); @@ -4525,8 +4739,10 @@ static PyObject *_wrap_PyShape_Show(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Show(arg2); @@ -4587,8 +4803,10 @@ static PyObject *_wrap_PyShape_Move(PyObject *self, PyObject *args, PyObject *kw PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4793,8 +5011,10 @@ static PyObject *_wrap_PyShape_SetSize(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Odd|O:PyShape_SetSize",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6027,8 +6247,10 @@ static PyObject *_wrap_PyShape_EraseLinks(PyObject *self, PyObject *args, PyObje PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6064,8 +6286,10 @@ static PyObject *_wrap_PyShape_DrawLinks(PyObject *self, PyObject *args, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6616,12 +6840,16 @@ static PyObject *_wrap_PyShape_CreateNewCopy(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_CreateNewCopy",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7021,8 +7249,10 @@ static PyObject *_wrap_PyShape_base_OnDrawBranches(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7292,8 +7522,10 @@ static PyObject *_wrap_PyShape_base_OnMovePre(PyObject *self, PyObject *args, Py PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7332,8 +7564,10 @@ static PyObject *_wrap_PyShape_base_OnMovePost(PyObject *self, PyObject *args, P PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7365,8 +7599,10 @@ static PyObject *_wrap_PyShape_base_OnDragLeft(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -7453,8 +7689,10 @@ static PyObject *_wrap_PyShape_base_OnDragRight(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -7638,8 +7876,10 @@ static PyObject *_wrap_PyShape_base_OnMoveLink(PyObject *self, PyObject *args, P PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7674,8 +7914,10 @@ static PyObject *_wrap_PyShape_base_OnSizingDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -8172,8 +8414,10 @@ static PyObject *_wrap_PseudoMetaFile_SetRotateable(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PseudoMetaFile_SetRotateable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPseudoMetaFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetRotateable(arg2); @@ -8911,8 +9155,10 @@ static PyObject *_wrap_PseudoMetaFile_SetPen(PyObject *self, PyObject *args, PyO arg2 = NULL; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8959,8 +9205,10 @@ static PyObject *_wrap_PseudoMetaFile_SetBrush(PyObject *self, PyObject *args, P arg2 = NULL; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9325,8 +9573,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDrawBranches(PyObject *self, PyOb PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9596,8 +9846,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMovePre(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9636,8 +9888,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMovePost(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9669,8 +9923,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDragLeft(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyRectangleShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -9757,8 +10013,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDragRight(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyRectangleShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -9942,8 +10200,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMoveLink(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9978,8 +10238,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnSizingDragLeft(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyRectangleShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -10309,8 +10571,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDrawBranches(PyObject *self, PyObje PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10580,8 +10844,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10620,8 +10886,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10653,8 +10921,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyControlPoint_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -10741,8 +11011,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyControlPoint_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -10926,8 +11198,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMoveLink(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10962,8 +11236,10 @@ static PyObject *_wrap_PyControlPoint_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyControlPoint_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -11383,8 +11659,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDrawBranches(PyObject *self, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11654,8 +11932,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMovePre(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11694,8 +11974,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMovePost(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11727,8 +12009,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyBitmapShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -11815,8 +12099,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDragRight(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyBitmapShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -12000,8 +12286,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMoveLink(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12036,8 +12324,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnSizingDragLeft(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyBitmapShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -12904,8 +13194,10 @@ static PyObject *_wrap_PyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *args arg2 = NULL; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13002,8 +13294,10 @@ static PyObject *_wrap_PyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args, arg2 = NULL; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13088,8 +13382,10 @@ static PyObject *_wrap_PyDrawnShape_SetSaveToFile(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyDrawnShape_SetSaveToFile",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSaveToFile(arg2); @@ -13233,8 +13529,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDrawBranches(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13504,8 +13802,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMovePre(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13544,8 +13844,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMovePost(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13577,8 +13879,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDragLeft(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDrawnShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -13665,8 +13969,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDragRight(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDrawnShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -13850,8 +14156,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMoveLink(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13886,8 +14194,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnSizingDragLeft(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDrawnShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -14683,8 +14993,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDrawBranches(PyObject *self, PyOb PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14954,8 +15266,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMovePre(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14994,8 +15308,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMovePost(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15027,8 +15343,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDragLeft(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCompositeShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -15115,8 +15433,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDragRight(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCompositeShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -15300,8 +15620,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMoveLink(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15336,8 +15658,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnSizingDragLeft(PyObject *self, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyCompositeShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -15678,8 +16002,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDrawBranches(PyObject *self, PyObje PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15949,8 +16275,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15989,8 +16317,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -16022,8 +16352,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDividedShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -16110,8 +16442,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDividedShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -16295,8 +16629,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMoveLink(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -16331,8 +16667,10 @@ static PyObject *_wrap_PyDividedShape_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDividedShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -16535,8 +16873,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustBottom(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustBottom",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->AdjustBottom(arg2,arg3); @@ -16564,8 +16904,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustLeft(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustLeft",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->AdjustLeft(arg2,arg3); @@ -16593,8 +16935,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustRight(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustRight",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->AdjustRight(arg2,arg3); @@ -16622,8 +16966,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustTop(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustTop",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->AdjustTop(arg2,arg3); @@ -16916,8 +17262,10 @@ static PyObject *_wrap_PyDivisionShape_ResizeAdjoining(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OidO:PyDivisionShape_ResizeAdjoining",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ResizeAdjoining(arg2,arg3,arg4); @@ -17362,8 +17710,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDrawBranches(PyObject *self, PyObj PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17633,8 +17983,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMovePre(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17673,8 +18025,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMovePost(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17706,8 +18060,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDragLeft(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDivisionShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -17794,8 +18150,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDivisionShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -17979,8 +18337,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMoveLink(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -18015,8 +18375,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnSizingDragLeft(PyObject *self, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDivisionShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -18285,8 +18647,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDrawBranches(PyObject *self, PyObje PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -18556,8 +18920,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -18596,8 +18962,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -18629,8 +18997,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyEllipseShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -18717,8 +19087,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyEllipseShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -18902,8 +19274,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMoveLink(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -18938,8 +19312,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyEllipseShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -19207,8 +19583,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDrawBranches(PyObject *self, PyObjec PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -19478,8 +19856,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMovePre(PyObject *self, PyObject *ar PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -19518,8 +19898,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMovePost(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -19551,8 +19933,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCircleShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -19639,8 +20023,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDragRight(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCircleShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -19824,8 +20210,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMoveLink(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -19860,8 +20248,10 @@ static PyObject *_wrap_PyCircleShape_base_OnSizingDragLeft(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyCircleShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -20713,8 +21103,10 @@ static PyObject *_wrap_PyLineShape_DrawArrow(PyObject *self, PyObject *args, PyO PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxArrowHead,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->DrawArrow(*arg2,arg3,arg4,arg5); @@ -21119,8 +21511,10 @@ static PyObject *_wrap_PyLineShape_FindNth(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyLineShape_FindNth",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg5 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->FindNth(arg2,arg3,arg4,arg5); @@ -21663,8 +22057,10 @@ static PyObject *_wrap_PyLineShape_SetIgnoreOffsets(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_SetIgnoreOffsets",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetIgnoreOffsets(arg2); @@ -21691,8 +22087,10 @@ static PyObject *_wrap_PyLineShape_SetSpline(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_SetSpline",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSpline(arg2); @@ -21801,10 +22199,14 @@ static PyObject *_wrap_PyLineShape_SetAlignmentOrientation(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyLineShape_SetAlignmentOrientation",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAlignmentOrientation(arg2,arg3); @@ -21832,8 +22234,10 @@ static PyObject *_wrap_PyLineShape_SetAlignmentType(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:PyLineShape_SetAlignmentType",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAlignmentType(arg2,arg3); @@ -21861,8 +22265,10 @@ static PyObject *_wrap_PyLineShape_GetAlignmentOrientation(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_GetAlignmentOrientation",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->GetAlignmentOrientation(arg2); @@ -21890,8 +22296,10 @@ static PyObject *_wrap_PyLineShape_GetAlignmentType(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_GetAlignmentType",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)(arg1)->GetAlignmentType(arg2); @@ -22035,8 +22443,10 @@ static PyObject *_wrap_PyLineShape_base_OnDrawBranches(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22306,8 +22716,10 @@ static PyObject *_wrap_PyLineShape_base_OnMovePre(PyObject *self, PyObject *args PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22346,8 +22758,10 @@ static PyObject *_wrap_PyLineShape_base_OnMovePost(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22379,8 +22793,10 @@ static PyObject *_wrap_PyLineShape_base_OnDragLeft(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyLineShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -22467,8 +22883,10 @@ static PyObject *_wrap_PyLineShape_base_OnDragRight(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyLineShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -22652,8 +23070,10 @@ static PyObject *_wrap_PyLineShape_base_OnMoveLink(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22688,8 +23108,10 @@ static PyObject *_wrap_PyLineShape_base_OnSizingDragLeft(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyLineShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -23232,8 +23654,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDrawBranches(PyObject *self, PyObje PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -23503,8 +23927,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMovePre(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -23543,8 +23969,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMovePost(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -23576,8 +24004,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDragLeft(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyPolygonShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -23664,8 +24094,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDragRight(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyPolygonShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -23849,8 +24281,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMoveLink(PyObject *self, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -23885,8 +24319,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnSizingDragLeft(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyPolygonShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -24179,8 +24615,10 @@ static PyObject *_wrap_PyTextShape_base_OnDrawBranches(PyObject *self, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24450,8 +24888,10 @@ static PyObject *_wrap_PyTextShape_base_OnMovePre(PyObject *self, PyObject *args PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24490,8 +24930,10 @@ static PyObject *_wrap_PyTextShape_base_OnMovePost(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24523,8 +24965,10 @@ static PyObject *_wrap_PyTextShape_base_OnDragLeft(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyTextShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6); @@ -24611,8 +25055,10 @@ static PyObject *_wrap_PyTextShape_base_OnDragRight(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyTextShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6); @@ -24796,8 +25242,10 @@ static PyObject *_wrap_PyTextShape_base_OnMoveLink(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24832,8 +25280,10 @@ static PyObject *_wrap_PyTextShape_base_OnSizingDragLeft(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyTextShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7); @@ -25545,8 +25995,10 @@ static PyObject *_wrap_Diagram_SetQuickEditMode(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_SetQuickEditMode",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetQuickEditMode(arg2); @@ -25573,8 +26025,10 @@ static PyObject *_wrap_Diagram_SetSnapToGrid(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_SetSnapToGrid",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSnapToGrid(arg2); @@ -25601,8 +26055,10 @@ static PyObject *_wrap_Diagram_ShowAll(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_ShowAll",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ShowAll(arg2); @@ -26089,8 +26545,10 @@ static PyObject *_wrap_PyShapeCanvas_base_OnDragLeft(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|i:PyShapeCanvas_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeCanvas,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5); @@ -26120,8 +26578,10 @@ static PyObject *_wrap_PyShapeCanvas_base_OnDragRight(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|i:PyShapeCanvas_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeCanvas,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5); diff --git a/wxPython/src/msw/calendar_wrap.cpp b/wxPython/src/msw/calendar_wrap.cpp index fecb539043..a07bde18ce 100644 --- a/wxPython/src/msw/calendar_wrap.cpp +++ b/wxPython/src/msw/calendar_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -496,8 +668,10 @@ static PyObject *_wrap_CalendarDateAttr_SetHoliday(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarDateAttr_SetHoliday",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarDateAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetHoliday(arg2); @@ -1384,8 +1558,10 @@ static PyObject *_wrap_CalendarCtrl_EnableYearChange(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableYearChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1414,8 +1590,10 @@ static PyObject *_wrap_CalendarCtrl_EnableMonthChange(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableMonthChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1444,8 +1622,10 @@ static PyObject *_wrap_CalendarCtrl_EnableHolidayDisplay(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_EnableHolidayDisplay",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1762,8 +1942,10 @@ static PyObject *_wrap_CalendarCtrl_GetAttr(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_GetAttr",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxCalendarDateAttr *)((wxCalendarCtrl const *)arg1)->GetAttr(arg2); @@ -1792,8 +1974,10 @@ static PyObject *_wrap_CalendarCtrl_SetAttr(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:CalendarCtrl_SetAttr",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxCalendarDateAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1821,8 +2005,10 @@ static PyObject *_wrap_CalendarCtrl_SetHoliday(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_SetHoliday",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetHoliday(arg2); @@ -1849,8 +2035,10 @@ static PyObject *_wrap_CalendarCtrl_ResetAttr(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarCtrl_ResetAttr",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ResetAttr(arg2); @@ -1921,8 +2109,10 @@ static PyObject *_wrap_CalendarCtrl_Enable(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1952,8 +2142,10 @@ static PyObject *_wrap_CalendarCtrl_Show(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CalendarCtrl_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index f93c22635f..409663dbfd 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -62,7 +62,7 @@ class Button(core.Control): return _controls.Button_SetImageMargins(*args, **kwargs) def GetDefaultSize(*args, **kwargs): - """Button.GetDefaultSize() -> Size""" + """GetDefaultSize() -> Size""" return _controls.Button_GetDefaultSize(*args, **kwargs) GetDefaultSize = staticmethod(GetDefaultSize) @@ -605,7 +605,7 @@ class StaticLine(core.Control): return _controls.StaticLine_IsVertical(*args, **kwargs) def GetDefaultSize(*args, **kwargs): - """StaticLine.GetDefaultSize() -> int""" + """GetDefaultSize() -> int""" return _controls.StaticLine_GetDefaultSize(*args, **kwargs) GetDefaultSize = staticmethod(GetDefaultSize) @@ -1034,7 +1034,7 @@ class TextAttr(object): return _controls.TextAttr_IsDefault(*args, **kwargs) def Combine(*args, **kwargs): - """TextAttr.Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" + """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" return _controls.TextAttr_Combine(*args, **kwargs) Combine = staticmethod(Combine) @@ -2091,7 +2091,7 @@ class Notebook(BookCtrl): """ HitTest(Point pt) -> (tab, where) - Returns the tab which is hit, and flags indicating where using wxNB_HITTEST_ flags. + Returns the tab which is hit, and flags indicating where using wx.NB_HITTEST_ flags. """ return _controls.Notebook_HitTest(*args, **kwargs) @@ -4635,12 +4635,12 @@ class HelpProvider(object): def __repr__(self): return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Set(*args, **kwargs): - """HelpProvider.Set(HelpProvider helpProvider) -> HelpProvider""" + """Set(HelpProvider helpProvider) -> HelpProvider""" return _controls.HelpProvider_Set(*args, **kwargs) Set = staticmethod(Set) def Get(*args, **kwargs): - """HelpProvider.Get() -> HelpProvider""" + """Get() -> HelpProvider""" return _controls.HelpProvider_Get(*args, **kwargs) Get = staticmethod(Get) diff --git a/wxPython/src/msw/controls_wrap.cpp b/wxPython/src/msw/controls_wrap.cpp index db3ed88042..8c0702f49a 100644 --- a/wxPython/src/msw/controls_wrap.cpp +++ b/wxPython/src/msw/controls_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -1908,8 +2080,10 @@ static PyObject *_wrap_CheckBox_SetValue(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CheckBox_SetValue",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCheckBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool const) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetValue(arg2); @@ -3009,8 +3183,10 @@ static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ComboBox_SetEditable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxComboBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetEditable(arg2); @@ -4859,8 +5035,10 @@ static PyObject *_wrap_ListBox_SetSelection(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:ListBox_SetSelection",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4973,8 +5151,10 @@ static PyObject *_wrap_ListBox_SetStringSelection(PyObject *self, PyObject *args temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5661,12 +5841,7 @@ static PyObject *_wrap_new_TextAttr(PyObject *self, PyObject *args) { if (argc <= 3) { return _wrap_new_TextAttr__SWIG_1(self,args); } - { - _v = (PyInt_Check(argv[3]) || PyLong_Check(argv[3])) ? 1 : 0; - } - if (_v) { - return _wrap_new_TextAttr__SWIG_1(self,args); - } + return _wrap_new_TextAttr__SWIG_1(self,args); } } } @@ -7245,8 +7420,10 @@ static PyObject *_wrap_TextCtrl_SetMaxLength(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_SetMaxLength",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTextCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned long) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned long) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetMaxLength(arg2); @@ -7993,8 +8170,10 @@ static PyObject *_wrap_TextCtrl_SetEditable(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextCtrl_SetEditable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTextCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetEditable(arg2); @@ -8023,8 +8202,10 @@ static PyObject *_wrap_TextCtrl_ShowNativeCaret(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TextCtrl_ShowNativeCaret",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTextCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8623,8 +8804,10 @@ static PyObject *_wrap_ScrollBar_SetScrollbar(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|O:ScrollBar_SetScrollbar",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxScrollBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj5) { - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10089,8 +10272,10 @@ static PyObject *_wrap_RadioBox_EnableItem(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:RadioBox_EnableItem",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRadioBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10120,8 +10305,10 @@ static PyObject *_wrap_RadioBox_ShowItem(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:RadioBox_ShowItem",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRadioBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10466,8 +10653,10 @@ static PyObject *_wrap_RadioButton_SetValue(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioButton_SetValue",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRadioButton,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetValue(arg2); @@ -11462,8 +11651,10 @@ static PyObject *_wrap_ToggleButton_SetValue(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToggleButton_SetValue",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToggleButton,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetValue(arg2); @@ -11588,7 +11779,7 @@ static PyObject *_wrap_BookCtrl_GetPageCount(PyObject *self, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -11608,8 +11799,10 @@ static PyObject *_wrap_BookCtrl_GetPage(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_GetPage",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxWindow *)(arg1)->GetPage(arg2); @@ -11667,8 +11860,10 @@ static PyObject *_wrap_BookCtrl_SetPageText(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:BookCtrl_SetPageText",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -11709,8 +11904,10 @@ static PyObject *_wrap_BookCtrl_GetPageText(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_GetPageText",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxBookCtrl const *)arg1)->GetPageText(arg2); @@ -11825,8 +12022,10 @@ static PyObject *_wrap_BookCtrl_GetPageImage(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_GetPageImage",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)((wxBookCtrl const *)arg1)->GetPageImage(arg2); @@ -11855,8 +12054,10 @@ static PyObject *_wrap_BookCtrl_SetPageImage(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:BookCtrl_SetPageImage",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SetPageImage(arg2,arg3); @@ -11951,8 +12152,10 @@ static PyObject *_wrap_BookCtrl_DeletePage(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_DeletePage",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->DeletePage(arg2); @@ -11980,8 +12183,10 @@ static PyObject *_wrap_BookCtrl_RemovePage(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_RemovePage",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->RemovePage(arg2); @@ -12047,8 +12252,10 @@ static PyObject *_wrap_BookCtrl_AddPage(PyObject *self, PyObject *args, PyObject temp3 = True; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12093,8 +12300,10 @@ static PyObject *_wrap_BookCtrl_InsertPage(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|Oi:BookCtrl_InsertPage",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { arg4 = wxString_in_helper(obj3); @@ -12102,8 +12311,10 @@ static PyObject *_wrap_BookCtrl_InsertPage(PyObject *self, PyObject *args, PyObj temp4 = True; } if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12140,8 +12351,10 @@ static PyObject *_wrap_BookCtrl_SetSelection(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:BookCtrl_SetSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)(arg1)->SetSelection(arg2); @@ -12169,8 +12382,10 @@ static PyObject *_wrap_BookCtrl_AdvanceSelection(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:BookCtrl_AdvanceSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxBookCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13637,8 +13852,10 @@ static PyObject *_wrap_ToolBarToolBase_Enable(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarToolBase_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->Enable(arg2); @@ -13690,8 +13907,10 @@ static PyObject *_wrap_ToolBarToolBase_SetToggle(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarToolBase_SetToggle",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SetToggle(arg2); @@ -14134,8 +14353,10 @@ static PyObject *_wrap_ToolBarBase_DoInsertTool(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiOO|OiOOO:ToolBarBase_DoInsertTool",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&obj5,&arg7,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -14253,8 +14474,10 @@ static PyObject *_wrap_ToolBarBase_InsertToolItem(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertToolItem",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxToolBarToolBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14317,8 +14540,10 @@ static PyObject *_wrap_ToolBarBase_InsertControl(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxControl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14404,8 +14629,10 @@ static PyObject *_wrap_ToolBarBase_InsertSeparator(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_InsertSeparator",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxToolBarToolBase *)(arg1)->InsertSeparator(arg2); @@ -14463,8 +14690,10 @@ static PyObject *_wrap_ToolBarBase_DeleteToolByPos(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_DeleteToolByPos",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->DeleteToolByPos(arg2); @@ -14567,8 +14796,10 @@ static PyObject *_wrap_ToolBarBase_EnableTool(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:ToolBarBase_EnableTool",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableTool(arg2,arg3); @@ -14596,8 +14827,10 @@ static PyObject *_wrap_ToolBarBase_ToggleTool(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:ToolBarBase_ToggleTool",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ToggleTool(arg2,arg3); @@ -14625,8 +14858,10 @@ static PyObject *_wrap_ToolBarBase_SetToggle(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:ToolBarBase_SetToggle",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxToolBarBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetToggle(arg2,arg3); @@ -17828,8 +18063,10 @@ static PyObject *_wrap_ListEvent_SetEditCanceled(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ListEvent_SetEditCanceled",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetEditCanceled(arg2); @@ -18924,8 +19161,10 @@ static PyObject *_wrap_ListCtrl_SetSingleStyle(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Ol|O:ListCtrl_SetSingleStyle",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -19347,8 +19586,10 @@ static PyObject *_wrap_ListCtrl_EndEditLabel(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ListCtrl_EndEditLabel",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyListCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->EndEditLabel(arg2); @@ -19412,8 +19653,10 @@ static PyObject *_wrap_ListCtrl_FindItem(PyObject *self, PyObject *args, PyObjec temp3 = True; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -20183,8 +20426,10 @@ static PyObject *_wrap_ListView_Select(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Ol|O:ListView_Select",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxListView,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -21145,8 +21390,10 @@ static PyObject *_wrap_TreeEvent_SetEditCanceled(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeEvent_SetEditCanceled",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTreeEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetEditCanceled(arg2); @@ -21435,7 +21682,7 @@ static PyObject *_wrap_TreeCtrl_GetCount(PyObject *self, PyObject *args, PyObjec wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -21460,7 +21707,7 @@ static PyObject *_wrap_TreeCtrl_GetIndent(PyObject *self, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -21479,8 +21726,10 @@ static PyObject *_wrap_TreeCtrl_SetIndent(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_SetIndent",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetIndent(arg2); @@ -21513,7 +21762,7 @@ static PyObject *_wrap_TreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyObj wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -21532,8 +21781,10 @@ static PyObject *_wrap_TreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_SetSpacing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTreeCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSpacing(arg2); @@ -22109,8 +22360,10 @@ static PyObject *_wrap_TreeCtrl_SetItemHasChildren(PyObject *self, PyObject *arg PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22145,8 +22398,10 @@ static PyObject *_wrap_TreeCtrl_SetItemBold(PyObject *self, PyObject *args, PyOb PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22181,8 +22436,10 @@ static PyObject *_wrap_TreeCtrl_SetItemDropHighlight(PyObject *self, PyObject *a PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22483,8 +22740,10 @@ static PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *self, PyObject *args, PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22493,7 +22752,7 @@ static PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *self, PyObject *args, wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -23090,8 +23349,10 @@ static PyObject *_wrap_TreeCtrl_InsertItemBefore(PyObject *self, PyObject *args, if (arg2 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -23602,8 +23863,10 @@ static PyObject *_wrap_TreeCtrl_EndEditLabel(PyObject *self, PyObject *args, PyO PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -23712,8 +23975,10 @@ static PyObject *_wrap_TreeCtrl_GetBoundingRect(PyObject *self, PyObject *args, PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24217,8 +24482,10 @@ static PyObject *_wrap_GenericDirCtrl_ShowHidden(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GenericDirCtrl_ShowHidden",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGenericDirCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ShowHidden(arg2); @@ -25628,8 +25895,10 @@ static PyObject *_wrap_new_ContextHelp(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -26299,8 +26568,10 @@ static PyObject *_wrap_DragImage_BeginDrag(PyObject *self, PyObject *args, PyObj } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj4) { if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -26618,10 +26889,14 @@ static PyObject *_wrap_DragImage_RedrawImage(PyObject *self, PyObject *args, PyO arg3 = &temp3; if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail; } - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->RedrawImage((wxPoint const &)*arg2,(wxPoint const &)*arg3,arg4,arg5); diff --git a/wxPython/src/msw/core.py b/wxPython/src/msw/core.py index 13999698c1..58db98ba84 100644 --- a/wxPython/src/msw/core.py +++ b/wxPython/src/msw/core.py @@ -1711,17 +1711,17 @@ class FileSystem(Object): return _core.FileSystem_FindNext(*args, **kwargs) def AddHandler(*args, **kwargs): - """FileSystem.AddHandler(CPPFileSystemHandler handler)""" + """AddHandler(CPPFileSystemHandler handler)""" return _core.FileSystem_AddHandler(*args, **kwargs) AddHandler = staticmethod(AddHandler) def CleanUpHandlers(*args, **kwargs): - """FileSystem.CleanUpHandlers()""" + """CleanUpHandlers()""" return _core.FileSystem_CleanUpHandlers(*args, **kwargs) CleanUpHandlers = staticmethod(CleanUpHandlers) def FileNameToURL(*args, **kwargs): - """FileSystem.FileNameToURL(String filename) -> String""" + """FileNameToURL(String filename) -> String""" return _core.FileSystem_FileNameToURL(*args, **kwargs) FileNameToURL = staticmethod(FileNameToURL) @@ -1838,7 +1838,7 @@ class MemoryFSHandler(CPPFileSystemHandler): self.thisown = 1 del newobj.thisown def RemoveFile(*args, **kwargs): - """MemoryFSHandler.RemoveFile(String filename)""" + """RemoveFile(String filename)""" return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) RemoveFile = staticmethod(RemoveFile) @@ -1932,7 +1932,7 @@ class ImageHistogram(object): del newobj.thisown def MakeKey(*args, **kwargs): """ - ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long + MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long Get the key in the histogram for the given RGB values """ @@ -2047,12 +2047,12 @@ class Image(Object): return _core.Image_SetMaskFromImage(*args, **kwargs) def CanRead(*args, **kwargs): - """Image.CanRead(String name) -> bool""" + """CanRead(String name) -> bool""" return _core.Image_CanRead(*args, **kwargs) CanRead = staticmethod(CanRead) def GetImageCount(*args, **kwargs): - """Image.GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" + """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" return _core.Image_GetImageCount(*args, **kwargs) GetImageCount = staticmethod(GetImageCount) @@ -2073,7 +2073,7 @@ class Image(Object): return _core.Image_SaveMimeFile(*args, **kwargs) def CanReadStream(*args, **kwargs): - """Image.CanReadStream(InputStream stream) -> bool""" + """CanReadStream(InputStream stream) -> bool""" return _core.Image_CanReadStream(*args, **kwargs) CanReadStream = staticmethod(CanReadStream) @@ -2220,22 +2220,22 @@ class Image(Object): return _core.Image_ComputeHistogram(*args, **kwargs) def AddHandler(*args, **kwargs): - """Image.AddHandler(ImageHandler handler)""" + """AddHandler(ImageHandler handler)""" return _core.Image_AddHandler(*args, **kwargs) AddHandler = staticmethod(AddHandler) def InsertHandler(*args, **kwargs): - """Image.InsertHandler(ImageHandler handler)""" + """InsertHandler(ImageHandler handler)""" return _core.Image_InsertHandler(*args, **kwargs) InsertHandler = staticmethod(InsertHandler) def RemoveHandler(*args, **kwargs): - """Image.RemoveHandler(String name) -> bool""" + """RemoveHandler(String name) -> bool""" return _core.Image_RemoveHandler(*args, **kwargs) RemoveHandler = staticmethod(RemoveHandler) def GetImageExtWildcard(*args, **kwargs): - """Image.GetImageExtWildcard() -> String""" + """GetImageExtWildcard() -> String""" return _core.Image_GetImageExtWildcard(*args, **kwargs) GetImageExtWildcard = staticmethod(GetImageExtWildcard) @@ -4031,32 +4031,32 @@ class UpdateUIEvent(CommandEvent): return _core.UpdateUIEvent_SetText(*args, **kwargs) def SetUpdateInterval(*args, **kwargs): - """UpdateUIEvent.SetUpdateInterval(long updateInterval)""" + """SetUpdateInterval(long updateInterval)""" return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) SetUpdateInterval = staticmethod(SetUpdateInterval) def GetUpdateInterval(*args, **kwargs): - """UpdateUIEvent.GetUpdateInterval() -> long""" + """GetUpdateInterval() -> long""" return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) GetUpdateInterval = staticmethod(GetUpdateInterval) def CanUpdate(*args, **kwargs): - """UpdateUIEvent.CanUpdate(Window win) -> bool""" + """CanUpdate(Window win) -> bool""" return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) CanUpdate = staticmethod(CanUpdate) def ResetUpdateTime(*args, **kwargs): - """UpdateUIEvent.ResetUpdateTime()""" + """ResetUpdateTime()""" return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) ResetUpdateTime = staticmethod(ResetUpdateTime) def SetMode(*args, **kwargs): - """UpdateUIEvent.SetMode(int mode)""" + """SetMode(int mode)""" return _core.UpdateUIEvent_SetMode(*args, **kwargs) SetMode = staticmethod(SetMode) def GetMode(*args, **kwargs): - """UpdateUIEvent.GetMode() -> int""" + """GetMode() -> int""" return _core.UpdateUIEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) @@ -4343,17 +4343,17 @@ class IdleEvent(Event): return _core.IdleEvent_MoreRequested(*args, **kwargs) def SetMode(*args, **kwargs): - """IdleEvent.SetMode(int mode)""" + """SetMode(int mode)""" return _core.IdleEvent_SetMode(*args, **kwargs) SetMode = staticmethod(SetMode) def GetMode(*args, **kwargs): - """IdleEvent.GetMode() -> int""" + """GetMode() -> int""" return _core.IdleEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) def CanSend(*args, **kwargs): - """IdleEvent.CanSend(Window win) -> bool""" + """CanSend(Window win) -> bool""" return _core.IdleEvent_CanSend(*args, **kwargs) CanSend = staticmethod(CanSend) @@ -4729,52 +4729,52 @@ class PyApp(EvtHandler): return _core.PyApp_GetAssertMode(*args, **kwargs) def GetMacSupportPCMenuShortcuts(*args, **kwargs): - """PyApp.GetMacSupportPCMenuShortcuts() -> bool""" + """GetMacSupportPCMenuShortcuts() -> bool""" return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) def GetMacAboutMenuItemId(*args, **kwargs): - """PyApp.GetMacAboutMenuItemId() -> long""" + """GetMacAboutMenuItemId() -> long""" return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) def GetMacPreferencesMenuItemId(*args, **kwargs): - """PyApp.GetMacPreferencesMenuItemId() -> long""" + """GetMacPreferencesMenuItemId() -> long""" return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) def GetMacExitMenuItemId(*args, **kwargs): - """PyApp.GetMacExitMenuItemId() -> long""" + """GetMacExitMenuItemId() -> long""" return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) def GetMacHelpMenuTitleName(*args, **kwargs): - """PyApp.GetMacHelpMenuTitleName() -> String""" + """GetMacHelpMenuTitleName() -> String""" return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) def SetMacSupportPCMenuShortcuts(*args, **kwargs): - """PyApp.SetMacSupportPCMenuShortcuts(bool val)""" + """SetMacSupportPCMenuShortcuts(bool val)""" return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) def SetMacAboutMenuItemId(*args, **kwargs): - """PyApp.SetMacAboutMenuItemId(long val)""" + """SetMacAboutMenuItemId(long val)""" return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) def SetMacPreferencesMenuItemId(*args, **kwargs): - """PyApp.SetMacPreferencesMenuItemId(long val)""" + """SetMacPreferencesMenuItemId(long val)""" return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) def SetMacExitMenuItemId(*args, **kwargs): - """PyApp.SetMacExitMenuItemId(long val)""" + """SetMacExitMenuItemId(long val)""" return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) def SetMacHelpMenuTitleName(*args, **kwargs): - """PyApp.SetMacHelpMenuTitleName(String val)""" + """SetMacHelpMenuTitleName(String val)""" return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) @@ -4788,7 +4788,7 @@ class PyApp(EvtHandler): def GetComCtl32Version(*args, **kwargs): """ - PyApp.GetComCtl32Version() -> int + GetComCtl32Version() -> int Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it wasn't found at all. Raises an exception on non-Windows platforms. @@ -5299,17 +5299,17 @@ class Window(EvtHandler): return _core.Window_GetId(*args, **kwargs) def NewControlId(*args, **kwargs): - """Window.NewControlId() -> int""" + """NewControlId() -> int""" return _core.Window_NewControlId(*args, **kwargs) NewControlId = staticmethod(NewControlId) def NextControlId(*args, **kwargs): - """Window.NextControlId(int winid) -> int""" + """NextControlId(int winid) -> int""" return _core.Window_NextControlId(*args, **kwargs) NextControlId = staticmethod(NextControlId) def PrevControlId(*args, **kwargs): - """Window.PrevControlId(int winid) -> int""" + """PrevControlId(int winid) -> int""" return _core.Window_PrevControlId(*args, **kwargs) PrevControlId = staticmethod(PrevControlId) @@ -5619,7 +5619,7 @@ class Window(EvtHandler): return _core.Window_SetFocusFromKbd(*args, **kwargs) def FindFocus(*args, **kwargs): - """Window.FindFocus() -> Window""" + """FindFocus() -> Window""" return _core.Window_FindFocus(*args, **kwargs) FindFocus = staticmethod(FindFocus) @@ -5760,7 +5760,7 @@ class Window(EvtHandler): return _core.Window_ReleaseMouse(*args, **kwargs) def GetCapture(*args, **kwargs): - """Window.GetCapture() -> Window""" + """GetCapture() -> Window""" return _core.Window_GetCapture(*args, **kwargs) GetCapture = staticmethod(GetCapture) @@ -6176,12 +6176,12 @@ class Validator(EvtHandler): return _core.Validator_SetWindow(*args, **kwargs) def IsSilent(*args, **kwargs): - """Validator.IsSilent() -> bool""" + """IsSilent() -> bool""" return _core.Validator_IsSilent(*args, **kwargs) IsSilent = staticmethod(IsSilent) def SetBellOnError(*args, **kwargs): - """Validator.SetBellOnError(int doIt=True)""" + """SetBellOnError(int doIt=True)""" return _core.Validator_SetBellOnError(*args, **kwargs) SetBellOnError = staticmethod(SetBellOnError) @@ -6240,27 +6240,27 @@ class Menu(EvtHandler): self._setOORInfo(self) def Append(*args, **kwargs): - """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL)""" + """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" return _core.Menu_Append(*args, **kwargs) def AppendSeparator(*args, **kwargs): - """AppendSeparator()""" + """AppendSeparator() -> MenuItem""" return _core.Menu_AppendSeparator(*args, **kwargs) def AppendCheckItem(*args, **kwargs): - """AppendCheckItem(int id, String text, String help=EmptyString)""" + """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_AppendCheckItem(*args, **kwargs) def AppendRadioItem(*args, **kwargs): - """AppendRadioItem(int id, String text, String help=EmptyString)""" + """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_AppendRadioItem(*args, **kwargs) def AppendMenu(*args, **kwargs): - """AppendMenu(int id, String text, Menu submenu, String help=EmptyString)""" + """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" return _core.Menu_AppendMenu(*args, **kwargs) def AppendItem(*args, **kwargs): - """AppendItem(MenuItem item)""" + """AppendItem(MenuItem item) -> MenuItem""" return _core.Menu_AppendItem(*args, **kwargs) def Break(*args, **kwargs): @@ -6268,54 +6268,54 @@ class Menu(EvtHandler): return _core.Menu_Break(*args, **kwargs) def InsertItem(*args, **kwargs): - """InsertItem(size_t pos, MenuItem item) -> bool""" + """InsertItem(size_t pos, MenuItem item) -> MenuItem""" return _core.Menu_InsertItem(*args, **kwargs) def Insert(*args, **kwargs): """ Insert(size_t pos, int id, String text, String help=EmptyString, - int kind=ITEM_NORMAL) + int kind=ITEM_NORMAL) -> MenuItem """ return _core.Menu_Insert(*args, **kwargs) def InsertSeparator(*args, **kwargs): - """InsertSeparator(size_t pos)""" + """InsertSeparator(size_t pos) -> MenuItem""" return _core.Menu_InsertSeparator(*args, **kwargs) def InsertCheckItem(*args, **kwargs): - """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString)""" + """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_InsertCheckItem(*args, **kwargs) def InsertRadioItem(*args, **kwargs): - """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString)""" + """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_InsertRadioItem(*args, **kwargs) def InsertMenu(*args, **kwargs): - """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString)""" + """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" return _core.Menu_InsertMenu(*args, **kwargs) def PrependItem(*args, **kwargs): - """PrependItem(MenuItem item)""" + """PrependItem(MenuItem item) -> MenuItem""" return _core.Menu_PrependItem(*args, **kwargs) def Prepend(*args, **kwargs): - """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL)""" + """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" return _core.Menu_Prepend(*args, **kwargs) def PrependSeparator(*args, **kwargs): - """PrependSeparator()""" + """PrependSeparator() -> MenuItem""" return _core.Menu_PrependSeparator(*args, **kwargs) def PrependCheckItem(*args, **kwargs): - """PrependCheckItem(int id, String text, String help=EmptyString)""" + """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_PrependCheckItem(*args, **kwargs) def PrependRadioItem(*args, **kwargs): - """PrependRadioItem(int id, String text, String help=EmptyString)""" + """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem""" return _core.Menu_PrependRadioItem(*args, **kwargs) def PrependMenu(*args, **kwargs): - """PrependMenu(int id, String text, Menu submenu, String help=EmptyString)""" + """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" return _core.Menu_PrependMenu(*args, **kwargs) def Remove(*args, **kwargs): @@ -6644,7 +6644,7 @@ class MenuItem(Object): return _core.MenuItem_GetText(*args, **kwargs) def GetLabelFromText(*args, **kwargs): - """MenuItem.GetLabelFromText(String text) -> String""" + """GetLabelFromText(String text) -> String""" return _core.MenuItem_GetLabelFromText(*args, **kwargs) GetLabelFromText = staticmethod(GetLabelFromText) @@ -6753,7 +6753,7 @@ class MenuItem(Object): return _core.MenuItem_GetMarginWidth(*args, **kwargs) def GetDefaultMarginWidth(*args, **kwargs): - """MenuItem.GetDefaultMarginWidth() -> int""" + """GetDefaultMarginWidth() -> int""" return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) diff --git a/wxPython/src/msw/core_wrap.cpp b/wxPython/src/msw/core_wrap.cpp index 4d277a5bbd..ee1dd0a3cb 100644 --- a/wxPython/src/msw/core_wrap.cpp +++ b/wxPython/src/msw/core_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -5006,7 +5178,7 @@ static PyObject *_wrap_InputStream_Peek(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = Py_BuildValue((char*)"c",result); + resultobj = SPyObj_FromChar(result); return resultobj; fail: return NULL; @@ -5031,7 +5203,7 @@ static PyObject *_wrap_InputStream_GetC(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = Py_BuildValue((char*)"c",result); + resultobj = SPyObj_FromChar(result); return resultobj; fail: return NULL; @@ -5056,7 +5228,7 @@ static PyObject *_wrap_InputStream_LastRead(PyObject *self, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6068,8 +6240,10 @@ static PyObject *_wrap_FileSystem_ChangePathTo(PyObject *self, PyObject *args, P temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7413,12 +7587,18 @@ static PyObject *_wrap_ImageHistogram_MakeKey(PyObject *self, PyObject *args, Py }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ImageHistogram_MakeKey",kwnames,&obj0,&obj1,&obj2)) goto fail; - arg1 = (unsigned char) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned char) SPyObj_AsUnsignedChar(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (unsigned long)wxImageHistogram::MakeKey(arg1,arg2,arg3); @@ -7426,7 +7606,7 @@ static PyObject *_wrap_ImageHistogram_MakeKey(PyObject *self, PyObject *args, Py wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -7460,16 +7640,22 @@ static PyObject *_wrap_ImageHistogram_FindFirstUnusedColour(PyObject *self, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:ImageHistogram_FindFirstUnusedColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImageHistogram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg5 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg6 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { - arg7 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7751,8 +7937,10 @@ static PyObject *_wrap_new_EmptyImage(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iiO:new_EmptyImage",kwnames,&arg1,&arg2,&obj2)) goto fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7983,12 +8171,18 @@ static PyObject *_wrap_Image_SetRGB(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiOOO:Image_SetRGB",kwnames,&obj0,&arg2,&arg3,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (unsigned char) PyInt_AsLong(obj4); - if (PyErr_Occurred()) SWIG_fail; - arg6 = (unsigned char) PyInt_AsLong(obj5); - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (unsigned char) SPyObj_AsUnsignedChar(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg6 = (unsigned char) SPyObj_AsUnsignedChar(obj5); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetRGB(arg2,arg3,arg4,arg5,arg6); @@ -8098,8 +8292,10 @@ static PyObject *_wrap_Image_SetAlpha(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiO:Image_SetAlpha",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAlpha(arg2,arg3,arg4); @@ -8193,16 +8389,22 @@ static PyObject *_wrap_Image_FindFirstUnusedColour(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:Image_FindFirstUnusedColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg5 = (byte) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (byte) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg6 = (byte) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (byte) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { - arg7 = (byte) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (byte) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8253,12 +8455,18 @@ static PyObject *_wrap_Image_SetMaskFromImage(PyObject *self, PyObject *args, Py if (arg2 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg3 = (byte) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (byte) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (byte) PyInt_AsLong(obj4); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (byte) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (byte) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (byte) SPyObj_AsUnsignedChar(obj4); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SetMaskFromImage((wxImage const &)*arg2,arg3,arg4,arg5); @@ -9115,12 +9323,18 @@ static PyObject *_wrap_Image_SetMaskColour(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_SetMaskColour",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetMaskColour(arg2,arg3,arg4); @@ -9223,8 +9437,10 @@ static PyObject *_wrap_Image_SetMask(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_SetMask",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9289,8 +9505,10 @@ static PyObject *_wrap_Image_Rotate(PyObject *self, PyObject *args, PyObject *kw if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj4) { if ((SWIG_ConvertPtr(obj4,(void **) &arg5, SWIGTYPE_p_wxPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -9327,8 +9545,10 @@ static PyObject *_wrap_Image_Rotate90(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_Rotate90",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9362,8 +9582,10 @@ static PyObject *_wrap_Image_Mirror(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_Mirror",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9405,18 +9627,30 @@ static PyObject *_wrap_Image_Replace(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:Image_Replace",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (unsigned char) PyInt_AsLong(obj4); - if (PyErr_Occurred()) SWIG_fail; - arg6 = (unsigned char) PyInt_AsLong(obj5); - if (PyErr_Occurred()) SWIG_fail; - arg7 = (unsigned char) PyInt_AsLong(obj6); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg5 = (unsigned char) SPyObj_AsUnsignedChar(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg6 = (unsigned char) SPyObj_AsUnsignedChar(obj5); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg7 = (unsigned char) SPyObj_AsUnsignedChar(obj6); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Replace(arg2,arg3,arg4,arg5,arg6,arg7); @@ -9448,12 +9682,18 @@ static PyObject *_wrap_Image_ConvertToMono(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_ConvertToMono",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxImage const *)arg1)->ConvertToMono(arg2,arg3,arg4); @@ -9712,8 +9952,10 @@ static PyObject *_wrap_Image_CountColours(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_CountColours",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (unsigned long) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned long) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9722,7 +9964,7 @@ static PyObject *_wrap_Image_CountColours(PyObject *self, PyObject *args, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -9753,7 +9995,7 @@ static PyObject *_wrap_Image_ComputeHistogram(PyObject *self, PyObject *args, Py wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -9920,12 +10162,18 @@ static PyObject *_wrap_Image_ConvertToMonoBitmap(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Image_ConvertToMonoBitmap",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxImage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxImage_ConvertToMonoBitmap(arg1,arg2,arg3,arg4); @@ -10574,8 +10822,10 @@ static PyObject *_wrap_EvtHandler_SetEvtHandlerEnabled(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:EvtHandler_SetEvtHandlerEnabled",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetEvtHandlerEnabled(arg2); @@ -11055,8 +11305,10 @@ static PyObject *_wrap_Event_Skip(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Event_Skip",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13042,8 +13294,10 @@ static PyObject *_wrap_MouseEvent_m_leftDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_leftDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_leftDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13085,8 +13339,10 @@ static PyObject *_wrap_MouseEvent_m_middleDown_set(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_middleDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_middleDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13128,8 +13384,10 @@ static PyObject *_wrap_MouseEvent_m_rightDown_set(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_rightDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_rightDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13171,8 +13429,10 @@ static PyObject *_wrap_MouseEvent_m_controlDown_set(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_controlDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_controlDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13214,8 +13474,10 @@ static PyObject *_wrap_MouseEvent_m_shiftDown_set(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_shiftDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_shiftDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13257,8 +13519,10 @@ static PyObject *_wrap_MouseEvent_m_altDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_altDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_altDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13300,8 +13564,10 @@ static PyObject *_wrap_MouseEvent_m_metaDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MouseEvent_m_metaDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMouseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_metaDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -13838,7 +14104,7 @@ static PyObject *_wrap_KeyEvent_GetRawKeyCode(PyObject *self, PyObject *args, Py wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -13863,7 +14129,7 @@ static PyObject *_wrap_KeyEvent_GetRawKeyFlags(PyObject *self, PyObject *args, P wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -14119,8 +14385,10 @@ static PyObject *_wrap_KeyEvent_m_controlDown_set(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_controlDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_controlDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14162,8 +14430,10 @@ static PyObject *_wrap_KeyEvent_m_shiftDown_set(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_shiftDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_shiftDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14205,8 +14475,10 @@ static PyObject *_wrap_KeyEvent_m_altDown_set(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_altDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_altDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14248,8 +14520,10 @@ static PyObject *_wrap_KeyEvent_m_metaDown_set(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_metaDown_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_metaDown = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14291,8 +14565,10 @@ static PyObject *_wrap_KeyEvent_m_scanCode_set(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_scanCode_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_scanCode = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14334,8 +14610,10 @@ static PyObject *_wrap_KeyEvent_m_rawCode_set(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_rawCode_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_rawCode = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14358,7 +14636,7 @@ static PyObject *_wrap_KeyEvent_m_rawCode_get(PyObject *self, PyObject *args, Py if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; result = (unsigned int) ((arg1)->m_rawCode); - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -14377,8 +14655,10 @@ static PyObject *_wrap_KeyEvent_m_rawFlags_set(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:KeyEvent_m_rawFlags_set",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned int) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned int) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (arg1) (arg1)->m_rawFlags = arg2; Py_INCREF(Py_None); resultobj = Py_None; @@ -14401,7 +14681,7 @@ static PyObject *_wrap_KeyEvent_m_rawFlags_get(PyObject *self, PyObject *args, P if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; result = (unsigned int) ((arg1)->m_rawFlags); - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -15176,8 +15456,10 @@ static PyObject *_wrap_new_ActivateEvent(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iOi:new_ActivateEvent",kwnames,&arg1,&obj1,&arg3)) goto fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15404,8 +15686,10 @@ static PyObject *_wrap_CloseEvent_SetLoggingOff(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CloseEvent_SetLoggingOff",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCloseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetLoggingOff(arg2); @@ -15458,8 +15742,10 @@ static PyObject *_wrap_CloseEvent_Veto(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CloseEvent_Veto",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCloseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15487,8 +15773,10 @@ static PyObject *_wrap_CloseEvent_SetCanVeto(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CloseEvent_SetCanVeto",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCloseEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCanVeto(arg2); @@ -15572,8 +15860,10 @@ static PyObject *_wrap_new_ShowEvent(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iO:new_ShowEvent",kwnames,&arg1,&obj1)) goto fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15601,8 +15891,10 @@ static PyObject *_wrap_ShowEvent_SetShow(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ShowEvent_SetShow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxShowEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetShow(arg2); @@ -15661,8 +15953,10 @@ static PyObject *_wrap_new_IconizeEvent(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iO:new_IconizeEvent",kwnames,&arg1,&obj1)) goto fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -16017,8 +16311,10 @@ static PyObject *_wrap_UpdateUIEvent_Check(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:UpdateUIEvent_Check",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxUpdateUIEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Check(arg2); @@ -16045,8 +16341,10 @@ static PyObject *_wrap_UpdateUIEvent_Enable(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:UpdateUIEvent_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxUpdateUIEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Enable(arg2); @@ -16481,8 +16779,10 @@ static PyObject *_wrap_QueryNewPaletteEvent_SetPaletteRealized(PyObject *self, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:QueryNewPaletteEvent_SetPaletteRealized",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxQueryNewPaletteEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetPaletteRealized(arg2); @@ -16588,8 +16888,10 @@ static PyObject *_wrap_NavigationKeyEvent_SetDirection(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NavigationKeyEvent_SetDirection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNavigationKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDirection(arg2); @@ -16641,8 +16943,10 @@ static PyObject *_wrap_NavigationKeyEvent_SetWindowChange(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NavigationKeyEvent_SetWindowChange",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNavigationKeyEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetWindowChange(arg2); @@ -16975,8 +17279,10 @@ static PyObject *_wrap_IdleEvent_RequestMore(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:IdleEvent_RequestMore",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIdleEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17664,8 +17970,10 @@ static PyObject *_wrap_PyApp_Yield(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PyApp_Yield",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyApp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17978,8 +18286,10 @@ static PyObject *_wrap_PyApp_SetExitOnFrameDelete(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyApp_SetExitOnFrameDelete",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyApp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetExitOnFrameDelete(arg2); @@ -18031,8 +18341,10 @@ static PyObject *_wrap_PyApp_SetUseBestVisual(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyApp_SetUseBestVisual",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyApp,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetUseBestVisual(arg2); @@ -18297,8 +18609,10 @@ static PyObject *_wrap_PyApp_SetMacSupportPCMenuShortcuts(PyObject *self, PyObje }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PyApp_SetMacSupportPCMenuShortcuts",kwnames,&obj0)) goto fail; - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxPyApp::SetMacSupportPCMenuShortcuts(arg1); @@ -18550,8 +18864,10 @@ static PyObject *_wrap_SafeYield(PyObject *self, PyObject *args, PyObject *kwarg if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -19224,8 +19540,10 @@ static PyObject *_wrap_Window_Close(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_Close",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -20821,8 +21139,10 @@ static PyObject *_wrap_Window_Show(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -20877,8 +21197,10 @@ static PyObject *_wrap_Window_Enable(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -21183,8 +21505,10 @@ static PyObject *_wrap_Window_MakeModal(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_MakeModal",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -21212,8 +21536,10 @@ static PyObject *_wrap_Window_SetThemeEnabled(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetThemeEnabled",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetThemeEnabled(arg2); @@ -21836,8 +22162,10 @@ static PyObject *_wrap_Window_PopEventHandler(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_PopEventHandler",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22403,8 +22731,10 @@ static PyObject *_wrap_Window_Refresh(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Window_Refresh",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -23665,8 +23995,10 @@ static PyObject *_wrap_Window_SetScrollbar(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|O:Window_SetScrollbar",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj5) { - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -23697,8 +24029,10 @@ static PyObject *_wrap_Window_SetScrollPos(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:Window_SetScrollPos",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24244,8 +24578,10 @@ static PyObject *_wrap_Window_DragAcceptFiles(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_DragAcceptFiles",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->DragAcceptFiles(arg2); @@ -24324,8 +24660,10 @@ static PyObject *_wrap_Window_SetAutoLayout(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetAutoLayout",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAutoLayout(arg2); @@ -24406,8 +24744,10 @@ static PyObject *_wrap_Window_SetSizer(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24439,8 +24779,10 @@ static PyObject *_wrap_Window_SetSizerAndFit(PyObject *self, PyObject *args, PyO if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -24674,8 +25016,10 @@ static PyObject *_wrap_Window_FromHWND(PyObject *self, PyObject *args, PyObject }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_FromHWND",kwnames,&obj0)) goto fail; - arg1 = (unsigned long) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxWindow *)wxWindow_FromHWND(arg1); @@ -25052,6 +25396,7 @@ static PyObject *_wrap_Menu_Append(PyObject *self, PyObject *args, PyObject *kwa wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; int arg5 = (int) wxITEM_NORMAL ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25077,12 +25422,14 @@ static PyObject *_wrap_Menu_Append(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Append(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); + result = (wxMenuItem *)(arg1)->Append(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25108,6 +25455,7 @@ static PyObject *_wrap_Menu_Append(PyObject *self, PyObject *args, PyObject *kwa static PyObject *_wrap_Menu_AppendSeparator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -25117,12 +25465,14 @@ static PyObject *_wrap_Menu_AppendSeparator(PyObject *self, PyObject *args, PyOb if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AppendSeparator(); + result = (wxMenuItem *)(arg1)->AppendSeparator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25136,6 +25486,7 @@ static PyObject *_wrap_Menu_AppendCheckItem(PyObject *self, PyObject *args, PyOb wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25161,12 +25512,14 @@ static PyObject *_wrap_Menu_AppendCheckItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AppendCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->AppendCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25196,6 +25549,7 @@ static PyObject *_wrap_Menu_AppendRadioItem(PyObject *self, PyObject *args, PyOb wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25221,12 +25575,14 @@ static PyObject *_wrap_Menu_AppendRadioItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AppendRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->AppendRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25257,6 +25613,7 @@ static PyObject *_wrap_Menu_AppendMenu(PyObject *self, PyObject *args, PyObject wxMenu *arg4 = (wxMenu *) 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25284,12 +25641,14 @@ static PyObject *_wrap_Menu_AppendMenu(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Append(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->Append(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25316,6 +25675,7 @@ static PyObject *_wrap_Menu_AppendItem(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; wxMenuItem *arg2 = (wxMenuItem *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -25327,12 +25687,14 @@ static PyObject *_wrap_Menu_AppendItem(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Append(arg2); + result = (wxMenuItem *)(arg1)->Append(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25368,7 +25730,7 @@ static PyObject *_wrap_Menu_InsertItem(PyObject *self, PyObject *args, PyObject wxMenu *arg1 = (wxMenu *) 0 ; size_t arg2 ; wxMenuItem *arg3 = (wxMenuItem *) 0 ; - bool result; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; @@ -25378,17 +25740,21 @@ static PyObject *_wrap_Menu_InsertItem(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Menu_InsertItem",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->Insert(arg2,arg3); + result = (wxMenuItem *)(arg1)->Insert(arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25404,6 +25770,7 @@ static PyObject *_wrap_Menu_Insert(PyObject *self, PyObject *args, PyObject *kwa wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; int arg6 = (int) wxITEM_NORMAL ; + wxMenuItem *result; bool temp4 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25416,8 +25783,10 @@ static PyObject *_wrap_Menu_Insert(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiO|Oi:Menu_Insert",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&arg6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -25432,12 +25801,14 @@ static PyObject *_wrap_Menu_Insert(PyObject *self, PyObject *args, PyObject *kwa } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Insert(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5,(wxItemKind )arg6); + result = (wxMenuItem *)(arg1)->Insert(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5,(wxItemKind )arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25464,6 +25835,7 @@ static PyObject *_wrap_Menu_InsertSeparator(PyObject *self, PyObject *args, PyOb PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; size_t arg2 ; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -25472,16 +25844,20 @@ static PyObject *_wrap_Menu_InsertSeparator(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Menu_InsertSeparator",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->InsertSeparator(arg2); + result = (wxMenuItem *)(arg1)->InsertSeparator(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25496,6 +25872,7 @@ static PyObject *_wrap_Menu_InsertCheckItem(PyObject *self, PyObject *args, PyOb wxString *arg4 = 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp4 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25508,8 +25885,10 @@ static PyObject *_wrap_Menu_InsertCheckItem(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiO|O:Menu_InsertCheckItem",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -25524,12 +25903,14 @@ static PyObject *_wrap_Menu_InsertCheckItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->InsertCheckItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->InsertCheckItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25560,6 +25941,7 @@ static PyObject *_wrap_Menu_InsertRadioItem(PyObject *self, PyObject *args, PyOb wxString *arg4 = 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp4 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25572,8 +25954,10 @@ static PyObject *_wrap_Menu_InsertRadioItem(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiO|O:Menu_InsertRadioItem",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -25588,12 +25972,14 @@ static PyObject *_wrap_Menu_InsertRadioItem(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->InsertRadioItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->InsertRadioItem(arg2,arg3,(wxString const &)*arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25625,6 +26011,7 @@ static PyObject *_wrap_Menu_InsertMenu(PyObject *self, PyObject *args, PyObject wxMenu *arg5 = (wxMenu *) 0 ; wxString const &arg6_defvalue = wxPyEmptyString ; wxString *arg6 = (wxString *) &arg6_defvalue ; + wxMenuItem *result; bool temp4 = False ; bool temp6 = False ; PyObject * obj0 = 0 ; @@ -25638,8 +26025,10 @@ static PyObject *_wrap_Menu_InsertMenu(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOiOO|O:Menu_InsertMenu",kwnames,&obj0,&obj1,&arg3,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg4 = wxString_in_helper(obj3); if (arg4 == NULL) SWIG_fail; @@ -25655,12 +26044,14 @@ static PyObject *_wrap_Menu_InsertMenu(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Insert(arg2,arg3,(wxString const &)*arg4,arg5,(wxString const &)*arg6); + result = (wxMenuItem *)(arg1)->Insert(arg2,arg3,(wxString const &)*arg4,arg5,(wxString const &)*arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp4) delete arg4; @@ -25687,6 +26078,7 @@ static PyObject *_wrap_Menu_PrependItem(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; wxMenuItem *arg2 = (wxMenuItem *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { @@ -25698,12 +26090,14 @@ static PyObject *_wrap_Menu_PrependItem(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2); + result = (wxMenuItem *)(arg1)->Prepend(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25718,6 +26112,7 @@ static PyObject *_wrap_Menu_Prepend(PyObject *self, PyObject *args, PyObject *kw wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; int arg5 = (int) wxITEM_NORMAL ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25743,12 +26138,14 @@ static PyObject *_wrap_Menu_Prepend(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); + result = (wxMenuItem *)(arg1)->Prepend(arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxItemKind )arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25774,6 +26171,7 @@ static PyObject *_wrap_Menu_Prepend(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_Menu_PrependSeparator(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMenu *arg1 = (wxMenu *) 0 ; + wxMenuItem *result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -25783,12 +26181,14 @@ static PyObject *_wrap_Menu_PrependSeparator(PyObject *self, PyObject *args, PyO if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->PrependSeparator(); + result = (wxMenuItem *)(arg1)->PrependSeparator(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } return resultobj; fail: return NULL; @@ -25802,6 +26202,7 @@ static PyObject *_wrap_Menu_PrependCheckItem(PyObject *self, PyObject *args, PyO wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25827,12 +26228,14 @@ static PyObject *_wrap_Menu_PrependCheckItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->PrependCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->PrependCheckItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25862,6 +26265,7 @@ static PyObject *_wrap_Menu_PrependRadioItem(PyObject *self, PyObject *args, PyO wxString *arg3 = 0 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp4 = False ; PyObject * obj0 = 0 ; @@ -25887,12 +26291,14 @@ static PyObject *_wrap_Menu_PrependRadioItem(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->PrependRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); + result = (wxMenuItem *)(arg1)->PrependRadioItem(arg2,(wxString const &)*arg3,(wxString const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -25923,6 +26329,7 @@ static PyObject *_wrap_Menu_PrependMenu(PyObject *self, PyObject *args, PyObject wxMenu *arg4 = (wxMenu *) 0 ; wxString const &arg5_defvalue = wxPyEmptyString ; wxString *arg5 = (wxString *) &arg5_defvalue ; + wxMenuItem *result; bool temp3 = False ; bool temp5 = False ; PyObject * obj0 = 0 ; @@ -25950,12 +26357,14 @@ static PyObject *_wrap_Menu_PrependMenu(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Prepend(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); + result = (wxMenuItem *)(arg1)->Prepend(arg2,(wxString const &)*arg3,arg4,(wxString const &)*arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + resultobj = wxPyMake_wxObject(result); + } { if (temp3) delete arg3; @@ -26186,7 +26595,7 @@ static PyObject *_wrap_Menu_GetMenuItemCount(PyObject *self, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -26300,8 +26709,10 @@ static PyObject *_wrap_Menu_FindItemByPosition(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Menu_FindItemByPosition",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxMenuItem *)((wxMenu const *)arg1)->FindItemByPosition(arg2); @@ -26331,8 +26742,10 @@ static PyObject *_wrap_Menu_Enable(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:Menu_Enable",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Enable(arg2,arg3); @@ -26386,8 +26799,10 @@ static PyObject *_wrap_Menu_Check(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:Menu_Check",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Check(arg2,arg3); @@ -27058,8 +27473,10 @@ static PyObject *_wrap_MenuBar_Insert(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:MenuBar_Insert",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { arg4 = wxString_in_helper(obj3); @@ -27106,7 +27523,7 @@ static PyObject *_wrap_MenuBar_GetMenuCount(PyObject *self, PyObject *args, PyOb wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -27126,8 +27543,10 @@ static PyObject *_wrap_MenuBar_GetMenu(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_GetMenu",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxMenu *)((wxMenuBar const *)arg1)->GetMenu(arg2); @@ -27162,8 +27581,10 @@ static PyObject *_wrap_MenuBar_Replace(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:MenuBar_Replace",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxMenu,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { arg4 = wxString_in_helper(obj3); @@ -27207,8 +27628,10 @@ static PyObject *_wrap_MenuBar_Remove(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_Remove",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxMenu *)(arg1)->Remove(arg2); @@ -27239,10 +27662,14 @@ static PyObject *_wrap_MenuBar_EnableTop(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MenuBar_EnableTop",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableTop(arg2,arg3); @@ -27270,8 +27697,10 @@ static PyObject *_wrap_MenuBar_IsEnabledTop(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_IsEnabledTop",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)((wxMenuBar const *)arg1)->IsEnabledTop(arg2); @@ -27301,8 +27730,10 @@ static PyObject *_wrap_MenuBar_SetLabelTop(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:MenuBar_SetLabelTop",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -27343,8 +27774,10 @@ static PyObject *_wrap_MenuBar_GetLabelTop(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuBar_GetLabelTop",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxMenuBar const *)arg1)->GetLabelTop(arg2); @@ -27504,8 +27937,10 @@ static PyObject *_wrap_MenuBar_Enable(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:MenuBar_Enable",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Enable(arg2,arg3); @@ -27533,8 +27968,10 @@ static PyObject *_wrap_MenuBar_Check(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:MenuBar_Check",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuBar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Check(arg2,arg3); @@ -28246,8 +28683,10 @@ static PyObject *_wrap_MenuItem_SetCheckable(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MenuItem_SetCheckable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCheckable(arg2); @@ -28379,8 +28818,10 @@ static PyObject *_wrap_MenuItem_Enable(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:MenuItem_Enable",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -28434,8 +28875,10 @@ static PyObject *_wrap_MenuItem_Check(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:MenuItem_Check",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -29012,8 +29455,10 @@ static PyObject *_wrap_MenuItem_SetOwnerDrawn(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:MenuItem_SetOwnerDrawn",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMenuItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -30776,8 +31221,10 @@ static PyObject *_wrap_SizerItem_Show(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SizerItem_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizerItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Show(arg2); @@ -31114,8 +31561,10 @@ static PyObject *_wrap_Sizer_InsertItem(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Sizer_InsertItem",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxSizerItem,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -31507,8 +31956,10 @@ static PyObject *_wrap_Sizer_Clear(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Sizer_Clear",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -31589,8 +32040,10 @@ static PyObject *_wrap_Sizer_Show(PyObject *self, PyObject *args, PyObject *kwar if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; arg2 = obj1; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -31673,8 +32126,10 @@ static PyObject *_wrap_Sizer_ShowItems(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_ShowItems",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->ShowItems(arg2); @@ -32379,8 +32834,10 @@ static PyObject *_wrap_FlexGridSizer_AddGrowableRow(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|i:FlexGridSizer_AddGrowableRow",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->AddGrowableRow(arg2,arg3); @@ -32407,8 +32864,10 @@ static PyObject *_wrap_FlexGridSizer_RemoveGrowableRow(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FlexGridSizer_RemoveGrowableRow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->RemoveGrowableRow(arg2); @@ -32436,8 +32895,10 @@ static PyObject *_wrap_FlexGridSizer_AddGrowableCol(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|i:FlexGridSizer_AddGrowableCol",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->AddGrowableCol(arg2,arg3); @@ -32464,8 +32925,10 @@ static PyObject *_wrap_FlexGridSizer_RemoveGrowableCol(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FlexGridSizer_RemoveGrowableCol",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFlexGridSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->RemoveGrowableCol(arg2); @@ -33897,8 +34360,10 @@ static PyObject *_wrap_GridBagSizer_GetItemPosition__SWIG_2(PyObject *self, PyOb if(!PyArg_ParseTuple(args,(char *)"OO:GridBagSizer_GetItemPosition",&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (arg1)->GetItemPosition(arg2); @@ -33991,7 +34456,13 @@ static PyObject *_wrap_GridBagSizer_GetItemPosition(PyObject *self, PyObject *ar } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_GridBagSizer_GetItemPosition__SWIG_2(self,args); @@ -34081,8 +34552,10 @@ static PyObject *_wrap_GridBagSizer_SetItemPosition__SWIG_2(PyObject *self, PyOb if(!PyArg_ParseTuple(args,(char *)"OOO:GridBagSizer_SetItemPosition",&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg3 = &temp3; if ( ! wxGBPosition_helper(obj2, &arg3)) SWIG_fail; @@ -34185,7 +34658,13 @@ static PyObject *_wrap_GridBagSizer_SetItemPosition(PyObject *self, PyObject *ar } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { @@ -34271,8 +34750,10 @@ static PyObject *_wrap_GridBagSizer_GetItemSpan__SWIG_2(PyObject *self, PyObject if(!PyArg_ParseTuple(args,(char *)"OO:GridBagSizer_GetItemSpan",&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (arg1)->GetItemSpan(arg2); @@ -34365,7 +34846,13 @@ static PyObject *_wrap_GridBagSizer_GetItemSpan(PyObject *self, PyObject *args) } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_GridBagSizer_GetItemSpan__SWIG_2(self,args); @@ -34455,8 +34942,10 @@ static PyObject *_wrap_GridBagSizer_SetItemSpan__SWIG_2(PyObject *self, PyObject if(!PyArg_ParseTuple(args,(char *)"OOO:GridBagSizer_SetItemSpan",&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridBagSizer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { arg3 = &temp3; if ( ! wxGBSpan_helper(obj2, &arg3)) SWIG_fail; @@ -34559,7 +35048,13 @@ static PyObject *_wrap_GridBagSizer_SetItemSpan(PyObject *self, PyObject *args) } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { @@ -35549,8 +36044,10 @@ static PyObject *_wrap_IndividualLayoutConstraint_SetDone(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:IndividualLayoutConstraint_SetDone",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxIndividualLayoutConstraint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDone(arg2); diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 853cc3667a..142e4bac19 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -1150,6 +1150,48 @@ FONTENCODING_UTF16BE = _gdi.FONTENCODING_UTF16BE FONTENCODING_UTF16LE = _gdi.FONTENCODING_UTF16LE FONTENCODING_UTF32BE = _gdi.FONTENCODING_UTF32BE FONTENCODING_UTF32LE = _gdi.FONTENCODING_UTF32LE +FONTENCODING_MACROMAN = _gdi.FONTENCODING_MACROMAN +FONTENCODING_MACJAPANESE = _gdi.FONTENCODING_MACJAPANESE +FONTENCODING_MACCHINESETRAD = _gdi.FONTENCODING_MACCHINESETRAD +FONTENCODING_MACKOREAN = _gdi.FONTENCODING_MACKOREAN +FONTENCODING_MACARABIC = _gdi.FONTENCODING_MACARABIC +FONTENCODING_MACHEBREW = _gdi.FONTENCODING_MACHEBREW +FONTENCODING_MACGREEK = _gdi.FONTENCODING_MACGREEK +FONTENCODING_MACCYRILLIC = _gdi.FONTENCODING_MACCYRILLIC +FONTENCODING_MACDEVANAGARI = _gdi.FONTENCODING_MACDEVANAGARI +FONTENCODING_MACGURMUKHI = _gdi.FONTENCODING_MACGURMUKHI +FONTENCODING_MACGUJARATI = _gdi.FONTENCODING_MACGUJARATI +FONTENCODING_MACORIYA = _gdi.FONTENCODING_MACORIYA +FONTENCODING_MACBENGALI = _gdi.FONTENCODING_MACBENGALI +FONTENCODING_MACTAMIL = _gdi.FONTENCODING_MACTAMIL +FONTENCODING_MACTELUGU = _gdi.FONTENCODING_MACTELUGU +FONTENCODING_MACKANNADA = _gdi.FONTENCODING_MACKANNADA +FONTENCODING_MACMALAJALAM = _gdi.FONTENCODING_MACMALAJALAM +FONTENCODING_MACSINHALESE = _gdi.FONTENCODING_MACSINHALESE +FONTENCODING_MACBURMESE = _gdi.FONTENCODING_MACBURMESE +FONTENCODING_MACKHMER = _gdi.FONTENCODING_MACKHMER +FONTENCODING_MACTHAI = _gdi.FONTENCODING_MACTHAI +FONTENCODING_MACLAOTIAN = _gdi.FONTENCODING_MACLAOTIAN +FONTENCODING_MACGEORGIAN = _gdi.FONTENCODING_MACGEORGIAN +FONTENCODING_MACARMENIAN = _gdi.FONTENCODING_MACARMENIAN +FONTENCODING_MACCHINESESIMP = _gdi.FONTENCODING_MACCHINESESIMP +FONTENCODING_MACTIBETAN = _gdi.FONTENCODING_MACTIBETAN +FONTENCODING_MACMONGOLIAN = _gdi.FONTENCODING_MACMONGOLIAN +FONTENCODING_MACETHIOPIC = _gdi.FONTENCODING_MACETHIOPIC +FONTENCODING_MACCENTRALEUR = _gdi.FONTENCODING_MACCENTRALEUR +FONTENCODING_MACVIATNAMESE = _gdi.FONTENCODING_MACVIATNAMESE +FONTENCODING_MACARABICEXT = _gdi.FONTENCODING_MACARABICEXT +FONTENCODING_MACSYMBOL = _gdi.FONTENCODING_MACSYMBOL +FONTENCODING_MACDINGBATS = _gdi.FONTENCODING_MACDINGBATS +FONTENCODING_MACTURKISH = _gdi.FONTENCODING_MACTURKISH +FONTENCODING_MACCROATIAN = _gdi.FONTENCODING_MACCROATIAN +FONTENCODING_MACICELANDIC = _gdi.FONTENCODING_MACICELANDIC +FONTENCODING_MACROMANIAN = _gdi.FONTENCODING_MACROMANIAN +FONTENCODING_MACCELTIC = _gdi.FONTENCODING_MACCELTIC +FONTENCODING_MACGAELIC = _gdi.FONTENCODING_MACGAELIC +FONTENCODING_MACKEYBOARD = _gdi.FONTENCODING_MACKEYBOARD +FONTENCODING_MACMIN = _gdi.FONTENCODING_MACMIN +FONTENCODING_MACMAX = _gdi.FONTENCODING_MACMAX FONTENCODING_MAX = _gdi.FONTENCODING_MAX FONTENCODING_UTF16 = _gdi.FONTENCODING_UTF16 FONTENCODING_UTF32 = _gdi.FONTENCODING_UTF32 @@ -1325,12 +1367,12 @@ class FontMapper(object): except: pass def Get(*args, **kwargs): - """FontMapper.Get() -> FontMapper""" + """Get() -> FontMapper""" return _gdi.FontMapper_Get(*args, **kwargs) Get = staticmethod(Get) def Set(*args, **kwargs): - """FontMapper.Set(FontMapper mapper) -> FontMapper""" + """Set(FontMapper mapper) -> FontMapper""" return _gdi.FontMapper_Set(*args, **kwargs) Set = staticmethod(Set) @@ -1339,22 +1381,22 @@ class FontMapper(object): return _gdi.FontMapper_CharsetToEncoding(*args, **kwargs) def GetSupportedEncodingsCount(*args, **kwargs): - """FontMapper.GetSupportedEncodingsCount() -> size_t""" + """GetSupportedEncodingsCount() -> size_t""" return _gdi.FontMapper_GetSupportedEncodingsCount(*args, **kwargs) GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount) def GetEncoding(*args, **kwargs): - """FontMapper.GetEncoding(size_t n) -> int""" + """GetEncoding(size_t n) -> int""" return _gdi.FontMapper_GetEncoding(*args, **kwargs) GetEncoding = staticmethod(GetEncoding) def GetEncodingName(*args, **kwargs): - """FontMapper.GetEncodingName(int encoding) -> String""" + """GetEncodingName(int encoding) -> String""" return _gdi.FontMapper_GetEncodingName(*args, **kwargs) GetEncodingName = staticmethod(GetEncodingName) def GetEncodingDescription(*args, **kwargs): - """FontMapper.GetEncodingDescription(int encoding) -> String""" + """GetEncodingDescription(int encoding) -> String""" return _gdi.FontMapper_GetEncodingDescription(*args, **kwargs) GetEncodingDescription = staticmethod(GetEncodingDescription) @@ -1367,7 +1409,7 @@ class FontMapper(object): return _gdi.FontMapper_SetConfigPath(*args, **kwargs) def GetDefaultConfigPath(*args, **kwargs): - """FontMapper.GetDefaultConfigPath() -> String""" + """GetDefaultConfigPath() -> String""" return _gdi.FontMapper_GetDefaultConfigPath(*args, **kwargs) GetDefaultConfigPath = staticmethod(GetDefaultConfigPath) @@ -1562,12 +1604,12 @@ class Font(GDIObject): return _gdi.Font_GetNoAntiAliasing(*args, **kwargs) def GetDefaultEncoding(*args, **kwargs): - """Font.GetDefaultEncoding() -> int""" + """GetDefaultEncoding() -> int""" return _gdi.Font_GetDefaultEncoding(*args, **kwargs) GetDefaultEncoding = staticmethod(GetDefaultEncoding) def SetDefaultEncoding(*args, **kwargs): - """Font.SetDefaultEncoding(int encoding)""" + """SetDefaultEncoding(int encoding)""" return _gdi.Font_SetDefaultEncoding(*args, **kwargs) SetDefaultEncoding = staticmethod(SetDefaultEncoding) @@ -1946,17 +1988,17 @@ class Locale(object): return val def GetSystemLanguage(*args, **kwargs): - """Locale.GetSystemLanguage() -> int""" + """GetSystemLanguage() -> int""" return _gdi.Locale_GetSystemLanguage(*args, **kwargs) GetSystemLanguage = staticmethod(GetSystemLanguage) def GetSystemEncoding(*args, **kwargs): - """Locale.GetSystemEncoding() -> int""" + """GetSystemEncoding() -> int""" return _gdi.Locale_GetSystemEncoding(*args, **kwargs) GetSystemEncoding = staticmethod(GetSystemEncoding) def GetSystemEncodingName(*args, **kwargs): - """Locale.GetSystemEncodingName() -> String""" + """GetSystemEncodingName() -> String""" return _gdi.Locale_GetSystemEncodingName(*args, **kwargs) GetSystemEncodingName = staticmethod(GetSystemEncodingName) @@ -1982,7 +2024,7 @@ class Locale(object): return _gdi.Locale_GetCanonicalName(*args, **kwargs) def AddCatalogLookupPathPrefix(*args, **kwargs): - """Locale.AddCatalogLookupPathPrefix(String prefix)""" + """AddCatalogLookupPathPrefix(String prefix)""" return _gdi.Locale_AddCatalogLookupPathPrefix(*args, **kwargs) AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix) @@ -1995,22 +2037,22 @@ class Locale(object): return _gdi.Locale_IsLoaded(*args, **kwargs) def GetLanguageInfo(*args, **kwargs): - """Locale.GetLanguageInfo(int lang) -> LanguageInfo""" + """GetLanguageInfo(int lang) -> LanguageInfo""" return _gdi.Locale_GetLanguageInfo(*args, **kwargs) GetLanguageInfo = staticmethod(GetLanguageInfo) def GetLanguageName(*args, **kwargs): - """Locale.GetLanguageName(int lang) -> String""" + """GetLanguageName(int lang) -> String""" return _gdi.Locale_GetLanguageName(*args, **kwargs) GetLanguageName = staticmethod(GetLanguageName) def FindLanguageInfo(*args, **kwargs): - """Locale.FindLanguageInfo(String locale) -> LanguageInfo""" + """FindLanguageInfo(String locale) -> LanguageInfo""" return _gdi.Locale_FindLanguageInfo(*args, **kwargs) FindLanguageInfo = staticmethod(FindLanguageInfo) def AddLanguage(*args, **kwargs): - """Locale.AddLanguage(LanguageInfo info)""" + """AddLanguage(LanguageInfo info)""" return _gdi.Locale_AddLanguage(*args, **kwargs) AddLanguage = staticmethod(AddLanguage) @@ -2099,17 +2141,17 @@ class EncodingConverter(core.Object): return _gdi.EncodingConverter_Convert(*args, **kwargs) def GetPlatformEquivalents(*args, **kwargs): - """EncodingConverter.GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" + """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" return _gdi.EncodingConverter_GetPlatformEquivalents(*args, **kwargs) GetPlatformEquivalents = staticmethod(GetPlatformEquivalents) def GetAllEquivalents(*args, **kwargs): - """EncodingConverter.GetAllEquivalents(int enc) -> wxFontEncodingArray""" + """GetAllEquivalents(int enc) -> wxFontEncodingArray""" return _gdi.EncodingConverter_GetAllEquivalents(*args, **kwargs) GetAllEquivalents = staticmethod(GetAllEquivalents) def CanConvert(*args, **kwargs): - """EncodingConverter.CanConvert(int encIn, int encOut) -> bool""" + """CanConvert(int encIn, int encOut) -> bool""" return _gdi.EncodingConverter_CanConvert(*args, **kwargs) CanConvert = staticmethod(CanConvert) @@ -3023,12 +3065,12 @@ class PostScriptDC(DC): return _gdi.PostScriptDC_SetPrintData(*args, **kwargs) def SetResolution(*args, **kwargs): - """PostScriptDC.SetResolution(int ppi)""" + """SetResolution(int ppi)""" return _gdi.PostScriptDC_SetResolution(*args, **kwargs) SetResolution = staticmethod(SetResolution) def GetResolution(*args, **kwargs): - """PostScriptDC.GetResolution() -> int""" + """GetResolution() -> int""" return _gdi.PostScriptDC_GetResolution(*args, **kwargs) GetResolution = staticmethod(GetResolution) diff --git a/wxPython/src/msw/gdi_wrap.cpp b/wxPython/src/msw/gdi_wrap.cpp index a6ba9574be..82fe48d550 100644 --- a/wxPython/src/msw/gdi_wrap.cpp +++ b/wxPython/src/msw/gdi_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -666,8 +838,10 @@ static PyObject *_wrap_GDIObject_SetVisible(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GDIObject_SetVisible",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGDIObject,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetVisible(arg2); @@ -729,16 +903,22 @@ static PyObject *_wrap_new_Colour(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:new_Colour",kwnames,&obj0,&obj1,&obj2)) goto fail; if (obj0) { - arg1 = (unsigned char) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned char) SPyObj_AsUnsignedChar(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj1) { - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -826,8 +1006,10 @@ static PyObject *_wrap_new_ColourRGB(PyObject *self, PyObject *args, PyObject *k }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_ColourRGB",kwnames,&obj0)) goto fail; - arg1 = (unsigned long) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxColour *)new wxColour(arg1); @@ -958,12 +1140,18 @@ static PyObject *_wrap_Colour_Set(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Colour_Set",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned char) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (unsigned char) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (unsigned char) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned char) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (unsigned char) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (unsigned char) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Set(arg2,arg3,arg4); @@ -990,8 +1178,10 @@ static PyObject *_wrap_Colour_SetRGB(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_SetRGB",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (unsigned long) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (unsigned long) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Set(arg2); @@ -1215,12 +1405,18 @@ static PyObject *_wrap_Palette_GetPixel(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Palette_GetPixel",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPalette,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (byte) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (byte) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (byte) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (byte) SPyObj_AsUnsignedChar(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (byte) SPyObj_AsUnsignedChar(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg4 = (byte) SPyObj_AsUnsignedChar(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)(arg1)->GetPixel(arg2,arg3,arg4); @@ -5897,8 +6093,10 @@ static PyObject *_wrap_NativeFontInfo_SetUnderlined(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:NativeFontInfo_SetUnderlined",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxNativeFontInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetUnderlined(arg2); @@ -6569,8 +6767,10 @@ static PyObject *_wrap_FontMapper_CharsetToEncoding(PyObject *self, PyObject *ar temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6609,7 +6809,7 @@ static PyObject *_wrap_FontMapper_GetSupportedEncodingsCount(PyObject *self, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6626,8 +6826,10 @@ static PyObject *_wrap_FontMapper_GetEncoding(PyObject *self, PyObject *args, Py }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FontMapper_GetEncoding",kwnames,&obj0)) goto fail; - arg1 = (size_t) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (size_t) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (int)wxFontMapper::GetEncoding(arg1); @@ -6821,8 +7023,10 @@ static PyObject *_wrap_FontMapper_GetAltForEncoding(PyObject *self, PyObject *ar } } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6985,8 +7189,10 @@ static PyObject *_wrap_new_Font(PyObject *self, PyObject *args, PyObject *kwargs if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"iiii|OOi:new_Font",kwnames,&arg1,&arg2,&arg3,&arg4,&obj4,&obj5,&arg7)) goto fail; if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj5) { { @@ -7684,8 +7890,10 @@ static PyObject *_wrap_Font_SetUnderlined(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Font_SetUnderlined",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFont,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetUnderlined(arg2); @@ -7941,8 +8149,10 @@ static PyObject *_wrap_Font_SetNoAntiAliasing(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Font_SetNoAntiAliasing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFont,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8098,8 +8308,10 @@ static PyObject *_wrap_FontEnumerator__setCallbackInfo(PyObject *self, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyFontEnumerator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; arg2 = obj1; arg3 = obj2; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->_setCallbackInfo(arg2,arg3,arg4); @@ -8129,8 +8341,10 @@ static PyObject *_wrap_FontEnumerator_EnumerateFacenames(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:FontEnumerator_EnumerateFacenames",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyFontEnumerator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8510,12 +8724,16 @@ static PyObject *_wrap_Locale_Init1(PyObject *self, PyObject *args, PyObject *kw } } if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj5) { - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9226,8 +9444,10 @@ static PyObject *_wrap_GetTranslation__SWIG_1(PyObject *self, PyObject *args) { if (arg2 == NULL) SWIG_fail; temp2 = True; } - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxGetTranslation((wxString const &)*arg1,(wxString const &)*arg2,arg3); @@ -9311,7 +9531,13 @@ static PyObject *_wrap_GetTranslation(PyObject *self, PyObject *args) { } if (_v) { { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsUnsignedInt(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_GetTranslation__SWIG_1(self,args); @@ -10579,8 +10805,10 @@ static PyObject *_wrap_DC_DrawBitmapXY(PyObject *self, PyObject *args, PyObject PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj4) { - arg5 = PyInt_AsLong(obj4) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg5 = (bool) SPyObj_AsBool(obj4); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10622,8 +10850,10 @@ static PyObject *_wrap_DC_DrawBitmap(PyObject *self, PyObject *args, PyObject *k if ( ! wxPoint_helper(obj2, &arg3)) SWIG_fail; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10845,8 +11075,10 @@ static PyObject *_wrap_DC_BlitXY(PyObject *self, PyObject *args, PyObject *kwarg if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj5,(void **) &arg6, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10905,8 +11137,10 @@ static PyObject *_wrap_DC_Blit(PyObject *self, PyObject *args, PyObject *kwargs) if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj7) { { @@ -13044,10 +13278,14 @@ static PyObject *_wrap_DC_SetAxisOrientation(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:DC_SetAxisOrientation",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAxisOrientation(arg2,arg3); @@ -13124,8 +13362,10 @@ static PyObject *_wrap_DC_SetOptimization(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DC_SetOptimization",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetOptimization(arg2); @@ -14024,8 +14264,10 @@ static PyObject *_wrap_new_MirrorDC(PyObject *self, PyObject *args, PyObject *kw if (arg1 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxMirrorDC *)new wxMirrorDC(*arg1,arg2); @@ -14776,8 +15018,10 @@ static PyObject *_wrap_ImageList_Draw(PyObject *self, PyObject *args, PyObject * PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool const) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15430,8 +15674,10 @@ static PyObject *_wrap_FontList_FindOrCreateFont(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|OOi:FontList_FindOrCreateFont",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5,&obj6,&arg8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontList,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj5) { - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj6) { { @@ -17774,6 +18020,48 @@ static swig_const_info swig_const_table[] = { { SWIG_PY_INT, (char *)"FONTENCODING_UTF16LE", (long) wxFONTENCODING_UTF16LE, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF32BE", (long) wxFONTENCODING_UTF32BE, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF32LE", (long) wxFONTENCODING_UTF32LE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACROMAN", (long) wxFONTENCODING_MACROMAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACJAPANESE", (long) wxFONTENCODING_MACJAPANESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCHINESETRAD", (long) wxFONTENCODING_MACCHINESETRAD, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKOREAN", (long) wxFONTENCODING_MACKOREAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACARABIC", (long) wxFONTENCODING_MACARABIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACHEBREW", (long) wxFONTENCODING_MACHEBREW, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGREEK", (long) wxFONTENCODING_MACGREEK, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCYRILLIC", (long) wxFONTENCODING_MACCYRILLIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACDEVANAGARI", (long) wxFONTENCODING_MACDEVANAGARI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGURMUKHI", (long) wxFONTENCODING_MACGURMUKHI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGUJARATI", (long) wxFONTENCODING_MACGUJARATI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACORIYA", (long) wxFONTENCODING_MACORIYA, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACBENGALI", (long) wxFONTENCODING_MACBENGALI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTAMIL", (long) wxFONTENCODING_MACTAMIL, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTELUGU", (long) wxFONTENCODING_MACTELUGU, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKANNADA", (long) wxFONTENCODING_MACKANNADA, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMALAJALAM", (long) wxFONTENCODING_MACMALAJALAM, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACSINHALESE", (long) wxFONTENCODING_MACSINHALESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACBURMESE", (long) wxFONTENCODING_MACBURMESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKHMER", (long) wxFONTENCODING_MACKHMER, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTHAI", (long) wxFONTENCODING_MACTHAI, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACLAOTIAN", (long) wxFONTENCODING_MACLAOTIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGEORGIAN", (long) wxFONTENCODING_MACGEORGIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACARMENIAN", (long) wxFONTENCODING_MACARMENIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCHINESESIMP", (long) wxFONTENCODING_MACCHINESESIMP, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTIBETAN", (long) wxFONTENCODING_MACTIBETAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMONGOLIAN", (long) wxFONTENCODING_MACMONGOLIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACETHIOPIC", (long) wxFONTENCODING_MACETHIOPIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCENTRALEUR", (long) wxFONTENCODING_MACCENTRALEUR, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACVIATNAMESE", (long) wxFONTENCODING_MACVIATNAMESE, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACARABICEXT", (long) wxFONTENCODING_MACARABICEXT, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACSYMBOL", (long) wxFONTENCODING_MACSYMBOL, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACDINGBATS", (long) wxFONTENCODING_MACDINGBATS, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACTURKISH", (long) wxFONTENCODING_MACTURKISH, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCROATIAN", (long) wxFONTENCODING_MACCROATIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACICELANDIC", (long) wxFONTENCODING_MACICELANDIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACROMANIAN", (long) wxFONTENCODING_MACROMANIAN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACCELTIC", (long) wxFONTENCODING_MACCELTIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACGAELIC", (long) wxFONTENCODING_MACGAELIC, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACKEYBOARD", (long) wxFONTENCODING_MACKEYBOARD, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMIN", (long) wxFONTENCODING_MACMIN, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"FONTENCODING_MACMAX", (long) wxFONTENCODING_MACMAX, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_MAX", (long) wxFONTENCODING_MAX, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF16", (long) wxFONTENCODING_UTF16, 0, 0, 0}, { SWIG_PY_INT, (char *)"FONTENCODING_UTF32", (long) wxFONTENCODING_UTF32, 0, 0, 0}, diff --git a/wxPython/src/msw/grid_wrap.cpp b/wxPython/src/msw/grid_wrap.cpp index 9b3882cab2..a690fc8100 100644 --- a/wxPython/src/msw/grid_wrap.cpp +++ b/wxPython/src/msw/grid_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -1406,8 +1578,10 @@ static PyObject *_wrap_GridCellRenderer_Draw(PyObject *self, PyObject *args, PyO arg5 = &temp5; if ( ! wxRect_helper(obj4, &arg5)) SWIG_fail; } - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Draw(*arg2,*arg3,*arg4,(wxRect const &)*arg5,arg6,arg7,arg8); @@ -2382,8 +2556,10 @@ static PyObject *_wrap_GridCellEditor_Show(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:GridCellEditor_Show",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellEditor,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGridCellAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } @@ -2678,8 +2854,10 @@ static PyObject *_wrap_PyGridCellEditor_base_Show(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyGridCellEditor_base_Show",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridCellEditor,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGridCellAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } @@ -3180,8 +3358,10 @@ static PyObject *_wrap_new_GridCellChoiceEditor(PyObject *self, PyObject *args, } } if (obj1) { - arg3 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3695,8 +3875,10 @@ static PyObject *_wrap_GridCellAttr_SetOverflow(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridCellAttr_SetOverflow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3725,8 +3907,10 @@ static PyObject *_wrap_GridCellAttr_SetReadOnly(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridCellAttr_SetReadOnly",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttr,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4511,8 +4695,10 @@ static PyObject *_wrap_GridCellAttrProvider_UpdateAttrRows(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:GridCellAttrProvider_UpdateAttrRows",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttrProvider,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->UpdateAttrRows(arg2,arg3); @@ -4540,8 +4726,10 @@ static PyObject *_wrap_GridCellAttrProvider_UpdateAttrCols(PyObject *self, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:GridCellAttrProvider_UpdateAttrCols",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridCellAttrProvider,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->UpdateAttrCols(arg2,arg3); @@ -5292,8 +5480,10 @@ static PyObject *_wrap_GridTableBase_SetValueAsBool(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiO:GridTableBase_SetValueAsBool",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetValueAsBool(arg2,arg3,arg4); @@ -5348,12 +5538,16 @@ static PyObject *_wrap_GridTableBase_InsertRows(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_InsertRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5383,8 +5577,10 @@ static PyObject *_wrap_GridTableBase_AppendRows(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridTableBase_AppendRows",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5416,12 +5612,16 @@ static PyObject *_wrap_GridTableBase_DeleteRows(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_DeleteRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5453,12 +5653,16 @@ static PyObject *_wrap_GridTableBase_InsertCols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_InsertCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5488,8 +5692,10 @@ static PyObject *_wrap_GridTableBase_AppendCols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:GridTableBase_AppendCols",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5521,12 +5727,16 @@ static PyObject *_wrap_GridTableBase_DeleteCols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:GridTableBase_DeleteCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6070,12 +6280,16 @@ static PyObject *_wrap_PyGridTableBase_base_InsertRows(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_InsertRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6105,8 +6319,10 @@ static PyObject *_wrap_PyGridTableBase_base_AppendRows(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PyGridTableBase_base_AppendRows",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6138,12 +6354,16 @@ static PyObject *_wrap_PyGridTableBase_base_DeleteRows(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_DeleteRows",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6175,12 +6395,16 @@ static PyObject *_wrap_PyGridTableBase_base_InsertCols(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_InsertCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6210,8 +6434,10 @@ static PyObject *_wrap_PyGridTableBase_base_AppendCols(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:PyGridTableBase_base_AppendCols",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6243,12 +6469,16 @@ static PyObject *_wrap_PyGridTableBase_base_DeleteCols(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyGridTableBase_base_DeleteCols",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7391,8 +7621,10 @@ static PyObject *_wrap_Grid_SetTable(PyObject *self, PyObject *args, PyObject *k if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxGridTableBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7448,8 +7680,10 @@ static PyObject *_wrap_Grid_InsertRows(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_InsertRows",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7480,8 +7714,10 @@ static PyObject *_wrap_Grid_AppendRows(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:Grid_AppendRows",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7513,8 +7749,10 @@ static PyObject *_wrap_Grid_DeleteRows(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_DeleteRows",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7546,8 +7784,10 @@ static PyObject *_wrap_Grid_InsertCols(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_InsertCols",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7578,8 +7818,10 @@ static PyObject *_wrap_Grid_AppendCols(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:Grid_AppendCols",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7611,8 +7853,10 @@ static PyObject *_wrap_Grid_DeleteCols(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iiO:Grid_DeleteCols",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7900,8 +8144,10 @@ static PyObject *_wrap_Grid_Refresh(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Grid_Refresh",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -7957,8 +8203,10 @@ static PyObject *_wrap_Grid_EnableEditing(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_EnableEditing",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableEditing(arg2); @@ -7986,8 +8234,10 @@ static PyObject *_wrap_Grid_EnableCellEditControl(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableCellEditControl",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8431,8 +8681,10 @@ static PyObject *_wrap_Grid_IsVisible(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:Grid_IsVisible",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -8513,8 +8765,10 @@ static PyObject *_wrap_Grid_MoveCursorUp(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorUp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorUp(arg2); @@ -8542,8 +8796,10 @@ static PyObject *_wrap_Grid_MoveCursorDown(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorDown",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorDown(arg2); @@ -8571,8 +8827,10 @@ static PyObject *_wrap_Grid_MoveCursorLeft(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorLeft",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorLeft(arg2); @@ -8600,8 +8858,10 @@ static PyObject *_wrap_Grid_MoveCursorRight(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorRight",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorRight(arg2); @@ -8679,8 +8939,10 @@ static PyObject *_wrap_Grid_MoveCursorUpBlock(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorUpBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorUpBlock(arg2); @@ -8708,8 +8970,10 @@ static PyObject *_wrap_Grid_MoveCursorDownBlock(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorDownBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorDownBlock(arg2); @@ -8737,8 +9001,10 @@ static PyObject *_wrap_Grid_MoveCursorLeftBlock(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorLeftBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorLeftBlock(arg2); @@ -8766,8 +9032,10 @@ static PyObject *_wrap_Grid_MoveCursorRightBlock(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_MoveCursorRightBlock",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->MoveCursorRightBlock(arg2); @@ -9668,8 +9936,10 @@ static PyObject *_wrap_Grid_EnableDragRowSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragRowSize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9747,8 +10017,10 @@ static PyObject *_wrap_Grid_EnableDragColSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragColSize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -9826,8 +10098,10 @@ static PyObject *_wrap_Grid_EnableDragGridSize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragGridSize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10108,8 +10382,10 @@ static PyObject *_wrap_Grid_EnableGridLines(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableGridLines",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10616,8 +10892,10 @@ static PyObject *_wrap_Grid_SetDefaultRowSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SetDefaultRowSize",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10673,8 +10951,10 @@ static PyObject *_wrap_Grid_SetDefaultColSize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SetDefaultColSize",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10730,8 +11010,10 @@ static PyObject *_wrap_Grid_AutoSizeColumn(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_AutoSizeColumn",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10761,8 +11043,10 @@ static PyObject *_wrap_Grid_AutoSizeRow(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_AutoSizeRow",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10791,8 +11075,10 @@ static PyObject *_wrap_Grid_AutoSizeColumns(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_AutoSizeColumns",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10821,8 +11107,10 @@ static PyObject *_wrap_Grid_AutoSizeRows(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_AutoSizeRows",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11320,8 +11608,10 @@ static PyObject *_wrap_Grid_SetDefaultCellOverflow(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_SetDefaultCellOverflow",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDefaultCellOverflow(arg2); @@ -11350,8 +11640,10 @@ static PyObject *_wrap_Grid_SetCellOverflow(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiiO:Grid_SetCellOverflow",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCellOverflow(arg2,arg3,arg4); @@ -11735,8 +12027,10 @@ static PyObject *_wrap_Grid_SetReadOnly(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:Grid_SetReadOnly",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11766,8 +12060,10 @@ static PyObject *_wrap_Grid_SelectRow(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SelectRow",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11797,8 +12093,10 @@ static PyObject *_wrap_Grid_SelectCol(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:Grid_SelectCol",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11831,8 +12129,10 @@ static PyObject *_wrap_Grid_SelectBlock(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|O:Grid_SelectBlock",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj5) { - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12693,24 +12993,34 @@ static PyObject *_wrap_new_GridEvent(PyObject *self, PyObject *args, PyObject *k if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"iiO|iiiiOOOOO:new_GridEvent",kwnames,&arg1,&arg2,&obj2,&arg4,&arg5,&arg6,&arg7,&obj7,&obj8,&obj9,&obj10,&obj11)) goto fail; if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj8) { - arg9 = PyInt_AsLong(obj8) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg9 = (bool) SPyObj_AsBool(obj8); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj10) { - arg11 = PyInt_AsLong(obj10) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg11 = (bool) SPyObj_AsBool(obj10); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj11) { - arg12 = PyInt_AsLong(obj11) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg12 = (bool) SPyObj_AsBool(obj11); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12962,20 +13272,28 @@ static PyObject *_wrap_new_GridSizeEvent(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"iiO|iiiOOOO:new_GridSizeEvent",kwnames,&arg1,&arg2,&obj2,&arg4,&arg5,&arg6,&obj6,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxGrid,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj8) { - arg9 = PyInt_AsLong(obj8) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg9 = (bool) SPyObj_AsBool(obj8); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13190,24 +13508,34 @@ static PyObject *_wrap_new_GridRangeSelectEvent(PyObject *self, PyObject *args, if (! wxGridCellCoords_helper(obj4, &arg5)) SWIG_fail; } if (obj5) { - arg6 = PyInt_AsLong(obj5) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg6 = (bool) SPyObj_AsBool(obj5); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj8) { - arg9 = PyInt_AsLong(obj8) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg9 = (bool) SPyObj_AsBool(obj8); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj9) { - arg10 = PyInt_AsLong(obj9) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg10 = (bool) SPyObj_AsBool(obj9); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index 603ae204c2..85e1da4dc2 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -1052,7 +1052,7 @@ class HtmlWindow(windows.ScrolledWindow): return _html.HtmlWindow_HasAnchor(*args, **kwargs) def AddFilter(*args, **kwargs): - """HtmlWindow.AddFilter(HtmlFilter filter)""" + """AddFilter(HtmlFilter filter)""" return _html.HtmlWindow_AddFilter(*args, **kwargs) AddFilter = staticmethod(AddFilter) @@ -1182,12 +1182,12 @@ class HtmlPrintout(windows.Printout): return _html.HtmlPrintout_SetMargins(*args, **kwargs) def AddFilter(*args, **kwargs): - """HtmlPrintout.AddFilter(wxHtmlFilter filter)""" + """AddFilter(wxHtmlFilter filter)""" return _html.HtmlPrintout_AddFilter(*args, **kwargs) AddFilter = staticmethod(AddFilter) def CleanUpStatics(*args, **kwargs): - """HtmlPrintout.CleanUpStatics()""" + """CleanUpStatics()""" return _html.HtmlPrintout_CleanUpStatics(*args, **kwargs) CleanUpStatics = staticmethod(CleanUpStatics) diff --git a/wxPython/src/msw/html_wrap.cpp b/wxPython/src/msw/html_wrap.cpp index a5073aefee..823b48ae0b 100644 --- a/wxPython/src/msw/html_wrap.cpp +++ b/wxPython/src/msw/html_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -4246,8 +4418,10 @@ static PyObject *_wrap_HtmlCell_SetCanLiveOnPagebreak(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlCell_SetCanLiveOnPagebreak",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxHtmlCell,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCanLiveOnPagebreak(arg2); @@ -4328,8 +4502,10 @@ static PyObject *_wrap_HtmlCell_FindCellByPos(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oii|O:HtmlCell_FindCellByPos",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxHtmlCell,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj3) { - arg4 = (unsigned int) PyInt_AsLong(obj3); - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (unsigned int) SPyObj_AsUnsignedInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -4442,7 +4618,7 @@ static PyObject *_wrap_HtmlCell_GetDepth(PyObject *self, PyObject *args, PyObjec wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6481,8 +6657,10 @@ static PyObject *_wrap_HtmlDCRenderer_SetHtmlText(PyObject *self, PyObject *args } } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6700,8 +6878,10 @@ static PyObject *_wrap_HtmlPrintout_SetHtmlText(PyObject *self, PyObject *args, } } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index 05ca825bbf..ba361c577d 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -103,32 +103,32 @@ class SystemSettings(object): def __repr__(self): return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def GetColour(*args, **kwargs): - """SystemSettings.GetColour(int index) -> Colour""" + """GetColour(int index) -> Colour""" return _misc.SystemSettings_GetColour(*args, **kwargs) GetColour = staticmethod(GetColour) def GetFont(*args, **kwargs): - """SystemSettings.GetFont(int index) -> Font""" + """GetFont(int index) -> Font""" return _misc.SystemSettings_GetFont(*args, **kwargs) GetFont = staticmethod(GetFont) def GetMetric(*args, **kwargs): - """SystemSettings.GetMetric(int index) -> int""" + """GetMetric(int index) -> int""" return _misc.SystemSettings_GetMetric(*args, **kwargs) GetMetric = staticmethod(GetMetric) def HasFeature(*args, **kwargs): - """SystemSettings.HasFeature(int index) -> bool""" + """HasFeature(int index) -> bool""" return _misc.SystemSettings_HasFeature(*args, **kwargs) HasFeature = staticmethod(HasFeature) def GetScreenType(*args, **kwargs): - """SystemSettings.GetScreenType() -> int""" + """GetScreenType() -> int""" return _misc.SystemSettings_GetScreenType(*args, **kwargs) GetScreenType = staticmethod(GetScreenType) def SetScreenType(*args, **kwargs): - """SystemSettings.SetScreenType(int screen)""" + """SetScreenType(int screen)""" return _misc.SystemSettings_SetScreenType(*args, **kwargs) SetScreenType = staticmethod(SetScreenType) @@ -174,27 +174,27 @@ class SystemOptions(core.Object): self.thisown = 1 del newobj.thisown def SetOption(*args, **kwargs): - """SystemOptions.SetOption(String name, String value)""" + """SetOption(String name, String value)""" return _misc.SystemOptions_SetOption(*args, **kwargs) SetOption = staticmethod(SetOption) def SetOptionInt(*args, **kwargs): - """SystemOptions.SetOptionInt(String name, int value)""" + """SetOptionInt(String name, int value)""" return _misc.SystemOptions_SetOptionInt(*args, **kwargs) SetOptionInt = staticmethod(SetOptionInt) def GetOption(*args, **kwargs): - """SystemOptions.GetOption(String name) -> String""" + """GetOption(String name) -> String""" return _misc.SystemOptions_GetOption(*args, **kwargs) GetOption = staticmethod(GetOption) def GetOptionInt(*args, **kwargs): - """SystemOptions.GetOptionInt(String name) -> int""" + """GetOptionInt(String name) -> int""" return _misc.SystemOptions_GetOptionInt(*args, **kwargs) GetOptionInt = staticmethod(GetOptionInt) def HasOption(*args, **kwargs): - """SystemOptions.HasOption(String name) -> bool""" + """HasOption(String name) -> bool""" return _misc.SystemOptions_HasOption(*args, **kwargs) HasOption = staticmethod(HasOption) @@ -553,12 +553,12 @@ class ToolTip(core.Object): return _misc.ToolTip_GetWindow(*args, **kwargs) def Enable(*args, **kwargs): - """ToolTip.Enable(bool flag)""" + """Enable(bool flag)""" return _misc.ToolTip_Enable(*args, **kwargs) Enable = staticmethod(Enable) def SetDelay(*args, **kwargs): - """ToolTip.SetDelay(long milliseconds)""" + """SetDelay(long milliseconds)""" return _misc.ToolTip_SetDelay(*args, **kwargs) SetDelay = staticmethod(SetDelay) @@ -823,6 +823,7 @@ class FileHistory(core.Object): """GetCount() -> int""" return _misc.FileHistory_GetCount(*args, **kwargs) + GetNoHistoryFiles = GetCount class FileHistoryPtr(FileHistory): def __init__(self, this): @@ -1093,17 +1094,17 @@ class Log(object): self.thisown = 1 del newobj.thisown def IsEnabled(*args, **kwargs): - """Log.IsEnabled() -> bool""" + """IsEnabled() -> bool""" return _misc.Log_IsEnabled(*args, **kwargs) IsEnabled = staticmethod(IsEnabled) def EnableLogging(*args, **kwargs): - """Log.EnableLogging(bool doIt=True) -> bool""" + """EnableLogging(bool doIt=True) -> bool""" return _misc.Log_EnableLogging(*args, **kwargs) EnableLogging = staticmethod(EnableLogging) def OnLog(*args, **kwargs): - """Log.OnLog(wxLogLevel level, wxChar szString, time_t t)""" + """OnLog(wxLogLevel level, wxChar szString, time_t t)""" return _misc.Log_OnLog(*args, **kwargs) OnLog = staticmethod(OnLog) @@ -1112,102 +1113,102 @@ class Log(object): return _misc.Log_Flush(*args, **kwargs) def FlushActive(*args, **kwargs): - """Log.FlushActive()""" + """FlushActive()""" return _misc.Log_FlushActive(*args, **kwargs) FlushActive = staticmethod(FlushActive) def GetActiveTarget(*args, **kwargs): - """Log.GetActiveTarget() -> Log""" + """GetActiveTarget() -> Log""" return _misc.Log_GetActiveTarget(*args, **kwargs) GetActiveTarget = staticmethod(GetActiveTarget) def SetActiveTarget(*args, **kwargs): - """Log.SetActiveTarget(Log pLogger) -> Log""" + """SetActiveTarget(Log pLogger) -> Log""" return _misc.Log_SetActiveTarget(*args, **kwargs) SetActiveTarget = staticmethod(SetActiveTarget) def Suspend(*args, **kwargs): - """Log.Suspend()""" + """Suspend()""" return _misc.Log_Suspend(*args, **kwargs) Suspend = staticmethod(Suspend) def Resume(*args, **kwargs): - """Log.Resume()""" + """Resume()""" return _misc.Log_Resume(*args, **kwargs) Resume = staticmethod(Resume) def SetVerbose(*args, **kwargs): - """Log.SetVerbose(bool bVerbose=True)""" + """SetVerbose(bool bVerbose=True)""" return _misc.Log_SetVerbose(*args, **kwargs) SetVerbose = staticmethod(SetVerbose) def SetLogLevel(*args, **kwargs): - """Log.SetLogLevel(wxLogLevel logLevel)""" + """SetLogLevel(wxLogLevel logLevel)""" return _misc.Log_SetLogLevel(*args, **kwargs) SetLogLevel = staticmethod(SetLogLevel) def DontCreateOnDemand(*args, **kwargs): - """Log.DontCreateOnDemand()""" + """DontCreateOnDemand()""" return _misc.Log_DontCreateOnDemand(*args, **kwargs) DontCreateOnDemand = staticmethod(DontCreateOnDemand) def SetTraceMask(*args, **kwargs): - """Log.SetTraceMask(wxTraceMask ulMask)""" + """SetTraceMask(wxTraceMask ulMask)""" return _misc.Log_SetTraceMask(*args, **kwargs) SetTraceMask = staticmethod(SetTraceMask) def AddTraceMask(*args, **kwargs): - """Log.AddTraceMask(String str)""" + """AddTraceMask(String str)""" return _misc.Log_AddTraceMask(*args, **kwargs) AddTraceMask = staticmethod(AddTraceMask) def RemoveTraceMask(*args, **kwargs): - """Log.RemoveTraceMask(String str)""" + """RemoveTraceMask(String str)""" return _misc.Log_RemoveTraceMask(*args, **kwargs) RemoveTraceMask = staticmethod(RemoveTraceMask) def ClearTraceMasks(*args, **kwargs): - """Log.ClearTraceMasks()""" + """ClearTraceMasks()""" return _misc.Log_ClearTraceMasks(*args, **kwargs) ClearTraceMasks = staticmethod(ClearTraceMasks) def GetTraceMasks(*args, **kwargs): - """Log.GetTraceMasks() -> wxArrayString""" + """GetTraceMasks() -> wxArrayString""" return _misc.Log_GetTraceMasks(*args, **kwargs) GetTraceMasks = staticmethod(GetTraceMasks) def SetTimestamp(*args, **kwargs): - """Log.SetTimestamp(wxChar ts)""" + """SetTimestamp(wxChar ts)""" return _misc.Log_SetTimestamp(*args, **kwargs) SetTimestamp = staticmethod(SetTimestamp) def GetVerbose(*args, **kwargs): - """Log.GetVerbose() -> bool""" + """GetVerbose() -> bool""" return _misc.Log_GetVerbose(*args, **kwargs) GetVerbose = staticmethod(GetVerbose) def GetTraceMask(*args, **kwargs): - """Log.GetTraceMask() -> wxTraceMask""" + """GetTraceMask() -> wxTraceMask""" return _misc.Log_GetTraceMask(*args, **kwargs) GetTraceMask = staticmethod(GetTraceMask) def IsAllowedTraceMask(*args, **kwargs): - """Log.IsAllowedTraceMask(wxChar mask) -> bool""" + """IsAllowedTraceMask(wxChar mask) -> bool""" return _misc.Log_IsAllowedTraceMask(*args, **kwargs) IsAllowedTraceMask = staticmethod(IsAllowedTraceMask) def GetLogLevel(*args, **kwargs): - """Log.GetLogLevel() -> wxLogLevel""" + """GetLogLevel() -> wxLogLevel""" return _misc.Log_GetLogLevel(*args, **kwargs) GetLogLevel = staticmethod(GetLogLevel) def GetTimestamp(*args, **kwargs): - """Log.GetTimestamp() -> wxChar""" + """GetTimestamp() -> wxChar""" return _misc.Log_GetTimestamp(*args, **kwargs) GetTimestamp = staticmethod(GetTimestamp) def TimeStamp(*args, **kwargs): - """Log.TimeStamp() -> String""" + """TimeStamp() -> String""" return _misc.Log_TimeStamp(*args, **kwargs) TimeStamp = staticmethod(TimeStamp) @@ -1575,17 +1576,17 @@ class Process(core.EvtHandler): def __repr__(self): return "<%s.%s; proxy of C++ wxPyProcess instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Kill(*args, **kwargs): - """Process.Kill(int pid, int sig=SIGTERM) -> int""" + """Kill(int pid, int sig=SIGTERM) -> int""" return _misc.Process_Kill(*args, **kwargs) Kill = staticmethod(Kill) def Exists(*args, **kwargs): - """Process.Exists(int pid) -> bool""" + """Exists(int pid) -> bool""" return _misc.Process_Exists(*args, **kwargs) Exists = staticmethod(Exists) def Open(*args, **kwargs): - """Process.Open(String cmd, int flags=EXEC_ASYNC) -> Process""" + """Open(String cmd, int flags=EXEC_ASYNC) -> Process""" return _misc.Process_Open(*args, **kwargs) Open = staticmethod(Open) @@ -2197,7 +2198,7 @@ class FileType(object): return _misc.FileType_Unassociate(*args, **kwargs) def ExpandCommand(*args, **kwargs): - """FileType.ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" + """ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" return _misc.FileType_ExpandCommand(*args, **kwargs) ExpandCommand = staticmethod(ExpandCommand) @@ -2217,7 +2218,7 @@ class MimeTypesManager(object): def __repr__(self): return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def IsOfType(*args, **kwargs): - """MimeTypesManager.IsOfType(String mimeType, String wildcard) -> bool""" + """IsOfType(String mimeType, String wildcard) -> bool""" return _misc.MimeTypesManager_IsOfType(*args, **kwargs) IsOfType = staticmethod(IsOfType) @@ -2305,7 +2306,7 @@ class ArtProvider(object): def PushProvider(*args, **kwargs): """ - ArtProvider.PushProvider(ArtProvider provider) + PushProvider(ArtProvider provider) Add new provider to the top of providers stack. """ @@ -2314,7 +2315,7 @@ class ArtProvider(object): PushProvider = staticmethod(PushProvider) def PopProvider(*args, **kwargs): """ - ArtProvider.PopProvider() -> bool + PopProvider() -> bool Remove latest added provider and delete it. """ @@ -2323,7 +2324,7 @@ class ArtProvider(object): PopProvider = staticmethod(PopProvider) def RemoveProvider(*args, **kwargs): """ - ArtProvider.RemoveProvider(ArtProvider provider) -> bool + RemoveProvider(ArtProvider provider) -> bool Remove provider. The provider must have been added previously! The provider is _not_ deleted. @@ -2333,7 +2334,7 @@ class ArtProvider(object): RemoveProvider = staticmethod(RemoveProvider) def GetBitmap(*args, **kwargs): """ - ArtProvider.GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap + GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap Query the providers for bitmap with given ID and return it. Return wx.NullBitmap if no provider provides it. @@ -2343,7 +2344,7 @@ class ArtProvider(object): GetBitmap = staticmethod(GetBitmap) def GetIcon(*args, **kwargs): """ - ArtProvider.GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon + GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon Query the providers for icon with given ID and return it. Return wx.NullIcon if no provider provides it. @@ -2466,22 +2467,22 @@ class ConfigBase(object): Type_Integer = _misc.ConfigBase_Type_Integer Type_Float = _misc.ConfigBase_Type_Float def Set(*args, **kwargs): - """ConfigBase.Set(ConfigBase pConfig) -> ConfigBase""" + """Set(ConfigBase pConfig) -> ConfigBase""" return _misc.ConfigBase_Set(*args, **kwargs) Set = staticmethod(Set) def Get(*args, **kwargs): - """ConfigBase.Get(bool createOnDemand=True) -> ConfigBase""" + """Get(bool createOnDemand=True) -> ConfigBase""" return _misc.ConfigBase_Get(*args, **kwargs) Get = staticmethod(Get) def Create(*args, **kwargs): - """ConfigBase.Create() -> ConfigBase""" + """Create() -> ConfigBase""" return _misc.ConfigBase_Create(*args, **kwargs) Create = staticmethod(Create) def DontCreateOnDemand(*args, **kwargs): - """ConfigBase.DontCreateOnDemand()""" + """DontCreateOnDemand()""" return _misc.ConfigBase_DontCreateOnDemand(*args, **kwargs) DontCreateOnDemand = staticmethod(DontCreateOnDemand) @@ -2903,62 +2904,62 @@ class DateTime(object): Monday_First = _misc.DateTime_Monday_First Sunday_First = _misc.DateTime_Sunday_First def SetCountry(*args, **kwargs): - """DateTime.SetCountry(int country)""" + """SetCountry(int country)""" return _misc.DateTime_SetCountry(*args, **kwargs) SetCountry = staticmethod(SetCountry) def GetCountry(*args, **kwargs): - """DateTime.GetCountry() -> int""" + """GetCountry() -> int""" return _misc.DateTime_GetCountry(*args, **kwargs) GetCountry = staticmethod(GetCountry) def IsWestEuropeanCountry(*args, **kwargs): - """DateTime.IsWestEuropeanCountry(int country=Country_Default) -> bool""" + """IsWestEuropeanCountry(int country=Country_Default) -> bool""" return _misc.DateTime_IsWestEuropeanCountry(*args, **kwargs) IsWestEuropeanCountry = staticmethod(IsWestEuropeanCountry) def GetCurrentYear(*args, **kwargs): - """DateTime.GetCurrentYear(int cal=Gregorian) -> int""" + """GetCurrentYear(int cal=Gregorian) -> int""" return _misc.DateTime_GetCurrentYear(*args, **kwargs) GetCurrentYear = staticmethod(GetCurrentYear) def ConvertYearToBC(*args, **kwargs): - """DateTime.ConvertYearToBC(int year) -> int""" + """ConvertYearToBC(int year) -> int""" return _misc.DateTime_ConvertYearToBC(*args, **kwargs) ConvertYearToBC = staticmethod(ConvertYearToBC) def GetCurrentMonth(*args, **kwargs): - """DateTime.GetCurrentMonth(int cal=Gregorian) -> int""" + """GetCurrentMonth(int cal=Gregorian) -> int""" return _misc.DateTime_GetCurrentMonth(*args, **kwargs) GetCurrentMonth = staticmethod(GetCurrentMonth) def IsLeapYear(*args, **kwargs): - """DateTime.IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" + """IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" return _misc.DateTime_IsLeapYear(*args, **kwargs) IsLeapYear = staticmethod(IsLeapYear) def GetCentury(*args, **kwargs): - """DateTime.GetCentury(int year=Inv_Year) -> int""" + """GetCentury(int year=Inv_Year) -> int""" return _misc.DateTime_GetCentury(*args, **kwargs) GetCentury = staticmethod(GetCentury) def GetNumberOfDaysinYear(*args, **kwargs): - """DateTime.GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" + """GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" return _misc.DateTime_GetNumberOfDaysinYear(*args, **kwargs) GetNumberOfDaysinYear = staticmethod(GetNumberOfDaysinYear) def GetNumberOfDaysInMonth(*args, **kwargs): - """DateTime.GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" + """GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" return _misc.DateTime_GetNumberOfDaysInMonth(*args, **kwargs) GetNumberOfDaysInMonth = staticmethod(GetNumberOfDaysInMonth) def GetMonthName(*args, **kwargs): - """DateTime.GetMonthName(int month, int flags=Name_Full) -> String""" + """GetMonthName(int month, int flags=Name_Full) -> String""" return _misc.DateTime_GetMonthName(*args, **kwargs) GetMonthName = staticmethod(GetMonthName) def GetWeekDayName(*args, **kwargs): - """DateTime.GetWeekDayName(int weekday, int flags=Name_Full) -> String""" + """GetWeekDayName(int weekday, int flags=Name_Full) -> String""" return _misc.DateTime_GetWeekDayName(*args, **kwargs) GetWeekDayName = staticmethod(GetWeekDayName) @@ -2972,32 +2973,32 @@ class DateTime(object): GetAmPmStrings = staticmethod(GetAmPmStrings) def IsDSTApplicable(*args, **kwargs): - """DateTime.IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" + """IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" return _misc.DateTime_IsDSTApplicable(*args, **kwargs) IsDSTApplicable = staticmethod(IsDSTApplicable) def GetBeginDST(*args, **kwargs): - """DateTime.GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" + """GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" return _misc.DateTime_GetBeginDST(*args, **kwargs) GetBeginDST = staticmethod(GetBeginDST) def GetEndDST(*args, **kwargs): - """DateTime.GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" + """GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" return _misc.DateTime_GetEndDST(*args, **kwargs) GetEndDST = staticmethod(GetEndDST) def Now(*args, **kwargs): - """DateTime.Now() -> DateTime""" + """Now() -> DateTime""" return _misc.DateTime_Now(*args, **kwargs) Now = staticmethod(Now) def UNow(*args, **kwargs): - """DateTime.UNow() -> DateTime""" + """UNow() -> DateTime""" return _misc.DateTime_UNow(*args, **kwargs) UNow = staticmethod(UNow) def Today(*args, **kwargs): - """DateTime.Today() -> DateTime""" + """Today() -> DateTime""" return _misc.DateTime_Today(*args, **kwargs) Today = staticmethod(Today) @@ -3495,52 +3496,52 @@ class TimeSpan(object): def __repr__(self): return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Seconds(*args, **kwargs): - """TimeSpan.Seconds(long sec) -> TimeSpan""" + """Seconds(long sec) -> TimeSpan""" return _misc.TimeSpan_Seconds(*args, **kwargs) Seconds = staticmethod(Seconds) def Second(*args, **kwargs): - """TimeSpan.Second() -> TimeSpan""" + """Second() -> TimeSpan""" return _misc.TimeSpan_Second(*args, **kwargs) Second = staticmethod(Second) def Minutes(*args, **kwargs): - """TimeSpan.Minutes(long min) -> TimeSpan""" + """Minutes(long min) -> TimeSpan""" return _misc.TimeSpan_Minutes(*args, **kwargs) Minutes = staticmethod(Minutes) def Minute(*args, **kwargs): - """TimeSpan.Minute() -> TimeSpan""" + """Minute() -> TimeSpan""" return _misc.TimeSpan_Minute(*args, **kwargs) Minute = staticmethod(Minute) def Hours(*args, **kwargs): - """TimeSpan.Hours(long hours) -> TimeSpan""" + """Hours(long hours) -> TimeSpan""" return _misc.TimeSpan_Hours(*args, **kwargs) Hours = staticmethod(Hours) def Hour(*args, **kwargs): - """TimeSpan.Hour() -> TimeSpan""" + """Hour() -> TimeSpan""" return _misc.TimeSpan_Hour(*args, **kwargs) Hour = staticmethod(Hour) def Days(*args, **kwargs): - """TimeSpan.Days(long days) -> TimeSpan""" + """Days(long days) -> TimeSpan""" return _misc.TimeSpan_Days(*args, **kwargs) Days = staticmethod(Days) def Day(*args, **kwargs): - """TimeSpan.Day() -> TimeSpan""" + """Day() -> TimeSpan""" return _misc.TimeSpan_Day(*args, **kwargs) Day = staticmethod(Day) def Weeks(*args, **kwargs): - """TimeSpan.Weeks(long days) -> TimeSpan""" + """Weeks(long days) -> TimeSpan""" return _misc.TimeSpan_Weeks(*args, **kwargs) Weeks = staticmethod(Weeks) def Week(*args, **kwargs): - """TimeSpan.Week() -> TimeSpan""" + """Week() -> TimeSpan""" return _misc.TimeSpan_Week(*args, **kwargs) Week = staticmethod(Week) @@ -3753,42 +3754,42 @@ class DateSpan(object): except: pass def Days(*args, **kwargs): - """DateSpan.Days(int days) -> DateSpan""" + """Days(int days) -> DateSpan""" return _misc.DateSpan_Days(*args, **kwargs) Days = staticmethod(Days) def Day(*args, **kwargs): - """DateSpan.Day() -> DateSpan""" + """Day() -> DateSpan""" return _misc.DateSpan_Day(*args, **kwargs) Day = staticmethod(Day) def Weeks(*args, **kwargs): - """DateSpan.Weeks(int weeks) -> DateSpan""" + """Weeks(int weeks) -> DateSpan""" return _misc.DateSpan_Weeks(*args, **kwargs) Weeks = staticmethod(Weeks) def Week(*args, **kwargs): - """DateSpan.Week() -> DateSpan""" + """Week() -> DateSpan""" return _misc.DateSpan_Week(*args, **kwargs) Week = staticmethod(Week) def Months(*args, **kwargs): - """DateSpan.Months(int mon) -> DateSpan""" + """Months(int mon) -> DateSpan""" return _misc.DateSpan_Months(*args, **kwargs) Months = staticmethod(Months) def Month(*args, **kwargs): - """DateSpan.Month() -> DateSpan""" + """Month() -> DateSpan""" return _misc.DateSpan_Month(*args, **kwargs) Month = staticmethod(Month) def Years(*args, **kwargs): - """DateSpan.Years(int years) -> DateSpan""" + """Years(int years) -> DateSpan""" return _misc.DateSpan_Years(*args, **kwargs) Years = staticmethod(Years) def Year(*args, **kwargs): - """DateSpan.Year() -> DateSpan""" + """Year() -> DateSpan""" return _misc.DateSpan_Year(*args, **kwargs) Year = staticmethod(Year) @@ -4334,6 +4335,14 @@ class MetafileDataObject(DataObjectSimple): self.this = newobj.this self.thisown = 1 del newobj.thisown + def SetMetafile(*args, **kwargs): + """SetMetafile(wxMetafile metafile)""" + return _misc.MetafileDataObject_SetMetafile(*args, **kwargs) + + def GetMetafile(*args, **kwargs): + """GetMetafile() -> wxMetafile""" + return _misc.MetafileDataObject_GetMetafile(*args, **kwargs) + class MetafileDataObjectPtr(MetafileDataObject): def __init__(self, this): diff --git a/wxPython/src/msw/misc_wrap.cpp b/wxPython/src/msw/misc_wrap.cpp index 1de1723f34..16c7bde4b7 100644 --- a/wxPython/src/msw/misc_wrap.cpp +++ b/wxPython/src/msw/misc_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -211,87 +383,88 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_wxLogChain swig_types[0] #define SWIGTYPE_p_wxMutexGuiLocker swig_types[1] -#define SWIGTYPE_p_wxFileHistory swig_types[2] -#define SWIGTYPE_p_wxLog swig_types[3] -#define SWIGTYPE_p_wxDateTime__TimeZone swig_types[4] -#define SWIGTYPE_p_wxMenu swig_types[5] -#define SWIGTYPE_p_wxEvent swig_types[6] -#define SWIGTYPE_p_wxConfigBase swig_types[7] -#define SWIGTYPE_p_wxWave swig_types[8] -#define SWIGTYPE_p_wxFileType swig_types[9] -#define SWIGTYPE_p_wxLogGui swig_types[10] -#define SWIGTYPE_p_wxFont swig_types[11] -#define SWIGTYPE_p_wxDataFormat swig_types[12] -#define SWIGTYPE_p_wxTimerEvent swig_types[13] -#define SWIGTYPE_p_wxCaret swig_types[14] -#define SWIGTYPE_p_int swig_types[15] -#define SWIGTYPE_p_wxSize swig_types[16] -#define SWIGTYPE_p_wxClipboard swig_types[17] -#define SWIGTYPE_p_wxStopWatch swig_types[18] -#define SWIGTYPE_p_wxDC swig_types[19] -#define SWIGTYPE_p_wxClipboardLocker swig_types[20] -#define SWIGTYPE_p_wxIcon swig_types[21] -#define SWIGTYPE_p_wxLogStderr swig_types[22] -#define SWIGTYPE_p_wxLogTextCtrl swig_types[23] -#define SWIGTYPE_p_wxTextCtrl swig_types[24] -#define SWIGTYPE_p_wxBusyCursor swig_types[25] -#define SWIGTYPE_p_wxFileDataObject swig_types[26] -#define SWIGTYPE_p_wxPyBitmapDataObject swig_types[27] -#define SWIGTYPE_p_wxPyTextDataObject swig_types[28] -#define SWIGTYPE_p_wxBitmapDataObject swig_types[29] -#define SWIGTYPE_p_wxTextDataObject swig_types[30] -#define SWIGTYPE_p_wxDataObject swig_types[31] -#define SWIGTYPE_p_wxCustomDataObject swig_types[32] -#define SWIGTYPE_p_wxURLDataObject swig_types[33] -#define SWIGTYPE_p_wxMetafileDataObject swig_types[34] -#define SWIGTYPE_p_wxTimerRunner swig_types[35] -#define SWIGTYPE_p_wxLogWindow swig_types[36] -#define SWIGTYPE_p_wxTimeSpan swig_types[37] -#define SWIGTYPE_p_wxArrayString swig_types[38] -#define SWIGTYPE_p_wxWindowDisabler swig_types[39] -#define SWIGTYPE_p_wxToolTip swig_types[40] -#define SWIGTYPE_p_wxDataObjectComposite swig_types[41] -#define SWIGTYPE_p_wxFileConfig swig_types[42] -#define SWIGTYPE_p_wxSystemSettings swig_types[43] -#define SWIGTYPE_p_wxPyDataObjectSimple swig_types[44] -#define SWIGTYPE_p_wxDataObjectSimple swig_types[45] -#define SWIGTYPE_p_wxEvtHandler swig_types[46] -#define SWIGTYPE_p_wxRect swig_types[47] -#define SWIGTYPE_p_wxSingleInstanceChecker swig_types[48] -#define SWIGTYPE_p_wxFileTypeInfo swig_types[49] -#define SWIGTYPE_p_wxFrame swig_types[50] -#define SWIGTYPE_p_wxTimer swig_types[51] -#define SWIGTYPE_p_wxMimeTypesManager swig_types[52] -#define SWIGTYPE_p_wxPyArtProvider swig_types[53] -#define SWIGTYPE_p_wxPyTipProvider swig_types[54] -#define SWIGTYPE_p_wxTipProvider swig_types[55] -#define SWIGTYPE_p_wxJoystick swig_types[56] -#define SWIGTYPE_p_wxSystemOptions swig_types[57] -#define SWIGTYPE_p_wxPoint swig_types[58] -#define SWIGTYPE_p_wxJoystickEvent swig_types[59] -#define SWIGTYPE_p_wxCursor swig_types[60] -#define SWIGTYPE_p_wxObject swig_types[61] -#define SWIGTYPE_p_wxOutputStream swig_types[62] -#define SWIGTYPE_p_wxDateTime swig_types[63] -#define SWIGTYPE_p_wxPyDropSource swig_types[64] -#define SWIGTYPE_p_wxWindow swig_types[65] -#define SWIGTYPE_p_wxString swig_types[66] -#define SWIGTYPE_p_wxPyProcess swig_types[67] -#define SWIGTYPE_p_wxBitmap swig_types[68] -#define SWIGTYPE_p_wxConfig swig_types[69] -#define SWIGTYPE_p_wxChar swig_types[70] -#define SWIGTYPE_p_wxBusyInfo swig_types[71] -#define SWIGTYPE_p_wxPyDropTarget swig_types[72] -#define SWIGTYPE_p_wxPyTextDropTarget swig_types[73] -#define SWIGTYPE_p_wxPyFileDropTarget swig_types[74] -#define SWIGTYPE_p_wxProcessEvent swig_types[75] -#define SWIGTYPE_p_wxPyLog swig_types[76] -#define SWIGTYPE_p_wxLogNull swig_types[77] -#define SWIGTYPE_p_wxColour swig_types[78] -#define SWIGTYPE_p_wxConfigPathChanger swig_types[79] -#define SWIGTYPE_p_wxPyTimer swig_types[80] -#define SWIGTYPE_p_wxDateSpan swig_types[81] -static swig_type_info *swig_types[83]; +#define SWIGTYPE_p_wxMetafile swig_types[2] +#define SWIGTYPE_p_wxFileHistory swig_types[3] +#define SWIGTYPE_p_wxLog swig_types[4] +#define SWIGTYPE_p_wxDateTime__TimeZone swig_types[5] +#define SWIGTYPE_p_wxMenu swig_types[6] +#define SWIGTYPE_p_wxEvent swig_types[7] +#define SWIGTYPE_p_wxConfigBase swig_types[8] +#define SWIGTYPE_p_wxWave swig_types[9] +#define SWIGTYPE_p_wxFileType swig_types[10] +#define SWIGTYPE_p_wxLogGui swig_types[11] +#define SWIGTYPE_p_wxFont swig_types[12] +#define SWIGTYPE_p_wxDataFormat swig_types[13] +#define SWIGTYPE_p_wxTimerEvent swig_types[14] +#define SWIGTYPE_p_wxCaret swig_types[15] +#define SWIGTYPE_p_int swig_types[16] +#define SWIGTYPE_p_wxSize swig_types[17] +#define SWIGTYPE_p_wxClipboard swig_types[18] +#define SWIGTYPE_p_wxStopWatch swig_types[19] +#define SWIGTYPE_p_wxDC swig_types[20] +#define SWIGTYPE_p_wxClipboardLocker swig_types[21] +#define SWIGTYPE_p_wxIcon swig_types[22] +#define SWIGTYPE_p_wxLogStderr swig_types[23] +#define SWIGTYPE_p_wxLogTextCtrl swig_types[24] +#define SWIGTYPE_p_wxTextCtrl swig_types[25] +#define SWIGTYPE_p_wxBusyCursor swig_types[26] +#define SWIGTYPE_p_wxFileDataObject swig_types[27] +#define SWIGTYPE_p_wxPyBitmapDataObject swig_types[28] +#define SWIGTYPE_p_wxPyTextDataObject swig_types[29] +#define SWIGTYPE_p_wxBitmapDataObject swig_types[30] +#define SWIGTYPE_p_wxTextDataObject swig_types[31] +#define SWIGTYPE_p_wxDataObject swig_types[32] +#define SWIGTYPE_p_wxCustomDataObject swig_types[33] +#define SWIGTYPE_p_wxURLDataObject swig_types[34] +#define SWIGTYPE_p_wxMetafileDataObject swig_types[35] +#define SWIGTYPE_p_wxTimerRunner swig_types[36] +#define SWIGTYPE_p_wxLogWindow swig_types[37] +#define SWIGTYPE_p_wxTimeSpan swig_types[38] +#define SWIGTYPE_p_wxArrayString swig_types[39] +#define SWIGTYPE_p_wxWindowDisabler swig_types[40] +#define SWIGTYPE_p_wxToolTip swig_types[41] +#define SWIGTYPE_p_wxDataObjectComposite swig_types[42] +#define SWIGTYPE_p_wxFileConfig swig_types[43] +#define SWIGTYPE_p_wxSystemSettings swig_types[44] +#define SWIGTYPE_p_wxPyDataObjectSimple swig_types[45] +#define SWIGTYPE_p_wxDataObjectSimple swig_types[46] +#define SWIGTYPE_p_wxEvtHandler swig_types[47] +#define SWIGTYPE_p_wxRect swig_types[48] +#define SWIGTYPE_p_wxSingleInstanceChecker swig_types[49] +#define SWIGTYPE_p_wxFileTypeInfo swig_types[50] +#define SWIGTYPE_p_wxFrame swig_types[51] +#define SWIGTYPE_p_wxTimer swig_types[52] +#define SWIGTYPE_p_wxMimeTypesManager swig_types[53] +#define SWIGTYPE_p_wxPyArtProvider swig_types[54] +#define SWIGTYPE_p_wxPyTipProvider swig_types[55] +#define SWIGTYPE_p_wxTipProvider swig_types[56] +#define SWIGTYPE_p_wxJoystick swig_types[57] +#define SWIGTYPE_p_wxSystemOptions swig_types[58] +#define SWIGTYPE_p_wxPoint swig_types[59] +#define SWIGTYPE_p_wxJoystickEvent swig_types[60] +#define SWIGTYPE_p_wxCursor swig_types[61] +#define SWIGTYPE_p_wxObject swig_types[62] +#define SWIGTYPE_p_wxOutputStream swig_types[63] +#define SWIGTYPE_p_wxDateTime swig_types[64] +#define SWIGTYPE_p_wxPyDropSource swig_types[65] +#define SWIGTYPE_p_wxWindow swig_types[66] +#define SWIGTYPE_p_wxString swig_types[67] +#define SWIGTYPE_p_wxPyProcess swig_types[68] +#define SWIGTYPE_p_wxBitmap swig_types[69] +#define SWIGTYPE_p_wxConfig swig_types[70] +#define SWIGTYPE_p_wxChar swig_types[71] +#define SWIGTYPE_p_wxBusyInfo swig_types[72] +#define SWIGTYPE_p_wxPyDropTarget swig_types[73] +#define SWIGTYPE_p_wxPyTextDropTarget swig_types[74] +#define SWIGTYPE_p_wxPyFileDropTarget swig_types[75] +#define SWIGTYPE_p_wxProcessEvent swig_types[76] +#define SWIGTYPE_p_wxPyLog swig_types[77] +#define SWIGTYPE_p_wxLogNull swig_types[78] +#define SWIGTYPE_p_wxColour swig_types[79] +#define SWIGTYPE_p_wxConfigPathChanger swig_types[80] +#define SWIGTYPE_p_wxPyTimer swig_types[81] +#define SWIGTYPE_p_wxDateSpan swig_types[82] +static swig_type_info *swig_types[84]; /* -------- TYPES TABLE (END) -------- */ @@ -1038,11 +1211,7 @@ PyObject *wxCustomDataObject_GetData(wxCustomDataObject *self){ return PyString_FromStringAndSize((char*)self->GetData(), self->GetSize()); } -class wxMetafileDataObject : public wxDataObjectSimple -{ -public: - wxMetafileDataObject() { wxPyRaiseNotImplemented(); } -}; +#include IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback); @@ -1692,8 +1861,10 @@ static PyObject *_wrap_GetElapsedTime(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) goto fail; if (obj0) { - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1996,8 +2167,10 @@ static PyObject *_wrap_Usleep(PyObject *self, PyObject *args, PyObject *kwargs) }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Usleep",kwnames,&obj0)) goto fail; - arg1 = (unsigned long) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxUsleep(arg1); @@ -2021,8 +2194,10 @@ static PyObject *_wrap_EnableTopLevelWindows(PyObject *self, PyObject *args, PyO }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:EnableTopLevelWindows",kwnames,&obj0)) goto fail; - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxEnableTopLevelWindows(arg1); @@ -2311,7 +2486,7 @@ static PyObject *_wrap_GetProcessId(PyObject *self, PyObject *args, PyObject *kw wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -2768,8 +2943,10 @@ static PyObject *_wrap_GetTextFromUser(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } if (obj6) { - arg7 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg7 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2946,8 +3123,10 @@ static PyObject *_wrap_GetSingleChoice(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj3,(void **) &arg5, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } if (obj6) { - arg8 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3035,8 +3214,10 @@ static PyObject *_wrap_GetSingleChoiceIndex(PyObject *self, PyObject *args, PyOb if ((SWIG_ConvertPtr(obj3,(void **) &arg5, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; } if (obj6) { - arg8 = PyInt_AsLong(obj6) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj6); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -3964,8 +4145,10 @@ static PyObject *_wrap_ToolTip_Enable(PyObject *self, PyObject *args, PyObject * }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToolTip_Enable",kwnames,&obj0)) goto fail; - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxToolTip::Enable(arg1); @@ -5467,7 +5650,7 @@ static PyObject *_wrap_TipProvider_GetCurrentTip(PyObject *self, PyObject *args, wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -5538,8 +5721,10 @@ static PyObject *_wrap_new_PyTipProvider(PyObject *self, PyObject *args, PyObjec }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_PyTipProvider",kwnames,&obj0)) goto fail; - arg1 = (size_t) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (size_t) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxPyTipProvider *)new wxPyTipProvider(arg1); @@ -5608,8 +5793,10 @@ static PyObject *_wrap_ShowTip(PyObject *self, PyObject *args, PyObject *kwargs) if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxTipProvider,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5643,8 +5830,10 @@ static PyObject *_wrap_CreateFileTipProvider(PyObject *self, PyObject *args, PyO if (arg1 == NULL) SWIG_fail; temp1 = True; } - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxTipProvider *)wxCreateFileTipProvider((wxString const &)*arg1,arg2); @@ -5792,8 +5981,10 @@ static PyObject *_wrap_Timer_Start(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:Timer_Start",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTimer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6036,8 +6227,10 @@ static PyObject *_wrap_new_TimerRunner__SWIG_1(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6090,14 +6283,26 @@ static PyObject *_wrap_new_TimerRunner(PyObject *self, PyObject *args) { } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { if (argc <= 2) { return _wrap_new_TimerRunner__SWIG_1(self,args); } { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsBool(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_new_TimerRunner__SWIG_1(self,args); @@ -6149,8 +6354,10 @@ static PyObject *_wrap_TimerRunner_Start(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:TimerRunner_Start",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTimerRunner,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6228,8 +6435,10 @@ static PyObject *_wrap_Log_EnableLogging(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Log_EnableLogging",kwnames,&obj0)) goto fail; if (obj0) { - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6258,11 +6467,15 @@ static PyObject *_wrap_Log_OnLog(PyObject *self, PyObject *args, PyObject *kwarg }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Log_OnLog",kwnames,&obj0,&obj1,&obj2)) goto fail; - arg1 = (wxLogLevel) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (wxLogLevel) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxChar,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = (time_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (time_t) SPyObj_AsUnsignedInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxLog::OnLog(arg1,(wxChar const *)arg2,arg3); @@ -6421,8 +6634,10 @@ static PyObject *_wrap_Log_SetVerbose(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Log_SetVerbose",kwnames,&obj0)) goto fail; if (obj0) { - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6447,8 +6662,10 @@ static PyObject *_wrap_Log_SetLogLevel(PyObject *self, PyObject *args, PyObject }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Log_SetLogLevel",kwnames,&obj0)) goto fail; - arg1 = (wxLogLevel) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (wxLogLevel) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxLog::SetLogLevel(arg1); @@ -6493,8 +6710,10 @@ static PyObject *_wrap_Log_SetTraceMask(PyObject *self, PyObject *args, PyObject }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Log_SetTraceMask",kwnames,&obj0)) goto fail; - arg1 = (wxTraceMask) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (wxTraceMask) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxLog::SetTraceMask(arg1); @@ -6692,7 +6911,7 @@ static PyObject *_wrap_Log_GetTraceMask(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6739,7 +6958,7 @@ static PyObject *_wrap_Log_GetLogLevel(PyObject *self, PyObject *args, PyObject wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -6941,12 +7160,16 @@ static PyObject *_wrap_new_LogWindow(PyObject *self, PyObject *args, PyObject *k temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -6983,8 +7206,10 @@ static PyObject *_wrap_LogWindow_Show(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:LogWindow_Show",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLogWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7089,8 +7314,10 @@ static PyObject *_wrap_LogWindow_PassMessages(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LogWindow_PassMessages",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLogWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->PassMessages(arg2); @@ -7176,8 +7403,10 @@ static PyObject *_wrap_LogChain_PassMessages(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LogChain_PassMessages",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxLogChain,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->PassMessages(arg2); @@ -7264,7 +7493,7 @@ static PyObject *_wrap_SysErrorCode(PyObject *self, PyObject *args, PyObject *kw wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -7282,8 +7511,10 @@ static PyObject *_wrap_SysErrorMsg(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:SysErrorMsg",kwnames,&obj0)) goto fail; if (obj0) { - arg1 = (unsigned long) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -7687,8 +7918,10 @@ static PyObject *_wrap_LogTrace__SWIG_0(PyObject *self, PyObject *args) { PyObject * obj1 = 0 ; if(!PyArg_ParseTuple(args,(char *)"OO:LogTrace",&obj0,&obj1)) goto fail; - arg1 = (unsigned long) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { arg2 = wxString_in_helper(obj1); if (arg2 == NULL) SWIG_fail; @@ -7804,7 +8037,13 @@ static PyObject *_wrap_LogTrace(PyObject *self, PyObject *args) { if (argc == 2) { int _v; { - _v = (PyInt_Check(argv[0]) || PyLong_Check(argv[0])) ? 1 : 0; + SPyObj_AsUnsignedLong(argv[0]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { @@ -7839,8 +8078,10 @@ static PyObject *_wrap_LogGeneric(PyObject *self, PyObject *args, PyObject *kwar }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:LogGeneric",kwnames,&obj0,&obj1)) goto fail; - arg1 = (unsigned long) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (unsigned long) SPyObj_AsUnsignedLong(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { arg2 = wxString_in_helper(obj1); if (arg2 == NULL) SWIG_fail; @@ -10462,8 +10703,10 @@ static PyObject *_wrap_new_Wave(PyObject *self, PyObject *args, PyObject *kwargs temp1 = True; } if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10590,12 +10833,16 @@ static PyObject *_wrap_Wave_Play(PyObject *self, PyObject *args, PyObject *kwarg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Wave_Play",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWave,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -11584,8 +11831,10 @@ static PyObject *_wrap_FileType_SetCommand(PyObject *self, PyObject *args, PyObj temp3 = True; } if (obj3) { - arg4 = PyInt_AsLong(obj3) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg4 = (bool) SPyObj_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -12035,8 +12284,10 @@ static PyObject *_wrap_MimeTypesManager_ReadMailcap(PyObject *self, PyObject *ar temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13362,8 +13613,10 @@ static PyObject *_wrap_ConfigBase_Get(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:ConfigBase_Get",kwnames,&obj0)) goto fail; if (obj0) { - arg1 = PyInt_AsLong(obj0) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (bool) SPyObj_AsBool(obj0); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13612,8 +13865,10 @@ static PyObject *_wrap_ConfigBase_GetNumberOfEntries(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_GetNumberOfEntries",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13622,7 +13877,7 @@ static PyObject *_wrap_ConfigBase_GetNumberOfEntries(PyObject *self, PyObject *a wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -13643,8 +13898,10 @@ static PyObject *_wrap_ConfigBase_GetNumberOfGroups(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_GetNumberOfGroups",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -13653,7 +13910,7 @@ static PyObject *_wrap_ConfigBase_GetNumberOfGroups(PyObject *self, PyObject *ar wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -13996,8 +14253,10 @@ static PyObject *_wrap_ConfigBase_ReadBool(PyObject *self, PyObject *args, PyObj temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14183,8 +14442,10 @@ static PyObject *_wrap_ConfigBase_WriteBool(PyObject *self, PyObject *args, PyOb if (arg2 == NULL) SWIG_fail; temp2 = True; } - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->Write((wxString const &)*arg2,arg3); @@ -14221,8 +14482,10 @@ static PyObject *_wrap_ConfigBase_Flush(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_Flush",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14374,8 +14637,10 @@ static PyObject *_wrap_ConfigBase_DeleteEntry(PyObject *self, PyObject *args, Py temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14503,8 +14768,10 @@ static PyObject *_wrap_ConfigBase_SetExpandEnvVars(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetExpandEnvVars",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -14533,8 +14800,10 @@ static PyObject *_wrap_ConfigBase_SetRecordDefaults(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:ConfigBase_SetRecordDefaults",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxConfigBase,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -15806,8 +16075,10 @@ static PyObject *_wrap_new_DateTimeFromTimeT(PyObject *self, PyObject *args, PyO }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_DateTimeFromTimeT",kwnames,&obj0)) goto fail; - arg1 = (time_t) PyInt_AsLong(obj0); - if (PyErr_Occurred()) SWIG_fail; + { + arg1 = (time_t) SPyObj_AsUnsignedInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (wxDateTime *)new wxDateTime(arg1); @@ -15965,8 +16236,10 @@ static PyObject *_wrap_DateTime_SetTimeT(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DateTime_SetTimeT",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (time_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (time_t) SPyObj_AsUnsignedInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); { @@ -16905,8 +17178,10 @@ static PyObject *_wrap_DateTime_ToTimezone(PyObject *self, PyObject *args, PyObj temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -16953,8 +17228,10 @@ static PyObject *_wrap_DateTime_MakeTimezone(PyObject *self, PyObject *args, PyO temp2 = True; } if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -16993,8 +17270,10 @@ static PyObject *_wrap_DateTime_ToGMT(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:DateTime_ToGMT",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17028,8 +17307,10 @@ static PyObject *_wrap_DateTime_MakeGMT(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:DateTime_MakeGMT",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -17117,7 +17398,7 @@ static PyObject *_wrap_DateTime_GetTicks(PyObject *self, PyObject *args, PyObjec wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -21670,7 +21951,7 @@ static PyObject *_wrap_DataFormat___eq____SWIG_0(PyObject *self, PyObject *args) if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDataFormat,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)((wxDataFormat const *)arg1)->operator ==((wxDataFormatId )arg2); + result = (bool)((wxDataFormat const *)arg1)->operator ==(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -21693,7 +21974,7 @@ static PyObject *_wrap_DataFormat___ne____SWIG_0(PyObject *self, PyObject *args) if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDataFormat,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)((wxDataFormat const *)arg1)->operator !=((wxDataFormatId )arg2); + result = (bool)((wxDataFormat const *)arg1)->operator !=(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -21781,7 +22062,13 @@ static PyObject *_wrap_DataFormat___eq__(PyObject *self, PyObject *args) { } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_DataFormat___eq____SWIG_0(self,args); @@ -21870,7 +22157,13 @@ static PyObject *_wrap_DataFormat___ne__(PyObject *self, PyObject *args) { } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_DataFormat___ne____SWIG_0(self,args); @@ -22098,7 +22391,7 @@ static PyObject *_wrap_DataObject_GetFormatCount(PyObject *self, PyObject *args, wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -22161,7 +22454,7 @@ static PyObject *_wrap_DataObject_GetDataSize(PyObject *self, PyObject *args, Py wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -22251,8 +22544,10 @@ static PyObject *_wrap_DataObject_SetData(PyObject *self, PyObject *args, PyObje if (arg2 == NULL) { PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if ((SWIG_ConvertPtr(obj3,(void **) &arg4, 0, SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -22555,7 +22850,7 @@ static PyObject *_wrap_TextDataObject_GetTextLength(PyObject *self, PyObject *ar wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -23086,7 +23381,7 @@ static PyObject *_wrap_CustomDataObject_GetSize(PyObject *self, PyObject *args, wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -23247,6 +23542,65 @@ static PyObject *_wrap_new_MetafileDataObject(PyObject *self, PyObject *args, Py } +static PyObject *_wrap_MetafileDataObject_SetMetafile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxMetafileDataObject *arg1 = (wxMetafileDataObject *) 0 ; + wxMetafile *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "metafile", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MetafileDataObject_SetMetafile",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMetafileDataObject,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxMetafile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg2 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetMetafile((wxMetafile const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_MetafileDataObject_GetMetafile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxMetafileDataObject *arg1 = (wxMetafileDataObject *) 0 ; + wxMetafile result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MetafileDataObject_GetMetafile",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMetafileDataObject,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxMetafileDataObject const *)arg1)->GetMetafile(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxMetafile * resultptr; + resultptr = new wxMetafile((wxMetafile &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_wxMetafile, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject * MetafileDataObject_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -24489,8 +24843,10 @@ static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Clipboard_UsePrimarySelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxClipboard,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -25309,6 +25665,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"URLDataObject_SetURL", (PyCFunction) _wrap_URLDataObject_SetURL, METH_VARARGS | METH_KEYWORDS }, { (char *)"URLDataObject_swigregister", URLDataObject_swigregister, METH_VARARGS }, { (char *)"new_MetafileDataObject", (PyCFunction) _wrap_new_MetafileDataObject, METH_VARARGS | METH_KEYWORDS }, + { (char *)"MetafileDataObject_SetMetafile", (PyCFunction) _wrap_MetafileDataObject_SetMetafile, METH_VARARGS | METH_KEYWORDS }, + { (char *)"MetafileDataObject_GetMetafile", (PyCFunction) _wrap_MetafileDataObject_GetMetafile, METH_VARARGS | METH_KEYWORDS }, { (char *)"MetafileDataObject_swigregister", MetafileDataObject_swigregister, METH_VARARGS }, { (char *)"IsDragResultOk", (PyCFunction) _wrap_IsDragResultOk, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_DropSource", (PyCFunction) _wrap_new_DropSource, METH_VARARGS | METH_KEYWORDS }, @@ -25873,6 +26231,7 @@ static void *_p_wxPyFileDropTargetTo_p_wxPyDropTarget(void *x) { } static swig_type_info _swigt__p_wxLogChain[] = {{"_p_wxLogChain", 0, "wxLogChain *", 0},{"_p_wxLogChain"},{0}}; static swig_type_info _swigt__p_wxMutexGuiLocker[] = {{"_p_wxMutexGuiLocker", 0, "wxMutexGuiLocker *", 0},{"_p_wxMutexGuiLocker"},{0}}; +static swig_type_info _swigt__p_wxMetafile[] = {{"_p_wxMetafile", 0, "wxMetafile *", 0},{"_p_wxMetafile"},{0}}; static swig_type_info _swigt__p_wxFileHistory[] = {{"_p_wxFileHistory", 0, "wxFileHistory *", 0},{"_p_wxFileHistory"},{0}}; static swig_type_info _swigt__p_wxLog[] = {{"_p_wxLog", 0, "wxLog *", 0},{"_p_wxLogStderr", _p_wxLogStderrTo_p_wxLog},{"_p_wxLogTextCtrl", _p_wxLogTextCtrlTo_p_wxLog},{"_p_wxLogWindow", _p_wxLogWindowTo_p_wxLog},{"_p_wxLogChain", _p_wxLogChainTo_p_wxLog},{"_p_wxLogGui", _p_wxLogGuiTo_p_wxLog},{"_p_wxPyLog", _p_wxPyLogTo_p_wxLog},{"_p_wxLog"},{0}}; static swig_type_info _swigt__p_wxDateTime__TimeZone[] = {{"_p_wxDateTime__TimeZone", 0, "wxDateTime::TimeZone *", 0},{"_p_wxDateTime__TimeZone"},{0}}; @@ -25957,6 +26316,7 @@ static swig_type_info _swigt__p_wxDateSpan[] = {{"_p_wxDateSpan", 0, "wxDateSpan static swig_type_info *swig_types_initial[] = { _swigt__p_wxLogChain, _swigt__p_wxMutexGuiLocker, +_swigt__p_wxMetafile, _swigt__p_wxFileHistory, _swigt__p_wxLog, _swigt__p_wxDateTime__TimeZone, diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index a896f93bad..e83a98ac13 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -3243,7 +3243,7 @@ class Printer(core.Object): return _windows.Printer_GetAbort(*args, **kwargs) def GetLastError(*args, **kwargs): - """Printer.GetLastError() -> int""" + """GetLastError() -> int""" return _windows.Printer_GetLastError(*args, **kwargs) GetLastError = staticmethod(GetLastError) diff --git a/wxPython/src/msw/windows_wrap.cpp b/wxPython/src/msw/windows_wrap.cpp index e30a65682e..10276673d4 100644 --- a/wxPython/src/msw/windows_wrap.cpp +++ b/wxPython/src/msw/windows_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -1336,8 +1508,10 @@ static PyObject *_wrap_ScrolledWindow_SetScrollbars(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oiiii|iiO:ScrolledWindow_SetScrollbars",kwnames,&obj0,&arg2,&arg3,&arg4,&arg5,&arg6,&arg7,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj7) { - arg8 = PyInt_AsLong(obj7) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg8 = (bool) SPyObj_AsBool(obj7); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -1509,10 +1683,14 @@ static PyObject *_wrap_ScrolledWindow_EnableScrolling(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ScrolledWindow_EnableScrolling",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableScrolling(arg2,arg3); @@ -1753,11 +1931,23 @@ static PyObject *_wrap_ScrolledWindow_CalcScrolledPosition(PyObject *self, PyObj } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsInt(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_ScrolledWindow_CalcScrolledPosition__SWIG_1(self,args); @@ -1883,11 +2073,23 @@ static PyObject *_wrap_ScrolledWindow_CalcUnscrolledPosition(PyObject *self, PyO } if (_v) { { - _v = (PyInt_Check(argv[1]) || PyLong_Check(argv[1])) ? 1 : 0; + SPyObj_AsInt(argv[1]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { { - _v = (PyInt_Check(argv[2]) || PyLong_Check(argv[2])) ? 1 : 0; + SPyObj_AsInt(argv[2]); + if (PyErr_Occurred()) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } } if (_v) { return _wrap_ScrolledWindow_CalcUnscrolledPosition__SWIG_1(self,args); @@ -2170,8 +2372,10 @@ static PyObject *_wrap_TopLevelWindow_Maximize(PyObject *self, PyObject *args, P if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_Maximize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTopLevelWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2224,8 +2428,10 @@ static PyObject *_wrap_TopLevelWindow_Iconize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TopLevelWindow_Iconize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTopLevelWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj1) { - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -2394,8 +2600,10 @@ static PyObject *_wrap_TopLevelWindow_ShowFullScreen(PyObject *self, PyObject *a if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|l:TopLevelWindow_ShowFullScreen",kwnames,&obj0,&obj1,&arg3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTopLevelWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->ShowFullScreen(arg2,arg3); @@ -3290,8 +3498,10 @@ static PyObject *_wrap_Frame_DoGiveHelp(PyObject *self, PyObject *args, PyObject if (arg2 == NULL) SWIG_fail; temp2 = True; } - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->DoGiveHelp((wxString const &)*arg2,arg3); @@ -5250,8 +5460,10 @@ static PyObject *_wrap_SplitterWindow_SetSashPosition(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:SplitterWindow_SetSashPosition",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSplitterWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -5406,8 +5618,10 @@ static PyObject *_wrap_SplitterWindow_SetNeedUpdating(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:SplitterWindow_SetNeedUpdating",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSplitterWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetNeedUpdating(arg2); @@ -5826,8 +6040,10 @@ static PyObject *_wrap_SashWindow_SetSashVisible(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:SashWindow_SetSashVisible",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSashWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSashVisible((wxSashEdgePosition )arg2,arg3); @@ -5881,8 +6097,10 @@ static PyObject *_wrap_SashWindow_SetSashBorder(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OiO:SashWindow_SetSashBorder",kwnames,&obj0,&arg2,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxSashWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSashBorder((wxSashEdgePosition )arg2,arg3); @@ -7944,8 +8162,10 @@ static PyObject *_wrap_VScrolledWindow_SetLineCount(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_SetLineCount",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetLineCount(arg2); @@ -7973,8 +8193,10 @@ static PyObject *_wrap_VScrolledWindow_ScrollToLine(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_ScrollToLine",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->ScrollToLine(arg2); @@ -8053,8 +8275,10 @@ static PyObject *_wrap_VScrolledWindow_RefreshLine(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_RefreshLine",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->RefreshLine(arg2); @@ -8083,10 +8307,14 @@ static PyObject *_wrap_VScrolledWindow_RefreshLines(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:VScrolledWindow_RefreshLines",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->RefreshLines(arg2,arg3); @@ -8202,7 +8430,7 @@ static PyObject *_wrap_VScrolledWindow_GetLineCount(PyObject *self, PyObject *ar wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8227,7 +8455,7 @@ static PyObject *_wrap_VScrolledWindow_GetFirstVisibleLine(PyObject *self, PyObj wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8252,7 +8480,7 @@ static PyObject *_wrap_VScrolledWindow_GetLastVisibleLine(PyObject *self, PyObje wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8272,8 +8500,10 @@ static PyObject *_wrap_VScrolledWindow_IsVisible(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VScrolledWindow_IsVisible",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVScrolledWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)((wxPyVScrolledWindow const *)arg1)->IsVisible(arg2); @@ -8520,7 +8750,7 @@ static PyObject *_wrap_VListBox_GetItemCount(PyObject *self, PyObject *args, PyO wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8590,8 +8820,10 @@ static PyObject *_wrap_VListBox_IsCurrent(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_IsCurrent",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)((wxPyVListBox const *)arg1)->IsCurrent(arg2); @@ -8619,8 +8851,10 @@ static PyObject *_wrap_VListBox_IsSelected(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_IsSelected",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)((wxPyVListBox const *)arg1)->IsSelected(arg2); @@ -8653,7 +8887,7 @@ static PyObject *_wrap_VListBox_GetSelectedCount(PyObject *self, PyObject *args, wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = PyInt_FromLong((long)result); + resultobj = SPyObj_FromUnsignedLong((unsigned long)result); return resultobj; fail: return NULL; @@ -8791,8 +9025,10 @@ static PyObject *_wrap_VListBox_SetItemCount(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_SetItemCount",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetItemCount(arg2); @@ -8871,12 +9107,16 @@ static PyObject *_wrap_VListBox_Select(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:VListBox_Select",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); if (PyErr_Occurred()) SWIG_fail; } + if (obj2) { + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->Select(arg2,arg3); @@ -8906,10 +9146,14 @@ static PyObject *_wrap_VListBox_SelectRange(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:VListBox_SelectRange",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (size_t) PyInt_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + arg3 = (size_t) SPyObj_AsUnsignedLong(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->SelectRange(arg2,arg3); @@ -8936,8 +9180,10 @@ static PyObject *_wrap_VListBox_Toggle(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VListBox_Toggle",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyVListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Toggle(arg2); @@ -9320,8 +9566,10 @@ static PyObject *_wrap_HtmlListBox_SetItemCount(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:HtmlListBox_SetItemCount",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyHtmlListBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = (size_t) PyInt_AsLong(obj1); - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (size_t) SPyObj_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetItemCount(arg2); @@ -11553,8 +11801,10 @@ static PyObject *_wrap_FontData_EnableEffects(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontData_EnableEffects",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableEffects(arg2); @@ -11743,8 +11993,10 @@ static PyObject *_wrap_FontData_SetAllowSymbols(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontData_SetAllowSymbols",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAllowSymbols(arg2); @@ -11888,8 +12140,10 @@ static PyObject *_wrap_FontData_SetShowHelp(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:FontData_SetShowHelp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxFontData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetShowHelp(arg2); @@ -13629,8 +13883,10 @@ static PyObject *_wrap_MDIChildFrame_Maximize(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:MDIChildFrame_Maximize",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxMDIChildFrame,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Maximize(arg2); @@ -15381,8 +15637,10 @@ static PyObject *_wrap_PrintData_SetCollate(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetCollate",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCollate(arg2); @@ -15474,8 +15732,10 @@ static PyObject *_wrap_PrintData_SetColour(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintData_SetColour",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetColour(arg2); @@ -16333,8 +16593,10 @@ static PyObject *_wrap_PageSetupDialogData_EnableHelp(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnableHelp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableHelp(arg2); @@ -16361,8 +16623,10 @@ static PyObject *_wrap_PageSetupDialogData_EnableMargins(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnableMargins",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableMargins(arg2); @@ -16389,8 +16653,10 @@ static PyObject *_wrap_PageSetupDialogData_EnableOrientation(PyObject *self, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnableOrientation",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableOrientation(arg2); @@ -16417,8 +16683,10 @@ static PyObject *_wrap_PageSetupDialogData_EnablePaper(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnablePaper",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnablePaper(arg2); @@ -16445,8 +16713,10 @@ static PyObject *_wrap_PageSetupDialogData_EnablePrinter(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_EnablePrinter",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnablePrinter(arg2); @@ -16871,8 +17141,10 @@ static PyObject *_wrap_PageSetupDialogData_SetDefaultInfo(PyObject *self, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_SetDefaultInfo",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDefaultInfo(arg2); @@ -16899,8 +17171,10 @@ static PyObject *_wrap_PageSetupDialogData_SetDefaultMinMargins(PyObject *self, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PageSetupDialogData_SetDefaultMinMargins",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPageSetupDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetDefaultMinMargins(arg2); @@ -17655,8 +17929,10 @@ static PyObject *_wrap_PrintDialogData_SetAllPages(PyObject *self, PyObject *arg if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetAllPages",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetAllPages(arg2); @@ -17683,8 +17959,10 @@ static PyObject *_wrap_PrintDialogData_SetSelection(PyObject *self, PyObject *ar if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSelection(arg2); @@ -17711,8 +17989,10 @@ static PyObject *_wrap_PrintDialogData_SetCollate(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetCollate",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetCollate(arg2); @@ -17739,8 +18019,10 @@ static PyObject *_wrap_PrintDialogData_SetPrintToFile(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetPrintToFile",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetPrintToFile(arg2); @@ -17767,8 +18049,10 @@ static PyObject *_wrap_PrintDialogData_SetSetupDialog(PyObject *self, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_SetSetupDialog",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetSetupDialog(arg2); @@ -17795,8 +18079,10 @@ static PyObject *_wrap_PrintDialogData_EnablePrintToFile(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnablePrintToFile",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnablePrintToFile(arg2); @@ -17823,8 +18109,10 @@ static PyObject *_wrap_PrintDialogData_EnableSelection(PyObject *self, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnableSelection",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableSelection(arg2); @@ -17851,8 +18139,10 @@ static PyObject *_wrap_PrintDialogData_EnablePageNumbers(PyObject *self, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnablePageNumbers",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnablePageNumbers(arg2); @@ -17879,8 +18169,10 @@ static PyObject *_wrap_PrintDialogData_EnableHelp(PyObject *self, PyObject *args if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintDialogData_EnableHelp",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintDialogData,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->EnableHelp(arg2); @@ -18952,8 +19244,10 @@ static PyObject *_wrap_Printout_SetIsPreview(PyObject *self, PyObject *args, PyO if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Printout_SetIsPreview",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPrintout,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetIsPreview(arg2); @@ -20267,8 +20561,10 @@ static PyObject *_wrap_PrintPreview_SetOk(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintPreview_SetOk",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintPreview,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetOk(arg2); @@ -20296,8 +20592,10 @@ static PyObject *_wrap_PrintPreview_Print(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PrintPreview_Print",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPrintPreview,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->Print(arg2); @@ -20564,8 +20862,10 @@ static PyObject *_wrap_PyPrintPreview_base_Print(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyPrintPreview_base_Print",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPrintPreview,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; - arg2 = PyInt_AsLong(obj1) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg2 = (bool) SPyObj_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->base_Print(arg2); diff --git a/wxPython/src/msw/wizard.py b/wxPython/src/msw/wizard.py index 04d3225f77..fd98bc0f72 100644 --- a/wxPython/src/msw/wizard.py +++ b/wxPython/src/msw/wizard.py @@ -209,7 +209,7 @@ class WizardPageSimple(WizardPage): return _wizard.WizardPageSimple_SetNext(*args, **kwargs) def Chain(*args, **kwargs): - """WizardPageSimple.Chain(WizardPageSimple first, WizardPageSimple second)""" + """Chain(WizardPageSimple first, WizardPageSimple second)""" return _wizard.WizardPageSimple_Chain(*args, **kwargs) Chain = staticmethod(Chain) diff --git a/wxPython/src/msw/wizard_wrap.cpp b/wxPython/src/msw/wizard_wrap.cpp index 78588189d1..6c6633cf71 100644 --- a/wxPython/src/msw/wizard_wrap.cpp +++ b/wxPython/src/msw/wizard_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.20 + * Version 1.3.22 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -137,6 +137,178 @@ SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int); #include "Python.h" +#include +#include + +#ifdef __cplusplus +#define SWIG_STATIC_INLINE static inline +#else +#define SWIG_STATIC_INLINE static +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLong(PyObject * obj) +{ + return PyInt_Check(obj) ? PyInt_AsLong(obj) : PyLong_AsLong(obj); +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLong(PyObject * obj) +{ + if (PyLong_Check(obj)) { + return PyLong_AsUnsignedLong(obj); + } else { + long i = PyInt_AsLong(obj); + if ( !PyErr_Occurred() && (i < 0)) { + PyErr_SetString(PyExc_TypeError, "negative value for unsigned type"); + } + return i; + } +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromLongLong(long long value) +{ + return (value > (long)(LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLong(unsigned long value) +{ + return (value > (unsigned long)(LONG_MAX)) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE PyObject* +SPyObj_FromUnsignedLongLong(unsigned long long value) +{ + return (value > (unsigned long long)(LONG_MAX)) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); +} +#endif + +SWIG_STATIC_INLINE long +SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value) +{ + long value = SPyObj_AsLong(obj); + if (!PyErr_Occurred()) { + if (value < min_value) { + PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum"); + } else if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE unsigned long +SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) +{ + unsigned long value = SPyObj_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (value > max_value) { + PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum"); + } + } + return value; +} + +SWIG_STATIC_INLINE signed char +SPyObj_AsSignedChar(PyObject *obj) { + return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX); +} + +SWIG_STATIC_INLINE short +SPyObj_AsShort(PyObject *obj) { + return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX); +} + +SWIG_STATIC_INLINE int +SPyObj_AsInt(PyObject *obj) { + return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX); +} + +SWIG_STATIC_INLINE unsigned char +SPyObj_AsUnsignedChar(PyObject *obj) { + return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX); +} + +SWIG_STATIC_INLINE unsigned short +SPyObj_AsUnsignedShort(PyObject *obj) { + return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX); +} + +SWIG_STATIC_INLINE unsigned int +SPyObj_AsUnsignedInt(PyObject *obj) { + return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX); +} + +#if !defined(_MSC_VER) +SWIG_STATIC_INLINE long long +SPyObj_AsLongLong(PyObject *obj) { + return PyInt_Check(obj) ? + PyInt_AsLong(obj) : PyLong_AsLongLong(obj); +} + +SWIG_STATIC_INLINE unsigned long long +SPyObj_AsUnsignedLongLong(PyObject *obj) { + return PyLong_Check(obj) ? + PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj); +} +#endif + +SWIG_STATIC_INLINE double +SPyObj_AsDouble(PyObject *obj) { + return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) : + (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj)); +} + +SWIG_STATIC_INLINE float +SPyObj_AsFloat(PyObject *obj) { + double value = SPyObj_AsDouble(obj); + if (!PyErr_Occurred()) { + if (value < FLT_MIN) { + PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min"); + } else if (value > FLT_MAX) { + PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max"); + } + } + return (float) value; +} + +SWIG_STATIC_INLINE char +SPyObj_AsChar(PyObject *obj) { + char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ? + PyString_AsString(obj)[0] + : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX); + if (PyErr_Occurred()) { + PyErr_Clear(); + PyErr_SetString(PyExc_TypeError, "a char is required"); + } + return c; +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromChar(char c) { + return PyString_FromStringAndSize(&c,1); +} + +SWIG_STATIC_INLINE PyObject * +SPyObj_FromCharPtr(const char* cptr) { + return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)""); +} + +SWIG_STATIC_INLINE int +SPyObj_AsBool(PyObject *obj) { + return SPyObj_AsLong/*Long*/(obj) ? 1 : 0; +} + + + #ifdef __cplusplus extern "C" { #endif @@ -172,7 +344,7 @@ typedef struct swig_const_info { SWIG_Python_NewPointerObj(p, type, flags) #define SWIG_MustGetPtr(p, type, argnum, flags) \ SWIG_Python_MustGetPtr(p, type, argnum, flags) - + /* Python-specific SWIG API */ #define SWIG_newvarlink() \ SWIG_Python_newvarlink() @@ -384,8 +556,10 @@ static PyObject *_wrap_new_WizardEvent(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|iiOO:new_WizardEvent",kwnames,&arg1,&arg2,&obj2,&obj3)) goto fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } if (obj3) { if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_wxWizardPage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; @@ -1912,8 +2086,10 @@ static PyObject *_wrap_Wizard_ShowPage(PyObject *self, PyObject *args, PyObject if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWizard,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxWizardPage,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if (obj2) { - arg3 = PyInt_AsLong(obj2) ? true : false; - if (PyErr_Occurred()) SWIG_fail; + { + arg3 = (bool) SPyObj_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); -- 2.45.2