X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c12014018b5ba03ed1a97091d0df7a0d7bc9ed7b..52f52ebc4e0be6a9899d328b08db9eb14629d219:/wxPython/src/_dataobj.i?ds=sidebyside diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index 7a52a47305..a0b8fbbdd6 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -57,8 +57,8 @@ public: %nokwargs operator==; %nokwargs operator!=; - bool operator==(int /*wxDataFormatId*/ format) const; - bool operator!=(int /*wxDataFormatId*/ format) const; + bool operator==(wxDataFormatId format) const; + bool operator!=(wxDataFormatId format) const; bool operator==(const wxDataFormat& format) const; bool operator!=(const wxDataFormat& format) const; @@ -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 };