]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_misc_wrap.cpp
reSWIGged
[wxWidgets.git] / wxPython / src / msw / _misc_wrap.cpp
index 72cac58dd5a503816d38be555c663aae0014201c..c07fcdca2450bc58f7ff2025fbc7abdba0374e2a 100644 (file)
@@ -349,8 +349,7 @@ static swig_type_info *swig_types[87];
 
 #include "wx/wxPython/wxPython.h"
 #include "wx/wxPython/pyclasses.h"
 
 #include "wx/wxPython/wxPython.h"
 #include "wx/wxPython/pyclasses.h"
-#include "wx/wxPython/pyistream.h"
-    
+#include "wx/wxPython/pyistream.h"    
 
  static const wxString wxPyEmptyString(wxEmptyString); 
 
 
  static const wxString wxPyEmptyString(wxEmptyString); 
 
@@ -1551,10 +1550,53 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop);
 
 bool wxClipboardLocker___nonzero__(wxClipboardLocker *self){ return !!(*self); }
 
 
 bool wxClipboardLocker___nonzero__(wxClipboardLocker *self){ return !!(*self); }
 
-#include "wx/display.h"
+#include <wx/display.h>
 
 bool wxVideoMode___eq__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self == *other) : False; }
 bool wxVideoMode___ne__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self != *other) : True;  }
 
 bool wxVideoMode___eq__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self == *other) : False; }
 bool wxVideoMode___ne__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self != *other) : True;  }
+
+// dummy version of wxDisplay for when it is not enabled in the wxWidgets build
+#if !wxUSE_DISPLAY
+#include <wx/dynarray.h>
+#include <wx/vidmode.h>
+
+WX_DECLARE_OBJARRAY(wxVideoMode, wxArrayVideoModes);
+#include "wx/arrimpl.cpp"
+WX_DEFINE_OBJARRAY(wxArrayVideoModes);
+const wxVideoMode wxDefaultVideoMode;
+
+class wxDisplay 
+{
+public:
+    wxDisplay(size_t index = 0) { wxPyRaiseNotImplemented(); }
+    ~wxDisplay() {}
+
+    static size_t  GetCount()
+        { wxPyRaiseNotImplemented(); return 0; }
+    
+    static int GetFromPoint(const wxPoint& pt)
+        { wxPyRaiseNotImplemented(); return wxNOT_FOUND; }
+    static int GetFromWindow(wxWindow *window) 
+        { wxPyRaiseNotImplemented(); return wxNOT_FOUND; }
+        
+    virtual bool IsOk() const { return false; }
+    virtual wxRect GetGeometry() const { wxRect r; return r; }
+    virtual wxString GetName() const { return wxEmptyString; }
+    bool IsPrimary() const { return false; }
+    
+    wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode)
+        { wxArrayVideoModes a; return a; }
+
+    virtual wxVideoMode GetCurrentMode() const
+        { return wxDefaultVideoMode; }
+    
+    virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode)
+       { return false; }
+    
+    void  ResetMode() {}
+};
+#endif
+
 PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){
             PyObject* pyList = NULL;
             wxArrayVideoModes arr = self->GetModes(mode);
 PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){
             PyObject* pyList = NULL;
             wxArrayVideoModes arr = self->GetModes(mode);
@@ -1585,6 +1627,7 @@ static PyObject *_wrap_SystemSettings_GetColour(PyObject *self, PyObject *args,
     arg1 = (wxSystemColour) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxSystemColour) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSystemSettings::GetColour((wxSystemColour )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSystemSettings::GetColour((wxSystemColour )arg1);
         
@@ -1615,6 +1658,7 @@ static PyObject *_wrap_SystemSettings_GetFont(PyObject *self, PyObject *args, Py
     arg1 = (wxSystemFont) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxSystemFont) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSystemSettings::GetFont((wxSystemFont )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSystemSettings::GetFont((wxSystemFont )arg1);
         
@@ -1645,6 +1689,7 @@ static PyObject *_wrap_SystemSettings_GetMetric(PyObject *self, PyObject *args,
     arg1 = (wxSystemMetric) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxSystemMetric) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxSystemSettings::GetMetric((wxSystemMetric )arg1);
         
@@ -1671,6 +1716,7 @@ static PyObject *_wrap_SystemSettings_HasFeature(PyObject *self, PyObject *args,
     arg1 = (wxSystemFeature) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxSystemFeature) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxSystemSettings::HasFeature((wxSystemFeature )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxSystemSettings::HasFeature((wxSystemFeature )arg1);
         
@@ -1695,6 +1741,7 @@ static PyObject *_wrap_SystemSettings_GetScreenType(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":SystemSettings_GetScreenType",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":SystemSettings_GetScreenType",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxSystemSettings::GetScreenType();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxSystemSettings::GetScreenType();
         
@@ -1720,6 +1767,7 @@ static PyObject *_wrap_SystemSettings_SetScreenType(PyObject *self, PyObject *ar
     arg1 = (wxSystemScreenType) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxSystemScreenType) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxSystemSettings::SetScreenType((wxSystemScreenType )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxSystemSettings::SetScreenType((wxSystemScreenType )arg1);
         
@@ -2122,6 +2170,7 @@ static PyObject *_wrap_Bell(PyObject *self, PyObject *args, PyObject *kwargs) {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Bell",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Bell",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxBell();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxBell();
         
@@ -2143,6 +2192,7 @@ static PyObject *_wrap_EndBusyCursor(PyObject *self, PyObject *args, PyObject *k
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":EndBusyCursor",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":EndBusyCursor",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxEndBusyCursor();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxEndBusyCursor();
         
@@ -2198,6 +2248,7 @@ static PyObject *_wrap_GetMousePosition(PyObject *self, PyObject *args, PyObject
     arg2 = &temp2;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetMousePosition",kwnames)) goto fail;
     {
     arg2 = &temp2;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetMousePosition",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxGetMousePosition(arg1,arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxGetMousePosition(arg1,arg2);
         
@@ -2434,6 +2485,7 @@ static PyObject *_wrap_Shutdown(PyObject *self, PyObject *args, PyObject *kwargs
     arg1 = (wxShutdownFlags) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxShutdownFlags) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxShutdown((wxShutdownFlags )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxShutdown((wxShutdownFlags )arg1);
         
@@ -2914,6 +2966,7 @@ static PyObject *_wrap_FileSelector(PyObject *self, PyObject *args, PyObject *kw
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxString const &)*arg5,arg6,arg7,arg8,arg9);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,(wxString const &)*arg4,(wxString const &)*arg5,arg6,arg7,arg8,arg9);
         
@@ -3015,6 +3068,7 @@ static PyObject *_wrap_LoadFileSelector(PyObject *self, PyObject *args, PyObject
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxLoadFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxLoadFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
         
@@ -3100,6 +3154,7 @@ static PyObject *_wrap_SaveFileSelector(PyObject *self, PyObject *args, PyObject
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSaveFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSaveFileSelector((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
         
@@ -3196,6 +3251,7 @@ static PyObject *_wrap_DirSelector(PyObject *self, PyObject *args, PyObject *kwa
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxDirSelector((wxString const &)*arg1,(wxString const &)*arg2,arg3,(wxPoint const &)*arg4,arg5);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxDirSelector((wxString const &)*arg1,(wxString const &)*arg2,arg3,(wxPoint const &)*arg4,arg5);
         
@@ -3294,6 +3350,7 @@ static PyObject *_wrap_GetTextFromUser(PyObject *self, PyObject *args, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetTextFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4,arg5,arg6,arg7);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetTextFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4,arg5,arg6,arg7);
         
@@ -3382,6 +3439,7 @@ static PyObject *_wrap_GetPasswordFromUser(PyObject *self, PyObject *args, PyObj
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetPasswordFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetPasswordFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4);
         
@@ -3494,6 +3552,7 @@ static PyObject *_wrap_GetSingleChoice(PyObject *self, PyObject *args, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetSingleChoice((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetSingleChoice((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
         
@@ -3604,6 +3663,7 @@ static PyObject *_wrap_GetSingleChoiceIndex(PyObject *self, PyObject *args, PyOb
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxGetSingleChoiceIndex((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxGetSingleChoiceIndex((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
         
@@ -3691,6 +3751,7 @@ static PyObject *_wrap_MessageBox(PyObject *self, PyObject *args, PyObject *kwar
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxMessageBox((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxMessageBox((wxString const &)*arg1,(wxString const &)*arg2,arg3,arg4,arg5,arg6);
         
@@ -3785,6 +3846,7 @@ static PyObject *_wrap_GetNumberFromUser(PyObject *self, PyObject *args, PyObjec
         }
     }
     {
         }
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (long)wxGetNumberFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4,arg5,arg6,arg7,(wxPoint const &)*arg8);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (long)wxGetNumberFromUser((wxString const &)*arg1,(wxString const &)*arg2,(wxString const &)*arg3,arg4,arg5,arg6,arg7,(wxPoint const &)*arg8);
         
@@ -3831,6 +3893,7 @@ static PyObject *_wrap_ColourDisplay(PyObject *self, PyObject *args, PyObject *k
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":ColourDisplay",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":ColourDisplay",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxColourDisplay();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxColourDisplay();
         
@@ -3855,6 +3918,7 @@ static PyObject *_wrap_DisplayDepth(PyObject *self, PyObject *args, PyObject *kw
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplayDepth",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplayDepth",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxDisplayDepth();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxDisplayDepth();
         
@@ -3877,6 +3941,7 @@ static PyObject *_wrap_GetDisplayDepth(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplayDepth",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplayDepth",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxGetDisplayDepth();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)wxGetDisplayDepth();
         
@@ -3904,6 +3969,7 @@ static PyObject *_wrap_DisplaySize(PyObject *self, PyObject *args, PyObject *kwa
     arg2 = &temp2;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplaySize",kwnames)) goto fail;
     {
     arg2 = &temp2;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplaySize",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxDisplaySize(arg1,arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxDisplaySize(arg1,arg2);
         
@@ -3934,6 +4000,7 @@ static PyObject *_wrap_GetDisplaySize(PyObject *self, PyObject *args, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplaySize",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplaySize",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetDisplaySize();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetDisplaySize();
         
@@ -3965,6 +4032,7 @@ static PyObject *_wrap_DisplaySizeMM(PyObject *self, PyObject *args, PyObject *k
     arg2 = &temp2;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplaySizeMM",kwnames)) goto fail;
     {
     arg2 = &temp2;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":DisplaySizeMM",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxDisplaySizeMM(arg1,arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxDisplaySizeMM(arg1,arg2);
         
@@ -3995,6 +4063,7 @@ static PyObject *_wrap_GetDisplaySizeMM(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplaySizeMM",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetDisplaySizeMM",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetDisplaySizeMM();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetDisplaySizeMM();
         
@@ -4032,6 +4101,7 @@ static PyObject *_wrap_ClientDisplayRect(PyObject *self, PyObject *args, PyObjec
     arg4 = &temp4;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":ClientDisplayRect",kwnames)) goto fail;
     {
     arg4 = &temp4;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":ClientDisplayRect",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxClientDisplayRect(arg1,arg2,arg3,arg4);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxClientDisplayRect(arg1,arg2,arg3,arg4);
         
@@ -4070,6 +4140,7 @@ static PyObject *_wrap_GetClientDisplayRect(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetClientDisplayRect",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetClientDisplayRect",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetClientDisplayRect();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGetClientDisplayRect();
         
@@ -4104,6 +4175,7 @@ static PyObject *_wrap_SetCursor(PyObject *self, PyObject *args, PyObject *kwarg
         SWIG_fail;
     }
     {
         SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxSetCursor(*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxSetCursor(*arg1);
         
@@ -4131,6 +4203,7 @@ static PyObject *_wrap_BeginBusyCursor(PyObject *self, PyObject *args, PyObject
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxBeginBusyCursor(arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxBeginBusyCursor(arg1);
         
@@ -4153,6 +4226,7 @@ static PyObject *_wrap_GetActiveWindow(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetActiveWindow",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetActiveWindow",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxGetActiveWindow();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxGetActiveWindow();
         
@@ -4160,7 +4234,7 @@ static PyObject *_wrap_GetActiveWindow(PyObject *self, PyObject *args, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -4184,6 +4258,7 @@ static PyObject *_wrap_GenericFindWindowAtPoint(PyObject *self, PyObject *args,
         if ( ! wxPoint_helper(obj0, &arg1)) SWIG_fail;
     }
     {
         if ( ! wxPoint_helper(obj0, &arg1)) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxGenericFindWindowAtPoint((wxPoint const &)*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxGenericFindWindowAtPoint((wxPoint const &)*arg1);
         
@@ -4191,7 +4266,7 @@ static PyObject *_wrap_GenericFindWindowAtPoint(PyObject *self, PyObject *args,
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -4215,6 +4290,7 @@ static PyObject *_wrap_FindWindowAtPoint(PyObject *self, PyObject *args, PyObjec
         if ( ! wxPoint_helper(obj0, &arg1)) SWIG_fail;
     }
     {
         if ( ! wxPoint_helper(obj0, &arg1)) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxFindWindowAtPoint((wxPoint const &)*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxFindWindowAtPoint((wxPoint const &)*arg1);
         
@@ -4222,7 +4298,7 @@ static PyObject *_wrap_FindWindowAtPoint(PyObject *self, PyObject *args, PyObjec
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -4243,6 +4319,7 @@ static PyObject *_wrap_GetTopLevelParent(PyObject *self, PyObject *args, PyObjec
     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     {
     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxGetTopLevelParent(arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindow *)wxGetTopLevelParent(arg1);
         
@@ -4250,7 +4327,7 @@ static PyObject *_wrap_GetTopLevelParent(PyObject *self, PyObject *args, PyObjec
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -4271,6 +4348,7 @@ static PyObject *_wrap_GetKeyState(PyObject *self, PyObject *args, PyObject *kwa
     arg1 = (wxKeyCode) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg1 = (wxKeyCode) SWIG_AsInt(obj0); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxGetKeyState((wxKeyCode )arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxGetKeyState((wxKeyCode )arg1);
         
@@ -4294,6 +4372,7 @@ static PyObject *_wrap_WakeUpMainThread(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":WakeUpMainThread",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":WakeUpMainThread",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxWakeUpMainThread();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxWakeUpMainThread();
         
@@ -4315,6 +4394,7 @@ static PyObject *_wrap_MutexGuiEnter(PyObject *self, PyObject *args, PyObject *k
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":MutexGuiEnter",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":MutexGuiEnter",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxMutexGuiEnter();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxMutexGuiEnter();
         
@@ -4336,6 +4416,7 @@ static PyObject *_wrap_MutexGuiLeave(PyObject *self, PyObject *args, PyObject *k
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":MutexGuiLeave",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":MutexGuiLeave",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxMutexGuiLeave();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxMutexGuiLeave();
         
@@ -4358,6 +4439,7 @@ static PyObject *_wrap_new_MutexGuiLocker(PyObject *self, PyObject *args, PyObje
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_MutexGuiLocker",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_MutexGuiLocker",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxMutexGuiLocker *)new wxMutexGuiLocker();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxMutexGuiLocker *)new wxMutexGuiLocker();
         
@@ -4444,6 +4526,7 @@ static PyObject *_wrap_new_ToolTip(PyObject *self, PyObject *args, PyObject *kwa
         temp1 = True;
     }
     {
         temp1 = True;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxToolTip *)new wxToolTip((wxString const &)*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxToolTip *)new wxToolTip((wxString const &)*arg1);
         
@@ -4451,7 +4534,7 @@ static PyObject *_wrap_new_ToolTip(PyObject *self, PyObject *args, PyObject *kwa
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 1); 
     }
     {
         if (temp1)
     }
     {
         if (temp1)
@@ -4560,7 +4643,7 @@ static PyObject *_wrap_ToolTip_GetWindow(PyObject *self, PyObject *args, PyObjec
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -4645,6 +4728,7 @@ static PyObject *_wrap_new_Caret(PyObject *self, PyObject *args, PyObject *kwarg
         if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
     }
     {
         if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxCaret *)new wxCaret(arg1,(wxSize const &)*arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxCaret *)new wxCaret(arg1,(wxSize const &)*arg2);
         
@@ -4897,7 +4981,7 @@ static PyObject *_wrap_Caret_GetWindow(PyObject *self, PyObject *args, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -5160,6 +5244,7 @@ static PyObject *_wrap_new_BusyCursor(PyObject *self, PyObject *args, PyObject *
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxBusyCursor *)new wxBusyCursor(arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxBusyCursor *)new wxBusyCursor(arg1);
         
@@ -5220,6 +5305,7 @@ static PyObject *_wrap_new_WindowDisabler(PyObject *self, PyObject *args, PyObje
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindowDisabler *)new wxWindowDisabler(arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxWindowDisabler *)new wxWindowDisabler(arg1);
         
@@ -5282,6 +5368,7 @@ static PyObject *_wrap_new_BusyInfo(PyObject *self, PyObject *args, PyObject *kw
         temp1 = True;
     }
     {
         temp1 = True;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxBusyInfo *)new wxBusyInfo((wxString const &)*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxBusyInfo *)new wxBusyInfo((wxString const &)*arg1);
         
@@ -6334,6 +6421,7 @@ static PyObject *_wrap_ShowTip(PyObject *self, PyObject *args, PyObject *kwargs)
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxShowTip(arg1,arg2,arg3);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxShowTip(arg1,arg2,arg3);
         
@@ -6370,6 +6458,7 @@ static PyObject *_wrap_CreateFileTipProvider(PyObject *self, PyObject *args, PyO
     arg2 = (size_t) SWIG_AsUnsignedLong(obj1); 
     if (PyErr_Occurred()) SWIG_fail;
     {
     arg2 = (size_t) SWIG_AsUnsignedLong(obj1); 
     if (PyErr_Occurred()) SWIG_fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxTipProvider *)wxCreateFileTipProvider((wxString const &)*arg1,arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxTipProvider *)wxCreateFileTipProvider((wxString const &)*arg1,arg2);
         
@@ -6412,6 +6501,7 @@ static PyObject *_wrap_new_Timer(PyObject *self, PyObject *args, PyObject *kwarg
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxPyTimer *)new wxPyTimer(arg1,arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxPyTimer *)new wxPyTimer(arg1,arg2);
         
@@ -6542,7 +6632,7 @@ static PyObject *_wrap_Timer_GetOwner(PyObject *self, PyObject *args, PyObject *
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -6812,6 +6902,7 @@ static PyObject *_wrap_new_TimerRunner__SWIG_0(PyObject *self, PyObject *args) {
         SWIG_fail;
     }
     {
         SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxTimerRunner *)new wxTimerRunner(*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxTimerRunner *)new wxTimerRunner(*arg1);
         
@@ -6850,6 +6941,7 @@ static PyObject *_wrap_new_TimerRunner__SWIG_1(PyObject *self, PyObject *args) {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxTimerRunner *)new wxTimerRunner(*arg1,arg2,arg3);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxTimerRunner *)new wxTimerRunner(*arg1,arg2,arg3);
         
@@ -7848,7 +7940,7 @@ static PyObject *_wrap_LogWindow_GetFrame(PyObject *self, PyObject *args, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
     }
     return resultobj;
     fail:
@@ -9564,6 +9656,7 @@ static PyObject *_wrap_Execute(PyObject *self, PyObject *args, PyObject *kwargs)
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
         SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (long)wxExecute((wxString const &)*arg1,arg2,arg3);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (long)wxExecute((wxString const &)*arg1,arg2,arg3);
         
@@ -9600,6 +9693,7 @@ static PyObject *_wrap_new_Joystick(PyObject *self, PyObject *args, PyObject *kw
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxJoystick *)new wxJoystick(arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxJoystick *)new wxJoystick(arg1);
         
@@ -11546,6 +11640,7 @@ static PyObject *_wrap_new_Sound(PyObject *self, PyObject *args, PyObject *kwarg
         }
     }
     {
         }
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxSound *)new_wxSound((wxString const &)*arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxSound *)new_wxSound((wxString const &)*arg1);
         
@@ -11579,6 +11674,7 @@ static PyObject *_wrap_new_SoundFromData(PyObject *self, PyObject *args, PyObjec
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_SoundFromData",kwnames,&obj0)) goto fail;
     arg1 = obj0;
     {
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_SoundFromData",kwnames,&obj0)) goto fail;
     arg1 = obj0;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxSound *)new_wxSound(arg1);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxSound *)new_wxSound(arg1);
         
@@ -11739,6 +11835,7 @@ static PyObject *_wrap_Sound_Play(PyObject *self, PyObject *args, PyObject *kwar
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)((wxSound const *)arg1)->Play(arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)((wxSound const *)arg1)->Play(arg2);
         
@@ -11777,6 +11874,7 @@ static PyObject *_wrap_Sound_PlaySound(PyObject *self, PyObject *args, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxSound::Play((wxString const &)*arg1,arg2);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)wxSound::Play((wxString const &)*arg1,arg2);
         
@@ -11808,6 +11906,7 @@ static PyObject *_wrap_Sound_Stop(PyObject *self, PyObject *args, PyObject *kwar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Sound_Stop",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Sound_Stop",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxSound::Stop();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         wxSound::Stop();
         
@@ -14305,6 +14404,7 @@ static PyObject *_wrap_new_ArtProvider(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_ArtProvider",kwnames)) goto fail;
     {
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_ArtProvider",kwnames)) goto fail;
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxPyArtProvider *)new wxPyArtProvider();
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (wxPyArtProvider *)new wxPyArtProvider();
         
@@ -14464,6 +14564,7 @@ static PyObject *_wrap_ArtProvider_GetBitmap(PyObject *self, PyObject *args, PyO
         }
     }
     {
         }
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxPyArtProvider::GetBitmap((wxString const &)*arg1,(wxString const &)*arg2,(wxSize const &)*arg3);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxPyArtProvider::GetBitmap((wxString const &)*arg1,(wxString const &)*arg2,(wxSize const &)*arg3);
         
@@ -14535,6 +14636,7 @@ static PyObject *_wrap_ArtProvider_GetIcon(PyObject *self, PyObject *args, PyObj
         }
     }
     {
         }
     }
     {
+        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxPyArtProvider::GetIcon((wxString const &)*arg1,(wxString const &)*arg2,(wxSize const &)*arg3);
         
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxPyArtProvider::GetIcon((wxString const &)*arg1,(wxString const &)*arg2,(wxSize const &)*arg3);
         
@@ -27154,6 +27256,28 @@ static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *a
 }
 
 
 }
 
 
+static PyObject *_wrap_Clipboard_Get(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxClipboard *result;
+    char *kwnames[] = {
+        NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Clipboard_Get",kwnames)) goto fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (wxClipboard *)wxClipboard::Get();
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxClipboard, 0);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
 static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -27161,20 +27285,6 @@ static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) {
     Py_INCREF(obj);
     return Py_BuildValue((char *)"");
 }
     Py_INCREF(obj);
     return Py_BuildValue((char *)"");
 }
-static int _wrap_TheClipboard_set(PyObject *_val) {
-    PyErr_SetString(PyExc_TypeError,"Variable TheClipboard is read-only.");
-    return 1;
-}
-
-
-static PyObject *_wrap_TheClipboard_get() {
-    PyObject *pyobj;
-    
-    pyobj = SWIG_NewPointerObj((void *)(wxTheClipboard), SWIGTYPE_p_wxClipboard, 0);
-    return pyobj;
-}
-
-
 static PyObject *_wrap_new_ClipboardLocker(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxClipboard *arg1 = (wxClipboard *) NULL ;
 static PyObject *_wrap_new_ClipboardLocker(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxClipboard *arg1 = (wxClipboard *) NULL ;
@@ -28888,6 +28998,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Clipboard_Clear", (PyCFunction) _wrap_Clipboard_Clear, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_Flush", (PyCFunction) _wrap_Clipboard_Flush, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_UsePrimarySelection", (PyCFunction) _wrap_Clipboard_UsePrimarySelection, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_Clear", (PyCFunction) _wrap_Clipboard_Clear, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_Flush", (PyCFunction) _wrap_Clipboard_Flush, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_UsePrimarySelection", (PyCFunction) _wrap_Clipboard_UsePrimarySelection, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"Clipboard_Get", (PyCFunction) _wrap_Clipboard_Get, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_swigregister", Clipboard_swigregister, METH_VARARGS },
         { (char *)"new_ClipboardLocker", (PyCFunction) _wrap_new_ClipboardLocker, METH_VARARGS | METH_KEYWORDS },
         { (char *)"delete_ClipboardLocker", (PyCFunction) _wrap_delete_ClipboardLocker, METH_VARARGS | METH_KEYWORDS },
         { (char *)"Clipboard_swigregister", Clipboard_swigregister, METH_VARARGS },
         { (char *)"new_ClipboardLocker", (PyCFunction) _wrap_new_ClipboardLocker, METH_VARARGS | METH_KEYWORDS },
         { (char *)"delete_ClipboardLocker", (PyCFunction) _wrap_delete_ClipboardLocker, METH_VARARGS | METH_KEYWORDS },
@@ -30067,7 +30178,6 @@ SWIGEXPORT(void) SWIG_init(void) {
     wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget");
     wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget");
     
     wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget");
     wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget");
     
-    SWIG_addvarlink(SWIG_globals,(char*)"TheClipboard",_wrap_TheClipboard_get, _wrap_TheClipboard_set);
     SWIG_addvarlink(SWIG_globals,(char*)"DefaultVideoMode",_wrap_DefaultVideoMode_get, _wrap_DefaultVideoMode_set);
 }
 
     SWIG_addvarlink(SWIG_globals,(char*)"DefaultVideoMode",_wrap_DefaultVideoMode_get, _wrap_DefaultVideoMode_set);
 }