[DEV] update new interface EWOL ewol::constext::Application

This commit is contained in:
Edouard DUPIN 2014-06-05 21:57:42 +02:00
parent 173e57342d
commit 55e05d24a3

View File

@ -28,22 +28,11 @@
#include <appl/ctags/readtags.h>
#include <appl/globalMsg.h>
/**
* @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);
}
ewol::object::Shared<appl::BufferManager> bufferManager = NULL;
ewol::object::Shared<appl::BufferManager> bufferManager;
/**
* @brief main application function initialisation
*/
bool APP_Init(ewol::Context& _context, size_t _initId, size_t& _nbInitStep) {
_nbInitStep = 1;
class MainApplication : public ewol::context::Application {
public:
bool init(ewol::Context& _context, size_t _initId) {
APPL_INFO(" == > init APPL v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
etk::theme::setName("COLOR", "color/black/");
@ -118,13 +107,8 @@ bool APP_Init(ewol::Context& _context, size_t _initId, size_t& _nbInitStep) {
APPL_INFO(" == > init " PROJECT_NAME " (END)");
return true;
}
/**
* @brief main application function Un-Initialisation
*/
void APP_UnInit(ewol::Context& _context) {
}
void unInit(ewol::Context& _context) {
APPL_INFO(" == > Un-Init " PROJECT_NAME " (START)");
appl::textPluginManager::unInit();
APPL_INFO("Stop Hightlight");
@ -132,5 +116,19 @@ void APP_UnInit(ewol::Context& _context) {
//Kill all singleton
bufferManager.reset();
APPL_INFO(" == > Un-Init " 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(new MainApplication(), _argc, _argv);
}