diff --git a/ewol/context/Context.cpp b/ewol/context/Context.cpp index 7c2cd060..6b615cb4 100644 --- a/ewol/context/Context.cpp +++ b/ewol/context/Context.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/ewol/debug.cpp b/ewol/debug.cpp index e961c48e..a4e3b806 100644 --- a/ewol/debug.cpp +++ b/ewol/debug.cpp @@ -9,6 +9,6 @@ #include int32_t ewol::getLogId() { - static int32_t g_val = etk::log::registerInstance("ewol"); + static int32_t g_val = elog::registerInstance("ewol"); return g_val; } diff --git a/ewol/debug.h b/ewol/debug.h index a59fbe49..3cb343fb 100644 --- a/ewol/debug.h +++ b/ewol/debug.h @@ -7,12 +7,12 @@ */ #pragma once -#include +#include namespace ewol { int32_t getLogId(); }; -#define EWOL_BASE(info,data) TK_LOG_BASE(ewol::getLogId(),info,data) +#define EWOL_BASE(info,data) ELOG_BASE(ewol::getLogId(),info,data) #define EWOL_PRINT(data) EWOL_BASE(-1, data) #define EWOL_CRITICAL(data) EWOL_BASE(1, data) diff --git a/ewol/resource/ColorFile.cpp b/ewol/resource/ColorFile.cpp index 5e38c4c5..0a9f7015 100644 --- a/ewol/resource/ColorFile.cpp +++ b/ewol/resource/ColorFile.cpp @@ -23,7 +23,7 @@ ewol::resource::ColorFile::ColorFile() : } void ewol::resource::ColorFile::init(const std::string& _filename) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); gale::Resource::init(_filename); EWOL_DEBUG("CF : load \"" << _filename << "\""); reload(); @@ -37,7 +37,7 @@ ewol::resource::ColorFile::~ColorFile() { void ewol::resource::ColorFile::reload() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); // remove all previous set of value : for (int32_t iii = 0; iii < m_list.size() ; ++iii) { m_list[iii] = m_errorColor; @@ -72,7 +72,7 @@ void ewol::resource::ColorFile::reload() { int32_t ewol::resource::ColorFile::request(const std::string& _paramName) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); // check if the parameters existed : if (m_list.exist(_paramName) == false) { m_list.add(_paramName, m_errorColor); diff --git a/ewol/resource/ConfigFile.cpp b/ewol/resource/ConfigFile.cpp index d24b1919..305222bf 100644 --- a/ewol/resource/ConfigFile.cpp +++ b/ewol/resource/ConfigFile.cpp @@ -25,7 +25,7 @@ ewol::resource::ConfigFile::ConfigFile() : } void ewol::resource::ConfigFile::init(const std::string& _filename) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); gale::Resource::init(_filename); EWOL_DEBUG("SFP : load \"" << _filename << "\""); reload(); @@ -37,7 +37,7 @@ ewol::resource::ConfigFile::~ConfigFile() { } void ewol::resource::ConfigFile::reload() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); // reset all parameters for (int32_t iii=0; iii lock(m_mutex); + std::unique_lock lock(m_mutex); // check if the parameters existed : if (m_list.exist(_paramName) == false) { m_list.add(_paramName, nullptr); @@ -68,7 +68,7 @@ int32_t ewol::resource::ConfigFile::request(const std::string& _paramName) { double ewol::resource::ConfigFile::getNumber(int32_t _id) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if ( _id < 0 || m_list[_id] == nullptr) { return 0.0; @@ -81,7 +81,7 @@ double ewol::resource::ConfigFile::getNumber(int32_t _id) { } const std::string& ewol::resource::ConfigFile::getString(int32_t _id) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); static const std::string& errorString(""); if ( _id < 0 || m_list[_id] == nullptr) { @@ -95,7 +95,7 @@ const std::string& ewol::resource::ConfigFile::getString(int32_t _id) { } bool ewol::resource::ConfigFile::getBoolean(int32_t _id) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if ( _id < 0 || m_list[_id] == nullptr) { return false; diff --git a/ewol/resource/DistanceFieldFont.cpp b/ewol/resource/DistanceFieldFont.cpp index 0bc1a714..1992e394 100644 --- a/ewol/resource/DistanceFieldFont.cpp +++ b/ewol/resource/DistanceFieldFont.cpp @@ -36,7 +36,7 @@ ewol::resource::DistanceFieldFont::DistanceFieldFont() : } void ewol::resource::DistanceFieldFont::init(const std::string& _fontName) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::Texture::init(_fontName); std::string localName = _fontName; std::vector folderList; @@ -135,13 +135,13 @@ ewol::resource::DistanceFieldFont::~DistanceFieldFont() { float ewol::resource::DistanceFieldFont::getDisplayRatio(float _size) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); return _size / (float)SIZE_GENERATION; } void ewol::resource::DistanceFieldFont::generateDistanceField(const egami::ImageMono& _input, egami::Image& _output) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); int32_t size = _input.getSize().x() * _input.getSize().y(); std::vector xdist(size); std::vector ydist(size); @@ -221,7 +221,7 @@ void ewol::resource::DistanceFieldFont::generateDistanceField(const egami::Image } bool ewol::resource::DistanceFieldFont::addGlyph(const char32_t& _val) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); bool hasChange = false; if (m_font == nullptr) { return false; @@ -303,7 +303,7 @@ bool ewol::resource::DistanceFieldFont::addGlyph(const char32_t& _val) { } int32_t ewol::resource::DistanceFieldFont::getIndex(char32_t _charcode) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if (_charcode < 0x20) { return 0; } else if (_charcode < 0x80) { @@ -330,7 +330,7 @@ int32_t ewol::resource::DistanceFieldFont::getIndex(char32_t _charcode) { } ewol::GlyphProperty* ewol::resource::DistanceFieldFont::getGlyphPointer(const char32_t& _charcode) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); //EWOL_DEBUG("Get glyph property for mode: " << _displayMode << " == > wrapping index : " << m_modeWraping[_displayMode]); int32_t index = getIndex(_charcode); if( index < 0 @@ -350,7 +350,7 @@ ewol::GlyphProperty* ewol::resource::DistanceFieldFont::getGlyphPointer(const ch } void ewol::resource::DistanceFieldFont::exportOnFile() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); EWOL_DEBUG("EXPORT: DistanceFieldFont : file : '" << m_fileName << ".json'"); ejson::Document doc; std::shared_ptr tmpList = ejson::Array::create(); @@ -385,7 +385,7 @@ void ewol::resource::DistanceFieldFont::exportOnFile() { } bool ewol::resource::DistanceFieldFont::importFromFile() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); EWOL_DEBUG("IMPORT: DistanceFieldFont : file : '" << m_fileName << ".json'"); // test file existance: etk::FSNode fileJSON(m_fileName + ".json"); diff --git a/ewol/resource/FontFreeType.cpp b/ewol/resource/FontFreeType.cpp index 350a9963..ab47f3ea 100644 --- a/ewol/resource/FontFreeType.cpp +++ b/ewol/resource/FontFreeType.cpp @@ -60,7 +60,7 @@ ewol::resource::FontFreeType::FontFreeType() { } void ewol::resource::FontFreeType::init(const std::string& _fontName) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::FontBase::init(_fontName); etk::FSNode myfile(_fontName); if (false == myfile.exist()) { @@ -101,7 +101,7 @@ void ewol::resource::FontFreeType::init(const std::string& _fontName) { } ewol::resource::FontFreeType::~FontFreeType() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); // clean the tmp memory if (nullptr != m_FileBuffer) { delete[] m_FileBuffer; @@ -112,7 +112,7 @@ ewol::resource::FontFreeType::~FontFreeType() { } vec2 ewol::resource::FontFreeType::getSize(int32_t _fontSize, const std::string& _unicodeString) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if(false == m_init) { return vec2(0,0); } @@ -122,16 +122,16 @@ vec2 ewol::resource::FontFreeType::getSize(int32_t _fontSize, const std::string& } int32_t ewol::resource::FontFreeType::getHeight(int32_t _fontSize) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); return _fontSize*1.43f; // this is a really "magic" number ... } float ewol::resource::FontFreeType::getSizeWithHeight(float _fontHeight) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); return _fontHeight*0.6993f; // this is a really "magic" number ... } bool ewol::resource::FontFreeType::getGlyphProperty(int32_t _fontSize, ewol::GlyphProperty& _property) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if(false == m_init) { return false; } @@ -176,7 +176,7 @@ bool ewol::resource::FontFreeType::drawGlyph(egami::Image& _imageOut, ivec2 _glyphPosition, ewol::GlyphProperty& _property, int8_t _posInImage) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if(false == m_init) { return false; } @@ -238,7 +238,7 @@ bool ewol::resource::FontFreeType::drawGlyph(egami::ImageMono& _imageOut, int32_t _fontSize, ewol::GlyphProperty& _property, int32_t _borderSize) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if(false == m_init) { return false; } @@ -282,7 +282,7 @@ bool ewol::resource::FontFreeType::drawGlyph(egami::ImageMono& _imageOut, void ewol::resource::FontFreeType::generateKerning(int32_t fontSize, std::vector& listGlyph) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if(m_init == false) { return; } @@ -316,7 +316,7 @@ void ewol::resource::FontFreeType::generateKerning(int32_t fontSize, std::vector void ewol::resource::FontFreeType::display() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if(m_init == false) { return; } diff --git a/ewol/resource/Image.cpp b/ewol/resource/Image.cpp index 7dc8d563..cccc2e8f 100644 --- a/ewol/resource/Image.cpp +++ b/ewol/resource/Image.cpp @@ -26,12 +26,12 @@ ewol::resource::TextureFile::TextureFile() { } void ewol::resource::TextureFile::init() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::Texture::init(); } void ewol::resource::TextureFile::init(std::string _genName, const std::string& _tmpfileName, const ivec2& _size) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::Texture::init(_genName); EWOL_DEBUG("create a new resource::Image : _genName=" << _genName << " _tmpfileName=" << _tmpfileName << " size=" << _size); if (egami::load(m_data, _tmpfileName, _size) == false) { diff --git a/ewol/resource/ImageDF.cpp b/ewol/resource/ImageDF.cpp index b14fe28b..7dd6a66a 100644 --- a/ewol/resource/ImageDF.cpp +++ b/ewol/resource/ImageDF.cpp @@ -24,12 +24,12 @@ ewol::resource::ImageDF::ImageDF() { void ewol::resource::ImageDF::init() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::Texture::init(); } void ewol::resource::ImageDF::init(std::string _genName, const std::string& _tmpfileName, const ivec2& _size) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::Texture::init(_genName); EWOL_DEBUG("create a new resource::Image : _genName=" << _genName << " _tmpfileName=" << _tmpfileName << " size=" << _size); if (false == egami::load(m_data, _tmpfileName, _size)) { @@ -54,7 +54,7 @@ void ewol::resource::ImageDF::init(std::string _genName, const std::string& _tmp void ewol::resource::ImageDF::generateDistanceField(const egami::ImageMono& _input, egami::Image& _output) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); int32_t size = _input.getSize().x() * _input.getSize().y(); std::vector xdist(size); std::vector ydist(size); diff --git a/ewol/resource/Texture.cpp b/ewol/resource/Texture.cpp index c295bb81..b75ec9b3 100644 --- a/ewol/resource/Texture.cpp +++ b/ewol/resource/Texture.cpp @@ -55,7 +55,7 @@ ewol::resource::Texture::~Texture() { //#include bool ewol::resource::Texture::updateContext() { - std11::unique_lock lock(m_mutex, std11::defer_lock); + std::unique_lock lock(m_mutex, std::defer_lock); if (lock.try_lock() == false) { //Lock error ==> try later ... return false; @@ -94,7 +94,7 @@ bool ewol::resource::Texture::updateContext() { } void ewol::resource::Texture::removeContext() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if (true == m_loaded) { // Request remove texture ... EWOL_INFO("TEXTURE: Rm [" << getId() << "] texId=" << m_texId); @@ -104,19 +104,19 @@ void ewol::resource::Texture::removeContext() { } void ewol::resource::Texture::removeContextToLate() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); m_loaded = false; m_texId=0; } void ewol::resource::Texture::flush() { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); // request to the manager to be call at the next update ... getManager().update(std::dynamic_pointer_cast(shared_from_this())); } void ewol::resource::Texture::setImageSize(ivec2 _newSize) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); _newSize.setValue( nextP2(_newSize.x()), nextP2(_newSize.y()) ); m_data.resize(_newSize); } diff --git a/ewol/resource/TexturedFont.cpp b/ewol/resource/TexturedFont.cpp index 27a98433..5b836af2 100644 --- a/ewol/resource/TexturedFont.cpp +++ b/ewol/resource/TexturedFont.cpp @@ -47,7 +47,7 @@ ewol::resource::TexturedFont::TexturedFont() { } void ewol::resource::TexturedFont::init(const std::string& _fontName) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); ewol::resource::Texture::init(_fontName); EWOL_DEBUG("Load font : '" << _fontName << "'" ); @@ -237,7 +237,7 @@ ewol::resource::TexturedFont::~TexturedFont() { } bool ewol::resource::TexturedFont::addGlyph(const char32_t& _val) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); bool hasChange = false; // for each font : for (int32_t iii=0; iii<4 ; iii++) { @@ -306,7 +306,7 @@ bool ewol::resource::TexturedFont::addGlyph(const char32_t& _val) { } int32_t ewol::resource::TexturedFont::getIndex(char32_t _charcode, const enum ewol::font::mode _displayMode) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); if (_charcode < 0x20) { return 0; } else if (_charcode < 0x80) { @@ -333,7 +333,7 @@ int32_t ewol::resource::TexturedFont::getIndex(char32_t _charcode, const enum ew } ewol::GlyphProperty* ewol::resource::TexturedFont::getGlyphPointer(const char32_t& _charcode, const enum ewol::font::mode _displayMode) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); //EWOL_DEBUG("Get glyph property for mode: " << _displayMode << " == > wrapping index : " << m_modeWraping[_displayMode]); int32_t index = getIndex(_charcode, _displayMode); if( index < 0 diff --git a/ewol/widget/Manager.cpp b/ewol/widget/Manager.cpp index a168f422..f5bf6d4e 100644 --- a/ewol/widget/Manager.cpp +++ b/ewol/widget/Manager.cpp @@ -80,7 +80,7 @@ void ewol::widget::Manager::focusKeep(const ewol::WidgetShared& _newWidget) { return; } EWOL_VERBOSE("focusKeep=" << _newWidget->getId() ); - //etk::log::displayBacktrace(); + //elog::displayBacktrace(); auto focusWidgetCurrent = m_focusWidgetCurrent.lock(); if (_newWidget == focusWidgetCurrent) { // nothing to do ... diff --git a/sample/001_HelloWord/appl/debug.cpp b/sample/001_HelloWord/appl/debug.cpp index d63981aa..d9532a51 100644 --- a/sample/001_HelloWord/appl/debug.cpp +++ b/sample/001_HelloWord/appl/debug.cpp @@ -10,6 +10,6 @@ #include int32_t appl::getLogId() { - static int32_t g_val = etk::log::registerInstance("example"); + static int32_t g_val = elog::registerInstance("example"); return g_val; } diff --git a/sample/001_HelloWord/appl/debug.h b/sample/001_HelloWord/appl/debug.h index eaf194a9..518ee1a0 100644 --- a/sample/001_HelloWord/appl/debug.h +++ b/sample/001_HelloWord/appl/debug.h @@ -7,12 +7,12 @@ */ #pragma once -#include +#include 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_CRITICAL(data) APPL_BASE(1, data) #define APPL_ERROR(data) APPL_BASE(2, data) diff --git a/sample/0XX_CustomWidgets/appl/debug.cpp b/sample/0XX_CustomWidgets/appl/debug.cpp index 455bfe50..389203b1 100644 --- a/sample/0XX_CustomWidgets/appl/debug.cpp +++ b/sample/0XX_CustomWidgets/appl/debug.cpp @@ -10,6 +10,6 @@ #include int32_t appl::getLogId() { - static int32_t g_val = etk::log::registerInstance("example"); + static int32_t g_val = elog::registerInstance("example"); return g_val; } diff --git a/sample/0XX_CustomWidgets/appl/debug.h b/sample/0XX_CustomWidgets/appl/debug.h index 5950b0fc..f2798589 100644 --- a/sample/0XX_CustomWidgets/appl/debug.h +++ b/sample/0XX_CustomWidgets/appl/debug.h @@ -7,12 +7,12 @@ */ #pragma once -#include +#include 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_CRITICAL(data) APPL_BASE(1, data) #define APPL_ERROR(data) APPL_BASE(2, data) diff --git a/sample/examplewallpaper/appl/debug.cpp b/sample/examplewallpaper/appl/debug.cpp index d63981aa..d9532a51 100644 --- a/sample/examplewallpaper/appl/debug.cpp +++ b/sample/examplewallpaper/appl/debug.cpp @@ -10,6 +10,6 @@ #include int32_t appl::getLogId() { - static int32_t g_val = etk::log::registerInstance("example"); + static int32_t g_val = elog::registerInstance("example"); return g_val; } diff --git a/sample/examplewallpaper/appl/debug.h b/sample/examplewallpaper/appl/debug.h index 8ab4a494..6189a3b7 100644 --- a/sample/examplewallpaper/appl/debug.h +++ b/sample/examplewallpaper/appl/debug.h @@ -7,12 +7,12 @@ */ #pragma once -#include +#include 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_CRITICAL(data) APPL_BASE(1, data) #define APPL_ERROR(data) APPL_BASE(2, data) diff --git a/test/main.cpp b/test/main.cpp index e9986593..2b1b7741 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,8 +29,8 @@ int main(int argc, const char *argv[]) { // init Google test : ::testing::InitGoogleTest(&argc, const_cast(argv)); // the only one init for etk: - //etk::log::setLevel(etk::log::logLevelVerbose); - etk::log::setLevel(etk::log::logLevelInfo); + //elog::setLevel(elog::logLevelVerbose); + elog::setLevel(elog::logLevelInfo); etk::setArgZero(argv[0]); etk::initDefaultFolder("ewol-test"); return RUN_ALL_TESTS(); diff --git a/tools/visual_test/appl/MainWindows.cpp b/tools/visual_test/appl/MainWindows.cpp index e6d7c14e..49f4353a 100644 --- a/tools/visual_test/appl/MainWindows.cpp +++ b/tools/visual_test/appl/MainWindows.cpp @@ -184,15 +184,6 @@ void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) { */ break; } - - m_subWidget = ewol::widget::Spin::create("name", std::string("plop")); - // wrong: m_subWidget = ewol::widget::SpinBase::create("name", std::string("plop"), 1521); - m_subWidget = ewol::widget::Spin::create("name", std::string("plop"), - "spin-mode", ewol::widget::spinPosition_RightRight); - - return; - - // create the widget with a xml generator (readable for test ...): m_subWidget = ewol::widget::composerGenerateString(tmpConstruct); if (m_subWidget != nullptr) { diff --git a/tools/visual_test/appl/debug.cpp b/tools/visual_test/appl/debug.cpp index 73f95e66..27c5a43e 100644 --- a/tools/visual_test/appl/debug.cpp +++ b/tools/visual_test/appl/debug.cpp @@ -10,6 +10,6 @@ #include int32_t appl::getLogId() { - static int32_t g_val = etk::log::registerInstance("test_ewol"); + static int32_t g_val = elog::registerInstance("test_ewol"); return g_val; } diff --git a/tools/visual_test/appl/debug.h b/tools/visual_test/appl/debug.h index d48fa3a6..d94a0be6 100644 --- a/tools/visual_test/appl/debug.h +++ b/tools/visual_test/appl/debug.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace appl { int32_t getLogId(); @@ -15,11 +15,11 @@ namespace appl { // TODO : Review this problem of multiple intanciation of "std::stringbuf sb" #define APPL_BASE(info,data) \ do { \ - if (info <= etk::log::getLevel(appl::getLogId())) { \ + if (info <= elog::getLevel(appl::getLogId())) { \ std::stringbuf sb; \ std::ostream tmpStream(&sb); \ tmpStream << data; \ - etk::log::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ + elog::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ } \ } while(0)