X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/81cfe5e13e9b8a2ec8374af1f7806b05a86d4d4b..52f52ebc4e0be6a9899d328b08db9eb14629d219:/wxPython/src/_dataobj.i diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index 191ca7a74b..a0b8fbbdd6 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -222,7 +222,7 @@ bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{ // Now define it for SWIG class wxPyDataObjectSimple : public wxDataObjectSimple { public: - %addtofunc wxPyDataObjectSimple "self._setCallbackInfo(self, PyDataObjectSimple)" + %pythonAppend wxPyDataObjectSimple "self._setCallbackInfo(self, PyDataObjectSimple)" wxPyDataObjectSimple(const wxDataFormat& format = wxFormatInvalid); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -240,8 +240,9 @@ class wxDataObjectComposite : public wxDataObject { public: wxDataObjectComposite(); - %addtofunc Add "args[1].thisown = 0" + %apply SWIGTYPE *DISOWN { wxDataObjectSimple *dataObject }; void Add(wxDataObjectSimple *dataObject, int preferred = False); + %clear wxDataObjectSimple *dataObject; }; //--------------------------------------------------------------------------- @@ -280,7 +281,7 @@ IMP_PYCALLBACK__STRING(wxPyTextDataObject, wxTextDataObject, SetText); // Now define it for SWIG class wxPyTextDataObject : public wxTextDataObject { public: - %addtofunc wxPyTextDataObject "self._setCallbackInfo(self, PyTextDataObject)" + %pythonAppend wxPyTextDataObject "self._setCallbackInfo(self, PyTextDataObject)" wxPyTextDataObject(const wxString& text = wxPyEmptyString); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -343,7 +344,7 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { // Now define it for SWIG class wxPyBitmapDataObject : public wxBitmapDataObject { public: - %addtofunc wxPyBitmapDataObject "self._setCallbackInfo(self, PyBitmapDataObject)" + %pythonAppend wxPyBitmapDataObject "self._setCallbackInfo(self, PyBitmapDataObject)" wxPyBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -359,9 +360,7 @@ public: wxFileDataObject(); const wxArrayString& GetFilenames(); -#ifdef __WXMSW__ void AddFile(const wxString &filename); -#endif }; @@ -424,7 +423,7 @@ public: //--------------------------------------------------------------------------- -#ifndef __WXGTK__ +#if defined(__WXMSW__) || defined(__WXMAC__) %{ #include