/** * @author Edouard DUPIN * * @copyright 2010, Edouard DUPIN, all right reserved * * @license GPL v3 (see license file) */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include MainWindows * basicWindows = NULL; /** * @brief Main of the program (This can be set in every case, but it is not used in Andoid...). * @param std IO * @return std IO */ int main(int argc, const char *argv[]) { // only one things to do : return ewol::Run(argc, argv); } /** * @brief main application function Initialisation */ void APP_Init(void) { #ifdef MODE_RELEASE const char * debugMode = "Release"; #else const char * debugMode = "Debug"; #endif #ifdef __TARGET_OS__Linux const char * osMode = "Linux"; #elif defined(__TARGET_OS__Android) const char * osMode = "Android"; #elif defined(__TARGET_OS__Windows) const char * osMode = "Windows"; #elif defined(__TARGET_OS__IOs) const char * osMode = "IOs"; #elif defined(__TARGET_OS__MacOs) const char * osMode = "MacOs"; #else const char * osMode = "Unknown"; #endif APPL_INFO("==> Init "PROJECT_NAME" (START) [" << osMode << "] (" << debugMode << ")"); ewol::ChangeSize(ivec2(800, 600)); etk::InitDefaultFolder(PROJECT_NAME); #ifdef __TARGET_OS__Android ewol::config::FontSetDefault("FreeSerif", 19); #else ewol::config::FontSetDefault("FreeSerif", 14); #endif // set the application icon ... ewol::SetIcon("DATA:icon.png"); // init internal global value globals::init(); // set the application icon ... ewol::SetIcon("DATA:icon.png"); // init ALL Singleton : //(void)CTagsManager::getInstance(); BufferManager::Init(); // set color and other trucs... ColorizeManager::Init(); ColorizeManager::LoadFile( "white" ); ColorizeManager::DisplayListOfColor(); HighlightManager::Init(); HighlightManager::loadLanguages(); cTagsManager::Init(); char cCurrentPath[FILENAME_MAX]; // get the curent program folder if (!getcwd(cCurrentPath, FILENAME_MAX)) { return ; } cCurrentPath[FILENAME_MAX - 1] = '\0'; //APPL_INFO("The current working directory is " << cCurrentPath); basicWindows = new MainWindows(); if (NULL == basicWindows) { APPL_ERROR("Can not allocate the basic windows"); ewol::Stop(); return; } // create the specific windows ewol::WindowsSet(basicWindows); // add files APPL_INFO("show list of files : "); bool ctagDetected = false; for( int32_t iii=0 ; iii Init Edn (END)"); } /** * @brief main application function Un-Initialisation */ void APP_UnInit(void) { APPL_INFO("==> Un-Init Edn (START)"); if (NULL != basicWindows) { delete(basicWindows); basicWindows = NULL; } cTagsManager::UnInit(); APPL_INFO("Stop Hightlight"); HighlightManager::UnInit(); //Kill all singleton APPL_INFO("Stop BufferManager"); BufferManager::UnInit(); APPL_INFO("Stop ColorizeManager"); ColorizeManager::UnInit(); APPL_INFO("==> Un-Init Edn (END)"); }