X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2e2649fabec084eb93468ba8c21f0f6eb45ff17..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/src/_filesys.i diff --git a/wxPython/src/_filesys.i b/wxPython/src/_filesys.i index a423b23fe5..fa76da3e68 100644 --- a/wxPython/src/_filesys.i +++ b/wxPython/src/_filesys.i @@ -38,10 +38,19 @@ public: ~wxFSFile(); wxInputStream *GetStream(); + void DetachStream(); + const wxString& GetMimeType(); const wxString& GetLocation(); const wxString& GetAnchor(); wxDateTime GetModificationTime(); + + %property(Anchor, GetAnchor, doc="See `GetAnchor`"); + %property(Location, GetLocation, doc="See `GetLocation`"); + %property(MimeType, GetMimeType, doc="See `GetMimeType`"); + %property(ModificationTime, GetModificationTime, doc="See `GetModificationTime`"); + %property(Stream, GetStream, doc="See `GetStream`"); + }; @@ -104,7 +113,7 @@ public: class wxPyFileSystemHandler : public wxFileSystemHandler { public: - %pythonAppend wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)"; + %pythonAppend wxPyFileSystemHandler setCallbackInfo(FileSystemHandler) wxPyFileSystemHandler(); @@ -121,6 +130,12 @@ public: wxString GetAnchor(const wxString& location); wxString GetRightLocation(const wxString& location); wxString GetMimeTypeFromExt(const wxString& location); + + %property(Anchor, GetAnchor, doc="See `GetAnchor`"); + %property(LeftLocation, GetLeftLocation, doc="See `GetLeftLocation`"); + %property(MimeTypeFromExt, GetMimeTypeFromExt, doc="See `GetMimeTypeFromExt`"); + %property(Protocol, GetProtocol, doc="See `GetProtocol`"); + %property(RightLocation, GetRightLocation, doc="See `GetRightLocation`"); }; @@ -129,9 +144,15 @@ public: class wxFileSystem : public wxObject { public: + // turn off this typemap + %typemap(out) wxFileSystem*; + wxFileSystem(); ~wxFileSystem(); + // Turn it back on again + %typemap(out) wxFileSystem* { $result = wxPyMake_wxObject($1, $owner); } + void ChangePathTo(const wxString& location, bool is_dir = false); wxString GetPath(); @@ -145,6 +166,10 @@ public: static void AddHandler(wxFileSystemHandler *handler); %cleardisown(wxFileSystemHandler *handler); + // Removes FS handler + %newobject RemoveHandler; + static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler); + static void CleanUpHandlers(); // Returns the file URL for a native path @@ -158,6 +183,8 @@ public: return fname.GetFullPath(); } } + + %property(Path, GetPath, doc="See `GetPath`"); };