[DEV] update new Application main interface

This commit is contained in:
Edouard DUPIN 2014-06-13 23:18:43 +02:00
parent 18c2370065
commit 361840c7f7
3 changed files with 31 additions and 43 deletions

View File

@ -6,9 +6,9 @@
* @license BSD v3 (see license file) * @license BSD v3 (see license file)
*/ */
#include <eaudiofx/debug.h>
#include <eaudiofx/base/ReceiverRtAudio.h> #include <eaudiofx/base/ReceiverRtAudio.h>
#include <eaudiofx/core/BufferAudioRaw.h> #include <eaudiofx/core/BufferAudioRaw.h>
#include <eaudiofx/debug.h>
#include <airtaudio/Interface.h> #include <airtaudio/Interface.h>
int eaudiofx::ReceiverRtAudio::rtAudioCallBack(void *_outputBuffer, int eaudiofx::ReceiverRtAudio::rtAudioCallBack(void *_outputBuffer,

View File

@ -38,7 +38,7 @@ def create(target):
]) ])
# name of the dependency # name of the dependency
myModule.add_module_depend(['ewol', 'airtaudio']) myModule.add_module_depend(['airtaudio', 'ewol'])
myModule.add_export_path(tools.get_current_path(__file__)) myModule.add_export_path(tools.get_current_path(__file__))

View File

@ -17,22 +17,9 @@
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/context/Context.h> #include <ewol/context/Context.h>
class MainApplication : public ewol::context::Application {
/** public:
* @brief Main of the program (This can be set in every case, but it is not used in Andoid...). bool init(ewol::Context& _context, size_t _initId) {
* @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
*/
bool APP_Init(ewol::Context& _context, size_t _initId, size_t& _nbInitStep) {
_nbInitStep = 1;
APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
// TODO : Remove this : Move if in the windows properties // TODO : Remove this : Move if in the windows properties
@ -42,26 +29,27 @@ bool APP_Init(ewol::Context& _context, size_t _initId, size_t& _nbInitStep) {
_context.getFontDefault().setUseExternal(false); _context.getFontDefault().setUseExternal(false);
_context.getFontDefault().set("FreeSerif", 30); _context.getFontDefault().set("FreeSerif", 30);
ewol::widget::Windows* basicWindows = new appl::Windows(); ewol::object::Shared<ewol::widget::Windows> basicWindows = ewol::object::makeShared(new appl::Windows());
// create the specific windows // create the specific windows
_context.setWindows(basicWindows); _context.setWindows(basicWindows);
APPL_INFO("==> Init APPL (END)"); APPL_INFO("==> Init APPL (END)");
return true; return true;
} }
/** void unInit(ewol::Context& _context) {
* @brief main application function Un-Initialisation
*/
void APP_UnInit(ewol::Context& _context) {
APPL_INFO("==> Un-Init APPL (START)"); APPL_INFO("==> Un-Init APPL (START)");
// Nothing to do (main windows will be remove after this call if not done... // nothing to do ...
ewol::widget::Windows* basicWindows = _context.getWindows();
if (NULL != basicWindows) {
basicWindows->removeObject();
basicWindows = NULL;
}
_context.setWindows(NULL);
APPL_INFO("==> Un-Init APPL (END)"); APPL_INFO("==> Un-Init APPL (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);
}