X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9416aa89ca06d0fb20b1002e026d2c7ac7aa6a17..cbf60e091efac7f407a650f7ec0fa169be89abd5:/wxPython/src/filesys.i diff --git a/wxPython/src/filesys.i b/wxPython/src/filesys.i index 60e5b93abe..2bab95dee8 100644 --- a/wxPython/src/filesys.i +++ b/wxPython/src/filesys.i @@ -2,7 +2,7 @@ // Name: filesys.i // Purpose: SWIG definitions of the wxFileSystem family of classes // -// Author: Joerg Baumann +// Author: Joerg Baumann and Robin Dunn // // Created: 25-Sept-2000 // RCS-ID: $Id$ @@ -14,6 +14,7 @@ %{ #include "helpers.h" +#include "pyistream.h" #include #include #include @@ -36,56 +37,6 @@ //--------------------------------------------------------------------------- -// // typemaps for wxInputStream: Note wxFSFile object has to do the delete -// // of wxInputStream * -// %typemap(python,in) wxInputStream *stream { -// if (PyInstance_Check($source)) { -// wxPyInputStream* ptr; -// if (SWIG_GetPtrObj($source, (void **) &ptr,"_wxPyInputStream_p")) { -// PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); -// return NULL; -// } -// $target = ptr->wxi; -// } else { -// PyErr_SetString(PyExc_TypeError,"Expected _wxInputStream_p."); -// return NULL; -// } -// } - - -// // typemaps for wxInputStream: Note wxFSFile object has to do the delete -// // of wxInputStream * -// %typemap(python,out) wxInputStream* { -// wxPyInputStream * _ptr = NULL; - -// if ($source) { -// _ptr = new wxPyInputStream($source); -// } -// if (_ptr) { -// char swigptr[64]; -// SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); - -// PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); -// if (! classobj) { -// Py_INCREF(Py_None); -// $target = Py_None; -// } else { -// PyObject* arg = Py_BuildValue("(s)", swigptr); -// $target = PyInstance_New(classobj, arg, NULL); -// Py_DECREF(arg); - -// // set ThisOwn -// PyObject* one = PyInt_FromLong(1); -// PyObject_SetAttrString($target, "thisown", one); -// Py_DECREF(one); -// } -// } else { -// Py_INCREF(Py_None); -// $target = Py_None; -// } -// } - - class wxFSFile : public wxObject { public: @@ -159,8 +110,8 @@ IMP_PYCALLBACK_STRING__pure(wxPyFileSystemHandler, wxFileSystemHandler, FindNext public: wxPyFileSystemHandler(); - void _setSelf(PyObject* self, PyObject* _class); - %pragma(python) addtomethod = "__init__:self._setSelf(self, wxFileSystemHandler)" + void _setCallbackInfo(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxFileSystemHandler)" bool CanOpen(const wxString& location); wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);