]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/misc_wrap.cpp
docstring patch has been submitted to SF
[wxWidgets.git] / wxPython / src / gtk / misc_wrap.cpp
index 5201c5ab8ca5c86d7e0334448abf9baa4f54e86a..bc7b845d9077ce635664fbce76158b3a1d302b67 100644 (file)
@@ -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 <limits.h>
+#include <float.h>
+
+#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()
@@ -307,16 +479,13 @@ static swig_type_info *swig_types[83];
 #include "wx/wxPython/pyclasses.h"
 #include "wx/wxPython/pyistream.h"
     
-    DECLARE_DEF_STRING(EmptyString);
-    
-
 
+ static const wxString wxPyEmptyString(wxEmptyString); 
 
 
-    DECLARE_DEF_STRING(FileSelectorPromptStr);
-    DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr);
-    DECLARE_DEF_STRING(DirSelectorPromptStr);
-
+ static const wxString wxPyFileSelectorPromptStr(wxFileSelectorPromptStr); 
+ static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr); 
+ static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); 
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     PyObject*   o2;
@@ -346,7 +515,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 
 
     long wxGetFreeMemory()
-        { PyErr_SetNone(PyExc_NotImplementedError); return 0; }
+        { wxPyRaiseNotImplemented(); return 0; }
+
+
+    bool wxGetKeyState(wxKeyCode key)
+        {  wxPyRaiseNotImplemented(); return False; }
 
 
     void wxWakeUpMainThread() {}
@@ -530,7 +703,8 @@ class wxJoystick : public wxObject {
 public:
     wxJoystick(int joystick = wxJOYSTICK1) {
         wxPyBeginBlockThreads();
-        PyErr_SetString(PyExc_NotImplementedError, "wxJoystick is not available on this platform.");
+        PyErr_SetString(PyExc_NotImplementedError,
+                        "wxJoystick is not available on this platform.");
         wxPyEndBlockThreads();
     }
     wxPoint GetPosition() { return wxPoint(-1,-1); }
@@ -592,12 +766,14 @@ class wxWave : public wxObject
 public:
     wxWave(const wxString& fileName, bool isResource = False) {
         wxPyBeginBlockThreads();
-        PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
+        PyErr_SetString(PyExc_NotImplementedError,
+                        "wxWave is not available on this platform.");
         wxPyEndBlockThreads();
     }
     wxWave(int size, const wxByte* data) {
         wxPyBeginBlockThreads();
-        PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
+        PyErr_SetString(PyExc_NotImplementedError,
+                        "wxWave is not available on this platform.");
         wxPyEndBlockThreads();
     }
 
@@ -845,10 +1021,9 @@ bool wxConfigBase_ReadBool(wxConfigBase *self,wxString const &key,bool defaultVa
 
 #include <wx/datetime.h>
 
-    DECLARE_DEF_STRING2(DateFormatStr, wxT("%c"));
-    DECLARE_DEF_STRING2(TimeSpanFormatStr, wxT("%H:%M:%S"));
-
 
+ static const wxString wxPyDateFormatStr(wxT("%c")); 
+ static const wxString wxPyTimeSpanFormatStr(wxT("%H:%M:%S")); 
 
 #define LOCAL_TZ wxDateTime::Local
 
@@ -1049,12 +1224,10 @@ PyObject *wxCustomDataObject_GetData(wxCustomDataObject *self){
 class wxMetafileDataObject : public wxDataObjectSimple
 {
 public:
-    wxMetafileDataObject() { PyErr_SetNone(PyExc_NotImplementedError); }
+    wxMetafileDataObject() { wxPyRaiseNotImplemented(); }
 };    
 
 
-
-
 IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback);
 
 
@@ -1523,6 +1696,66 @@ static PyObject * SystemOptions_swigregister(PyObject *self, PyObject *args) {
     Py_INCREF(obj);
     return Py_BuildValue((char *)"");
 }
+static int _wrap_FileSelectorPromptStr_set(PyObject *_val) {
+    PyErr_SetString(PyExc_TypeError,"Variable FileSelectorPromptStr is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_FileSelectorPromptStr_get() {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyFileSelectorPromptStr)->c_str(), (&wxPyFileSelectorPromptStr)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
+static int _wrap_FileSelectorDefaultWildcardStr_set(PyObject *_val) {
+    PyErr_SetString(PyExc_TypeError,"Variable FileSelectorDefaultWildcardStr is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_FileSelectorDefaultWildcardStr_get() {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyFileSelectorDefaultWildcardStr)->c_str(), (&wxPyFileSelectorDefaultWildcardStr)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
+static int _wrap_DirSelectorPromptStr_set(PyObject *_val) {
+    PyErr_SetString(PyExc_TypeError,"Variable DirSelectorPromptStr is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_DirSelectorPromptStr_get() {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyDirSelectorPromptStr)->c_str(), (&wxPyDirSelectorPromptStr)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
 static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     long result;
@@ -1642,8 +1875,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();
@@ -1946,8 +2181,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);
@@ -1971,8 +2208,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);
@@ -2261,7 +2500,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;
@@ -2718,8 +2957,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();
@@ -2896,8 +3137,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();
@@ -2985,8 +3228,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();
@@ -3606,6 +3851,29 @@ static PyObject *_wrap_GetTopLevelParent(PyObject *self, PyObject *args, PyObjec
 }
 
 
+static PyObject *_wrap_GetKeyState(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    int arg1 ;
+    bool result;
+    char *kwnames[] = {
+        (char *) "key", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"i:GetKeyState",kwnames,&arg1)) goto fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (bool)wxGetKeyState((wxKeyCode )arg1);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = PyInt_FromLong((long)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_WakeUpMainThread(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     char *kwnames[] = {
@@ -3891,8 +4159,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);
@@ -5394,7 +5664,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;
@@ -5465,8 +5735,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);
@@ -5535,8 +5807,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();
@@ -5570,8 +5844,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);
@@ -5719,8 +5995,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();
@@ -5963,8 +6241,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();
@@ -6017,14 +6297,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);
@@ -6076,8 +6368,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();
@@ -6155,8 +6449,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();
@@ -6185,11 +6481,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);
@@ -6348,8 +6648,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();
@@ -6374,8 +6676,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);
@@ -6420,8 +6724,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);
@@ -6619,7 +6925,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;
@@ -6666,7 +6972,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;
@@ -6868,12 +7174,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();
@@ -6910,8 +7220,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();
@@ -7016,8 +7328,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);
@@ -7103,8 +7417,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);
@@ -7191,7 +7507,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;
@@ -7209,8 +7525,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();
@@ -7614,8 +7932,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;
@@ -7731,7 +8051,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) {
             {
@@ -7766,8 +8092,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;
@@ -10389,8 +10717,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();
@@ -10517,12 +10847,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();
@@ -11511,8 +11845,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();
@@ -11962,8 +12298,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();
@@ -13289,8 +13627,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();
@@ -13539,8 +13879,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();
@@ -13549,7 +13891,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;
@@ -13570,8 +13912,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();
@@ -13580,7 +13924,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;
@@ -13923,8 +14267,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();
@@ -14110,8 +14456,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);
@@ -14148,8 +14496,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();
@@ -14301,8 +14651,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();
@@ -14430,8 +14782,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();
@@ -14460,8 +14814,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();
@@ -15158,6 +15514,46 @@ static PyObject *_wrap_ExpandEnvVars(PyObject *self, PyObject *args, PyObject *k
 }
 
 
+static int _wrap_DateFormatStr_set(PyObject *_val) {
+    PyErr_SetString(PyExc_TypeError,"Variable DateFormatStr is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_DateFormatStr_get() {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyDateFormatStr)->c_str(), (&wxPyDateFormatStr)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyDateFormatStr)->c_str(), (&wxPyDateFormatStr)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
+static int _wrap_TimeSpanFormatStr_set(PyObject *_val) {
+    PyErr_SetString(PyExc_TypeError,"Variable TimeSpanFormatStr is read-only.");
+    return 1;
+}
+
+
+static PyObject *_wrap_TimeSpanFormatStr_get() {
+    PyObject *pyobj;
+    
+    {
+#if wxUSE_UNICODE
+        pyobj = PyUnicode_FromWideChar((&wxPyTimeSpanFormatStr)->c_str(), (&wxPyTimeSpanFormatStr)->Len());
+#else
+        pyobj = PyString_FromStringAndSize((&wxPyTimeSpanFormatStr)->c_str(), (&wxPyTimeSpanFormatStr)->Len());
+#endif
+    }
+    return pyobj;
+}
+
+
 static PyObject *_wrap_DateTime_SetCountry(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     int arg1 ;
@@ -15454,6 +15850,8 @@ static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *self, PyObject *args, P
     PyObject *resultobj;
     wxString *arg1 = (wxString *) 0 ;
     wxString *arg2 = (wxString *) 0 ;
+    bool temp1 = False ;
+    bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     char *kwnames[] = {
@@ -15461,8 +15859,16 @@ static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *self, PyObject *args, P
     };
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:DateTime_GetAmPmStrings",kwnames,&obj0,&obj1)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    {
+        arg1 = wxString_in_helper(obj0);
+        if (arg1 == NULL) SWIG_fail;
+        temp1 = True;
+    }
+    {
+        arg2 = wxString_in_helper(obj1);
+        if (arg2 == NULL) SWIG_fail;
+        temp2 = True;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxDateTime::GetAmPmStrings(arg1,arg2);
@@ -15471,8 +15877,24 @@ static PyObject *_wrap_DateTime_GetAmPmStrings(PyObject *self, PyObject *args, P
         if (PyErr_Occurred()) SWIG_fail;
     }
     Py_INCREF(Py_None); resultobj = Py_None;
+    {
+        if (temp1)
+        delete arg1;
+    }
+    {
+        if (temp2)
+        delete arg2;
+    }
     return resultobj;
     fail:
+    {
+        if (temp1)
+        delete arg1;
+    }
+    {
+        if (temp2)
+        delete arg2;
+    }
     return NULL;
 }
 
@@ -15667,8 +16089,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);
@@ -15826,8 +16250,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();
         {
@@ -16766,8 +17192,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();
@@ -16814,8 +17242,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();
@@ -16854,8 +17284,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();
@@ -16889,8 +17321,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();
@@ -16978,7 +17412,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;
@@ -21531,7 +21965,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;
@@ -21554,7 +21988,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;
@@ -21642,7 +22076,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);
@@ -21731,7 +22171,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);
@@ -21959,7 +22405,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;
@@ -22022,7 +22468,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;
@@ -22112,8 +22558,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();
@@ -22416,7 +22864,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;
@@ -22907,7 +23355,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;
@@ -23100,7 +23548,7 @@ static PyObject *_wrap_IsDragResultOk(PyObject *self, PyObject *args, PyObject *
 
 static PyObject *_wrap_new_DropSource(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
-    wxWindow *arg1 = (wxWindow *) NULL ;
+    wxWindow *arg1 = (wxWindow *) 0 ;
     wxIcon const &arg2_defvalue = wxNullIcon ;
     wxIcon *arg2 = (wxIcon *) &arg2_defvalue ;
     wxIcon const &arg3_defvalue = wxNullIcon ;
@@ -23116,10 +23564,8 @@ static PyObject *_wrap_new_DropSource(PyObject *self, PyObject *args, PyObject *
         (char *) "win",(char *) "copy",(char *) "move",(char *) "none", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_DropSource",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
-    if (obj0) {
-        if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    }
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:new_DropSource",kwnames,&obj0,&obj1,&obj2,&obj3)) 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_wxIcon,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
         if (arg2 == NULL) {
@@ -23352,7 +23798,7 @@ static PyObject * DropSource_swigregister(PyObject *self, PyObject *args) {
     Py_INCREF(obj);
     return Py_BuildValue((char *)"");
 }
-static PyObject *_wrap_new_DropTarget(PyObject *self, PyObject *args, PyObject *kwargs) {
+static PyObject *_wrap_new_PyDropTarget(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxDataObject *arg1 = (wxDataObject *) NULL ;
     wxPyDropTarget *result;
@@ -23361,7 +23807,7 @@ static PyObject *_wrap_new_DropTarget(PyObject *self, PyObject *args, PyObject *
         (char *) "dataObject", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_DropTarget",kwnames,&obj0)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_PyDropTarget",kwnames,&obj0)) goto fail;
     if (obj0) {
         if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDataObject,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
@@ -24312,8 +24758,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();
@@ -24501,6 +24949,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS },
         { (char *)"FindWindowAtPoint", (PyCFunction) _wrap_FindWindowAtPoint, METH_VARARGS | METH_KEYWORDS },
         { (char *)"GetTopLevelParent", (PyCFunction) _wrap_GetTopLevelParent, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"GetKeyState", (PyCFunction) _wrap_GetKeyState, METH_VARARGS | METH_KEYWORDS },
         { (char *)"WakeUpMainThread", (PyCFunction) _wrap_WakeUpMainThread, METH_VARARGS | METH_KEYWORDS },
         { (char *)"MutexGuiEnter", (PyCFunction) _wrap_MutexGuiEnter, METH_VARARGS | METH_KEYWORDS },
         { (char *)"MutexGuiLeave", (PyCFunction) _wrap_MutexGuiLeave, METH_VARARGS | METH_KEYWORDS },
@@ -25141,7 +25590,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"DropSource_DoDragDrop", (PyCFunction) _wrap_DropSource_DoDragDrop, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DropSource_base_GiveFeedback", (PyCFunction) _wrap_DropSource_base_GiveFeedback, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DropSource_swigregister", DropSource_swigregister, METH_VARARGS },
-        { (char *)"new_DropTarget", (PyCFunction) _wrap_new_DropTarget, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"new_PyDropTarget", (PyCFunction) _wrap_new_PyDropTarget, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DropTarget__setCallbackInfo", (PyCFunction) _wrap_DropTarget__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { (char *)"delete_DropTarget", (PyCFunction) _wrap_delete_DropTarget, METH_VARARGS | METH_KEYWORDS },
         { (char *)"DropTarget_GetDataObject", (PyCFunction) _wrap_DropTarget_GetDataObject, METH_VARARGS | METH_KEYWORDS },
@@ -26249,6 +26698,10 @@ SWIGEXPORT(void) SWIG_init(void) {
     }
     SWIG_InstallConstants(d,swig_const_table);
     
+    PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
+    SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorPromptStr",_wrap_FileSelectorPromptStr_get, _wrap_FileSelectorPromptStr_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorDefaultWildcardStr",_wrap_FileSelectorDefaultWildcardStr_get, _wrap_FileSelectorDefaultWildcardStr_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"DirSelectorPromptStr",_wrap_DirSelectorPromptStr_get, _wrap_DirSelectorPromptStr_set);
     PyDict_SetItemString(d, "wxEVT_TIMER", PyInt_FromLong(wxEVT_TIMER));
     PyDict_SetItemString(d, "wxEVT_END_PROCESS", PyInt_FromLong(wxEVT_END_PROCESS));
     
@@ -26258,7 +26711,6 @@ SWIGEXPORT(void) SWIG_init(void) {
     PyDict_SetItemString(d, "wxEVT_JOY_BUTTON_UP", PyInt_FromLong(wxEVT_JOY_BUTTON_UP));
     PyDict_SetItemString(d, "wxEVT_JOY_MOVE", PyInt_FromLong(wxEVT_JOY_MOVE));
     PyDict_SetItemString(d, "wxEVT_JOY_ZMOVE", PyInt_FromLong(wxEVT_JOY_ZMOVE));
-    PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
     SWIG_addvarlink(SWIG_globals,(char*)"TheMimeTypesManager",_wrap_TheMimeTypesManager_get, _wrap_TheMimeTypesManager_set);
     SWIG_addvarlink(SWIG_globals,(char*)"ART_TOOLBAR",_wrap_ART_TOOLBAR_get, _wrap_ART_TOOLBAR_set);
     SWIG_addvarlink(SWIG_globals,(char*)"ART_MENU",_wrap_ART_MENU_get, _wrap_ART_MENU_set);
@@ -26301,6 +26753,8 @@ SWIGEXPORT(void) SWIG_init(void) {
     
     wxPyPtrTypeMap_Add("wxArtProvider", "wxPyArtProvider");
     
+    SWIG_addvarlink(SWIG_globals,(char*)"DateFormatStr",_wrap_DateFormatStr_get, _wrap_DateFormatStr_set);
+    SWIG_addvarlink(SWIG_globals,(char*)"TimeSpanFormatStr",_wrap_TimeSpanFormatStr_get, _wrap_TimeSpanFormatStr_set);
     SWIG_addvarlink(SWIG_globals,(char*)"FormatInvalid",_wrap_FormatInvalid_get, _wrap_FormatInvalid_set);
     
     wxPyPtrTypeMap_Add("wxDropSource",     "wxPyDropSource");