X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b813b73cd79cfb4d275e9628811f379e8c5ee39..5c6bd4a9570c63619275710f0b91a93231532b98:/include/wx/mimetype.h diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index 0f5b78819b..241bdb34f9 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -13,7 +13,7 @@ #ifndef _WX_MIMETYPE_H_ #define _WX_MIMETYPE_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "mimetypebase.h" #endif // __GNUG__ @@ -23,6 +23,8 @@ #include "wx/defs.h" +#if wxUSE_MIMETYPE + // the things we really need #include "wx/string.h" #include "wx/dynarray.h" @@ -79,10 +81,10 @@ class WXDLLEXPORT wxFileTypeInfo public: // ctors // a normal item - wxFileTypeInfo(const char *mimeType, - const char *openCmd, - const char *printCmd, - const char *desc, + wxFileTypeInfo(const wxChar *mimeType, + const wxChar *openCmd, + const wxChar *printCmd, + const wxChar *desc, // the other parameters form a NULL terminated list of // extensions ...); @@ -174,7 +176,8 @@ public: public: // ctors MessageParameters() { } - MessageParameters(const wxString& filename, const wxString& mimetype) + MessageParameters(const wxString& filename, + const wxString& mimetype = _T("")) : m_filename(filename), m_mimetype(mimetype) { } // accessors (called by GetOpenCommand) @@ -219,6 +222,9 @@ public: // get the command to execute the file of given type bool GetOpenCommand(wxString *openCmd, const MessageParameters& params) const; + // a simpler to use version of GetOpenCommand() -- it only takes the + // filename and returns an empty string on failure + wxString GetOpenCommand(const wxString& filename) const; // get the command to print the file of given type bool GetPrintCommand(wxString *printCmd, const MessageParameters& params) const; @@ -385,5 +391,7 @@ private: // the default mime manager for wxWindows programs WXDLLEXPORT_DATA(extern wxMimeTypesManager *) wxTheMimeTypesManager; +#endif // wxUSE_MIMETYPE + #endif //_WX_MIMETYPE_H_