From b0078027defecd8fc1162404f06ec3af80d746f4 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 2 Jul 2011 18:24:00 +0000 Subject: [PATCH] .developing rainbow git-svn-id: svn://ultimatepp.org/upp/trunk@3593 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- rainbow/LinuxFb/Local.h | 19 +++++++++++++++++++ rainbow/WinFb/Local.h | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 rainbow/LinuxFb/Local.h create mode 100644 rainbow/WinFb/Local.h diff --git a/rainbow/LinuxFb/Local.h b/rainbow/LinuxFb/Local.h new file mode 100644 index 000000000..a716b9bde --- /dev/null +++ b/rainbow/LinuxFb/Local.h @@ -0,0 +1,19 @@ +#ifdef PLATFORM_POSIX +void FBInit(const String& fbdevice); + +#define GUI_APP_MAIN \ +void GuiMainFn_();\ +\ +int main(int argc, const char **argv, const char **envptr) { \ + UPP::AppInit__(argc, argv, envptr); \ + FBInit("/dev/fb0"); \ + GuiMainFn_(); \ + UPP::Ctrl::CloseTopCtrls(); \ + UPP::UsrLog("---------- About to delete this log of LinuxFB..."); \ + UPP::DeleteUsrLog(); \ + return UPP::GetExitCode(); \ +} \ +\ +void GuiMainFn_() + +#endif diff --git a/rainbow/WinFb/Local.h b/rainbow/WinFb/Local.h new file mode 100644 index 000000000..16e3ec3b0 --- /dev/null +++ b/rainbow/WinFb/Local.h @@ -0,0 +1,21 @@ +Vector& coreCmdLine__(); +Vector SplitCmdLine__(const char *cmd); + +void FBInit(HINSTANCE hInstance); + +#define GUI_APP_MAIN \ +void GuiMainFn_();\ +\ +int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) \ +{ \ + UPP::coreCmdLine__() = UPP::SplitCmdLine__(UPP::FromSystemCharset(lpCmdLine)); \ + UPP::AppInitEnvironment__(); \ + UPP::FBInit(hInstance); \ + GuiMainFn_(); \ + UPP::Ctrl::CloseTopCtrls(); \ + UPP::UsrLog("---------- About to delete this log of WinFB..."); \ + UPP::DeleteUsrLog(); \ + return UPP::GetExitCode(); \ +} \ +\ +void GuiMainFn_()