mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
git-svn-id: svn://ultimatepp.org/upp/trunk@346 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
fb11d7ab00
commit
8f0faaf56e
186 changed files with 44447 additions and 0 deletions
75
uppdev/CoreTopics/App.h
Normal file
75
uppdev/CoreTopics/App.h
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
String GetExeFilePath();
|
||||
String GetExeDirFile(const char *fp);
|
||||
|
||||
String GetHomeDirFile(const char *fp);
|
||||
String GetHomeDirectory();
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
|
||||
void SetHomeDirectory(const char *dir);
|
||||
|
||||
#endif
|
||||
|
||||
String GetExeTitle();
|
||||
|
||||
void UseHomeDirectoryConfig(bool b = true);
|
||||
|
||||
String ConfigFile(const char *file);
|
||||
String ConfigFile();
|
||||
|
||||
const Vector<String>& CommandLine();
|
||||
const VectorMap<String, String>& Environment();
|
||||
|
||||
void SetExitCode(int code);
|
||||
int GetExitCode();
|
||||
|
||||
bool IsMainRunning();
|
||||
|
||||
#ifndef flagSO
|
||||
//void Main(); // By console application
|
||||
#endif
|
||||
|
||||
void AppExit__();
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
|
||||
void AppInit__(int argc, const char **argv);
|
||||
void AppInitEnvironment__();
|
||||
|
||||
#define CONSOLE_APP_MAIN \
|
||||
void ConsoleMainFn_(); \
|
||||
\
|
||||
int main(int argc, char *argv[]) { \
|
||||
UPP::AppInit__(argc, (const char **)argv); \
|
||||
ConsoleMainFn_(); \
|
||||
UPP::DeleteUsrLog(); \
|
||||
UPP::AppExit__(); \
|
||||
return UPP::GetExitCode(); \
|
||||
} \
|
||||
\
|
||||
void ConsoleMainFn_()
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
|
||||
void AppInit__(int argc, const char **argv, const char **envptr);
|
||||
|
||||
#define CONSOLE_APP_MAIN \
|
||||
void ConsoleMainFn_(); \
|
||||
\
|
||||
int main(int argc, const char **argv, const char **envptr) { \
|
||||
UPP::AppInit__(argc, argv, envptr); \
|
||||
ConsoleMainFn_(); \
|
||||
UPP::DeleteUsrLog(); \
|
||||
UPP::AppExit__(); \
|
||||
return UPP::GetExitCode(); \
|
||||
} \
|
||||
\
|
||||
void ConsoleMainFn_()
|
||||
|
||||
#endif
|
||||
|
||||
String GetDataFile(const char *filename);
|
||||
|
||||
void LaunchWebBrowser(const String& url);
|
||||
Loading…
Reference in a new issue