X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8bc7bb84dcca816055d5876e4772551c48acda5..5dacf03c57128529219145bafe9cee07d4348e85:/wxPython/src/msw/clip_dnd.cpp diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index 493610c844..9a4fceba93 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -86,6 +85,9 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } + + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyEmptyString(wxT("")); // An alternate constructor... wxDataFormat* wxCustomDataFormat(const wxString &id) { return new wxDataFormat(id); @@ -144,7 +146,7 @@ bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) { // Create a new class for wxPython to use class wxPyTextDataObject : public wxTextDataObject { public: - wxPyTextDataObject(const wxString& text = wxEmptyString) + wxPyTextDataObject(const wxString& text = wxPyEmptyString) : wxTextDataObject(text) {} DEC_PYCALLBACK_SIZET_(GetTextLength); @@ -188,29 +190,34 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() { 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, wxT("wxBitmap")); + m_myInst.callCallback(Py_BuildValue("(O)", bo)); + Py_DECREF(bo); } wxPyEndBlockThreads(); } #include - // See below in the init function... - wxClipboard* wxPyTheClipboard; +#if 0 +extern wxClipboard * wxTheClipboard; + +#endif class wxPyDropSource : public wxDropSource { public: -#ifdef __WXMSW__ - wxPyDropSource(wxWindow *win = NULL, - const wxCursor &cursorCopy = wxNullCursor, - const wxCursor &cursorMove = wxNullCursor, - const wxCursor &cursorStop = wxNullCursor) - : wxDropSource(win, cursorCopy, cursorMove, cursorStop) {} +#ifndef __WXGTK__ + wxPyDropSource(wxWindow *win = NULL, + const wxCursor © = wxNullCursor, + const wxCursor &move = wxNullCursor, + const wxCursor &none = wxNullCursor) + : wxDropSource(win, copy, move, none) {} #else wxPyDropSource(wxWindow *win = NULL, - const wxIcon &go = wxNullIcon) - : wxDropSource(win, go) {} + const wxIcon& copy = wxNullIcon, + const wxIcon& move = wxNullIcon, + const wxIcon& none = wxNullIcon) + : wxDropSource(win, copy, move, none) {} #endif ~wxPyDropSource() { } @@ -290,10 +297,11 @@ bool wxPyFileDropTarget::OnDropFiles(wxCoord x, wxCoord y, 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; } @@ -360,17 +368,17 @@ static PyObject *_wrap_wxPyFormatInvalid_get() { return pyobj; } -static int _wrap_wxPyTheClipboard_set(PyObject *val) { +static int _wrap_wxTheClipboard_set(PyObject *val) { PyErr_SetString(PyExc_TypeError,"Variable wxTheClipboard is read-only."); return 1; } -static PyObject *_wrap_wxPyTheClipboard_get() { +static PyObject *_wrap_wxTheClipboard_get() { PyObject * pyobj; char ptemp[128]; - SWIG_MakePtr(ptemp, (char *) wxPyTheClipboard,"_wxClipboard_p"); + SWIG_MakePtr(ptemp, (char *) wxTheClipboard,"_wxClipboard_p"); pyobj = PyString_FromString(ptemp); return pyobj; } @@ -532,7 +540,7 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -547,12 +555,13 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje static PyObject *_wrap_wxDataFormat_SetId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDataFormat * _arg0; - wxChar * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","format", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxDataFormat_SetId",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataFormat_SetId",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -561,14 +570,23 @@ static PyObject *_wrap_wxDataFormat_SetId(PyObject *self, PyObject *args, PyObje return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDataFormat_SetId(_arg0,_arg1); + wxDataFormat_SetId(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -698,36 +716,44 @@ static PyObject *_wrap_wxDataObject_GetAllFormats(PyObject *self, PyObject *args return _resultobj; } -#define wxDataObject_GetDataSize(_swigobj,_swigarg0) (_swigobj->GetDataSize(_swigarg0)) -static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDataObject_GetDataHere(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDataHere(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - size_t _result; + bool _result; wxDataObject * _arg0; wxDataFormat * _arg1; + void * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","format", NULL }; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","format","buf", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataObject_GetDataSize",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDataObject_GetDataHere",_kwnames,&_argo0,&_argo1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataSize. Expected _wxDataObject_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataHere. Expected _wxDataObject_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataSize. Expected _wxDataFormat_p."); + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataHere. Expected _wxDataFormat_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,(char *) 0 )) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDataObject_GetDataHere. Expected _void_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); + _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -735,45 +761,35 @@ static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, return _resultobj; } -#define wxDataObject_GetDataHere(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDataHere(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDataObject_GetDataSize(_swigobj,_swigarg0) (_swigobj->GetDataSize(_swigarg0)) +static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + size_t _result; wxDataObject * _arg0; wxDataFormat * _arg1; - void * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","format","buf", NULL }; + char *_kwnames[] = { "self","format", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDataObject_GetDataHere",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataObject_GetDataSize",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataHere. Expected _wxDataObject_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataSize. Expected _wxDataObject_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataHere. Expected _wxDataFormat_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,(char *) 0 )) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDataObject_GetDataHere. Expected _void_p."); + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataSize. Expected _wxDataFormat_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); + _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -805,8 +821,7 @@ static PyObject *_wrap_wxDataObject_SetData(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_SetData. Expected _wxDataFormat_p."); return NULL; } @@ -849,8 +864,7 @@ static PyObject *_wrap_wxDataObject_IsSupportedFormat(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_IsSupportedFormat. Expected _wxDataFormat_p."); return NULL; } @@ -886,8 +900,7 @@ static PyObject *_wrap_new_wxDataObjectSimple(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxDataObjectSimple",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDataObjectSimple. Expected _wxDataFormat_p."); return NULL; } @@ -964,8 +977,7 @@ static PyObject *_wrap_wxDataObjectSimple_SetFormat(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObjectSimple_SetFormat. Expected _wxDataFormat_p."); return NULL; } @@ -1010,8 +1022,7 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPyDataObjectSimple",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPyDataObjectSimple. Expected _wxDataFormat_p."); return NULL; } @@ -1162,7 +1173,7 @@ static void *SwigwxTextDataObjectTowxDataObject(void *ptr) { static PyObject *_wrap_new_wxTextDataObject(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextDataObject * _result; - wxString * _arg0 = (wxString *) &wxEmptyString; + wxString * _arg0 = (wxString *) &wxPyEmptyString; PyObject * _obj0 = 0; char *_kwnames[] = { "text", NULL }; char _ptemp[128]; @@ -1250,7 +1261,7 @@ static PyObject *_wrap_wxTextDataObject_GetText(PyObject *self, PyObject *args, if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1328,7 +1339,7 @@ static void *SwigwxPyTextDataObjectTowxDataObject(void *ptr) { static PyObject *_wrap_new_wxPyTextDataObject(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyTextDataObject * _result; - wxString * _arg0 = (wxString *) &wxEmptyString; + wxString * _arg0 = (wxString *) &wxPyEmptyString; PyObject * _obj0 = 0; char *_kwnames[] = { "text", NULL }; char _ptemp[128]; @@ -1429,8 +1440,7 @@ static PyObject *_wrap_new_wxBitmapDataObject(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBitmapDataObject",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBitmapDataObject. Expected _wxBitmap_p."); return NULL; } @@ -1501,8 +1511,7 @@ static PyObject *_wrap_wxBitmapDataObject_SetBitmap(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapDataObject_SetBitmap. Expected _wxBitmap_p."); return NULL; } @@ -1555,8 +1564,7 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPyBitmapDataObject",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPyBitmapDataObject. Expected _wxBitmap_p."); return NULL; } @@ -1758,8 +1766,7 @@ static PyObject *_wrap_new_wxCustomDataObject(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxCustomDataObject",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCustomDataObject. Expected _wxDataFormat_p."); return NULL; } @@ -1983,7 +1990,7 @@ static PyObject *_wrap_wxURLDataObject_GetURL(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2095,8 +2102,7 @@ static PyObject *_wrap_wxMetafileDataObject_SetMetafile(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMetafileDataObject_SetMetafile. Expected _wxMetafile_p."); return NULL; } @@ -2355,8 +2361,7 @@ static PyObject *_wrap_wxClipboard_IsSupported(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxClipboard_IsSupported. Expected _wxDataFormat_p."); return NULL; } @@ -2392,8 +2397,7 @@ static PyObject *_wrap_wxClipboard_GetData(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxClipboard_GetData. Expected _wxDataObject_p."); return NULL; } @@ -2505,7 +2509,7 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject PyObject * _argo1 = 0; PyObject * _argo2 = 0; PyObject * _argo3 = 0; - char *_kwnames[] = { "win","cursorCopy","cursorMove","cursorStop", NULL }; + char *_kwnames[] = { "win","copy","move","none", NULL }; char _ptemp[128]; self = self; @@ -2519,22 +2523,19 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDropSource. Expected _wxCursor_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxDropSource. Expected _wxCursor_p."); return NULL; } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxDropSource. Expected _wxCursor_p."); return NULL; } @@ -2642,8 +2643,7 @@ static PyObject *_wrap_wxDropSource_SetData(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDropSource_SetData. Expected _wxDataObject_p."); return NULL; } @@ -2715,8 +2715,7 @@ static PyObject *_wrap_wxDropSource_SetCursor(PyObject *self, PyObject *args, Py } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDropSource_SetCursor. Expected _wxCursor_p."); return NULL; } @@ -2737,9 +2736,9 @@ static PyObject *_wrap_wxDropSource_DoDragDrop(PyObject *self, PyObject *args, P 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)) @@ -3659,8 +3658,8 @@ static PyMethodDef clip_dndcMethods[] = { { "new_wxDataObjectSimple", (PyCFunction) _wrap_new_wxDataObjectSimple, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_IsSupportedFormat", (PyCFunction) _wrap_wxDataObject_IsSupportedFormat, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_SetData", (PyCFunction) _wrap_wxDataObject_SetData, METH_VARARGS | METH_KEYWORDS }, - { "wxDataObject_GetDataHere", (PyCFunction) _wrap_wxDataObject_GetDataHere, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetDataSize", (PyCFunction) _wrap_wxDataObject_GetDataSize, METH_VARARGS | METH_KEYWORDS }, + { "wxDataObject_GetDataHere", (PyCFunction) _wrap_wxDataObject_GetDataHere, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetAllFormats", (PyCFunction) _wrap_wxDataObject_GetAllFormats, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetFormatCount", (PyCFunction) _wrap_wxDataObject_GetFormatCount, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetPreferredFormat", (PyCFunction) _wrap_wxDataObject_GetPreferredFormat, METH_VARARGS | METH_KEYWORDS }, @@ -3833,10 +3832,14 @@ SWIGEXPORT(void) initclip_dndc() { PyDict_SetItemString(d,"wxDF_FILENAME", PyInt_FromLong((long) wxDF_FILENAME)); PyDict_SetItemString(d,"wxDF_LOCALE", PyInt_FromLong((long) wxDF_LOCALE)); PyDict_SetItemString(d,"wxDF_PRIVATE", PyInt_FromLong((long) wxDF_PRIVATE)); + PyDict_SetItemString(d,"wxDF_HTML", PyInt_FromLong((long) wxDF_HTML)); PyDict_SetItemString(d,"wxDF_MAX", PyInt_FromLong((long) wxDF_MAX)); 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); + SWIG_addvarlink(SWIG_globals,"wxTheClipboard",_wrap_wxTheClipboard_get, _wrap_wxTheClipboard_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)); @@ -3845,7 +3848,6 @@ SWIGEXPORT(void) initclip_dndc() { PyDict_SetItemString(d,"wxDragCancel", PyInt_FromLong((long) wxDragCancel)); - wxPyTheClipboard = wxTheClipboard; wxPyPtrTypeMap_Add("wxDropSource", "wxPyDropSource"); wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget"); wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget");