[DEV] set compilation back ...

- update ejson
- update ememory
- umdate lutin
- umdate ewol
- update gale
This commit is contained in:
2016-10-04 21:20:40 +02:00
parent 2f3a2c5976
commit c01b518f05
49 changed files with 604 additions and 760 deletions

View File

@@ -1,45 +1,46 @@
/**
/** @file
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license BSD 3 clauses (see license file)
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
#include <etk/types.hpp>
#include <ewol/ewol.hpp>
#include <gale/context/commandLine.hpp>
#include <etk/types.h>
#include <ewol/ewol.h>
#include <ewol/context/commandLine.h>
#include <test/debug.h>
#include <test/Windows.h>
#include <ewol/object/Object.h>
#include <ewol/widget/Manager.h>
#include <ewol/context/Context.h>
#include <test/debug.hpp>
#include <test/Windows.hpp>
#include <ewol/object/Object.hpp>
#include <ewol/widget/Manager.hpp>
#include <ewol/context/Context.hpp>
class MainApplication : public ewol::context::Application {
public:
bool init(ewol::Context& _context, size_t _initId) {
APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
// TODO : Remove this : Move if in the windows properties
virtual void onCreate(ewol::Context& _context) override {
APPL_INFO("==> OnCreate APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) {
std::string tmpppp = _context.getCmd().get(iii);
if ( tmpppp == "-h"
|| tmpppp == "--help") {
APPL_INFO(" -t c-flags-file-name" );
APPL_INFO(" -h/--help display this help" );
exit(0);
}
}
_context.setTitle("test 'block-engine'");
_context.setSize(vec2(800, 600));
// select internal data for font ...
_context.getFontDefault().setUseExternal(false);
_context.getFontDefault().set("FreeSerif", 30);
std::shared_ptr<ewol::widget::Windows> basicWindows = appl::Windows::create();
// create the specific windows
_context.setWindows(basicWindows);
APPL_INFO("==> Init APPL (END)");
return true;
}
void unInit(ewol::Context& _context) {
APPL_INFO("==> Un-Init APPL (START)");
// nothing to do ...
APPL_INFO("==> Un-Init APPL (END)");
void onStart(ewol::Context& _context) override {
APPL_INFO("==> On start APPL (END)");
ewol::widget::WindowsShared basicWindows = appl::Windows::create();
// create the specific windows
_context.setWindows(basicWindows);
APPL_INFO("==> On start APPL (END)");
}
};

View File

@@ -1,14 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license BSD 3 clauses (see license file)
*/
#ifndef __APPL_MAIN_H__
#define __APPL_MAIN_H__
#endif

7
test/Main.hpp Normal file
View File

@@ -0,0 +1,7 @@
/** @file
* @author Edouard DUPIN
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
#pragma once

View File

@@ -1,25 +1,21 @@
/**
/** @file
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license BSD 3 clauses (see license file)
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
#include <ewol/ewol.h>
#include <test/debug.h>
#include <test/Windows.h>
#include <ewol/widget/Label.h>
#include <etk/tool.h>
#include <eaudiofx/eaudiofx.h>
#include <ewol/widget/Button.h>
#include <ewol/ewol.hpp>
#include <test/debug.hpp>
#include <test/Windows.hpp>
#include <ewol/widget/Label.hpp>
#include <etk/tool.hpp>
#include <eaudiofx/eaudiofx.hpp>
#include <ewol/widget/Button.hpp>
#include <unistd.h>
#include <eaudiofx/base/GeneratorSignal.h>
#include <eaudiofx/base/ReceiverRiver.h>
#include <eaudiofx/base/GeneratorSignal.hpp>
#include <eaudiofx/base/ReceiverRiver.hpp>
#undef __class__
#define __class__ "Windows"
static const char* const g_eventPlay1 = "appl-play-1";
static const char* const g_eventPlay2 = "appl-play-2";
@@ -30,7 +26,6 @@ appl::Windows::Windows() {
void appl::Windows::init() {
ewol::widget::Windows::init();
setTitle("example 001_HelloWord");
std::string composition = std::string("");
composition += "<sizer mode='vert'>\n";
composition += " <sizer mode='hori'>\n";
@@ -53,18 +48,18 @@ void appl::Windows::init() {
composition += " <spacer expand='true' fill='true'/>\n";
composition += "</sizer>\n";
m_composer = ewol::widget::Composer::create(ewol::widget::Composer::String, composition);
if (m_composer == NULL) {
m_composer = ewol::widget::Composer::create();
if (m_composer == nullptr) {
APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
return;
}
m_composer->loadFromString(composition);
setSubWidget(m_composer);
subBind(ewol::widget::Button, "bt-play1", signalPressed, shared_from_this(), &appl::Windows::onCallbackPlay);
subBind(ewol::widget::Button, "bt-stop1", signalPressed, shared_from_this(), &appl::Windows::onCallbackStop);
subBind(ewol::widget::Button, "bt-play-stop", signalPressed, shared_from_this(), &appl::Windows::onCallbackPlayStop);
subBind(ewol::widget::Button, "bt-play1", signalPressed, sharedFromThis(), &appl::Windows::onCallbackPlay);
subBind(ewol::widget::Button, "bt-stop1", signalPressed, sharedFromThis(), &appl::Windows::onCallbackStop);
subBind(ewol::widget::Button, "bt-play-stop", signalPressed, sharedFromThis(), &appl::Windows::onCallbackPlayStop);
}
std::shared_ptr<eaudiofx::Processing> process = NULL;
void appl::Windows::onCallbackPlayStop() {
onCallbackPlay();
usleep(500000);
@@ -73,79 +68,79 @@ void appl::Windows::onCallbackPlayStop() {
void appl::Windows::onCallbackPlay() {
#if 0
APPL_INFO("Play Requested ...");
process = eaudiofx::Processing::create();
if (process == NULL) {
m_process = eaudiofx::Processing::create();
if (m_process == nullptr) {
APPL_ERROR("can not create processing ...");
return;
}
APPL_INFO("Create Generator ...");
std::shared_ptr<eaudiofx::GeneratorFile> generator = eaudiofx::GeneratorFile::create();
if (generator == NULL) {
ememory::SharedPtr<eaudiofx::GeneratorFile> generator = eaudiofx::GeneratorFile::create();
if (generator == nullptr) {
APPL_ERROR("can not create Generator ...");
return;
}
generator->setName("myGenerator");
process->addBlock(generator);
generator->propertyName.set("myGenerator");
m_process->addBlock(generator);
APPL_INFO("Create DECODER ...");
std::shared_ptr<eaudiofx::BlockDecoder> decoder = eaudiofx::BlockDecoder::create();
if (decoder == NULL) {
ememory::SharedPtr<eaudiofx::BlockDecoder> decoder = eaudiofx::BlockDecoder::create();
if (decoder == nullptr) {
APPL_ERROR("can not create Generator ...");
return;
}
decoder->setName("myDecoder");
process->addBlock(decoder);
decoder->propertyName.set("myDecoder");
m_process->addBlock(decoder);
APPL_INFO("Create Receiver ...");
std::shared_ptr<eaudiofx::ReceiverRtAudio> receiver = eaudiofx::ReceiverRtAudio::create();
if (receiver == NULL) {
ememory::SharedPtr<eaudiofx::ReceiverRtAudio> receiver = eaudiofx::ReceiverRtAudio::create();
if (receiver == nullptr) {
APPL_ERROR("can not create Receiver ...");
return;
}
receiver->setName("myReceiver");
process->addBlock(receiver);
receiver->propertyName.set("myReceiver");
m_process->addBlock(receiver);
process->linkBlock("myGenerator", "out","myDecoder", "in");
process->linkBlock("myDecoder", "out","myReceiver", "in");
m_process->linkBlock("myGenerator", "out","myDecoder", "in");
m_process->linkBlock("myDecoder", "out","myReceiver", "in");
process->start();
m_process->start();
return;
#else
APPL_INFO("Play Requested ...");
process = eaudiofx::Processing::create();
if (process == NULL) {
m_process = eaudiofx::Processing::create();
if (m_process == nullptr) {
APPL_ERROR("can not create processing ...");
return;
}
process->setName("main Process");
m_process->propertyName.set("main Process");
APPL_INFO("Create Generator Sinus");
std::shared_ptr<eaudiofx::GeneratorSignal> generator = eaudiofx::GeneratorSignal::create();
if (generator == NULL) {
ememory::SharedPtr<eaudiofx::GeneratorSignal> generator = eaudiofx::GeneratorSignal::create();
if (generator == nullptr) {
APPL_ERROR("can not create Generator ...");
return;
}
generator->setName("myGenerator");
process->addBlock(generator);
generator->propertyName.set("myGenerator");
m_process->addBlock(generator);
APPL_INFO("Create Receiver ...");
std::shared_ptr<eaudiofx::ReceiverRiver> receiver = eaudiofx::ReceiverRiver::create();
if (receiver == NULL) {
ememory::SharedPtr<eaudiofx::ReceiverRiver> receiver = eaudiofx::ReceiverRiver::create();
if (receiver == nullptr) {
APPL_ERROR("can not create Receiver ...");
return;
}
receiver->setName("myReceiver");
process->addBlock(receiver);
receiver->propertyName.set("myReceiver");
m_process->addBlock(receiver);
process->linkBlock("myGenerator", "out","myReceiver", "in");
m_process->linkBlock("myGenerator", "out","myReceiver", "in");
process->start();
m_process->start();
return;
#endif
}
void appl::Windows::onCallbackStop() {
if (process != NULL) {
process->stop();
if (m_process != nullptr) {
m_process->stop();
}
}

View File

@@ -1,33 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license BSD 3 clauses (see license file)
*/
#ifndef __APPL_WINDOWS_H__
#define __APPL_WINDOWS_H__
#include <ewol/widget/Windows.h>
#include <ewol/widget/Composer.h>
namespace appl {
class Windows : public ewol::widget::Windows {
private:
std::shared_ptr<ewol::widget::Composer> m_composer;
protected:
Windows();
void init();
public:
DECLARE_FACTORY(Windows);
public: // callback functions
void onCallbackPlay();
void onCallbackStop();
void onCallbackPlayStop();
};
};
#endif

29
test/Windows.hpp Normal file
View File

@@ -0,0 +1,29 @@
/** @file
* @author Edouard DUPIN
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <ewol/widget/Windows.hpp>
#include <ewol/widget/Composer.hpp>
#include <eaudiofx/core/Processing.hpp>
namespace appl {
class Windows : public ewol::widget::Windows {
private:
ewol::widget::ComposerShared m_composer;
protected:
Windows();
void init();
public:
DECLARE_FACTORY(Windows);
public: // callback functions
void onCallbackPlay();
void onCallbackStop();
void onCallbackPlayStop();
ememory::SharedPtr<eaudiofx::Processing> m_process;
};
}

View File

@@ -1,15 +1,13 @@
/**
/** @file
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license BSD 3 clauses (see license file)
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
#include <test/debug.h>
#include <test/debug.hpp>
int32_t appl::getLogId() {
static int32_t g_val = etk::log::registerInstance("ea-fx TT");
static int32_t g_val = elog::registerInstance("ea-fx TT");
return g_val;
}

View File

@@ -1,21 +1,18 @@
/**
/** @file
* @author Edouard DUPIN
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license BSD 3 clauses (see license file)
* @copyright 2014, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
#pragma once
#ifndef __APPL_DEBUG_H__
#define __APPL_DEBUG_H__
#include <etk/log.h>
#include <elog/log.hpp>
namespace appl {
int32_t getLogId();
};
#define APPL_BASE(info,data) TK_LOG_BASE(appl::getLogId(),info,data)
#define APPL_BASE(info,data) ELOG_BASE(appl::getLogId(),info,data)
#define APPL_PRINT(data) APPL_BASE(-1, data)
#define APPL_CRITICAL(data) APPL_BASE(1, data)
#define APPL_ERROR(data) APPL_BASE(2, data)
#define APPL_WARNING(data) APPL_BASE(3, data)
@@ -39,5 +36,4 @@ namespace appl {
} \
} while (0)
#endif