diff options
Diffstat (limited to 'src/porting.h')
-rw-r--r-- | src/porting.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/porting.h b/src/porting.h index f50f0a950..e4ebe36fd 100644 --- a/src/porting.h +++ b/src/porting.h @@ -309,6 +309,8 @@ inline const char *getPlatformName() #else "SunOS" #endif +#elif defined(__HAIKU__) + "Haiku" #elif defined(__CYGWIN__) "Cygwin" #elif defined(__unix__) || defined(__unix) @@ -330,7 +332,25 @@ void attachOrCreateConsole(); int mt_snprintf(char *buf, const size_t buf_size, const char *fmt, ...); -bool openURL(const std::string &url); +/** + * Opens URL in default web browser + * + * Must begin with http:// or https://, and not contain any new lines + * + * @param url The URL + * @return true on success, false on failure + */ +bool open_url(const std::string &url); + +/** + * Opens a directory in the default file manager + * + * The directory must exist. + * + * @param path Path to directory + * @return true on success, false on failure + */ +bool open_directory(const std::string &path); } // namespace porting |