Use the DISOWN typemap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,6 +40,9 @@ public:
|
||||
// query whether the clipboard is opened
|
||||
virtual bool IsOpened() const;
|
||||
|
||||
|
||||
%apply SWIGTYPE *DISOWN { wxDataObject *data };
|
||||
|
||||
// add to the clipboard data
|
||||
//
|
||||
// NB: the clipboard owns the pointer and will delete it, so data must be
|
||||
@@ -50,6 +53,8 @@ public:
|
||||
// AddData()
|
||||
virtual bool SetData( wxDataObject *data );
|
||||
|
||||
%clear wxDataObject *data;
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupported( const wxDataFormat& format );
|
||||
|
||||
|
@@ -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;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@@ -119,8 +119,8 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
|
||||
{
|
||||
public:
|
||||
%addtofunc wxPyDropTarget
|
||||
"if args: args[0].thisown = 0;
|
||||
self._setCallbackInfo(self, DropTarget)"
|
||||
"self._setCallbackInfo(self, DropTarget)"
|
||||
%apply SWIGTYPE *DISOWN { wxDataObject *dataObject };
|
||||
|
||||
wxPyDropTarget(wxDataObject *dataObject = NULL);
|
||||
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
||||
@@ -129,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();
|
||||
|
@@ -578,8 +578,9 @@ public:
|
||||
|
||||
// is there a way to tell SWIG to disown this???
|
||||
|
||||
%addtofunc AssignImageList "args[1].thisown = 0";
|
||||
%apply SWIGTYPE *DISOWN { wxImageList *imageList };
|
||||
void AssignImageList(wxImageList *imageList, int which);
|
||||
%clear wxImageList *imageList;
|
||||
|
||||
// returns True if it is a virtual list control
|
||||
bool IsVirtual() const;
|
||||
|
@@ -64,8 +64,9 @@ public:
|
||||
virtual void SetImageList(wxImageList *imageList);
|
||||
|
||||
// as SetImageList() but we will delete the image list ourselves
|
||||
%addtofunc AssignImageList "args[1].thisown = 0"
|
||||
%apply SWIGTYPE *DISOWN { wxImageList *imageList };
|
||||
void AssignImageList(wxImageList *imageList);
|
||||
%clear wxImageList *imageList;
|
||||
|
||||
// get pointer (may be NULL) to the associated image list
|
||||
wxImageList* GetImageList() const;
|
||||
|
@@ -371,10 +371,10 @@ public:
|
||||
void SetImageList(wxImageList *imageList);
|
||||
void SetStateImageList(wxImageList *imageList);
|
||||
|
||||
%addtofunc AssignImageList "args[1].thisown = 0";
|
||||
%addtofunc AssignStateImageList "args[1].thisown = 0";
|
||||
%apply SWIGTYPE *DISOWN { wxImageList *imageList };
|
||||
void AssignImageList(wxImageList *imageList);
|
||||
void AssignStateImageList(wxImageList *imageList);
|
||||
%clear wxImageList *imageList;
|
||||
|
||||
|
||||
// retrieve items label
|
||||
|
@@ -683,8 +683,10 @@ public:
|
||||
|
||||
// set/retrieve the drop target associated with this window (may be
|
||||
// NULL; it's owned by the window and will be deleted by it)
|
||||
%addtofunc SetDropTarget "args[1].thisown = 0"
|
||||
%apply SWIGTYPE *DISOWN { wxPyDropTarget *dropTarget };
|
||||
virtual void SetDropTarget( wxPyDropTarget *dropTarget );
|
||||
%clear wxPyDropTarget *dropTarget;
|
||||
|
||||
virtual wxPyDropTarget *GetDropTarget() const;
|
||||
|
||||
#ifdef __WXMSW__ // TODO: should I drop-kick this?
|
||||
|
Reference in New Issue
Block a user