X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac346f50461692f40d98ead8d6817ec8a668f915..5bf2abe34850e0952a44f3be4a4390ea12c55bd0:/wxPython/src/misc2.i diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index cb61fbe064..7cea032de8 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -284,18 +284,10 @@ public: wxString GetTip(); // *** Not in the "public" interface void SetWindow(wxWindow *win); wxWindow *GetWindow(); -}; - - -%inline %{ - void wxToolTip_Enable(bool flag) { - wxToolTip::Enable(flag); - } - void wxToolTip_SetDelay(long milliseconds) { - wxToolTip::SetDelay(milliseconds); - } -%} + static void Enable(bool flag); + static void SetDelay(long milliseconds); +}; //---------------------------------------------------------------------- @@ -481,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); @@ -501,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 { @@ -696,6 +659,7 @@ public: }; IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate); + %} @@ -747,7 +711,7 @@ public: int GetUPosition() { return -1; } int GetVPosition() { return -1; } int GetMovementThreshold() { return -1; } - void SetMovementThreshold(int threshold) ; + void SetMovementThreshold(int threshold) {} bool IsOk(void) { return FALSE; } int GetNumberJoysticks() { return -1; } @@ -843,20 +807,20 @@ public: //---------------------------------------------------------------------- %{ -#if !wxUSE_WAVE && !defined(__WXMSW__) +#if !wxUSE_WAVE // A C++ stub class for wxWave for platforms that don't have it. 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() {} @@ -885,6 +849,8 @@ public: } %} + +//---------------------------------------------------------------------- //----------------------------------------------------------------------