void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
wxPyBeginBlockThreads();
if (m_myInst.findCallback("SetBitmap")) {
- m_myInst.callCallback(Py_BuildValue("(O)",
- wxPyConstructObject((void*)&bitmap, "wxBitmap")));
+ PyObject* bo = wxPyConstructObject((void*)&bitmap, "wxBitmap");
+ m_myInst.callCallback(Py_BuildValue("(O)", bo));
+ Py_DECREF(bo);
}
wxPyEndBlockThreads();
}
const wxArrayString& filenames) {
bool rval = FALSE;
wxPyBeginBlockThreads();
- PyObject* list = wxArrayString2PyList_helper(filenames);
- if (m_myInst.findCallback("OnDropFiles"))
+ if (m_myInst.findCallback("OnDropFiles")) {
+ PyObject* list = wxArrayString2PyList_helper(filenames);
rval = m_myInst.callCallback(Py_BuildValue("(iiO)",x,y,list));
- Py_DECREF(list);
+ Py_DECREF(list);
+ }
wxPyEndBlockThreads();
return rval;
}
PyObject * _resultobj;
wxDragResult _result;
wxPyDropSource * _arg0;
- int _arg1 = (int ) FALSE;
+ int _arg1 = (int ) (wxDrag_CopyOnly);
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","bAllowMove", NULL };
+ char *_kwnames[] = { "self","flags", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDropSource_DoDragDrop",_kwnames,&_argo0,&_arg1))
PyDict_SetItemString(d,"cvar", SWIG_globals);
SWIG_addvarlink(SWIG_globals,"wxFormatInvalid",_wrap_wxPyFormatInvalid_get, _wrap_wxPyFormatInvalid_set);
SWIG_addvarlink(SWIG_globals,"wxTheClipboard",_wrap_wxPyTheClipboard_get, _wrap_wxPyTheClipboard_set);
+ PyDict_SetItemString(d,"wxDrag_CopyOnly", PyInt_FromLong((long) wxDrag_CopyOnly));
+ PyDict_SetItemString(d,"wxDrag_AllowMove", PyInt_FromLong((long) wxDrag_AllowMove));
+ PyDict_SetItemString(d,"wxDrag_DefaultMove", PyInt_FromLong((long) wxDrag_DefaultMove));
PyDict_SetItemString(d,"wxDragError", PyInt_FromLong((long) wxDragError));
PyDict_SetItemString(d,"wxDragNone", PyInt_FromLong((long) wxDragNone));
PyDict_SetItemString(d,"wxDragCopy", PyInt_FromLong((long) wxDragCopy));