]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglshapes.cpp
In GetPath(), don't append separator if there's already one at the end
[wxWidgets.git] / wxPython / contrib / ogl / oglshapes.cpp
index 87b53489a088db3e5ffe0a0ce69065bc146b807a..0335330a47f31be00eb73059764b112a418c6719 100644 (file)
@@ -1,9 +1,9 @@
 /*
 /*
- * FILE : oglshapes.cpp
+ * FILE : contrib/ogl/oglshapes.cpp
  * 
  * This file was automatically generated by :
  * Simplified Wrapper and Interface Generator (SWIG)
  * 
  * This file was automatically generated by :
  * Simplified Wrapper and Interface Generator (SWIG)
- * Version 1.1 (Build 810)
+ * Version 1.1 (Build 883)
  * 
  * Portions Copyright (c) 1995-1998
  * The University of Utah and The Regents of the University of California.
  * 
  * Portions Copyright (c) 1995-1998
  * The University of Utah and The Regents of the University of California.
 #      define SWIGEXPORT(a) __declspec(dllexport) a
 #   else
 #      if defined(__BORLANDC__)
 #      define SWIGEXPORT(a) __declspec(dllexport) a
 #   else
 #      if defined(__BORLANDC__)
-#          define SWIGEXPORT(a) a _export 
+#          define SWIGEXPORT(a) a _export
 #      else
 #      else
-#          define SWIGEXPORT(a) a 
+#          define SWIGEXPORT(a) a
 #      endif
 #   endif
 #else
 #      endif
 #   endif
 #else
-#   define SWIGEXPORT(a) a 
+#   define SWIGEXPORT(a) a
 #endif
 
 #endif
 
+#include "Python.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 #ifdef __cplusplus
 extern "C" {
 #endif
-#include "Python.h"
+
 extern void SWIG_MakePtr(char *, void *, char *);
 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
 extern char *SWIG_GetPtr(char *, void **, char *);
 extern void SWIG_MakePtr(char *, void *, char *);
 extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
 extern char *SWIG_GetPtr(char *, void **, char *);
@@ -53,58 +55,36 @@ extern PyObject *SWIG_newvarlink(void);
 
 #define SWIG_name    "oglshapesc"
 
 
 #define SWIG_name    "oglshapesc"
 
-#include "helpers.h"
+#include "export.h"
 #include "oglhelpers.h"
 
 #include "oglhelpers.h"
 
-static PyObject* l_output_helper(PyObject* target, PyObject* o) {
-    PyObject*   o2;
-    PyObject*   o3;
-    if (!target) {                   
-        target = o;
-    } else if (target == Py_None) {  
-        Py_DECREF(Py_None);
-        target = o;
-    } else {                         
-        if (!PyList_Check(target)) {
-            o2 = target;
-            target = PyList_New(0);
-            PyList_Append(target, o2);
-           Py_XDECREF(o2);
-        }
-        PyList_Append(target,o);
-       Py_XDECREF(o);
-    }
-    return target;
-}
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     PyObject*   o2;
     PyObject*   o3;
 
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     PyObject*   o2;
     PyObject*   o3;
 
-    if (!target) {                   
+    if (!target) {
         target = o;
         target = o;
-    } else if (target == Py_None) {  
+    } else if (target == Py_None) {
         Py_DECREF(Py_None);
         target = o;
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
+    } else {
         if (!PyTuple_Check(target)) {
             o2 = target;
             target = PyTuple_New(1);
             PyTuple_SetItem(target, 0, o2);
         }
         if (!PyTuple_Check(target)) {
             o2 = target;
             target = PyTuple_New(1);
             PyTuple_SetItem(target, 0, o2);
         }
-        o3 = PyTuple_New(1);            
-        PyTuple_SetItem(o3, 0, o);      
+        o3 = PyTuple_New(1);
+        PyTuple_SetItem(o3, 0, o);
 
         o2 = target;
 
         o2 = target;
-        target = PySequence_Concat(o2, o3); 
-        Py_DECREF(o2);                      
+        target = PySequence_Concat(o2, o3);
+        Py_DECREF(o2);
         Py_DECREF(o3);
     }
     return target;
 }
 
         Py_DECREF(o3);
     }
     return target;
 }
 
-static char* wxStringErrorMsg = "string type is required for parameter";
-
     WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
 
     WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
     WXSHAPE_IMP_CALLBACKS(wxPyRectangleShape, wxRectangleShape);
 
     WXSHAPE_IMP_CALLBACKS(wxPyControlPoint, wxControlPoint);
@@ -121,6 +101,14 @@ static char* wxStringErrorMsg = "string type is required for parameter";
 #ifdef __cplusplus
 extern "C" {
 #endif
 #ifdef __cplusplus
 extern "C" {
 #endif
+static void *SwigwxPseudoMetaFileTowxObject(void *ptr) {
+    wxPseudoMetaFile *src;
+    wxObject *dest;
+    src = (wxPseudoMetaFile *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPseudoMetaFile() (new wxPseudoMetaFile())
 static PyObject *_wrap_new_wxPseudoMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPseudoMetaFile() (new wxPseudoMetaFile())
 static PyObject *_wrap_new_wxPseudoMetaFile(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -132,10 +120,11 @@ static PyObject *_wrap_new_wxPseudoMetaFile(PyObject *self, PyObject *args, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPseudoMetaFile",_kwnames)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPseudoMetaFile",_kwnames)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPseudoMetaFile *)new_wxPseudoMetaFile();
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPseudoMetaFile *)new_wxPseudoMetaFile();
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPseudoMetaFile_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPseudoMetaFile_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -164,10 +153,11 @@ static PyObject *_wrap_delete_wxPseudoMetaFile(PyObject *self, PyObject *args, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        delete_wxPseudoMetaFile(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    delete_wxPseudoMetaFile(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -202,10 +192,11 @@ static PyObject *_wrap_wxPseudoMetaFile_Draw(PyObject *self, PyObject *args, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_Draw(_arg0,*_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_Draw(_arg0,*_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -239,10 +230,11 @@ static PyObject *_wrap_wxPseudoMetaFile_WriteAttributes(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_WriteAttributes(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_WriteAttributes(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -276,10 +268,11 @@ static PyObject *_wrap_wxPseudoMetaFile_ReadAttributes(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_ReadAttributes(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_ReadAttributes(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -303,10 +296,11 @@ static PyObject *_wrap_wxPseudoMetaFile_Clear(PyObject *self, PyObject *args, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_Clear(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_Clear(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -339,10 +333,11 @@ static PyObject *_wrap_wxPseudoMetaFile_Copy(PyObject *self, PyObject *args, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_Copy(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_Copy(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -368,10 +363,11 @@ static PyObject *_wrap_wxPseudoMetaFile_Scale(PyObject *self, PyObject *args, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_Scale(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_Scale(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -397,10 +393,11 @@ static PyObject *_wrap_wxPseudoMetaFile_ScaleTo(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_ScaleTo(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_ScaleTo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -426,10 +423,11 @@ static PyObject *_wrap_wxPseudoMetaFile_Translate(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_Translate(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_Translate(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -456,10 +454,11 @@ static PyObject *_wrap_wxPseudoMetaFile_Rotate(PyObject *self, PyObject *args, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_Rotate(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_Rotate(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -503,10 +502,11 @@ static PyObject *_wrap_wxPseudoMetaFile_LoadFromMetaFile(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPseudoMetaFile_LoadFromMetaFile(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPseudoMetaFile_LoadFromMetaFile(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -565,10 +565,11 @@ static PyObject *_wrap_wxPseudoMetaFile_GetBounds(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_GetBounds(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_GetBounds(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -601,10 +602,11 @@ static PyObject *_wrap_wxPseudoMetaFile_CalculateSize(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_CalculateSize(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_CalculateSize(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -631,10 +633,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetRotateable(PyObject *self, PyObject *
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetRotateable(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetRotateable(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -659,10 +662,11 @@ static PyObject *_wrap_wxPseudoMetaFile_GetRotateable(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPseudoMetaFile_GetRotateable(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPseudoMetaFile_GetRotateable(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -687,10 +691,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetSize(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -702,11 +707,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFillBrush(PyObject *self, PyObject *a
     wxPseudoMetaFile * _arg0;
     wxBrush * _arg1;
     PyObject * _argo0 = 0;
     wxPseudoMetaFile * _arg0;
     wxBrush * _arg1;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","brush", NULL };
 
     self = self;
     char *_kwnames[] = { "self","brush", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFillBrush",_kwnames,&_argo0,&_argo1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFillBrush",_kwnames,&_argo0,&_obj1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -715,18 +720,26 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFillBrush(PyObject *self, PyObject *a
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetFillBrush. Expected _wxBrush_p.");
+{
+    wxBrush* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
 {
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetFillBrush(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetFillBrush(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -752,10 +765,11 @@ static PyObject *_wrap_wxPseudoMetaFile_GetFillBrush(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxBrush *)wxPseudoMetaFile_GetFillBrush(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxBrush *)wxPseudoMetaFile_GetFillBrush(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxBrush_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -772,11 +786,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlinePen(PyObject *self, PyObject *
     wxPseudoMetaFile * _arg0;
     wxPen * _arg1;
     PyObject * _argo0 = 0;
     wxPseudoMetaFile * _arg0;
     wxPen * _arg1;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","pen", NULL };
 
     self = self;
     char *_kwnames[] = { "self","pen", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetOutlinePen",_kwnames,&_argo0,&_argo1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetOutlinePen",_kwnames,&_argo0,&_obj1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -785,18 +799,28 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlinePen(PyObject *self, PyObject *
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetOutlinePen. Expected _wxPen_p.");
+{
+    wxPen* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
+                                                temp->GetWidth(),
+                                                temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
 {
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetOutlinePen(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetOutlinePen(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -822,10 +846,11 @@ static PyObject *_wrap_wxPseudoMetaFile_GetOutlinePen(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPen *)wxPseudoMetaFile_GetOutlinePen(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPen *)wxPseudoMetaFile_GetOutlinePen(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -855,10 +880,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetOutlineOp(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetOutlineOp(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetOutlineOp(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -883,10 +909,11 @@ static PyObject *_wrap_wxPseudoMetaFile_GetOutlineOp(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (int )wxPseudoMetaFile_GetOutlineOp(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (int )wxPseudoMetaFile_GetOutlineOp(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -910,10 +937,11 @@ static PyObject *_wrap_wxPseudoMetaFile_IsValid(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPseudoMetaFile_IsValid(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPseudoMetaFile_IsValid(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -952,10 +980,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLine(PyObject *self, PyObject *args,
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawLine(_arg0,*_arg1,*_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawLine(_arg0,*_arg1,*_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -987,10 +1016,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawRectangle(PyObject *self, PyObject *
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawRectangle(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawRectangle(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1023,10 +1053,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawRoundedRectangle(PyObject *self, PyO
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawRoundedRectangle(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawRoundedRectangle(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1074,10 +1105,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawArc(PyObject *self, PyObject *args,
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawArc(_arg0,*_arg1,*_arg2,*_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawArc(_arg0,*_arg1,*_arg2,*_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1111,10 +1143,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawEllipticArc(PyObject *self, PyObject
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1146,10 +1179,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawEllipse(PyObject *self, PyObject *ar
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawEllipse(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawEllipse(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1181,10 +1215,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPoint(PyObject *self, PyObject *args
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawPoint(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawPoint(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1213,11 +1248,9 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawText(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    if (!PyString_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+    _arg1 = wxString_in_helper(_obj1);
+    if (_arg1 == NULL)
         return NULL;
         return NULL;
-    }
-    _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
 }
 {
     _arg2 = &temp;
 }
 {
     _arg2 = &temp;
@@ -1225,10 +1258,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawText(PyObject *self, PyObject *args,
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawText(_arg0,*_arg1,*_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawText(_arg0,*_arg1,*_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -1245,6 +1279,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLines(PyObject *self, PyObject *args
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
+    int  NPOINTS;
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
@@ -1260,24 +1295,20 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawLines(PyObject *self, PyObject *args
     }
     if (_obj2)
 {
     }
     if (_obj2)
 {
-    _arg2 = wxPoint_LIST_helper(_obj2);
-    if (_arg2 == NULL) {
-        return NULL;
-    }
+    _arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
+       if (_arg2 == NULL) {
+               return NULL;
+       }
 }
 {
 }
 {
-    if (_obj2) {
-        _arg1 = PyList_Size(_obj2);
-    }
-    else {
-        _arg1 = 0;
-    }
+       _arg1 = NPOINTS;
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawLines(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawLines(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -1294,6 +1325,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPolygon(PyObject *self, PyObject *ar
     wxPoint * _arg2;
     int  _arg3 = (int ) 0;
     PyObject * _argo0 = 0;
     wxPoint * _arg2;
     int  _arg3 = (int ) 0;
     PyObject * _argo0 = 0;
+    int  NPOINTS;
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points","flags", NULL };
 
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points","flags", NULL };
 
@@ -1309,24 +1341,20 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawPolygon(PyObject *self, PyObject *ar
     }
     if (_obj2)
 {
     }
     if (_obj2)
 {
-    _arg2 = wxPoint_LIST_helper(_obj2);
-    if (_arg2 == NULL) {
-        return NULL;
-    }
+    _arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
+       if (_arg2 == NULL) {
+               return NULL;
+       }
 }
 {
 }
 {
-    if (_obj2) {
-        _arg1 = PyList_Size(_obj2);
-    }
-    else {
-        _arg1 = 0;
-    }
+       _arg1 = NPOINTS;
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawPolygon(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawPolygon(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -1342,6 +1370,7 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawSpline(PyObject *self, PyObject *arg
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
+    int  NPOINTS;
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
@@ -1357,24 +1386,20 @@ static PyObject *_wrap_wxPseudoMetaFile_DrawSpline(PyObject *self, PyObject *arg
     }
     if (_obj2)
 {
     }
     if (_obj2)
 {
-    _arg2 = wxPoint_LIST_helper(_obj2);
-    if (_arg2 == NULL) {
-        return NULL;
-    }
+    _arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
+       if (_arg2 == NULL) {
+               return NULL;
+       }
 }
 {
 }
 {
-    if (_obj2) {
-        _arg1 = PyList_Size(_obj2);
-    }
-    else {
-        _arg1 = 0;
-    }
+       _arg1 = NPOINTS;
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DrawSpline(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DrawSpline(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -1409,10 +1434,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetClippingRect(PyObject *self, PyObject
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetClippingRect(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetClippingRect(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1436,10 +1462,11 @@ static PyObject *_wrap_wxPseudoMetaFile_DestroyClippingRect(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_DestroyClippingRect(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_DestroyClippingRect(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1452,12 +1479,12 @@ static PyObject *_wrap_wxPseudoMetaFile_SetPen(PyObject *self, PyObject *args, P
     wxPen * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
     wxPen * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","pen","isOutline", NULL };
 
     self = self;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","pen","isOutline", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetPen",_kwnames,&_argo0,&_argo1,&tempbool2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetPen",_kwnames,&_argo0,&_obj1,&tempbool2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1466,19 +1493,29 @@ static PyObject *_wrap_wxPseudoMetaFile_SetPen(PyObject *self, PyObject *args, P
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetPen. Expected _wxPen_p.");
+{
+    wxPen* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
+                                                temp->GetWidth(),
+                                                temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
     _arg2 = (bool ) tempbool2;
 {
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetPen(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetPen(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1491,12 +1528,12 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBrush(PyObject *self, PyObject *args,
     wxBrush * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
     wxBrush * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","brush","isFill", NULL };
 
     self = self;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","brush","isFill", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetBrush",_kwnames,&_argo0,&_argo1,&tempbool2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPseudoMetaFile_SetBrush",_kwnames,&_argo0,&_obj1,&tempbool2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1505,19 +1542,27 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBrush(PyObject *self, PyObject *args,
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetBrush. Expected _wxBrush_p.");
+{
+    wxBrush* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
     _arg2 = (bool ) tempbool2;
 {
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetBrush(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetBrush(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1529,11 +1574,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFont(PyObject *self, PyObject *args,
     wxPseudoMetaFile * _arg0;
     wxFont * _arg1;
     PyObject * _argo0 = 0;
     wxPseudoMetaFile * _arg0;
     wxFont * _arg1;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","font", NULL };
 
     self = self;
     char *_kwnames[] = { "self","font", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFont",_kwnames,&_argo0,&_argo1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPseudoMetaFile_SetFont",_kwnames,&_argo0,&_obj1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1542,18 +1587,32 @@ static PyObject *_wrap_wxPseudoMetaFile_SetFont(PyObject *self, PyObject *args,
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_SetFont. Expected _wxFont_p.");
+{
+    wxFont* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxFont_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
+                                                  temp->GetFamily(),
+                                                  temp->GetStyle(),
+                                                  temp->GetWeight(),
+                                                  temp->GetUnderlined(),
+                                                  temp->GetFaceName(),
+                                                  temp->GetEncoding());
+    else
+        _arg1 = NULL;
+}
 {
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetFont(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetFont(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1585,10 +1644,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetTextColour(PyObject *self, PyObject *
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetTextColour(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetTextColour(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1620,10 +1680,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBackgroundColour(PyObject *self, PyOb
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetBackgroundColour(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetBackgroundColour(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1648,10 +1709,11 @@ static PyObject *_wrap_wxPseudoMetaFile_SetBackgroundMode(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile_SetBackgroundMode(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile_SetBackgroundMode(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1673,6 +1735,14 @@ static void *SwigwxPyRectangleShapeTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyRectangleShapeTowxObject(void *ptr) {
+    wxPyRectangleShape *src;
+    wxObject *dest;
+    src = (wxPyRectangleShape *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyRectangleShape(_swigarg0,_swigarg1) (new wxPyRectangleShape(_swigarg0,_swigarg1))
 static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyRectangleShape(_swigarg0,_swigarg1) (new wxPyRectangleShape(_swigarg0,_swigarg1))
 static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -1686,10 +1756,11 @@ static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, Py
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|dd:new_wxPyRectangleShape",_kwnames,&_arg0,&_arg1)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|dd:new_wxPyRectangleShape",_kwnames,&_arg0,&_arg1)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyRectangleShape *)new_wxPyRectangleShape(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyRectangleShape *)new_wxPyRectangleShape(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyRectangleShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyRectangleShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -1700,8 +1771,8 @@ static PyObject *_wrap_new_wxPyRectangleShape(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyRectangleShape__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyRectangleShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyRectangleShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyRectangleShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyRectangleShape * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyRectangleShape * _arg0;
     PyObject * _arg1;
@@ -1712,12 +1783,12 @@ static PyObject *_wrap_wxPyRectangleShape__setSelf(PyObject *self, PyObject *arg
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyRectangleShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyRectangleShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyRectangleShape_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyRectangleShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyRectangleShape__setSelf. Expected _wxPyRectangleShape_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyRectangleShape__setCallbackInfo. Expected _wxPyRectangleShape_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -1728,10 +1799,11 @@ static PyObject *_wrap_wxPyRectangleShape__setSelf(PyObject *self, PyObject *arg
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1756,10 +1828,11 @@ static PyObject *_wrap_wxPyRectangleShape_SetCornerRadius(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_SetCornerRadius(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_SetCornerRadius(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1783,10 +1856,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDelete(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1819,10 +1893,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDraw(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1855,10 +1930,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawContents(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1894,10 +1970,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawBranches(PyObject *self, Py
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1930,10 +2007,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMoveLinks(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1966,10 +2044,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnErase(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2002,10 +2081,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEraseContents(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2038,10 +2118,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnHighlight(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2069,10 +2150,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnLeftClick(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2100,10 +2182,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnLeftDoubleClick(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2131,10 +2214,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnRightClick(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2160,10 +2244,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSize(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2204,10 +2289,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMovePre(PyObject *self, PyObjec
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyRectangleShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyRectangleShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2246,10 +2332,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMovePost(PyObject *self, PyObje
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2280,10 +2367,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDragLeft(PyObject *self, PyObje
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2311,10 +2399,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnBeginDragLeft(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2342,10 +2431,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEndDragLeft(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2376,10 +2466,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDragRight(PyObject *self, PyObj
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2407,10 +2498,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnBeginDragRight(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2438,10 +2530,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEndDragRight(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2478,10 +2571,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawOutline(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2514,10 +2608,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnDrawControlPoints(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2550,10 +2645,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEraseControlPoints(PyObject *se
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2589,10 +2685,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnMoveLink(PyObject *self, PyObje
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2632,10 +2729,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSizingDragLeft(PyObject *self,
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2672,10 +2770,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSizingBeginDragLeft(PyObject *s
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2712,10 +2811,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnSizingEndDragLeft(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2741,10 +2841,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnBeginSize(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2770,10 +2871,11 @@ static PyObject *_wrap_wxPyRectangleShape_base_OnEndSize(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyRectangleShape_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyRectangleShape_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2803,6 +2905,14 @@ static void *SwigwxPyControlPointTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyControlPointTowxObject(void *ptr) {
+    wxPyControlPoint *src;
+    wxObject *dest;
+    src = (wxPyControlPoint *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyControlPoint(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPyControlPoint(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
 static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyControlPoint(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (new wxPyControlPoint(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5))
 static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -2836,10 +2946,11 @@ static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyControlPoint *)new_wxPyControlPoint(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyControlPoint *)new_wxPyControlPoint(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyControlPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyControlPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -2850,8 +2961,8 @@ static PyObject *_wrap_new_wxPyControlPoint(PyObject *self, PyObject *args, PyOb
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyControlPoint__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyControlPoint__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyControlPoint__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyControlPoint__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyControlPoint * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyControlPoint * _arg0;
     PyObject * _arg1;
@@ -2862,12 +2973,12 @@ static PyObject *_wrap_wxPyControlPoint__setSelf(PyObject *self, PyObject *args,
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyControlPoint__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyControlPoint__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyControlPoint_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyControlPoint_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyControlPoint__setSelf. Expected _wxPyControlPoint_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyControlPoint__setCallbackInfo. Expected _wxPyControlPoint_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -2878,10 +2989,11 @@ static PyObject *_wrap_wxPyControlPoint__setSelf(PyObject *self, PyObject *args,
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2906,10 +3018,11 @@ static PyObject *_wrap_wxPyControlPoint_SetCornerRadius(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_SetCornerRadius(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_SetCornerRadius(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2933,10 +3046,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDelete(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2969,10 +3083,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDraw(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3005,10 +3120,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawContents(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3044,10 +3160,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawBranches(PyObject *self, PyOb
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3080,10 +3197,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMoveLinks(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3116,10 +3234,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnErase(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3152,10 +3271,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEraseContents(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3188,10 +3308,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnHighlight(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3219,10 +3340,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnLeftClick(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3250,10 +3372,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnLeftDoubleClick(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3281,10 +3404,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnRightClick(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3310,10 +3434,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSize(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3354,10 +3479,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMovePre(PyObject *self, PyObject
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyControlPoint_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyControlPoint_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3396,10 +3522,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMovePost(PyObject *self, PyObject
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3430,10 +3557,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDragLeft(PyObject *self, PyObject
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3461,10 +3589,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnBeginDragLeft(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3492,10 +3621,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEndDragLeft(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3526,10 +3656,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDragRight(PyObject *self, PyObjec
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3557,10 +3688,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnBeginDragRight(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3588,10 +3720,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEndDragRight(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3628,10 +3761,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawOutline(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3664,10 +3798,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnDrawControlPoints(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3700,10 +3835,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEraseControlPoints(PyObject *self
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3739,10 +3875,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnMoveLink(PyObject *self, PyObject
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3782,10 +3919,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSizingDragLeft(PyObject *self, Py
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3822,10 +3960,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSizingBeginDragLeft(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3862,10 +4001,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnSizingEndDragLeft(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3891,10 +4031,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnBeginSize(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3920,10 +4061,11 @@ static PyObject *_wrap_wxPyControlPoint_base_OnEndSize(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyControlPoint_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyControlPoint_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3953,6 +4095,14 @@ static void *SwigwxPyBitmapShapeTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyBitmapShapeTowxObject(void *ptr) {
+    wxPyBitmapShape *src;
+    wxObject *dest;
+    src = (wxPyBitmapShape *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyBitmapShape() (new wxPyBitmapShape())
 static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyBitmapShape() (new wxPyBitmapShape())
 static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -3964,10 +4114,11 @@ static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObj
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyBitmapShape",_kwnames)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyBitmapShape",_kwnames)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyBitmapShape *)new_wxPyBitmapShape();
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyBitmapShape *)new_wxPyBitmapShape();
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyBitmapShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyBitmapShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -3978,8 +4129,8 @@ static PyObject *_wrap_new_wxPyBitmapShape(PyObject *self, PyObject *args, PyObj
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyBitmapShape__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyBitmapShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyBitmapShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyBitmapShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyBitmapShape * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyBitmapShape * _arg0;
     PyObject * _arg1;
@@ -3990,12 +4141,12 @@ static PyObject *_wrap_wxPyBitmapShape__setSelf(PyObject *self, PyObject *args,
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyBitmapShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyBitmapShape_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyBitmapShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyBitmapShape__setSelf. Expected _wxPyBitmapShape_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyBitmapShape__setCallbackInfo. Expected _wxPyBitmapShape_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -4006,10 +4157,11 @@ static PyObject *_wrap_wxPyBitmapShape__setSelf(PyObject *self, PyObject *args,
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4035,11 +4187,12 @@ static PyObject *_wrap_wxPyBitmapShape_GetBitmap(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxBitmap & _result_ref = wxPyBitmapShape_GetBitmap(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxBitmap & _result_ref = wxPyBitmapShape_GetBitmap(_arg0);
     _result = (wxBitmap *) &_result_ref;
 
     _result = (wxBitmap *) &_result_ref;
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -4069,12 +4222,17 @@ static PyObject *_wrap_wxPyBitmapShape_GetFilename(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = new wxString (wxPyBitmapShape_GetFilename(_arg0));
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = new wxString (wxPyBitmapShape_GetFilename(_arg0));
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }{
 }{
+#if wxUSE_UNICODE
+    _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+#else
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+#endif
 }
 {
     delete _result;
 }
 {
     delete _result;
@@ -4109,10 +4267,11 @@ static PyObject *_wrap_wxPyBitmapShape_SetBitmap(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_SetBitmap(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_SetBitmap(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4138,17 +4297,16 @@ static PyObject *_wrap_wxPyBitmapShape_SetFilename(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    if (!PyString_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+    _arg1 = wxString_in_helper(_obj1);
+    if (_arg1 == NULL)
         return NULL;
         return NULL;
-    }
-    _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_SetFilename(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_SetFilename(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -4176,10 +4334,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDelete(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4212,10 +4371,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDraw(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4248,10 +4408,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawContents(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4287,10 +4448,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawBranches(PyObject *self, PyObj
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4323,10 +4485,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMoveLinks(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4359,10 +4522,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnErase(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4395,10 +4559,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEraseContents(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4431,10 +4596,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnHighlight(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4462,10 +4628,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnLeftClick(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4493,10 +4660,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnLeftDoubleClick(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4524,10 +4692,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnRightClick(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4553,10 +4722,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSize(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4597,10 +4767,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMovePre(PyObject *self, PyObject *
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyBitmapShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyBitmapShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4639,10 +4810,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMovePost(PyObject *self, PyObject
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4673,10 +4845,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDragLeft(PyObject *self, PyObject
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4704,10 +4877,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnBeginDragLeft(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4735,10 +4909,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEndDragLeft(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4769,10 +4944,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDragRight(PyObject *self, PyObject
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4800,10 +4976,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnBeginDragRight(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4831,10 +5008,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEndDragRight(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4871,10 +5049,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawOutline(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4907,10 +5086,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnDrawControlPoints(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4943,10 +5123,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEraseControlPoints(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4982,10 +5163,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnMoveLink(PyObject *self, PyObject
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5025,10 +5207,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSizingDragLeft(PyObject *self, PyO
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5065,10 +5248,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSizingBeginDragLeft(PyObject *self
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5105,10 +5289,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnSizingEndDragLeft(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5134,10 +5319,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnBeginSize(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5163,10 +5349,11 @@ static PyObject *_wrap_wxPyBitmapShape_base_OnEndSize(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyBitmapShape_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyBitmapShape_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5196,6 +5383,14 @@ static void *SwigwxPyDrawnShapeTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyDrawnShapeTowxObject(void *ptr) {
+    wxPyDrawnShape *src;
+    wxObject *dest;
+    src = (wxPyDrawnShape *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyDrawnShape() (new wxPyDrawnShape())
 static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyDrawnShape() (new wxPyDrawnShape())
 static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -5207,10 +5402,11 @@ static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObje
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyDrawnShape",_kwnames)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyDrawnShape",_kwnames)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDrawnShape *)new_wxPyDrawnShape();
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDrawnShape *)new_wxPyDrawnShape();
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDrawnShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDrawnShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -5221,8 +5417,8 @@ static PyObject *_wrap_new_wxPyDrawnShape(PyObject *self, PyObject *args, PyObje
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyDrawnShape__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyDrawnShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyDrawnShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyDrawnShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyDrawnShape * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyDrawnShape * _arg0;
     PyObject * _arg1;
@@ -5233,12 +5429,12 @@ static PyObject *_wrap_wxPyDrawnShape__setSelf(PyObject *self, PyObject *args, P
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDrawnShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDrawnShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDrawnShape_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDrawnShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDrawnShape__setSelf. Expected _wxPyDrawnShape_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDrawnShape__setCallbackInfo. Expected _wxPyDrawnShape_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -5249,10 +5445,11 @@ static PyObject *_wrap_wxPyDrawnShape__setSelf(PyObject *self, PyObject *args, P
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5276,10 +5473,11 @@ static PyObject *_wrap_wxPyDrawnShape_CalculateSize(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_CalculateSize(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_CalculateSize(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5303,10 +5501,11 @@ static PyObject *_wrap_wxPyDrawnShape_DestroyClippingRect(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DestroyClippingRect(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DestroyClippingRect(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5354,10 +5553,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawArc(PyObject *self, PyObject *args, Py
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawArc(_arg0,*_arg1,*_arg2,*_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawArc(_arg0,*_arg1,*_arg2,*_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5382,10 +5582,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawAtAngle(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawAtAngle(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawAtAngle(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5419,10 +5620,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawEllipticArc(PyObject *self, PyObject *
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawEllipticArc(_arg0,*_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5462,10 +5664,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLine(PyObject *self, PyObject *args, P
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawLine(_arg0,*_arg1,*_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawLine(_arg0,*_arg1,*_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5478,6 +5681,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLines(PyObject *self, PyObject *args,
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
+    int  NPOINTS;
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
@@ -5493,24 +5697,20 @@ static PyObject *_wrap_wxPyDrawnShape_DrawLines(PyObject *self, PyObject *args,
     }
     if (_obj2)
 {
     }
     if (_obj2)
 {
-    _arg2 = wxPoint_LIST_helper(_obj2);
-    if (_arg2 == NULL) {
-        return NULL;
-    }
+    _arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
+       if (_arg2 == NULL) {
+               return NULL;
+       }
 }
 {
 }
 {
-    if (_obj2) {
-        _arg1 = PyList_Size(_obj2);
-    }
-    else {
-        _arg1 = 0;
-    }
+       _arg1 = NPOINTS;
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawLines(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawLines(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -5545,10 +5745,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPoint(PyObject *self, PyObject *args,
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawPoint(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawPoint(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5562,6 +5763,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPolygon(PyObject *self, PyObject *args
     wxPoint * _arg2;
     int  _arg3 = (int ) 0;
     PyObject * _argo0 = 0;
     wxPoint * _arg2;
     int  _arg3 = (int ) 0;
     PyObject * _argo0 = 0;
+    int  NPOINTS;
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points","flags", NULL };
 
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points","flags", NULL };
 
@@ -5577,24 +5779,20 @@ static PyObject *_wrap_wxPyDrawnShape_DrawPolygon(PyObject *self, PyObject *args
     }
     if (_obj2)
 {
     }
     if (_obj2)
 {
-    _arg2 = wxPoint_LIST_helper(_obj2);
-    if (_arg2 == NULL) {
-        return NULL;
-    }
+    _arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
+       if (_arg2 == NULL) {
+               return NULL;
+       }
 }
 {
 }
 {
-    if (_obj2) {
-        _arg1 = PyList_Size(_obj2);
-    }
-    else {
-        _arg1 = 0;
-    }
+       _arg1 = NPOINTS;
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawPolygon(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawPolygon(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -5629,10 +5827,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawRectangle(PyObject *self, PyObject *ar
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawRectangle(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawRectangle(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5665,10 +5864,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawRoundedRectangle(PyObject *self, PyObj
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawRoundedRectangle(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawRoundedRectangle(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5681,6 +5881,7 @@ static PyObject *_wrap_wxPyDrawnShape_DrawSpline(PyObject *self, PyObject *args,
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
     int  _arg1;
     wxPoint * _arg2;
     PyObject * _argo0 = 0;
+    int  NPOINTS;
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
     PyObject * _obj2 = 0;
     char *_kwnames[] = { "self","points", NULL };
 
@@ -5696,24 +5897,20 @@ static PyObject *_wrap_wxPyDrawnShape_DrawSpline(PyObject *self, PyObject *args,
     }
     if (_obj2)
 {
     }
     if (_obj2)
 {
-    _arg2 = wxPoint_LIST_helper(_obj2);
-    if (_arg2 == NULL) {
-        return NULL;
-    }
+    _arg2 = wxPoint_LIST_helper(_obj2, &NPOINTS);
+       if (_arg2 == NULL) {
+               return NULL;
+       }
 }
 {
 }
 {
-    if (_obj2) {
-        _arg1 = PyList_Size(_obj2);
-    }
-    else {
-        _arg1 = 0;
-    }
+       _arg1 = NPOINTS;
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawSpline(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawSpline(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -5745,11 +5942,9 @@ static PyObject *_wrap_wxPyDrawnShape_DrawText(PyObject *self, PyObject *args, P
         }
     }
 {
         }
     }
 {
-    if (!PyString_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+    _arg1 = wxString_in_helper(_obj1);
+    if (_arg1 == NULL)
         return NULL;
         return NULL;
-    }
-    _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
 }
 {
     _arg2 = &temp;
 }
 {
     _arg2 = &temp;
@@ -5757,10 +5952,11 @@ static PyObject *_wrap_wxPyDrawnShape_DrawText(PyObject *self, PyObject *args, P
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_DrawText(_arg0,*_arg1,*_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_DrawText(_arg0,*_arg1,*_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -5789,10 +5985,11 @@ static PyObject *_wrap_wxPyDrawnShape_GetAngle(PyObject *self, PyObject *args, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (int )wxPyDrawnShape_GetAngle(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (int )wxPyDrawnShape_GetAngle(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5804,7 +6001,6 @@ static PyObject *_wrap_wxPyDrawnShape_GetMetaFile(PyObject *self, PyObject *args
     wxPyDrawnShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyDrawnShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDrawnShape_GetMetaFile",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDrawnShape_GetMetaFile",_kwnames,&_argo0)) 
@@ -5817,18 +6013,13 @@ static PyObject *_wrap_wxPyDrawnShape_GetMetaFile(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPseudoMetaFile & _result_ref = wxPyDrawnShape_GetMetaFile(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPseudoMetaFile & _result_ref = wxPyDrawnShape_GetMetaFile(_arg0);
     _result = (wxPseudoMetaFile *) &_result_ref;
 
     _result = (wxPseudoMetaFile *) &_result_ref;
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPseudoMetaFile_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -5851,10 +6042,11 @@ static PyObject *_wrap_wxPyDrawnShape_GetRotation(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (double )wxPyDrawnShape_GetRotation(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (double )wxPyDrawnShape_GetRotation(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("d",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("d",_result);
     return _resultobj;
 }
@@ -5879,10 +6071,11 @@ static PyObject *_wrap_wxPyDrawnShape_LoadFromMetaFile(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyDrawnShape_LoadFromMetaFile(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyDrawnShape_LoadFromMetaFile(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5908,10 +6101,11 @@ static PyObject *_wrap_wxPyDrawnShape_Rotate(PyObject *self, PyObject *args, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_Rotate(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_Rotate(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5943,10 +6137,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetClippingRect(PyObject *self, PyObject *
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetClippingRect(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetClippingRect(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5978,10 +6173,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBackgroundColour(PyObject *self, P
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetDrawnBackgroundColour(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetDrawnBackgroundColour(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6006,10 +6202,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBackgroundMode(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetDrawnBackgroundMode(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetDrawnBackgroundMode(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6022,12 +6219,12 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *ar
     wxBrush * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
     wxBrush * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","pen","isOutline", NULL };
 
     self = self;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","pen","isOutline", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnBrush",_kwnames,&_argo0,&_argo1,&tempbool2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnBrush",_kwnames,&_argo0,&_obj1,&tempbool2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -6036,19 +6233,27 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *ar
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnBrush. Expected _wxBrush_p.");
+{
+    wxBrush* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxBrush_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxBrush_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxTheBrushList->FindOrCreateBrush(temp->GetColour(), temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
     _arg2 = (bool ) tempbool2;
 {
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetDrawnBrush(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetDrawnBrush(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6060,11 +6265,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnFont(PyObject *self, PyObject *arg
     wxPyDrawnShape * _arg0;
     wxFont * _arg1;
     PyObject * _argo0 = 0;
     wxPyDrawnShape * _arg0;
     wxFont * _arg1;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","font", NULL };
 
     self = self;
     char *_kwnames[] = { "self","font", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnFont",_kwnames,&_argo0,&_argo1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDrawnShape_SetDrawnFont",_kwnames,&_argo0,&_obj1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -6073,18 +6278,32 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnFont(PyObject *self, PyObject *arg
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnFont. Expected _wxFont_p.");
+{
+    wxFont* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxFont_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxFont_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxTheFontList->FindOrCreateFont(temp->GetPointSize(),
+                                                  temp->GetFamily(),
+                                                  temp->GetStyle(),
+                                                  temp->GetWeight(),
+                                                  temp->GetUnderlined(),
+                                                  temp->GetFaceName(),
+                                                  temp->GetEncoding());
+    else
+        _arg1 = NULL;
+}
 {
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetDrawnFont(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetDrawnFont(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6097,12 +6316,12 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args
     wxPen * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
     wxPen * _arg1;
     bool  _arg2 = (bool ) FALSE;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","pen","isOutline", NULL };
 
     self = self;
     int tempbool2 = (int) FALSE;
     char *_kwnames[] = { "self","pen","isOutline", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnPen",_kwnames,&_argo0,&_argo1,&tempbool2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxPyDrawnShape_SetDrawnPen",_kwnames,&_argo0,&_obj1,&tempbool2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -6111,19 +6330,29 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDrawnShape_SetDrawnPen. Expected _wxPen_p.");
+{
+    wxPen* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
+                                                temp->GetWidth(),
+                                                temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
     _arg2 = (bool ) tempbool2;
 {
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetDrawnPen(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetDrawnPen(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6155,10 +6384,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetDrawnTextColour(PyObject *self, PyObjec
         return NULL;
 }
 {
         return NULL;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetDrawnTextColour(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetDrawnTextColour(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6184,10 +6414,11 @@ static PyObject *_wrap_wxPyDrawnShape_Scale(PyObject *self, PyObject *args, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_Scale(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_Scale(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6214,10 +6445,11 @@ static PyObject *_wrap_wxPyDrawnShape_SetSaveToFile(PyObject *self, PyObject *ar
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_SetSaveToFile(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_SetSaveToFile(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6243,10 +6475,11 @@ static PyObject *_wrap_wxPyDrawnShape_Translate(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_Translate(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_Translate(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6270,10 +6503,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDelete(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6306,10 +6540,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDraw(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6342,10 +6577,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawContents(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6381,10 +6617,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawBranches(PyObject *self, PyObje
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6417,10 +6654,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMoveLinks(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6453,10 +6691,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnErase(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6489,10 +6728,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEraseContents(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6525,10 +6765,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnHighlight(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6556,10 +6797,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnLeftClick(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6587,10 +6829,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnLeftDoubleClick(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6618,10 +6861,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnRightClick(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6647,10 +6891,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSize(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6691,10 +6936,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMovePre(PyObject *self, PyObject *a
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyDrawnShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyDrawnShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -6733,10 +6979,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMovePost(PyObject *self, PyObject *
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6767,10 +7014,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDragLeft(PyObject *self, PyObject *
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6798,10 +7046,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnBeginDragLeft(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6829,10 +7078,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndDragLeft(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6863,10 +7113,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDragRight(PyObject *self, PyObject
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6894,10 +7145,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnBeginDragRight(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6925,10 +7177,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndDragRight(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -6965,10 +7218,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawOutline(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7001,10 +7255,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnDrawControlPoints(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7037,10 +7292,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEraseControlPoints(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7076,10 +7332,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnMoveLink(PyObject *self, PyObject *
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7119,10 +7376,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSizingDragLeft(PyObject *self, PyOb
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7159,10 +7417,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSizingBeginDragLeft(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7199,10 +7458,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnSizingEndDragLeft(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7228,10 +7488,11 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnBeginSize(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7257,15 +7518,24 @@ static PyObject *_wrap_wxPyDrawnShape_base_OnEndSize(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDrawnShape_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDrawnShape_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }
 
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }
 
+static void *SwigwxOGLConstraintTowxObject(void *ptr) {
+    wxOGLConstraint *src;
+    wxObject *dest;
+    src = (wxOGLConstraint *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 static wxOGLConstraint *new_wxOGLConstraint(int type,wxPyShape *constraining,PyObject *constrained) {
             wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
             wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
 static wxOGLConstraint *new_wxOGLConstraint(int type,wxPyShape *constraining,PyObject *constrained) {
             wxList* list = wxPy_wxListHelper(constrained, "_wxPyShape_p");
             wxOGLConstraint* rv = new wxOGLConstraint(type, constraining, *list);
@@ -7298,10 +7568,11 @@ static PyObject *_wrap_new_wxOGLConstraint(PyObject *self, PyObject *args, PyObj
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxOGLConstraint *)new_wxOGLConstraint(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxOGLConstraint *)new_wxOGLConstraint(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -7312,33 +7583,6 @@ static PyObject *_wrap_new_wxOGLConstraint(PyObject *self, PyObject *args, PyObj
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define delete_wxOGLConstraint(_swigobj) (delete _swigobj)
-static PyObject *_wrap_delete_wxOGLConstraint(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject * _resultobj;
-    wxOGLConstraint * _arg0;
-    PyObject * _argo0 = 0;
-    char *_kwnames[] = { "self", NULL };
-
-    self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxOGLConstraint",_kwnames,&_argo0)) 
-        return NULL;
-    if (_argo0) {
-        if (_argo0 == Py_None) { _arg0 = NULL; }
-        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxOGLConstraint_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxOGLConstraint. Expected _wxOGLConstraint_p.");
-        return NULL;
-        }
-    }
-{
-    wxPy_BEGIN_ALLOW_THREADS;
-        delete_wxOGLConstraint(_arg0);
-
-    wxPy_END_ALLOW_THREADS;
-}    Py_INCREF(Py_None);
-    _resultobj = Py_None;
-    return _resultobj;
-}
-
 #define wxOGLConstraint_Evaluate(_swigobj)  (_swigobj->Evaluate())
 static PyObject *_wrap_wxOGLConstraint_Evaluate(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define wxOGLConstraint_Evaluate(_swigobj)  (_swigobj->Evaluate())
 static PyObject *_wrap_wxOGLConstraint_Evaluate(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -7358,10 +7602,11 @@ static PyObject *_wrap_wxOGLConstraint_Evaluate(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxOGLConstraint_Evaluate(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxOGLConstraint_Evaluate(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -7386,10 +7631,11 @@ static PyObject *_wrap_wxOGLConstraint_SetSpacing(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxOGLConstraint_SetSpacing(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxOGLConstraint_SetSpacing(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7416,10 +7662,11 @@ static PyObject *_wrap_wxOGLConstraint_Equals(PyObject *self, PyObject *args, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxOGLConstraint_Equals(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxOGLConstraint_Equals(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -7448,6 +7695,14 @@ static void *SwigwxPyCompositeShapeTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyCompositeShapeTowxObject(void *ptr) {
+    wxPyCompositeShape *src;
+    wxObject *dest;
+    src = (wxPyCompositeShape *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyCompositeShape() (new wxPyCompositeShape())
 static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyCompositeShape() (new wxPyCompositeShape())
 static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -7459,10 +7714,11 @@ static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, Py
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyCompositeShape",_kwnames)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyCompositeShape",_kwnames)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyCompositeShape *)new_wxPyCompositeShape();
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyCompositeShape *)new_wxPyCompositeShape();
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyCompositeShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyCompositeShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -7473,8 +7729,8 @@ static PyObject *_wrap_new_wxPyCompositeShape(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyCompositeShape__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyCompositeShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyCompositeShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyCompositeShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyCompositeShape * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyCompositeShape * _arg0;
     PyObject * _arg1;
@@ -7485,12 +7741,12 @@ static PyObject *_wrap_wxPyCompositeShape__setSelf(PyObject *self, PyObject *arg
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyCompositeShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyCompositeShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyCompositeShape_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyCompositeShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCompositeShape__setSelf. Expected _wxPyCompositeShape_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCompositeShape__setCallbackInfo. Expected _wxPyCompositeShape_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -7501,10 +7757,11 @@ static PyObject *_wrap_wxPyCompositeShape__setSelf(PyObject *self, PyObject *arg
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7546,10 +7803,11 @@ static PyObject *_wrap_wxPyCompositeShape_AddChild(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_AddChild(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_AddChild(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7564,7 +7822,6 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstraint(PyObject *self, PyObject
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     char *_kwnames[] = { "self","constraint", NULL };
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     char *_kwnames[] = { "self","constraint", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCompositeShape_AddConstraint",_kwnames,&_argo0,&_argo1)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCompositeShape_AddConstraint",_kwnames,&_argo0,&_argo1)) 
@@ -7584,17 +7841,12 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstraint(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstraint(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstraint(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -7615,7 +7867,6 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstrainedShapes(PyObject *self, P
     PyObject * _argo2 = 0;
     PyObject * _obj3 = 0;
     char *_kwnames[] = { "self","type","constraining","constrained", NULL };
     PyObject * _argo2 = 0;
     PyObject * _obj3 = 0;
     char *_kwnames[] = { "self","type","constraining","constrained", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddConstrainedShapes",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddConstrainedShapes",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3)) 
@@ -7638,17 +7889,12 @@ static PyObject *_wrap_wxPyCompositeShape_AddConstrainedShapes(PyObject *self, P
   _arg3 = _obj3;
 }
 {
   _arg3 = _obj3;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstrainedShapes(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxOGLConstraint *)wxPyCompositeShape_AddConstrainedShapes(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -7664,7 +7910,6 @@ static PyObject *_wrap_wxPyCompositeShape_AddSimpleConstraint(PyObject *self, Py
     PyObject * _argo2 = 0;
     PyObject * _argo3 = 0;
     char *_kwnames[] = { "self","type","constraining","constrained", NULL };
     PyObject * _argo2 = 0;
     PyObject * _argo3 = 0;
     char *_kwnames[] = { "self","type","constraining","constrained", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddSimpleConstraint",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO:wxPyCompositeShape_AddSimpleConstraint",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3)) 
@@ -7691,17 +7936,12 @@ static PyObject *_wrap_wxPyCompositeShape_AddSimpleConstraint(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxOGLConstraint *)wxPyCompositeShape_AddSimpleConstraint(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxOGLConstraint *)wxPyCompositeShape_AddSimpleConstraint(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxOGLConstraint_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -7723,10 +7963,11 @@ static PyObject *_wrap_wxPyCompositeShape_CalculateSize(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_CalculateSize(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_CalculateSize(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7760,10 +8001,11 @@ static PyObject *_wrap_wxPyCompositeShape_ContainsDivision(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyCompositeShape_ContainsDivision(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyCompositeShape_ContainsDivision(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -7795,10 +8037,11 @@ static PyObject *_wrap_wxPyCompositeShape_DeleteConstraint(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_DeleteConstraint(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_DeleteConstraint(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7831,10 +8074,11 @@ static PyObject *_wrap_wxPyCompositeShape_DeleteConstraintsInvolvingChild(PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_DeleteConstraintsInvolvingChild(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_DeleteConstraintsInvolvingChild(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7847,7 +8091,6 @@ static PyObject *_wrap_wxPyCompositeShape_FindContainerImage(PyObject *self, PyO
     wxPyCompositeShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyCompositeShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyCompositeShape_FindContainerImage",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyCompositeShape_FindContainerImage",_kwnames,&_argo0)) 
@@ -7860,17 +8103,12 @@ static PyObject *_wrap_wxPyCompositeShape_FindContainerImage(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyShape_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -7896,10 +8134,11 @@ static PyObject *_wrap_wxPyCompositeShape_GetConstraints(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (PyObject *)wxPyCompositeShape_GetConstraints(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (PyObject *)wxPyCompositeShape_GetConstraints(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }{
   _resultobj = _result;
 }
 }{
   _resultobj = _result;
 }
@@ -7908,7 +8147,7 @@ static PyObject *_wrap_wxPyCompositeShape_GetConstraints(PyObject *self, PyObjec
 
 static PyObject * wxPyCompositeShape_GetDivisions(wxPyCompositeShape *self) {
             wxList& list = self->GetDivisions();
 
 static PyObject * wxPyCompositeShape_GetDivisions(wxPyCompositeShape *self) {
             wxList& list = self->GetDivisions();
-            return wxPy_ConvertList(&list, "wxPyDivisionShape");
+            return wxPy_ConvertShapeList(&list, "wxPyDivisionShape");
         }
 static PyObject *_wrap_wxPyCompositeShape_GetDivisions(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
         }
 static PyObject *_wrap_wxPyCompositeShape_GetDivisions(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -7928,10 +8167,11 @@ static PyObject *_wrap_wxPyCompositeShape_GetDivisions(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (PyObject *)wxPyCompositeShape_GetDivisions(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (PyObject *)wxPyCompositeShape_GetDivisions(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }{
   _resultobj = _result;
 }
 }{
   _resultobj = _result;
 }
@@ -7956,10 +8196,11 @@ static PyObject *_wrap_wxPyCompositeShape_MakeContainer(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_MakeContainer(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_MakeContainer(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7984,10 +8225,11 @@ static PyObject *_wrap_wxPyCompositeShape_Recompute(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyCompositeShape_Recompute(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyCompositeShape_Recompute(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -8019,10 +8261,11 @@ static PyObject *_wrap_wxPyCompositeShape_RemoveChild(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_RemoveChild(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_RemoveChild(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8046,10 +8289,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDelete(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8082,10 +8326,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDraw(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8118,10 +8363,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawContents(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8157,10 +8403,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawBranches(PyObject *self, Py
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8193,10 +8440,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMoveLinks(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8229,10 +8477,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnErase(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8265,10 +8514,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEraseContents(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8301,10 +8551,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnHighlight(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8332,10 +8583,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnLeftClick(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8363,10 +8615,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnLeftDoubleClick(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8394,10 +8647,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnRightClick(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8423,10 +8677,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSize(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8467,10 +8722,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMovePre(PyObject *self, PyObjec
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyCompositeShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyCompositeShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -8509,10 +8765,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMovePost(PyObject *self, PyObje
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8543,10 +8800,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDragLeft(PyObject *self, PyObje
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8574,10 +8832,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnBeginDragLeft(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8605,10 +8864,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEndDragLeft(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8639,10 +8899,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDragRight(PyObject *self, PyObj
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8670,10 +8931,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnBeginDragRight(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8701,10 +8963,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEndDragRight(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8741,10 +9004,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawOutline(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8777,10 +9041,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnDrawControlPoints(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8813,10 +9078,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEraseControlPoints(PyObject *se
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8852,10 +9118,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnMoveLink(PyObject *self, PyObje
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8895,10 +9162,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSizingDragLeft(PyObject *self,
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8935,10 +9203,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSizingBeginDragLeft(PyObject *s
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -8975,10 +9244,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnSizingEndDragLeft(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9004,10 +9274,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnBeginSize(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9033,10 +9304,11 @@ static PyObject *_wrap_wxPyCompositeShape_base_OnEndSize(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyCompositeShape_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyCompositeShape_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9066,6 +9338,14 @@ static void *SwigwxPyDividedShapeTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyDividedShapeTowxObject(void *ptr) {
+    wxPyDividedShape *src;
+    wxObject *dest;
+    src = (wxPyDividedShape *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyDividedShape(_swigarg0,_swigarg1) (new wxPyDividedShape(_swigarg0,_swigarg1))
 static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyDividedShape(_swigarg0,_swigarg1) (new wxPyDividedShape(_swigarg0,_swigarg1))
 static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -9079,10 +9359,11 @@ static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|dd:new_wxPyDividedShape",_kwnames,&_arg0,&_arg1)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|dd:new_wxPyDividedShape",_kwnames,&_arg0,&_arg1)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDividedShape *)new_wxPyDividedShape(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDividedShape *)new_wxPyDividedShape(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDividedShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDividedShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -9093,8 +9374,8 @@ static PyObject *_wrap_new_wxPyDividedShape(PyObject *self, PyObject *args, PyOb
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyDividedShape__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyDividedShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyDividedShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyDividedShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyDividedShape * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyDividedShape * _arg0;
     PyObject * _arg1;
@@ -9105,12 +9386,12 @@ static PyObject *_wrap_wxPyDividedShape__setSelf(PyObject *self, PyObject *args,
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDividedShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDividedShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDividedShape_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDividedShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDividedShape__setSelf. Expected _wxPyDividedShape_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDividedShape__setCallbackInfo. Expected _wxPyDividedShape_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -9121,10 +9402,11 @@ static PyObject *_wrap_wxPyDividedShape__setSelf(PyObject *self, PyObject *args,
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9148,10 +9430,11 @@ static PyObject *_wrap_wxPyDividedShape_EditRegions(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_EditRegions(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_EditRegions(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9175,10 +9458,11 @@ static PyObject *_wrap_wxPyDividedShape_SetRegionSizes(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_SetRegionSizes(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_SetRegionSizes(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9202,10 +9486,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDelete(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9238,10 +9523,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDraw(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9274,10 +9560,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawContents(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9313,10 +9600,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawBranches(PyObject *self, PyOb
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9349,10 +9637,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMoveLinks(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9385,10 +9674,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnErase(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9421,10 +9711,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEraseContents(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9457,10 +9748,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnHighlight(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9488,10 +9780,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnLeftClick(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9519,10 +9812,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnLeftDoubleClick(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9550,10 +9844,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnRightClick(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9579,10 +9874,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSize(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9623,10 +9919,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMovePre(PyObject *self, PyObject
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyDividedShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyDividedShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -9665,10 +9962,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMovePost(PyObject *self, PyObject
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9699,10 +9997,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDragLeft(PyObject *self, PyObject
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9730,10 +10029,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnBeginDragLeft(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9761,10 +10061,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEndDragLeft(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9795,10 +10096,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDragRight(PyObject *self, PyObjec
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9826,10 +10128,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnBeginDragRight(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9857,10 +10160,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEndDragRight(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9897,10 +10201,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawOutline(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9933,10 +10238,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnDrawControlPoints(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -9969,10 +10275,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEraseControlPoints(PyObject *self
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10008,10 +10315,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnMoveLink(PyObject *self, PyObject
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10051,10 +10359,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSizingDragLeft(PyObject *self, Py
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10091,10 +10400,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSizingBeginDragLeft(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10131,10 +10441,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnSizingEndDragLeft(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10160,10 +10471,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnBeginSize(PyObject *self, PyObjec
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10189,10 +10501,11 @@ static PyObject *_wrap_wxPyDividedShape_base_OnEndSize(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDividedShape_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDividedShape_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10230,6 +10543,14 @@ static void *SwigwxPyDivisionShapeTowxPyShapeEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyDivisionShapeTowxObject(void *ptr) {
+    wxPyDivisionShape *src;
+    wxObject *dest;
+    src = (wxPyDivisionShape *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxPyDivisionShape() (new wxPyDivisionShape())
 static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxPyDivisionShape() (new wxPyDivisionShape())
 static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -10241,10 +10562,11 @@ static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyO
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyDivisionShape",_kwnames)) 
         return NULL;
 {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPyDivisionShape",_kwnames)) 
         return NULL;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDivisionShape *)new_wxPyDivisionShape();
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDivisionShape *)new_wxPyDivisionShape();
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -10255,8 +10577,8 @@ static PyObject *_wrap_new_wxPyDivisionShape(PyObject *self, PyObject *args, PyO
     return _resultobj;
 }
 
     return _resultobj;
 }
 
-#define wxPyDivisionShape__setSelf(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setSelf(_swigarg0,_swigarg1))
-static PyObject *_wrap_wxPyDivisionShape__setSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyDivisionShape__setCallbackInfo(_swigobj,_swigarg0,_swigarg1)  (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1))
+static PyObject *_wrap_wxPyDivisionShape__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxPyDivisionShape * _arg0;
     PyObject * _arg1;
     PyObject * _resultobj;
     wxPyDivisionShape * _arg0;
     PyObject * _arg1;
@@ -10267,12 +10589,12 @@ static PyObject *_wrap_wxPyDivisionShape__setSelf(PyObject *self, PyObject *args
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
     char *_kwnames[] = { "self","self","_class", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDivisionShape__setSelf",_kwnames,&_argo0,&_obj1,&_obj2)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyDivisionShape__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDivisionShape_p")) {
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyDivisionShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDivisionShape__setSelf. Expected _wxPyDivisionShape_p.");
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyDivisionShape__setCallbackInfo. Expected _wxPyDivisionShape_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
@@ -10283,10 +10605,11 @@ static PyObject *_wrap_wxPyDivisionShape__setSelf(PyObject *self, PyObject *args
   _arg2 = _obj2;
 }
 {
   _arg2 = _obj2;
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape__setSelf(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape__setCallbackInfo(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10314,10 +10637,11 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustBottom(PyObject *self, PyObject *
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_AdjustBottom(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_AdjustBottom(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10345,10 +10669,11 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustLeft(PyObject *self, PyObject *ar
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_AdjustLeft(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_AdjustLeft(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10376,10 +10701,11 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustRight(PyObject *self, PyObject *a
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_AdjustRight(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_AdjustRight(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10407,10 +10733,11 @@ static PyObject *_wrap_wxPyDivisionShape_AdjustTop(PyObject *self, PyObject *arg
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_AdjustTop(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_AdjustTop(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10435,10 +10762,11 @@ static PyObject *_wrap_wxPyDivisionShape_Divide(PyObject *self, PyObject *args,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_Divide(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_Divide(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10463,10 +10791,11 @@ static PyObject *_wrap_wxPyDivisionShape_EditEdge(PyObject *self, PyObject *args
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_EditEdge(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_EditEdge(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10479,7 +10808,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetBottomSide(PyObject *self, PyObject
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetBottomSide",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetBottomSide",_kwnames,&_argo0)) 
@@ -10492,17 +10820,12 @@ static PyObject *_wrap_wxPyDivisionShape_GetBottomSide(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -10525,10 +10848,11 @@ static PyObject *_wrap_wxPyDivisionShape_GetHandleSide(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (int )wxPyDivisionShape_GetHandleSide(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (int )wxPyDivisionShape_GetHandleSide(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -10540,7 +10864,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSide(PyObject *self, PyObject *a
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetLeftSide",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetLeftSide",_kwnames,&_argo0)) 
@@ -10553,17 +10876,12 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSide(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -10586,12 +10904,17 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSideColour(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = new wxString (wxPyDivisionShape_GetLeftSideColour(_arg0));
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = new wxString (wxPyDivisionShape_GetLeftSideColour(_arg0));
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }{
 }{
+#if wxUSE_UNICODE
+    _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+#else
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+#endif
 }
 {
     delete _result;
 }
 {
     delete _result;
@@ -10619,10 +10942,11 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSidePen(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPen *)wxPyDivisionShape_GetLeftSidePen(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPen *)wxPyDivisionShape_GetLeftSidePen(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -10640,7 +10964,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetRightSide(PyObject *self, PyObject *
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetRightSide",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetRightSide",_kwnames,&_argo0)) 
@@ -10653,17 +10976,12 @@ static PyObject *_wrap_wxPyDivisionShape_GetRightSide(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -10674,7 +10992,6 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSide(PyObject *self, PyObject *ar
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyDivisionShape * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetTopSide",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyDivisionShape_GetTopSide",_kwnames,&_argo0)) 
@@ -10687,17 +11004,12 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSide(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyDivisionShape_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -10721,10 +11033,11 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSidePen(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (wxPen *)wxPyDivisionShape_GetTopSidePen(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (wxPen *)wxPyDivisionShape_GetTopSidePen(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPen_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -10758,10 +11071,11 @@ static PyObject *_wrap_wxPyDivisionShape_ResizeAdjoining(PyObject *self, PyObjec
     }
     _arg3 = (bool ) tempbool3;
 {
     }
     _arg3 = (bool ) tempbool3;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_ResizeAdjoining(_arg0,_arg1,_arg2,_arg3);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_ResizeAdjoining(_arg0,_arg1,_arg2,_arg3);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10787,10 +11101,11 @@ static PyObject *_wrap_wxPyDivisionShape_PopupMenu(PyObject *self, PyObject *arg
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_PopupMenu(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_PopupMenu(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10823,10 +11138,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetBottomSide(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetBottomSide(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetBottomSide(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10851,10 +11167,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetHandleSide(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetHandleSide(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetHandleSide(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10887,10 +11204,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSide(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetLeftSide(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetLeftSide(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10916,17 +11234,16 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSideColour(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    if (!PyString_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+    _arg1 = wxString_in_helper(_obj1);
+    if (_arg1 == NULL)
         return NULL;
         return NULL;
-    }
-    _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetLeftSideColour(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetLeftSideColour(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -10942,11 +11259,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSidePen(PyObject *self, PyObject
     wxPyDivisionShape * _arg0;
     wxPen * _arg1;
     PyObject * _argo0 = 0;
     wxPyDivisionShape * _arg0;
     wxPen * _arg1;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","pen", NULL };
 
     self = self;
     char *_kwnames[] = { "self","pen", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetLeftSidePen",_kwnames,&_argo0,&_argo1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetLeftSidePen",_kwnames,&_argo0,&_obj1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -10955,18 +11272,28 @@ static PyObject *_wrap_wxPyDivisionShape_SetLeftSidePen(PyObject *self, PyObject
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDivisionShape_SetLeftSidePen. Expected _wxPen_p.");
+{
+    wxPen* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
+                                                temp->GetWidth(),
+                                                temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
 {
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetLeftSidePen(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetLeftSidePen(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -10999,10 +11326,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetRightSide(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetRightSide(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetRightSide(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11035,10 +11363,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSide(PyObject *self, PyObject *ar
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetTopSide(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetTopSide(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11064,17 +11393,16 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSideColour(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    if (!PyString_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+    _arg1 = wxString_in_helper(_obj1);
+    if (_arg1 == NULL)
         return NULL;
         return NULL;
-    }
-    _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
 }
 {
 }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetTopSideColour(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetTopSideColour(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -11090,11 +11418,11 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSidePen(PyObject *self, PyObject
     wxPyDivisionShape * _arg0;
     wxPen * _arg1;
     PyObject * _argo0 = 0;
     wxPyDivisionShape * _arg0;
     wxPen * _arg1;
     PyObject * _argo0 = 0;
-    PyObject * _argo1 = 0;
+    PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","pen", NULL };
 
     self = self;
     char *_kwnames[] = { "self","pen", NULL };
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetTopSidePen",_kwnames,&_argo0,&_argo1)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyDivisionShape_SetTopSidePen",_kwnames,&_argo0,&_obj1)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -11103,18 +11431,28 @@ static PyObject *_wrap_wxPyDivisionShape_SetTopSidePen(PyObject *self, PyObject
         return NULL;
         }
     }
         return NULL;
         }
     }
-    if (_argo1) {
-        if (_argo1 == Py_None) { _arg1 = NULL; }
-        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyDivisionShape_SetTopSidePen. Expected _wxPen_p.");
+{
+    wxPen* temp;
+    if (_obj1) {
+        if (_obj1 == Py_None) { temp = NULL; }
+        else if (SWIG_GetPtrObj(_obj1, (void **) &temp,"_wxPen_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error, expected _wxPen_p.");
         return NULL;
         }
     }
         return NULL;
         }
     }
+    if (temp)
+        _arg1 = wxThePenList->FindOrCreatePen(temp->GetColour(),
+                                                temp->GetWidth(),
+                                                temp->GetStyle());
+    else
+        _arg1 = NULL;
+}
 {
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_SetTopSidePen(_arg0,_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_SetTopSidePen(_arg0,_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11138,10 +11476,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDelete(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDelete(_arg0);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDelete(_arg0);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11174,10 +11513,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDraw(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDraw(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDraw(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11210,10 +11550,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawContents(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDrawContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDrawContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11249,10 +11590,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawBranches(PyObject *self, PyO
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDrawBranches(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11285,10 +11627,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMoveLinks(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnMoveLinks(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnMoveLinks(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11321,10 +11664,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnErase(PyObject *self, PyObject *
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnErase(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnErase(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11357,10 +11701,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEraseContents(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnEraseContents(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnEraseContents(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11393,10 +11738,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnHighlight(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnHighlight(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnHighlight(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11424,10 +11770,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnLeftClick(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnLeftClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11455,10 +11802,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnLeftDoubleClick(PyObject *self,
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnLeftDoubleClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11486,10 +11834,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnRightClick(PyObject *self, PyObj
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnRightClick(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11515,10 +11864,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSize(PyObject *self, PyObject *a
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11559,10 +11909,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMovePre(PyObject *self, PyObject
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        _result = (bool )wxPyDivisionShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    _result = (bool )wxPyDivisionShape_base_OnMovePre(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -11601,10 +11952,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMovePost(PyObject *self, PyObjec
     }
     _arg6 = (bool ) tempbool6;
 {
     }
     _arg6 = (bool ) tempbool6;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnMovePost(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11635,10 +11987,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDragLeft(PyObject *self, PyObjec
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11666,10 +12019,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnBeginDragLeft(PyObject *self, Py
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11697,10 +12051,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEndDragLeft(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11731,10 +12086,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDragRight(PyObject *self, PyObje
     }
     _arg1 = (bool ) tempbool1;
 {
     }
     _arg1 = (bool ) tempbool1;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDragRight(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11762,10 +12118,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnBeginDragRight(PyObject *self, P
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnBeginDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11793,10 +12150,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEndDragRight(PyObject *self, PyO
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnEndDragRight(_arg0,_arg1,_arg2,_arg3,_arg4);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11833,10 +12191,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawOutline(PyObject *self, PyOb
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDrawOutline(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11869,10 +12228,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnDrawControlPoints(PyObject *self
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnDrawControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnDrawControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11905,10 +12265,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEraseControlPoints(PyObject *sel
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnEraseControlPoints(_arg0,*_arg1);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnEraseControlPoints(_arg0,*_arg1);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11944,10 +12305,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnMoveLink(PyObject *self, PyObjec
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnMoveLink(_arg0,*_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -11987,10 +12349,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSizingDragLeft(PyObject *self, P
     }
     _arg2 = (bool ) tempbool2;
 {
     }
     _arg2 = (bool ) tempbool2;
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnSizingDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -12027,10 +12390,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSizingBeginDragLeft(PyObject *se
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnSizingBeginDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -12067,10 +12431,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnSizingEndDragLeft(PyObject *self
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnSizingEndDragLeft(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -12096,10 +12461,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnBeginSize(PyObject *self, PyObje
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnBeginSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnBeginSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -12125,10 +12491,11 @@ static PyObject *_wrap_wxPyDivisionShape_base_OnEndSize(PyObject *self, PyObject
         }
     }
 {
         }
     }
 {
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyDivisionShape_base_OnEndSize(_arg0,_arg1,_arg2);
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxPyDivisionShape_base_OnEndSize(_arg0,_arg1,_arg2);
 
 
-    wxPy_END_ALLOW_THREADS;
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -12189,7 +12556,7 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyDivisionShape_AdjustRight", (PyCFunction) _wrap_wxPyDivisionShape_AdjustRight, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDivisionShape_AdjustLeft", (PyCFunction) _wrap_wxPyDivisionShape_AdjustLeft, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDivisionShape_AdjustBottom", (PyCFunction) _wrap_wxPyDivisionShape_AdjustBottom, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDivisionShape_AdjustRight", (PyCFunction) _wrap_wxPyDivisionShape_AdjustRight, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDivisionShape_AdjustLeft", (PyCFunction) _wrap_wxPyDivisionShape_AdjustLeft, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDivisionShape_AdjustBottom", (PyCFunction) _wrap_wxPyDivisionShape_AdjustBottom, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyDivisionShape__setSelf", (PyCFunction) _wrap_wxPyDivisionShape__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyDivisionShape__setCallbackInfo", (PyCFunction) _wrap_wxPyDivisionShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyDivisionShape", (PyCFunction) _wrap_new_wxPyDivisionShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_base_OnEndSize", (PyCFunction) _wrap_wxPyDividedShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyDividedShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyDivisionShape", (PyCFunction) _wrap_new_wxPyDivisionShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_base_OnEndSize", (PyCFunction) _wrap_wxPyDividedShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyDividedShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -12222,7 +12589,7 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyDividedShape_base_OnDelete", (PyCFunction) _wrap_wxPyDividedShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_SetRegionSizes", (PyCFunction) _wrap_wxPyDividedShape_SetRegionSizes, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_EditRegions", (PyCFunction) _wrap_wxPyDividedShape_EditRegions, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_base_OnDelete", (PyCFunction) _wrap_wxPyDividedShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_SetRegionSizes", (PyCFunction) _wrap_wxPyDividedShape_SetRegionSizes, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDividedShape_EditRegions", (PyCFunction) _wrap_wxPyDividedShape_EditRegions, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyDividedShape__setSelf", (PyCFunction) _wrap_wxPyDividedShape__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyDividedShape__setCallbackInfo", (PyCFunction) _wrap_wxPyDividedShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyDividedShape", (PyCFunction) _wrap_new_wxPyDividedShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_base_OnEndSize", (PyCFunction) _wrap_wxPyCompositeShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyCompositeShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyDividedShape", (PyCFunction) _wrap_new_wxPyDividedShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_base_OnEndSize", (PyCFunction) _wrap_wxPyCompositeShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyCompositeShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -12267,12 +12634,11 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyCompositeShape_AddConstrainedShapes", (PyCFunction) _wrap_wxPyCompositeShape_AddConstrainedShapes, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_AddConstraint", (PyCFunction) _wrap_wxPyCompositeShape_AddConstraint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_AddChild", (PyCFunction) _wrap_wxPyCompositeShape_AddChild, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_AddConstrainedShapes", (PyCFunction) _wrap_wxPyCompositeShape_AddConstrainedShapes, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_AddConstraint", (PyCFunction) _wrap_wxPyCompositeShape_AddConstraint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyCompositeShape_AddChild", (PyCFunction) _wrap_wxPyCompositeShape_AddChild, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyCompositeShape__setSelf", (PyCFunction) _wrap_wxPyCompositeShape__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyCompositeShape__setCallbackInfo", (PyCFunction) _wrap_wxPyCompositeShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyCompositeShape", (PyCFunction) _wrap_new_wxPyCompositeShape, METH_VARARGS | METH_KEYWORDS },
         { "wxOGLConstraint_Equals", (PyCFunction) _wrap_wxOGLConstraint_Equals, METH_VARARGS | METH_KEYWORDS },
         { "wxOGLConstraint_SetSpacing", (PyCFunction) _wrap_wxOGLConstraint_SetSpacing, METH_VARARGS | METH_KEYWORDS },
         { "wxOGLConstraint_Evaluate", (PyCFunction) _wrap_wxOGLConstraint_Evaluate, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyCompositeShape", (PyCFunction) _wrap_new_wxPyCompositeShape, METH_VARARGS | METH_KEYWORDS },
         { "wxOGLConstraint_Equals", (PyCFunction) _wrap_wxOGLConstraint_Equals, METH_VARARGS | METH_KEYWORDS },
         { "wxOGLConstraint_SetSpacing", (PyCFunction) _wrap_wxOGLConstraint_SetSpacing, METH_VARARGS | METH_KEYWORDS },
         { "wxOGLConstraint_Evaluate", (PyCFunction) _wrap_wxOGLConstraint_Evaluate, METH_VARARGS | METH_KEYWORDS },
-        { "delete_wxOGLConstraint", (PyCFunction) _wrap_delete_wxOGLConstraint, METH_VARARGS | METH_KEYWORDS },
         { "new_wxOGLConstraint", (PyCFunction) _wrap_new_wxOGLConstraint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_base_OnEndSize", (PyCFunction) _wrap_wxPyDrawnShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyDrawnShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
         { "new_wxOGLConstraint", (PyCFunction) _wrap_new_wxOGLConstraint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_base_OnEndSize", (PyCFunction) _wrap_wxPyDrawnShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyDrawnShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -12331,7 +12697,7 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyDrawnShape_DrawArc", (PyCFunction) _wrap_wxPyDrawnShape_DrawArc, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_DestroyClippingRect", (PyCFunction) _wrap_wxPyDrawnShape_DestroyClippingRect, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_CalculateSize", (PyCFunction) _wrap_wxPyDrawnShape_CalculateSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_DrawArc", (PyCFunction) _wrap_wxPyDrawnShape_DrawArc, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_DestroyClippingRect", (PyCFunction) _wrap_wxPyDrawnShape_DestroyClippingRect, METH_VARARGS | METH_KEYWORDS },
         { "wxPyDrawnShape_CalculateSize", (PyCFunction) _wrap_wxPyDrawnShape_CalculateSize, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyDrawnShape__setSelf", (PyCFunction) _wrap_wxPyDrawnShape__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyDrawnShape__setCallbackInfo", (PyCFunction) _wrap_wxPyDrawnShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyDrawnShape", (PyCFunction) _wrap_new_wxPyDrawnShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_base_OnEndSize", (PyCFunction) _wrap_wxPyBitmapShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyBitmapShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyDrawnShape", (PyCFunction) _wrap_new_wxPyDrawnShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_base_OnEndSize", (PyCFunction) _wrap_wxPyBitmapShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyBitmapShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -12366,7 +12732,7 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyBitmapShape_SetBitmap", (PyCFunction) _wrap_wxPyBitmapShape_SetBitmap, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_GetFilename", (PyCFunction) _wrap_wxPyBitmapShape_GetFilename, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_GetBitmap", (PyCFunction) _wrap_wxPyBitmapShape_GetBitmap, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_SetBitmap", (PyCFunction) _wrap_wxPyBitmapShape_SetBitmap, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_GetFilename", (PyCFunction) _wrap_wxPyBitmapShape_GetFilename, METH_VARARGS | METH_KEYWORDS },
         { "wxPyBitmapShape_GetBitmap", (PyCFunction) _wrap_wxPyBitmapShape_GetBitmap, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyBitmapShape__setSelf", (PyCFunction) _wrap_wxPyBitmapShape__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyBitmapShape__setCallbackInfo", (PyCFunction) _wrap_wxPyBitmapShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyBitmapShape", (PyCFunction) _wrap_new_wxPyBitmapShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnEndSize", (PyCFunction) _wrap_wxPyControlPoint_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnBeginSize", (PyCFunction) _wrap_wxPyControlPoint_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyBitmapShape", (PyCFunction) _wrap_new_wxPyBitmapShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnEndSize", (PyCFunction) _wrap_wxPyControlPoint_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnBeginSize", (PyCFunction) _wrap_wxPyControlPoint_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -12398,7 +12764,7 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyControlPoint_base_OnDraw", (PyCFunction) _wrap_wxPyControlPoint_base_OnDraw, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnDelete", (PyCFunction) _wrap_wxPyControlPoint_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_SetCornerRadius", (PyCFunction) _wrap_wxPyControlPoint_SetCornerRadius, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnDraw", (PyCFunction) _wrap_wxPyControlPoint_base_OnDraw, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_base_OnDelete", (PyCFunction) _wrap_wxPyControlPoint_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
         { "wxPyControlPoint_SetCornerRadius", (PyCFunction) _wrap_wxPyControlPoint_SetCornerRadius, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyControlPoint__setSelf", (PyCFunction) _wrap_wxPyControlPoint__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyControlPoint__setCallbackInfo", (PyCFunction) _wrap_wxPyControlPoint__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyControlPoint", (PyCFunction) _wrap_new_wxPyControlPoint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnEndSize", (PyCFunction) _wrap_wxPyRectangleShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyRectangleShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyControlPoint", (PyCFunction) _wrap_new_wxPyControlPoint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnEndSize", (PyCFunction) _wrap_wxPyRectangleShape_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnBeginSize", (PyCFunction) _wrap_wxPyRectangleShape_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -12430,7 +12796,7 @@ static PyMethodDef oglshapescMethods[] = {
         { "wxPyRectangleShape_base_OnDraw", (PyCFunction) _wrap_wxPyRectangleShape_base_OnDraw, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnDelete", (PyCFunction) _wrap_wxPyRectangleShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_SetCornerRadius", (PyCFunction) _wrap_wxPyRectangleShape_SetCornerRadius, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnDraw", (PyCFunction) _wrap_wxPyRectangleShape_base_OnDraw, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_base_OnDelete", (PyCFunction) _wrap_wxPyRectangleShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
         { "wxPyRectangleShape_SetCornerRadius", (PyCFunction) _wrap_wxPyRectangleShape_SetCornerRadius, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyRectangleShape__setSelf", (PyCFunction) _wrap_wxPyRectangleShape__setSelf, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyRectangleShape__setCallbackInfo", (PyCFunction) _wrap_wxPyRectangleShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyRectangleShape", (PyCFunction) _wrap_new_wxPyRectangleShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPseudoMetaFile_SetBackgroundMode", (PyCFunction) _wrap_wxPseudoMetaFile_SetBackgroundMode, METH_VARARGS | METH_KEYWORDS },
         { "wxPseudoMetaFile_SetBackgroundColour", (PyCFunction) _wrap_wxPseudoMetaFile_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyRectangleShape", (PyCFunction) _wrap_new_wxPyRectangleShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPseudoMetaFile_SetBackgroundMode", (PyCFunction) _wrap_wxPseudoMetaFile_SetBackgroundMode, METH_VARARGS | METH_KEYWORDS },
         { "wxPseudoMetaFile_SetBackgroundColour", (PyCFunction) _wrap_wxPseudoMetaFile_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
@@ -12484,18 +12850,7 @@ static PyMethodDef oglshapescMethods[] = {
  * This table is used by the pointer type-checker
  */
 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
  * This table is used by the pointer type-checker
  */
 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
-    { "_wxAcceleratorTable","_class_wxAcceleratorTable",0},
-    { "_wxEvent","_class_wxEvent",0},
-    { "_class_wxActivateEvent","_wxActivateEvent",0},
     { "_signed_long","_long",0},
     { "_signed_long","_long",0},
-    { "_wxMenuEvent","_class_wxMenuEvent",0},
-    { "_class_wxJPEGHandler","_wxJPEGHandler",0},
-    { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0},
-    { "_wxBitmapDataObject","_class_wxBitmapDataObject",0},
-    { "_class_wxPyCommandEvent","_wxPyCommandEvent",0},
-    { "_wxBMPHandler","_class_wxBMPHandler",0},
-    { "_wxImage","_class_wxImage",0},
-    { "_wxFlexGridSizer","_class_wxFlexGridSizer",0},
     { "_wxPrintQuality","_wxCoord",0},
     { "_wxPrintQuality","_int",0},
     { "_wxPrintQuality","_signed_int",0},
     { "_wxPrintQuality","_wxCoord",0},
     { "_wxPrintQuality","_int",0},
     { "_wxPrintQuality","_signed_int",0},
@@ -12504,432 +12859,105 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxPrintQuality","_uint",0},
     { "_wxPrintQuality","_EBool",0},
     { "_wxPrintQuality","_size_t",0},
     { "_wxPrintQuality","_uint",0},
     { "_wxPrintQuality","_EBool",0},
     { "_wxPrintQuality","_size_t",0},
-    { "_class_wxCustomDataObject","_wxCustomDataObject",0},
-    { "_wxFontData","_class_wxFontData",0},
-    { "_class_wxRegionIterator","_wxRegionIterator",0},
-    { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0},
-    { "_class_wxMenuBar","_wxMenuBar",0},
-    { "_class_wxPyTreeItemData","_wxPyTreeItemData",0},
-    { "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0},
-    { "_class_wxEvtHandler","_wxEvtHandler",0},
-    { "_wxPaintEvent","_class_wxPaintEvent",0},
-    { "_wxGIFHandler","_class_wxGIFHandler",0},
-    { "_wxPySizer","_class_wxPySizer",0},
-    { "_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape},
+    { "_wxPrintQuality","_time_t",0},
     { "_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape},
     { "_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape},
-    { "_wxPyCompositeShape","_class_wxPyCompositeShape",0},
-    { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0},
-    { "_wxCursor","_class_wxCursor",0},
-    { "_wxNotifyEvent","_class_wxNotifyEvent",0},
-    { "_wxImageHandler","_class_wxImageHandler",0},
-    { "_class_wxPyRectangleShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
-    { "_class_wxPyRectangleShape","_wxPyRectangleShape",0},
-    { "_class_wxToolBarBase","_wxToolBarBase",0},
-    { "_class_wxTreeCtrl","_wxTreeCtrl",0},
-    { "_wxMask","_class_wxMask",0},
-    { "_wxToolTip","_class_wxToolTip",0},
-    { "_wxPNGHandler","_class_wxPNGHandler",0},
-    { "_class_wxOGLConstraint","_wxOGLConstraint",0},
-    { "_class_wxColourData","_wxColourData",0},
-    { "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0},
-    { "_wxPrinter","_class_wxPrinter",0},
-    { "_wxPseudoMetaFile","_class_wxPseudoMetaFile",0},
-    { "_wxPen","_class_wxPen",0},
-    { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0},
-    { "_class_wxNotebookSizer","_wxNotebookSizer",0},
     { "_byte","_unsigned_char",0},
     { "_byte","_unsigned_char",0},
-    { "_wxDataObject","_class_wxDataObject",0},
-    { "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
-    { "_wxStaticBox","_class_wxStaticBox",0},
-    { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
-    { "_wxPyDropSource","_class_wxPyDropSource",0},
-    { "_wxChoice","_class_wxChoice",0},
-    { "_wxSlider","_class_wxSlider",0},
-    { "_wxNotebookEvent","_class_wxNotebookEvent",0},
-    { "_wxPyPrintout","_class_wxPyPrintout",0},
-    { "_wxShapeRegion","_class_wxShapeRegion",0},
     { "_long","_unsigned_long",0},
     { "_long","_signed_long",0},
     { "_long","_unsigned_long",0},
     { "_long","_signed_long",0},
-    { "_wxImageList","_class_wxImageList",0},
-    { "_wxDataObjectSimple","_class_wxDataObjectSimple",0},
-    { "_wxDropFilesEvent","_class_wxDropFilesEvent",0},
-    { "_wxBitmapButton","_class_wxBitmapButton",0},
-    { "_wxSashWindow","_class_wxSashWindow",0},
-    { "_class_wxSizer","_wxSizer",0},
-    { "_class_wxTIFFHandler","_wxTIFFHandler",0},
-    { "_class_wxPrintDialogData","_wxPrintDialogData",0},
-    { "_wxGridSizer","_class_wxGridSizer",0},
-    { "_class_wxAcceleratorTable","_wxAcceleratorTable",0},
-    { "_class_wxClipboard","_wxClipboard",0},
-    { "_class_wxGauge","_wxGauge",0},
-    { "_class_wxSashEvent","_wxSashEvent",0},
-    { "_wxDC","_class_wxDC",0},
-    { "_wxSizerItem","_class_wxSizerItem",0},
-    { "_class_wxBitmapDataObject","_wxBitmapDataObject",0},
-    { "_wxListEvent","_class_wxListEvent",0},
-    { "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0},
-    { "_wxProgressDialog","_class_wxProgressDialog",0},
-    { "_class_wxBMPHandler","_wxBMPHandler",0},
-    { "_wxPrintPreview","_class_wxPrintPreview",0},
-    { "_class_wxFlexGridSizer","_wxFlexGridSizer",0},
-    { "_wxSpinEvent","_class_wxSpinEvent",0},
-    { "_wxSashLayoutWindow","_class_wxSashLayoutWindow",0},
-    { "_wxPyBitmapShape","_class_wxPyBitmapShape",0},
     { "_size_t","_wxCoord",0},
     { "_size_t","_wxPrintQuality",0},
     { "_size_t","_wxCoord",0},
     { "_size_t","_wxPrintQuality",0},
+    { "_size_t","_time_t",0},
     { "_size_t","_unsigned_int",0},
     { "_size_t","_int",0},
     { "_size_t","_wxWindowID",0},
     { "_size_t","_uint",0},
     { "_size_t","_unsigned_int",0},
     { "_size_t","_int",0},
     { "_size_t","_wxWindowID",0},
     { "_size_t","_uint",0},
-    { "_class_wxRealPoint","_wxRealPoint",0},
-    { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0},
-    { "_wxPNMHandler","_class_wxPNMHandler",0},
-    { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler},
-    { "_class_wxPyShapeEvtHandler","_wxPyShapeEvtHandler",0},
-    { "_class_wxMenuItem","_wxMenuItem",0},
-    { "_class_wxPaintEvent","_wxPaintEvent",0},
-    { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
-    { "_class_wxStatusBar","_wxStatusBar",0},
-    { "_class_wxGIFHandler","_wxGIFHandler",0},
-    { "_class_wxPySizer","_wxPySizer",0},
-    { "_class_wxPyCompositeShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape},
-    { "_class_wxPyCompositeShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyCompositeShape},
-    { "_class_wxPyCompositeShape","_wxPyCompositeShape",0},
-    { "_class_wxPostScriptDC","_wxPostScriptDC",0},
-    { "_wxPanel","_class_wxPanel",0},
-    { "_wxInitDialogEvent","_class_wxInitDialogEvent",0},
-    { "_wxCheckBox","_class_wxCheckBox",0},
-    { "_wxPyEvent","_class_wxPyEvent",0},
-    { "_wxTextCtrl","_class_wxTextCtrl",0},
-    { "_class_wxMask","_wxMask",0},
-    { "_wxTextDataObject","_class_wxTextDataObject",0},
-    { "_class_wxKeyEvent","_wxKeyEvent",0},
-    { "_class_wxToolTip","_wxToolTip",0},
-    { "_class_wxPNGHandler","_wxPNGHandler",0},
-    { "_wxColour","_class_wxColour",0},
-    { "_class_wxDialog","_wxDialog",0},
-    { "_wxBusyCursor","_class_wxBusyCursor",0},
-    { "_wxPageSetupDialog","_class_wxPageSetupDialog",0},
-    { "_class_wxPrinter","_wxPrinter",0},
-    { "_class_wxFileDataObject","_wxFileDataObject",0},
-    { "_wxIdleEvent","_class_wxIdleEvent",0},
-    { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
-    { "_wxToolBar","_class_wxToolBar",0},
-    { "_class_wxDataObject","_wxDataObject",0},
-    { "_wxCaret","_class_wxCaret",0},
-    { "_wxStaticLine","_class_wxStaticLine",0},
-    { "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
-    { "_wxBrush","_class_wxBrush",0},
-    { "_wxMiniFrame","_class_wxMiniFrame",0},
-    { "_class_wxNotebookEvent","_wxNotebookEvent",0},
-    { "_class_wxPyPrintout","_wxPyPrintout",0},
-    { "_wxDataFormat","_class_wxDataFormat",0},
-    { "_class_wxDataObjectSimple","_wxDataObjectSimple",0},
-    { "_class_wxSashWindow","_wxSashWindow",0},
-    { "_wxShowEvent","_class_wxShowEvent",0},
-    { "_class_wxPyDivisionShape","_wxPyDivisionShape",0},
     { "_uint","_wxCoord",0},
     { "_uint","_wxPrintQuality",0},
     { "_uint","_wxCoord",0},
     { "_uint","_wxPrintQuality",0},
+    { "_uint","_time_t",0},
     { "_uint","_size_t",0},
     { "_uint","_unsigned_int",0},
     { "_uint","_int",0},
     { "_uint","_wxWindowID",0},
     { "_uint","_size_t",0},
     { "_uint","_unsigned_int",0},
     { "_uint","_int",0},
     { "_uint","_wxWindowID",0},
-    { "_wxPyValidator","_class_wxPyValidator",0},
-    { "_class_wxEvent","_wxEvent",0},
-    { "_wxCheckListBox","_class_wxCheckListBox",0},
-    { "_wxSplitterEvent","_class_wxSplitterEvent",0},
-    { "_wxRect","_class_wxRect",0},
-    { "_wxCommandEvent","_class_wxCommandEvent",0},
-    { "_wxSizeEvent","_class_wxSizeEvent",0},
-    { "_class_wxImage","_wxImage",0},
-    { "_wxPoint","_class_wxPoint",0},
-    { "_class_wxSashLayoutWindow","_wxSashLayoutWindow",0},
-    { "_class_wxPyBitmapShape","_wxPyBitmapShape",0},
-    { "_class_wxButton","_wxButton",0},
-    { "_wxRadioBox","_class_wxRadioBox",0},
-    { "_class_wxFontData","_wxFontData",0},
-    { "_class_wxPNMHandler","_wxPNMHandler",0},
-    { "_wxBoxSizer","_class_wxBoxSizer",0},
-    { "_wxBitmap","_class_wxBitmap",0},
-    { "_wxPrintDialog","_class_wxPrintDialog",0},
-    { "_wxPyControlPoint","_class_wxPyControlPoint",0},
-    { "_wxPyTimer","_class_wxPyTimer",0},
-    { "_wxWindowDC","_class_wxWindowDC",0},
-    { "_wxScrollBar","_class_wxScrollBar",0},
-    { "_wxSpinButton","_class_wxSpinButton",0},
-    { "_wxColourDialog","_class_wxColourDialog",0},
-    { "_wxPrintData","_class_wxPrintData",0},
-    { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
-    { "_class_wxNotifyEvent","_wxNotifyEvent",0},
-    { "_wxMessageDialog","_class_wxMessageDialog",0},
-    { "_class_wxValidator","_wxValidator",0},
-    { "_class_wxPyEvent","_wxPyEvent",0},
-    { "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
-    { "_class_wxIconizeEvent","_wxIconizeEvent",0},
-    { "_class_wxStaticBitmap","_wxStaticBitmap",0},
-    { "_class_wxPyDrawnShape","_wxPyDrawnShape",0},
-    { "_class_wxBusyCursor","_wxBusyCursor",0},
-    { "_wxToolBarSimple","_class_wxToolBarSimple",0},
-    { "_wxMDIChildFrame","_class_wxMDIChildFrame",0},
-    { "_wxListItem","_class_wxListItem",0},
-    { "_class_wxPseudoMetaFile","_wxPseudoMetaFile",0},
-    { "_class_wxToolBar","_wxToolBar",0},
-    { "_wxDropTarget","_class_wxDropTarget",0},
-    { "_class_wxStaticLine","_wxStaticLine",0},
-    { "_wxScrollEvent","_class_wxScrollEvent",0},
-    { "_wxToolBarToolBase","_class_wxToolBarToolBase",0},
-    { "_wxCalculateLayoutEvent","_class_wxCalculateLayoutEvent",0},
-    { "_class_wxShapeRegion","_wxShapeRegion",0},
+    { "_wxChar","_char",0},
+    { "_char","_wxChar",0},
+    { "_struct_wxNativeFontInfo","_wxNativeFontInfo",0},
     { "_EBool","_wxCoord",0},
     { "_EBool","_wxPrintQuality",0},
     { "_EBool","_signed_int",0},
     { "_EBool","_int",0},
     { "_EBool","_wxWindowID",0},
     { "_EBool","_wxCoord",0},
     { "_EBool","_wxPrintQuality",0},
     { "_EBool","_signed_int",0},
     { "_EBool","_int",0},
     { "_EBool","_wxWindowID",0},
-    { "_class_wxRegion","_wxRegion",0},
-    { "_class_wxDataFormat","_wxDataFormat",0},
-    { "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
-    { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
-    { "_class_wxPreviewFrame","_wxPreviewFrame",0},
-    { "_wxStaticText","_class_wxStaticText",0},
-    { "_wxFont","_class_wxFont",0},
-    { "_class_wxPyDropTarget","_wxPyDropTarget",0},
-    { "_wxCloseEvent","_class_wxCloseEvent",0},
-    { "_class_wxSplitterEvent","_wxSplitterEvent",0},
-    { "_wxNotebook","_class_wxNotebook",0},
     { "_unsigned_long","_long",0},
     { "_unsigned_long","_long",0},
-    { "_class_wxRect","_wxRect",0},
-    { "_class_wxDC","_wxDC",0},
-    { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
-    { "_class_wxProgressDialog","_wxProgressDialog",0},
-    { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
-    { "_wxPyApp","_class_wxPyApp",0},
-    { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
-    { "_wxMDIParentFrame","_class_wxMDIParentFrame",0},
-    { "_class_wxTreeEvent","_wxTreeEvent",0},
-    { "_class_wxDirDialog","_wxDirDialog",0},
-    { "_class_wxPyTimer","_wxPyTimer",0},
-    { "_wxFocusEvent","_class_wxFocusEvent",0},
-    { "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
-    { "_class_wxSpinButton","_wxSpinButton",0},
-    { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0},
-    { "_class_wxPanel","_wxPanel",0},
-    { "_class_wxCheckBox","_wxCheckBox",0},
-    { "_wxComboBox","_class_wxComboBox",0},
-    { "_wxRadioButton","_class_wxRadioButton",0},
-    { "_class_wxMessageDialog","_wxMessageDialog",0},
+    { "_wxNativeFontInfo","_struct_wxNativeFontInfo",0},
     { "_signed_int","_wxCoord",0},
     { "_signed_int","_wxPrintQuality",0},
     { "_signed_int","_EBool",0},
     { "_signed_int","_wxWindowID",0},
     { "_signed_int","_int",0},
     { "_signed_int","_wxCoord",0},
     { "_signed_int","_wxPrintQuality",0},
     { "_signed_int","_EBool",0},
     { "_signed_int","_wxWindowID",0},
     { "_signed_int","_int",0},
-    { "_class_wxTextCtrl","_wxTextCtrl",0},
-    { "_class_wxListItemAttr","_wxListItemAttr",0},
-    { "_wxLayoutConstraints","_class_wxLayoutConstraints",0},
-    { "_class_wxTextDataObject","_wxTextDataObject",0},
-    { "_wxMenu","_class_wxMenu",0},
-    { "_class_wxMoveEvent","_wxMoveEvent",0},
-    { "_wxListBox","_class_wxListBox",0},
-    { "_wxScreenDC","_class_wxScreenDC",0},
-    { "_class_wxToolBarSimple","_wxToolBarSimple",0},
-    { "_class_wxMDIChildFrame","_wxMDIChildFrame",0},
+    { "_WXTYPE","_wxDateTime_t",0},
     { "_WXTYPE","_short",0},
     { "_WXTYPE","_signed_short",0},
     { "_WXTYPE","_unsigned_short",0},
     { "_WXTYPE","_short",0},
     { "_WXTYPE","_signed_short",0},
     { "_WXTYPE","_unsigned_short",0},
-    { "_wxFileDialog","_class_wxFileDialog",0},
-    { "_class_wxDropTarget","_wxDropTarget",0},
-    { "_class_wxCaret","_wxCaret",0},
-    { "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
-    { "_class_wxBrush","_wxBrush",0},
-    { "_wxTipProvider","_class_wxTipProvider",0},
+    { "_unsigned_short","_wxDateTime_t",0},
     { "_unsigned_short","_WXTYPE",0},
     { "_unsigned_short","_short",0},
     { "_unsigned_short","_WXTYPE",0},
     { "_unsigned_short","_short",0},
-    { "_class_wxWindow","_wxWindow",0},
-    { "_wxSplitterWindow","_class_wxSplitterWindow",0},
-    { "_class_wxStaticText","_wxStaticText",0},
-    { "_wxPrintDialogData","_class_wxPrintDialogData",0},
-    { "_class_wxFont","_wxFont",0},
-    { "_wxClipboard","_class_wxClipboard",0},
-    { "_class_wxPyValidator","_wxPyValidator",0},
-    { "_class_wxCloseEvent","_wxCloseEvent",0},
-    { "_wxSashEvent","_class_wxSashEvent",0},
-    { "_wxBusyInfo","_class_wxBusyInfo",0},
-    { "_class_wxMenuEvent","_wxMenuEvent",0},
-    { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
-    { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
-    { "_wxClientDC","_class_wxClientDC",0},
-    { "_wxMouseEvent","_class_wxMouseEvent",0},
-    { "_wxListCtrl","_class_wxListCtrl",0},
-    { "_wxSingleChoiceDialog","_class_wxSingleChoiceDialog",0},
-    { "_wxPyDividedShape","_class_wxPyDividedShape",0},
-    { "_class_wxPoint","_wxPoint",0},
-    { "_wxRealPoint","_class_wxRealPoint",0},
-    { "_class_wxRadioBox","_wxRadioBox",0},
-    { "_class_wxBoxSizer","_wxBoxSizer",0},
+    { "_wxObject","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxObject},
+    { "_wxObject","_wxPyDividedShape",SwigwxPyDividedShapeTowxObject},
+    { "_wxObject","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxObject},
+    { "_wxObject","_wxOGLConstraint",SwigwxOGLConstraintTowxObject},
+    { "_wxObject","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxObject},
+    { "_wxObject","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxObject},
+    { "_wxObject","_wxPyControlPoint",SwigwxPyControlPointTowxObject},
+    { "_wxObject","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxObject},
+    { "_wxObject","_wxPseudoMetaFile",SwigwxPseudoMetaFileTowxObject},
     { "_signed_short","_WXTYPE",0},
     { "_signed_short","_short",0},
     { "_signed_short","_WXTYPE",0},
     { "_signed_short","_short",0},
-    { "_wxMemoryDC","_class_wxMemoryDC",0},
-    { "_wxPyTextDataObject","_class_wxPyTextDataObject",0},
-    { "_class_wxPrintDialog","_wxPrintDialog",0},
-    { "_class_wxPyControlPoint","_wxPyControlPoint",0},
-    { "_wxPaintDC","_class_wxPaintDC",0},
-    { "_class_wxWindowDC","_wxWindowDC",0},
-    { "_class_wxFocusEvent","_wxFocusEvent",0},
-    { "_class_wxMaximizeEvent","_wxMaximizeEvent",0},
-    { "_wxStatusBar","_class_wxStatusBar",0},
-    { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0},
-    { "_class_wxCursor","_wxCursor",0},
-    { "_wxPostScriptDC","_class_wxPostScriptDC",0},
-    { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0},
-    { "_class_wxImageHandler","_wxImageHandler",0},
-    { "_wxPyShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape},
     { "_wxPyShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape},
     { "_wxPyShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape},
-    { "_wxPyShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape},
     { "_wxPyShape","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape},
     { "_wxPyShape","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape},
-    { "_wxPyShape","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShape},
     { "_wxPyShape","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShape},
     { "_wxPyShape","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShape},
-    { "_wxPyShape","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShape},
     { "_wxPyShape","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShape},
     { "_wxPyShape","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShape},
-    { "_wxPyShape","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShape},
     { "_wxPyShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShape},
     { "_wxPyShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShape},
-    { "_wxPyShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyShape},
     { "_wxPyShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyShape},
     { "_wxPyShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyShape},
-    { "_wxPyShape","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
     { "_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
     { "_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
-    { "_wxPyShape","_class_wxPyShape",0},
-    { "_wxScrolledWindow","_class_wxScrolledWindow",0},
-    { "_wxTreeItemId","_class_wxTreeItemId",0},
     { "_unsigned_char","_byte",0},
     { "_unsigned_char","_byte",0},
-    { "_class_wxMenu","_wxMenu",0},
-    { "_wxControl","_class_wxControl",0},
-    { "_class_wxListBox","_wxListBox",0},
     { "_unsigned_int","_wxCoord",0},
     { "_unsigned_int","_wxPrintQuality",0},
     { "_unsigned_int","_wxCoord",0},
     { "_unsigned_int","_wxPrintQuality",0},
+    { "_unsigned_int","_time_t",0},
     { "_unsigned_int","_size_t",0},
     { "_unsigned_int","_uint",0},
     { "_unsigned_int","_wxWindowID",0},
     { "_unsigned_int","_int",0},
     { "_unsigned_int","_size_t",0},
     { "_unsigned_int","_uint",0},
     { "_unsigned_int","_wxWindowID",0},
     { "_unsigned_int","_int",0},
-    { "_wxIcon","_class_wxIcon",0},
-    { "_wxDialog","_class_wxDialog",0},
-    { "_class_wxListItem","_wxListItem",0},
-    { "_class_wxPen","_wxPen",0},
-    { "_class_wxFileDialog","_wxFileDialog",0},
-    { "_wxQueryLayoutInfoEvent","_class_wxQueryLayoutInfoEvent",0},
+    { "_short","_wxDateTime_t",0},
     { "_short","_WXTYPE",0},
     { "_short","_unsigned_short",0},
     { "_short","_signed_short",0},
     { "_short","_WXTYPE",0},
     { "_short","_unsigned_short",0},
     { "_short","_signed_short",0},
-    { "_class_wxStaticBox","_wxStaticBox",0},
-    { "_wxLayoutAlgorithm","_class_wxLayoutAlgorithm",0},
-    { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
-    { "_class_wxPyDropSource","_wxPyDropSource",0},
-    { "_class_wxScrollEvent","_wxScrollEvent",0},
-    { "_wxJoystickEvent","_class_wxJoystickEvent",0},
-    { "_class_wxChoice","_wxChoice",0},
-    { "_class_wxSlider","_wxSlider",0},
-    { "_class_wxCalculateLayoutEvent","_wxCalculateLayoutEvent",0},
-    { "_class_wxImageList","_wxImageList",0},
-    { "_class_wxBitmapButton","_wxBitmapButton",0},
-    { "_wxPyTipProvider","_class_wxPyTipProvider",0},
-    { "_wxFrame","_class_wxFrame",0},
-    { "_wxPCXHandler","_class_wxPCXHandler",0},
-    { "_class_wxGridSizer","_wxGridSizer",0},
-    { "_wxPyDivisionShape","_class_wxPyDivisionShape",0},
-    { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
-    { "_class_wxNotebook","_wxNotebook",0},
-    { "_wxJPEGHandler","_class_wxJPEGHandler",0},
     { "_wxWindowID","_wxCoord",0},
     { "_wxWindowID","_wxPrintQuality",0},
     { "_wxWindowID","_wxCoord",0},
     { "_wxWindowID","_wxPrintQuality",0},
+    { "_wxWindowID","_time_t",0},
     { "_wxWindowID","_size_t",0},
     { "_wxWindowID","_EBool",0},
     { "_wxWindowID","_uint",0},
     { "_wxWindowID","_int",0},
     { "_wxWindowID","_signed_int",0},
     { "_wxWindowID","_unsigned_int",0},
     { "_wxWindowID","_size_t",0},
     { "_wxWindowID","_EBool",0},
     { "_wxWindowID","_uint",0},
     { "_wxWindowID","_int",0},
     { "_wxWindowID","_signed_int",0},
     { "_wxWindowID","_unsigned_int",0},
-    { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
-    { "_class_wxSizerItem","_wxSizerItem",0},
     { "_int","_wxCoord",0},
     { "_int","_wxPrintQuality",0},
     { "_int","_wxCoord",0},
     { "_int","_wxPrintQuality",0},
+    { "_int","_time_t",0},
     { "_int","_size_t",0},
     { "_int","_EBool",0},
     { "_int","_uint",0},
     { "_int","_wxWindowID",0},
     { "_int","_unsigned_int",0},
     { "_int","_signed_int",0},
     { "_int","_size_t",0},
     { "_int","_EBool",0},
     { "_int","_uint",0},
     { "_int","_wxWindowID",0},
     { "_int","_unsigned_int",0},
     { "_int","_signed_int",0},
-    { "_class_wxMouseEvent","_wxMouseEvent",0},
-    { "_wxPyCommandEvent","_class_wxPyCommandEvent",0},
-    { "_class_wxListEvent","_wxListEvent",0},
-    { "_class_wxPrintPreview","_wxPrintPreview",0},
-    { "_class_wxSpinEvent","_wxSpinEvent",0},
-    { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0},
-    { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0},
-    { "_wxButton","_class_wxButton",0},
-    { "_class_wxPyApp","_wxPyApp",0},
-    { "_wxSize","_class_wxSize",0},
-    { "_wxRegionIterator","_class_wxRegionIterator",0},
-    { "_class_wxPyTextDataObject","_wxPyTextDataObject",0},
-    { "_class_wxMDIParentFrame","_wxMDIParentFrame",0},
-    { "_wxPyTreeItemData","_class_wxPyTreeItemData",0},
-    { "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0},
-    { "_class_wxPaintDC","_wxPaintDC",0},
-    { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0},
-    { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0},
-    { "_class_wxInitDialogEvent","_wxInitDialogEvent",0},
-    { "_class_wxComboBox","_wxComboBox",0},
-    { "_class_wxRadioButton","_wxRadioButton",0},
-    { "_class_wxPyShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShape},
-    { "_class_wxPyShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShape},
-    { "_class_wxPyShape","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShape},
-    { "_class_wxPyShape","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShape},
-    { "_class_wxPyShape","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShape},
-    { "_class_wxPyShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyShape},
-    { "_class_wxPyShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyShape},
-    { "_class_wxPyShape","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
-    { "_class_wxPyShape","_wxPyShape",0},
-    { "_wxValidator","_class_wxValidator",0},
-    { "_wxToolBarBase","_class_wxToolBarBase",0},
-    { "_class_wxTreeItemId","_wxTreeItemId",0},
-    { "_wxTreeCtrl","_class_wxTreeCtrl",0},
-    { "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
-    { "_wxIconizeEvent","_class_wxIconizeEvent",0},
-    { "_class_wxControl","_wxControl",0},
-    { "_wxStaticBitmap","_class_wxStaticBitmap",0},
-    { "_wxPyDrawnShape","_class_wxPyDrawnShape",0},
-    { "_class_wxIcon","_wxIcon",0},
-    { "_class_wxColour","_wxColour",0},
-    { "_class_wxScreenDC","_wxScreenDC",0},
-    { "_class_wxPageSetupDialog","_wxPageSetupDialog",0},
-    { "_wxPalette","_class_wxPalette",0},
-    { "_class_wxIdleEvent","_wxIdleEvent",0},
+    { "_wxDateTime_t","_unsigned_short",0},
+    { "_wxDateTime_t","_short",0},
+    { "_wxDateTime_t","_WXTYPE",0},
+    { "_time_t","_wxCoord",0},
+    { "_time_t","_wxPrintQuality",0},
+    { "_time_t","_unsigned_int",0},
+    { "_time_t","_int",0},
+    { "_time_t","_wxWindowID",0},
+    { "_time_t","_uint",0},
+    { "_time_t","_size_t",0},
     { "_wxCoord","_int",0},
     { "_wxCoord","_signed_int",0},
     { "_wxCoord","_unsigned_int",0},
     { "_wxCoord","_int",0},
     { "_wxCoord","_signed_int",0},
     { "_wxCoord","_unsigned_int",0},
@@ -12937,93 +12965,21 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxCoord","_uint",0},
     { "_wxCoord","_EBool",0},
     { "_wxCoord","_size_t",0},
     { "_wxCoord","_uint",0},
     { "_wxCoord","_EBool",0},
     { "_wxCoord","_size_t",0},
+    { "_wxCoord","_time_t",0},
     { "_wxCoord","_wxPrintQuality",0},
     { "_wxCoord","_wxPrintQuality",0},
-    { "_wxEraseEvent","_class_wxEraseEvent",0},
-    { "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
-    { "_class_wxJoystickEvent","_wxJoystickEvent",0},
-    { "_class_wxTipProvider","_wxTipProvider",0},
-    { "_class_wxMiniFrame","_wxMiniFrame",0},
-    { "_wxFontDialog","_class_wxFontDialog",0},
-    { "_wxRegion","_class_wxRegion",0},
-    { "_class_wxSplitterWindow","_wxSplitterWindow",0},
-    { "_wxPreviewFrame","_class_wxPreviewFrame",0},
-    { "_wxSizer","_class_wxSizer",0},
-    { "_class_wxShowEvent","_wxShowEvent",0},
-    { "_class_wxPyTipProvider","_wxPyTipProvider",0},
-    { "_class_wxPCXHandler","_wxPCXHandler",0},
-    { "_wxTIFFHandler","_class_wxTIFFHandler",0},
-    { "_wxPyDropTarget","_class_wxPyDropTarget",0},
-    { "_wxActivateEvent","_class_wxActivateEvent",0},
-    { "_wxGauge","_class_wxGauge",0},
-    { "_class_wxCheckListBox","_wxCheckListBox",0},
-    { "_class_wxBusyInfo","_wxBusyInfo",0},
-    { "_class_wxCommandEvent","_wxCommandEvent",0},
-    { "_class_wxClientDC","_wxClientDC",0},
-    { "_class_wxSizeEvent","_wxSizeEvent",0},
-    { "_class_wxListCtrl","_wxListCtrl",0},
-    { "_class_wxPyDividedShape","_wxPyDividedShape",0},
-    { "_wxCustomDataObject","_class_wxCustomDataObject",0},
-    { "_class_wxSize","_wxSize",0},
-    { "_class_wxBitmap","_wxBitmap",0},
-    { "_class_wxMemoryDC","_wxMemoryDC",0},
-    { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0},
-    { "_wxMenuBar","_class_wxMenuBar",0},
-    { "_wxTreeEvent","_class_wxTreeEvent",0},
-    { "_wxDirDialog","_class_wxDirDialog",0},
-    { "_wxPyShapeEvtHandler","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyControlPoint",SwigwxPyControlPointTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler},
     { "_wxPyShapeEvtHandler","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShapeEvtHandler},
-    { "_wxPyShapeEvtHandler","_class_wxPyShapeEvtHandler",0},
-    { "_wxEvtHandler","_class_wxEvtHandler",0},
-    { "_wxMenuItem","_class_wxMenuItem",0},
-    { "_class_wxScrollBar","_wxScrollBar",0},
-    { "_class_wxColourDialog","_wxColourDialog",0},
-    { "_class_wxPrintData","_wxPrintData",0},
-    { "_wxPyRectangleShape","_class_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyDivisionShape",SwigwxPyDivisionShapeTowxPyRectangleShape},
-    { "_wxPyRectangleShape","_class_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyDividedShape",SwigwxPyDividedShapeTowxPyRectangleShape},
-    { "_wxPyRectangleShape","_class_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyCompositeShape",SwigwxPyCompositeShapeTowxPyRectangleShape},
-    { "_wxPyRectangleShape","_class_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyDrawnShape",SwigwxPyDrawnShapeTowxPyRectangleShape},
-    { "_wxPyRectangleShape","_class_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyBitmapShape",SwigwxPyBitmapShapeTowxPyRectangleShape},
-    { "_wxPyRectangleShape","_class_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
     { "_wxPyRectangleShape","_wxPyControlPoint",SwigwxPyControlPointTowxPyRectangleShape},
-    { "_wxPyRectangleShape","_class_wxPyRectangleShape",0},
-    { "_class_wxScrolledWindow","_wxScrolledWindow",0},
-    { "_wxListItemAttr","_class_wxListItemAttr",0},
-    { "_class_wxTextEntryDialog","_wxTextEntryDialog",0},
-    { "_wxKeyEvent","_class_wxKeyEvent",0},
-    { "_wxMoveEvent","_class_wxMoveEvent",0},
-    { "_wxOGLConstraint","_class_wxOGLConstraint",0},
-    { "_wxColourData","_class_wxColourData",0},
-    { "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0},
-    { "_class_wxPalette","_wxPalette",0},
-    { "_wxFileDataObject","_class_wxFileDataObject",0},
-    { "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0},
-    { "_wxNotebookSizer","_class_wxNotebookSizer",0},
-    { "_class_wxEraseEvent","_wxEraseEvent",0},
-    { "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0},
-    { "_wxMDIClientWindow","_class_wxMDIClientWindow",0},
-    { "_class_wxDataObjectComposite","_wxDataObjectComposite",0},
-    { "_class_wxToolBarToolBase","_wxToolBarToolBase",0},
-    { "_class_wxFontDialog","_wxFontDialog",0},
-    { "_wxWindow","_class_wxWindow",0},
-    { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0},
-    { "_class_wxFrame","_wxFrame",0},
 {0,0,0}};
 
 static PyObject *SWIG_globals;
 {0,0,0}};
 
 static PyObject *SWIG_globals;