/** @file * @author Edouard DUPIN * @copyright 2016, Edouard DUPIN, all right reserved * @license PROPRIETARY (see license file) */ #include #include #include #include #include #include #include #include #include class MainApplication : public ewol::context::Application { public: void onCreate(ewol::Context& _context) override { APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { etk::String tmpppp = _context.getCmd().get(iii); if ( tmpppp == "-h" || tmpppp == "--help") { APPL_INFO(" -h/--help display this help" ); exit(0); } } // TODO : Remove this : Move if in the windows properties _context.setSize(vec2(800, 600)); // select internal data for font ... _context.getFontDefault().setUseExternal(false); _context.getFontDefault().set("FreeMono;FreeSerif;DejaVuSansMono;DroidSansMono", 24); appl::widget::TextAreaRecognition::createManagerWidget(_context.getWidgetManager()); ewol::widget::WindowsShared basicWindows = appl::Windows::create(); // create the specific windows _context.setWindows(basicWindows); APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } void onStart(ewol::Context& _context) override { APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); // nothing to do ... APPL_INFO("==> START ... " PROJECT_NAME " (END)"); } void onStop(ewol::Context& _context) override { APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); // nothing to do ... APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); } }; /** * @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[]) { // second possibility return ewol::run(ETK_NEW(MainApplication), _argc, _argv); }