#include <OSystem.hxx>
Definition at line 6 of file OSystem.hxx.
◆ Type
Enumerator |
---|
unknown | |
windows | |
unix | |
linux | |
macos | |
bsd | |
haiku | |
beos | |
android | |
Definition at line 8 of file OSystem.hxx.
◆ error()
Definition at line 34 of file OSystem.cxx.
36 #if defined(CYTOPIA_PLATFORM_LINUX)
37 const char *dialogCommand = getDialogCommand();
41 command +=
" --title \"" + title +
"\" --msgbox \"" + text +
"\"";
42 int syserror = ::system(command.c_str());
45 LOG(
LOG_DEBUG) <<
"WARNING: Cant execute command " << command;
50 #elif defined(CYTOPIA_PLATFORM_WIN)
51 MessageBox(
nullptr, text.c_str(), title.c_str(), MB_OK | MB_ICONERROR);
◆ is()
Definition at line 88 of file OSystem.cxx.
90 #define RETURN_TRUE(t) \
94 #ifdef CYTOPIA_PLATFORM_WIN
98 #ifdef CYTOPIA_PLATFORM_LINUX
102 #ifdef CYTOPIA_PLATFORM_UNIX
106 #ifdef CYTOPIA_PLATFORM_ANDROID
110 #ifdef CYTOPIA_PLATFORM_MACOSX
114 #ifdef CYTOPIA_PLATFORM_XBSD
118 #ifdef CYTOPIA_PLATFORM_HAIKU
122 #ifdef CYTOPIA_PLATFORM_BEOS
◆ isAndroid()
bool OSystem::isAndroid |
( |
| ) |
|
|
static |
◆ isLinux()
bool OSystem::isLinux |
( |
| ) |
|
|
static |
◆ isMac()
◆ isUnix()
◆ isWindows()
bool OSystem::isWindows |
( |
| ) |
|
|
static |
◆ openDir()
Definition at line 71 of file OSystem.cxx.
75 #ifdef CYTOPIA_PLATFORM_LINUX
76 command = prefix +
"nautilus '" + path +
"' &";
77 ::system(command.c_str());
78 #elif defined(CYTOPIA_PLATFORM_WIN)
79 ShellExecute(GetDesktopWindow(),
"open", path.c_str(),
nullptr,
nullptr, SW_SHOWNORMAL);
81 #elif defined(CYTOPIA_PLATFORM_MACOSX)
82 command =
"open \"" + path +
"\" &";
83 ::system(command.c_str());
◆ openUrl()
Definition at line 55 of file OSystem.cxx.
57 #ifdef CYTOPIA_PLATFORM_LINUX
58 std::string command = prefix +
"xdg-open '" + url +
"'";
60 ::system(command.c_str());
62 #elif defined(CYTOPIA_PLATFORM_WIN)
63 ShellExecuteA(0,
"Open", url.c_str(), 0, 0, SW_SHOW);
65 #elif defined(CYTOPIA_PLATFORM_MACOSX)
67 ::system(command.c_str());
The documentation for this struct was generated from the following files: