X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd3f2efe791cf99c2e4944cd615f02a5502ed93e..52f52ebc4e0be6a9899d328b08db9eb14629d219:/wxPython/src/_dnd.i?ds=sidebyside diff --git a/wxPython/src/_dnd.i b/wxPython/src/_dnd.i index 15f0f18777..c109240212 100644 --- a/wxPython/src/_dnd.i +++ b/wxPython/src/_dnd.i @@ -14,11 +14,8 @@ //--------------------------------------------------------------------------- +#ifndef __WXX11__ -%{ -%} - -//--------------------------------------------------------------------------- %newgroup // flags for wxDropSource::DoDragDrop() @@ -61,12 +58,12 @@ IMP_PYCALLBACK_BOOL_DR(wxPyDropSource, wxDropSource, GiveFeedback); %name(DropSource) class wxPyDropSource { public: #ifndef __WXGTK__ - wxPyDropSource(wxWindow *win = NULL, + wxPyDropSource(wxWindow *win, const wxCursor © = wxNullCursor, const wxCursor &move = wxNullCursor, const wxCursor &none = wxNullCursor); #else - wxPyDropSource(wxWindow *win = NULL, + wxPyDropSource(wxWindow *win, const wxIcon& copy = wxNullIcon, const wxIcon& move = wxNullIcon, const wxIcon& none = wxNullIcon); @@ -121,9 +118,9 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop); %name(DropTarget) class wxPyDropTarget // : public wxDropTarget { public: - %addtofunc wxPyDropTarget - "if args: args[0].thisown = 0; - self._setCallbackInfo(self, DropTarget)" + %pythonAppend wxPyDropTarget + "self._setCallbackInfo(self, DropTarget)" + %apply SWIGTYPE *DISOWN { wxDataObject *dataObject }; wxPyDropTarget(wxDataObject *dataObject = NULL); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -132,9 +129,10 @@ public: // get/set the associated wxDataObject wxDataObject *GetDataObject(); - %addtofunc SetDataObject "args[1].thisown = 0" void SetDataObject(wxDataObject *dataObject); + %clear wxDataObject *dataObject; + wxDragResult base_OnEnter(wxCoord x, wxCoord y, wxDragResult def); wxDragResult base_OnDragOver(wxCoord x, wxCoord y, wxDragResult def); void base_OnLeave(); @@ -182,7 +180,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop); %name(TextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget { public: - %addtofunc wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" + %pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" wxPyTextDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -243,7 +241,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); %name(FileDropTarget) class wxPyFileDropTarget : public wxPyDropTarget { public: - %addtofunc wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" + %pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" wxPyFileDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -265,3 +263,5 @@ public: wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget"); %} //--------------------------------------------------------------------------- + +#endif