%name(DropSource) class wxPyDropSource {
public:
+ %pythonAppend wxPyDropSource "self._setCallbackInfo(self, DropSource, 0)"
#ifndef __WXGTK__
wxPyDropSource(wxWindow *win,
const wxCursor © = wxNullCursor,
#endif
void _setCallbackInfo(PyObject* self, PyObject* _class, int incref);
- %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxDropSource, 0)"
~wxPyDropSource();
// set the data which is transfered by drag and drop
void SetData(wxDataObject& data);
-
+
wxDataObject *GetDataObject();
-
+
// set the icon corresponding to given drag result
void SetCursor(wxDragResult res, const wxCursor& cursor);
%name(DropTarget) class wxPyDropTarget // : public wxDropTarget
{
public:
- %addtofunc wxPyDropTarget
+ %pythonAppend wxPyDropTarget
"self._setCallbackInfo(self, DropTarget)"
%apply SWIGTYPE *DISOWN { wxDataObject *dataObject };
%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);
bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString& filenames) {
bool rval = False;
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "OnDropFiles")) {
PyObject* list = wxArrayString2PyList_helper(filenames);
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",x,y,list));
Py_DECREF(list);
}
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return rval;
}
%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);