]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/misc2.i
minor fixes
[wxWidgets.git] / wxPython / src / misc2.i
index 06fe54cb3bac54c47dd48f448788db51597c0009..7cea032de86071df22eaa95855cd14b29deb63f2 100644 (file)
@@ -473,6 +473,13 @@ public:
 
     wxGenericDragImage(const wxBitmap& image,
                        const wxCursor& cursor = wxNullCursor);
+    %name(wxDragIcon)wxGenericDragImage(const wxIcon& image,
+                                        const wxCursor& cursor = wxNullCursor);
+    %name(wxDragString)wxGenericDragImage(const wxString& str,
+                                          const wxCursor& cursor = wxNullCursor);
+    %name(wxDragTreeItem)wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
+    %name(wxDragListItem)wxGenericDragImage(const wxListCtrl& listCtrl, long id);
+
     ~wxGenericDragImage();
 
     void SetBackingBitmap(wxBitmap* bitmap);
@@ -493,42 +500,6 @@ public:
 };
 
 
-// Alternate Constructors
-%new wxGenericDragImage* wxDragIcon(const wxIcon& image,
-                                   const wxCursor& cursor = wxNullCursor);
-
-%new wxGenericDragImage* wxDragString(const wxString& str,
-                                      const wxCursor& cursor = wxNullCursor);
-
-%new wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
-
-%new wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id);
-
-
-%{
-
-wxGenericDragImage* wxDragIcon(const wxIcon& image,
-                               const wxCursor& cursor) {
-    return new wxGenericDragImage(image, cursor);
-}
-
-wxGenericDragImage* wxDragString(const wxString& str,
-                                 const wxCursor& cursor) {
-    return new wxGenericDragImage(str, cursor);
-}
-
-wxGenericDragImage* wxDragTreeItem(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) {
-    return new wxGenericDragImage(treeCtrl, id);
-}
-
-wxGenericDragImage* wxDragListItem(const wxListCtrl& listCtrl, long id) {
-    return new wxGenericDragImage(listCtrl, id);
-}
-
-%}
-
-
-
 //----------------------------------------------------------------------
 
 class wxPyTimer : public wxObject {
@@ -688,6 +659,7 @@ public:
 };
 
 IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate);
+
 %}
 
 
@@ -841,14 +813,14 @@ class wxWave : public wxObject
 {
 public:
     wxWave(const wxString& fileName, bool isResource = FALSE) {
-        bool doSave = wxPyRestoreThread();
+        wxPyTState* state = wxPyBeginBlockThreads();
         PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
-        wxPySaveThread(doSave);
+        wxPyEndBlockThreads(state);
     }
     wxWave(int size, const wxByte* data) {
-        bool doSave = wxPyRestoreThread();
+        wxPyTState* state = wxPyBeginBlockThreads();
         PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
-        wxPySaveThread(doSave);
+        wxPyEndBlockThreads(state);
     }
 
     ~wxWave() {}
@@ -877,6 +849,8 @@ public:
     }
 %}
 
+
+//----------------------------------------------------------------------
 //----------------------------------------------------------------------