const wxArrayString& filenames) {
bool rval = FALSE;
wxPyTState* state = wxPyBeginBlockThreads();
- PyObject* list = PyList_New(0);
- for (size_t i=0; i<filenames.GetCount(); i++) {
- PyObject* str = PyString_FromString(filenames[i].c_str());
- PyList_Append(list, str);
- }
+ PyObject* list = wxArrayString2PyList_helper(filenames);
if (m_myInst.findCallback("OnDropFiles"))
rval = m_myInst.callCallback(Py_BuildValue("(iiO)",x,y,list));
Py_DECREF(list);
static PyObject * wxFileDataObject_GetFilenames(wxFileDataObject *self) {
const wxArrayString& strings = self->GetFilenames();
- PyObject* list = PyList_New(0);
- for (size_t x=0; x<strings.GetCount(); x++)
- PyList_Append(list, PyString_FromString(strings[x]));
- return list;
+ return wxArrayString2PyList_helper(strings);
}
static PyObject *_wrap_wxFileDataObject_GetFilenames(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
return _resultobj;
}
+static void *SwigwxURLDataObjectTowxDataObjectComposite(void *ptr) {
+ wxURLDataObject *src;
+ wxDataObjectComposite *dest;
+ src = (wxURLDataObject *) ptr;
+ dest = (wxDataObjectComposite *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxURLDataObjectTowxDataObject(void *ptr) {
+ wxURLDataObject *src;
+ wxDataObject *dest;
+ src = (wxURLDataObject *) ptr;
+ dest = (wxDataObject *) src;
+ return (void *) dest;
+}
+
+#define new_wxURLDataObject() (new wxURLDataObject())
+static PyObject *_wrap_new_wxURLDataObject(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxURLDataObject * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxURLDataObject",_kwnames))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (wxURLDataObject *)new_wxURLDataObject();
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxURLDataObject_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxURLDataObject_GetURL(_swigobj) (_swigobj->GetURL())
+static PyObject *_wrap_wxURLDataObject_GetURL(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxString * _result;
+ wxURLDataObject * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxURLDataObject_GetURL",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxURLDataObject_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxURLDataObject_GetURL. Expected _wxURLDataObject_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = new wxString (wxURLDataObject_GetURL(_arg0));
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+}{
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+ delete _result;
+}
+ return _resultobj;
+}
+
+#define wxURLDataObject_SetURL(_swigobj,_swigarg0) (_swigobj->SetURL(_swigarg0))
+static PyObject *_wrap_wxURLDataObject_SetURL(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxURLDataObject * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","url", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxURLDataObject_SetURL",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxURLDataObject_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxURLDataObject_SetURL. Expected _wxURLDataObject_p.");
+ return NULL;
+ }
+ }
+{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxURLDataObject_SetURL(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
static void *SwigwxClipboardTowxObject(void *ptr) {
wxClipboard *src;
wxObject *dest;
{ "wxClipboard_Close", (PyCFunction) _wrap_wxClipboard_Close, METH_VARARGS | METH_KEYWORDS },
{ "wxClipboard_Open", (PyCFunction) _wrap_wxClipboard_Open, METH_VARARGS | METH_KEYWORDS },
{ "new_wxClipboard", (PyCFunction) _wrap_new_wxClipboard, METH_VARARGS | METH_KEYWORDS },
+ { "wxURLDataObject_SetURL", (PyCFunction) _wrap_wxURLDataObject_SetURL, METH_VARARGS | METH_KEYWORDS },
+ { "wxURLDataObject_GetURL", (PyCFunction) _wrap_wxURLDataObject_GetURL, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxURLDataObject", (PyCFunction) _wrap_new_wxURLDataObject, METH_VARARGS | METH_KEYWORDS },
{ "wxCustomDataObject_GetData", (PyCFunction) _wrap_wxCustomDataObject_GetData, METH_VARARGS | METH_KEYWORDS },
{ "wxCustomDataObject_GetSize", (PyCFunction) _wrap_wxCustomDataObject_GetSize, METH_VARARGS | METH_KEYWORDS },
{ "wxCustomDataObject_SetData", (PyCFunction) _wrap_wxCustomDataObject_SetData, METH_VARARGS | METH_KEYWORDS },
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
+ { "_wxDataObject","_wxURLDataObject",SwigwxURLDataObjectTowxDataObject},
{ "_wxDataObject","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObject},
{ "_wxDataObject","_wxFileDataObject",SwigwxFileDataObjectTowxDataObject},
{ "_wxDataObject","_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxDataObject},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
+ { "_wxDataObjectComposite","_wxURLDataObject",SwigwxURLDataObjectTowxDataObjectComposite},
{ "_wxPyDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
{ "_wxPyDropTarget","_wxPyTextDropTarget",SwigwxPyTextDropTargetTowxPyDropTarget},
{0,0,0}};
PyDict_SetItemString(d,"wxDragNone", PyInt_FromLong((long) wxDragNone));
PyDict_SetItemString(d,"wxDragCopy", PyInt_FromLong((long) wxDragCopy));
PyDict_SetItemString(d,"wxDragMove", PyInt_FromLong((long) wxDragMove));
+ PyDict_SetItemString(d,"wxDragLink", PyInt_FromLong((long) wxDragLink));
PyDict_SetItemString(d,"wxDragCancel", PyInt_FromLong((long) wxDragCancel));