[DEV] correct application interface (update)
This commit is contained in:
parent
52ee889ee5
commit
dbac89199f
@ -73,8 +73,9 @@ namespace appl {
|
|||||||
std::vector<HighlightPattern> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 == > When we display the buffer( only the display area (100 lines)) )
|
std::vector<HighlightPattern> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 == > When we display the buffer( only the display area (100 lines)) )
|
||||||
std::map<std::string, std::vector<HighlightPattern>> m_listHighlightNamed; //!< list of all sub partern to parse...
|
std::map<std::string, std::vector<HighlightPattern>> m_listHighlightNamed; //!< list of all sub partern to parse...
|
||||||
public: // herited function :
|
public: // herited function :
|
||||||
virtual void updateContext() {
|
virtual bool updateContext() {
|
||||||
// no upfate to do ...
|
// no upfate to do ...
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,8 +34,8 @@ class MainApplication : public ewol::context::Application {
|
|||||||
std::shared_ptr<appl::BufferManager> m_bufferManager;
|
std::shared_ptr<appl::BufferManager> m_bufferManager;
|
||||||
std::shared_ptr<appl::textPluginManager> m_pluginManager;
|
std::shared_ptr<appl::textPluginManager> m_pluginManager;
|
||||||
public:
|
public:
|
||||||
bool init(ewol::Context& _context, size_t _initId) {
|
virtual void onCreate(ewol::Context& _context) {
|
||||||
APPL_INFO(" == > init APPL v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
|
APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ") (BEGIN)");
|
||||||
for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) {
|
for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) {
|
||||||
std::string tmpppp = _context.getCmd().get(iii);
|
std::string tmpppp = _context.getCmd().get(iii);
|
||||||
if ( tmpppp == "-h"
|
if ( tmpppp == "-h"
|
||||||
@ -63,7 +63,11 @@ class MainApplication : public ewol::context::Application {
|
|||||||
|
|
||||||
// set the application icon ...
|
// set the application icon ...
|
||||||
_context.setIcon("DATA:icon.png");
|
_context.setIcon("DATA:icon.png");
|
||||||
|
APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)");
|
||||||
|
}
|
||||||
|
|
||||||
|
void onStart(ewol::Context& _context) {
|
||||||
|
APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)");
|
||||||
// init internal global value
|
// init internal global value
|
||||||
globals::init();
|
globals::init();
|
||||||
|
|
||||||
@ -78,7 +82,7 @@ class MainApplication : public ewol::context::Application {
|
|||||||
char cCurrentPath[FILENAME_MAX];
|
char cCurrentPath[FILENAME_MAX];
|
||||||
// get the curent program folder
|
// get the curent program folder
|
||||||
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
||||||
//APPL_INFO("The current working directory is " << cCurrentPath);
|
//APPL_INFO("The current working directory is " << cCurrentPath);
|
||||||
@ -88,7 +92,7 @@ class MainApplication : public ewol::context::Application {
|
|||||||
if (basicWindows == nullptr) {
|
if (basicWindows == nullptr) {
|
||||||
APPL_ERROR("Can not allocate the basic windows");
|
APPL_ERROR("Can not allocate the basic windows");
|
||||||
_context.stop();
|
_context.stop();
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
// create the specific windows
|
// create the specific windows
|
||||||
_context.setWindows(basicWindows);
|
_context.setWindows(basicWindows);
|
||||||
@ -122,17 +126,16 @@ class MainApplication : public ewol::context::Application {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
APPL_INFO(" == > init " PROJECT_NAME " (END)");
|
APPL_INFO("==> START ... " PROJECT_NAME " (END)");
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
void unInit(ewol::Context& _context) {
|
void onStop(ewol::Context& _context) {
|
||||||
APPL_INFO(" == > Un-Init " PROJECT_NAME " (START)");
|
APPL_INFO("==> STOP ... " PROJECT_NAME " (START)");
|
||||||
APPL_INFO("Stop Hightlight");
|
|
||||||
appl::highlightManager::unInit();
|
appl::highlightManager::unInit();
|
||||||
//Kill all singleton
|
//Kill all singleton
|
||||||
m_pluginManager.reset();
|
m_pluginManager.reset();
|
||||||
m_bufferManager.reset();
|
m_bufferManager.reset();
|
||||||
APPL_INFO(" == > Un-Init " PROJECT_NAME " (END)");
|
APPL_INFO("==> STOP ... " PROJECT_NAME " (END)");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user