diff --git a/build b/build index 01f75930..051759ed 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 01f75930774fae683d70b50bd62b5681bceaca74 +Subproject commit 051759ed892a8392fb0dfb75308608765f321827 diff --git a/external/bullet/lutin_bullet.py b/external/bullet/lutin_bullet.py index 9223d609..8e680c07 100644 --- a/external/bullet/lutin_bullet.py +++ b/external/bullet/lutin_bullet.py @@ -9,6 +9,8 @@ def Create(target): myModule = lutinModule.module(__file__, 'bullet', 'LIBRARY') myModule.AddModuleDepend(['linearmath']) + #remove compilation warning (specific for external libs): + myModule.remove_compile_warning() myModule.CompileFlags_CC([ '-Wno-write-strings', diff --git a/external/bullet/lutin_linearmath.py b/external/bullet/lutin_linearmath.py index 8593e142..6dedff8d 100644 --- a/external/bullet/lutin_linearmath.py +++ b/external/bullet/lutin_linearmath.py @@ -7,6 +7,8 @@ import lutinTools def Create(target): myModule = lutinModule.module(__file__, 'linearmath', 'LIBRARY') + #remove compilation warning (specific for external libs): + myModule.remove_compile_warning() myModule.AddSrcFile([ 'bullet/src/LinearMath/btQuickprof.cpp', diff --git a/external/egami b/external/egami index e2d2e514..80e3d4b4 160000 --- a/external/egami +++ b/external/egami @@ -1 +1 @@ -Subproject commit e2d2e514682f72cb35916d00048b2ccc460dd2c8 +Subproject commit 80e3d4b47dbf3dc97eb2469b15ad6d9169b19986 diff --git a/external/ege b/external/ege index 803ae2fc..b616a99b 160000 --- a/external/ege +++ b/external/ege @@ -1 +1 @@ -Subproject commit 803ae2fc3bb894109826fb763cbc4b0091393038 +Subproject commit b616a99bfac3e293ffe1d78b7ac5aa58c7113fa6 diff --git a/external/ejson b/external/ejson index 564ec313..7593b52d 160000 --- a/external/ejson +++ b/external/ejson @@ -1 +1 @@ -Subproject commit 564ec3130f3874c3bcc2235976f2d85996c4f770 +Subproject commit 7593b52dd9657301370c31d7a97465fa7b450ae0 diff --git a/external/etk b/external/etk index b507f48e..9f47018a 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit b507f48e4733d1bde152435fd7997f788101cd7b +Subproject commit 9f47018aa4fcac3c2bfd92012576be76e2c56b20 diff --git a/external/exml b/external/exml index c24b20b9..0cfb9c21 160000 --- a/external/exml +++ b/external/exml @@ -1 +1 @@ -Subproject commit c24b20b9d20bfa2d648e51152eb8182fb4537f03 +Subproject commit 0cfb9c2130d5fadeb46c2b08d28dde609a6736af diff --git a/external/freetype b/external/freetype index d3adbca4..9532cd98 160000 --- a/external/freetype +++ b/external/freetype @@ -1 +1 @@ -Subproject commit d3adbca45b32e33e9834c359fac5308e96769bd7 +Subproject commit 9532cd9800336c9259aa0f746f146446343a5703 diff --git a/sources/ewol/Dimension.cpp b/sources/ewol/Dimension.cpp index 59fd75df..2a67cc92 100644 --- a/sources/ewol/Dimension.cpp +++ b/sources/ewol/Dimension.cpp @@ -178,6 +178,7 @@ vec2 ewol::Dimension::get(enum ewol::Dimension::distance _type) const { case ewol::Dimension::foot: return getFoot(); } + return vec2(0,0); } void ewol::Dimension::set(const vec2& _size, enum ewol::Dimension::distance _type) { diff --git a/sources/ewol/commandLine.cpp b/sources/ewol/commandLine.cpp index 130d5d9b..d4522734 100644 --- a/sources/ewol/commandLine.cpp +++ b/sources/ewol/commandLine.cpp @@ -11,19 +11,20 @@ #include void ewol::CommandLine::parse(int32_t _argc, const char* _argv[]) { - for( int32_t i=1 ; i<_argc; i++) { + for (int32_t i=1 ; i<_argc; i++) { EWOL_INFO("commandLine : \"" << _argv[i] << "\"" ); m_listArgs.push_back(_argv[i]); } } -esize_t ewol::CommandLine::size(void) { +int32_t ewol::CommandLine::size(void) { return m_listArgs.size(); } const std::string& ewol::CommandLine::get(int32_t _id) { static const std::string errorArg(""); - if (_id<0 && _id >= m_listArgs.size()) { + if ( _id < 0 + && _id >= (int64_t)m_listArgs.size()) { return errorArg; } return m_listArgs[_id]; @@ -33,7 +34,7 @@ void ewol::CommandLine::add(const std::string& _newElement) { m_listArgs.push_back(_newElement); } -void ewol::CommandLine::remove(esize_t _id) { +void ewol::CommandLine::remove(int32_t _id) { m_listArgs.erase(m_listArgs.begin()+_id); } diff --git a/sources/ewol/commandLine.h b/sources/ewol/commandLine.h index 7077edc1..a0d4ea6e 100644 --- a/sources/ewol/commandLine.h +++ b/sources/ewol/commandLine.h @@ -25,7 +25,7 @@ namespace ewol { * @brief get the number of element in the Command line * @return the number of element */ - esize_t size(void); + int32_t size(void); /** * @brief get an element with a specific ID * @return _id The cmdLine Id element @@ -40,7 +40,7 @@ namespace ewol { * @brief remove an element * @param[in] _id Id of the element */ - void remove(esize_t _id); + void remove(int32_t _id); }; }; diff --git a/sources/ewol/compositing/Text.cpp b/sources/ewol/compositing/Text.cpp index df4dce19..34a94f11 100644 --- a/sources/ewol/compositing/Text.cpp +++ b/sources/ewol/compositing/Text.cpp @@ -380,7 +380,7 @@ void ewol::Text::parseHtmlNode(exml::Element* _element) { if (_element == NULL) { EWOL_ERROR( "Error Input node does not existed ..."); } - for(int32_t iii=0; iii< _element->size(); iii++) { + for(size_t iii=0; iii< _element->size(); iii++) { if (_element->getType(iii) == exml::typeComment) { // nothing to do ... } else if (_element->getType(iii) == exml::typeText) { @@ -533,10 +533,10 @@ void ewol::Text::print(const std::string& _text, const std::vector= iii - && iii > m_cursorPos-1) ) { + if( ( m_selectionStartPos-1 < (int64_t)iii + && (int64_t)iii <= m_cursorPos-1) + || ( m_selectionStartPos-1 >= (int64_t)iii + && (int64_t)iii > m_cursorPos-1) ) { setColor( 0x000000FF); setColorBg(m_colorSelection); } else { @@ -558,7 +558,7 @@ void ewol::Text::print(const std::string& _text, const std::vectorgetHeight(m_mode); // get specific decoration if provided if (iii<_decoration.size()) { @@ -623,10 +623,10 @@ void ewol::Text::print(const std::string& _text, const std::vector= iii - && iii > m_cursorPos-1) ) { + if( ( m_selectionStartPos-1<(int64_t)iii + && (int64_t)iii <= m_cursorPos-1) + || ( m_selectionStartPos-1 >= (int64_t)iii + && (int64_t)iii > m_cursorPos-1) ) { setColor( 0x000000FF); setColorBg(m_colorSelection); } else { @@ -635,7 +635,7 @@ void ewol::Text::print(const std::string& _text, const std::vectorgetHeight(m_mode)), m_position.z()) ); m_nbCharDisplayed++; - } else if(_text[stop] == etk::UChar::Return) { + } else if((char32_t)_text[stop] == etk::UChar::Return) { currentId = stop+1; // reset position : setPos(vec3(m_startTextpos, @@ -694,6 +694,7 @@ void ewol::Text::print(const std::string& _text, const std::vector= iii - && iii > m_cursorPos-1) ) { + if( ( m_selectionStartPos-1<(int64_t)iii + && (int64_t)iii <= m_cursorPos-1) + || ( m_selectionStartPos-1 >= (int64_t)iii + && (int64_t)iii > m_cursorPos-1) ) { setColor( 0x000000FF); setColorBg(m_colorSelection); } else { @@ -746,7 +747,7 @@ void ewol::Text::print(const std::u32string& _text, const std::vectorgetHeight(m_mode); // get specific decoration if provided if (iii<_decoration.size()) { @@ -811,10 +812,10 @@ void ewol::Text::print(const std::u32string& _text, const std::vector= iii - && iii > m_cursorPos-1) ) { + if( ( m_selectionStartPos-1<(int64_t)iii + && (int64_t)iii <= m_cursorPos-1) + || ( m_selectionStartPos-1 >= (int64_t)iii + && (int64_t)iii > m_cursorPos-1) ) { setColor( 0x000000FF); setColorBg(m_colorSelection); } else { @@ -823,7 +824,7 @@ void ewol::Text::print(const std::u32string& _text, const std::vectorlocalEventId == _generateEventId) { @@ -155,7 +155,7 @@ void ewol::EObject::registerOnEvent(ewol::EObject * _destinationObject, } // check if event existed : bool findIt = false; - for(int32_t iii=0; iii Un-Init EObject-Manager"); removeAllAutoRemove(); EWOL_INFO(" remove missing user widget"); - int32_t iii=0; - while(iiigetStatic() == true || m_eObjectList[iii]->getStatusResource() == true) { iii++; @@ -56,8 +56,8 @@ void ewol::EObjectManager::unInit(void) { } removeAllAutoRemove(); EWOL_INFO(" remove resources user widgets"); - while(iiigetStatic() == true) { iii++; } else { @@ -71,8 +71,8 @@ void ewol::EObjectManager::unInit(void) { } removeAllAutoRemove(); EWOL_INFO(" remove static user widgets"); - while(iiigetObjectType() << "\""); delete(m_eObjectList[iii]); m_eObjectList[iii] = NULL; @@ -95,12 +95,12 @@ int32_t ewol::EObjectManager::getNumberObject(void) { } void ewol::EObjectManager::informOneObjectIsRemoved(ewol::EObject* _object) { - for (int32_t iii=0; iiionObjectRemove(_object); } } - for (int32_t iii=0; iiionObjectRemove(_object); @@ -115,7 +115,7 @@ void ewol::EObjectManager::rm(ewol::EObject* _object) { EWOL_ERROR("Try to remove (NULL) EObject"); return; } - for (int32_t iii=0; iiigetName() == _name) { return m_eObjectList[iii]; diff --git a/sources/ewol/renderer/X11/Context.cpp b/sources/ewol/renderer/X11/Context.cpp index a0458b82..0b6af371 100644 --- a/sources/ewol/renderer/X11/Context.cpp +++ b/sources/ewol/renderer/X11/Context.cpp @@ -207,7 +207,7 @@ class X11Interface : public ewol::eContext { switch (event.type) { case ClientMessage: { X11_INFO("Receive : ClientMessage"); - if(XAtomeDeleteWindows == (int64_t)event.xclient.data.l[0]) { + if(XAtomeDeleteWindows == (uint64_t)event.xclient.data.l[0]) { EWOL_INFO(" == > Kill Requested ..."); OS_Stop(); m_run = false; diff --git a/sources/ewol/renderer/audio/audio.cpp b/sources/ewol/renderer/audio/audio.cpp index 9cc246cd..f7fc8d79 100644 --- a/sources/ewol/renderer/audio/audio.cpp +++ b/sources/ewol/renderer/audio/audio.cpp @@ -280,7 +280,7 @@ std::vector ListEffectsPlaying; int32_t ewol::audio::effects::add(std::string _file) { - for (int32_t iii=0; iiim_file == _file) { ListEffects[iii]->m_requestedTime++; @@ -301,7 +301,7 @@ int32_t ewol::audio::effects::add(std::string _file) { void ewol::audio::effects::rm(int32_t _effectId) { // find element ... - if (_effectId <0 || _effectId >= ListEffects.size()) { + if (_effectId <0 || _effectId >= (int64_t)ListEffects.size()) { EWOL_ERROR("Wrong effect ID : " << _effectId << " != [0.." << ListEffects.size()-1 << "] == > can not remove it ..."); return; } @@ -321,7 +321,7 @@ void ewol::audio::effects::rm(int32_t _effectId) { void ewol::audio::effects::play(int32_t _effectId, float _xxx, float _yyy) { - if (_effectId <0 || _effectId >= ListEffects.size()) { + if (_effectId <0 || _effectId >= (int64_t)ListEffects.size()) { EWOL_ERROR("Wrong effect ID : " << _effectId << " != [0.." << ListEffects.size()-1 << "] == > can not play it ..."); return; } @@ -331,7 +331,7 @@ void ewol::audio::effects::play(int32_t _effectId, float _xxx, float _yyy) { } EWOL_VERBOSE("effect play : " << _effectId ); // try to find an empty slot : - for (int32_t iii=0; iiiisFree()) { ListEffectsPlaying[iii]->reset(ListEffects[_effectId]); return; @@ -382,8 +382,8 @@ void ewol::audio::effects::muteSet(bool _newMute) { -void ewol::audio::effects::getData(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels) { - for (int32_t iii=0; iiiplay(_bufferInterlace, _nbSample, _nbChannels); } diff --git a/sources/ewol/renderer/audio/decWav.cpp b/sources/ewol/renderer/audio/decWav.cpp index 1e000568..de603df6 100644 --- a/sources/ewol/renderer/audio/decWav.cpp +++ b/sources/ewol/renderer/audio/decWav.cpp @@ -82,7 +82,7 @@ int16_t * ewol::audio::wav::loadData(std::string filename, int8_t nbChan, int32_ return NULL; } // try to find endienness : - if (fileSize < sizeof(waveHeader)) { + if (fileSize < (int64_t)sizeof(waveHeader)) { EWOL_ERROR("File : \"" << fileAccess << "\" == > has not enouth data inside might be minumum of " << (int32_t)(sizeof(waveHeader))); return NULL; } diff --git a/sources/ewol/renderer/eContext.cpp b/sources/ewol/renderer/eContext.cpp index a3817c63..72b9986c 100644 --- a/sources/ewol/renderer/eContext.cpp +++ b/sources/ewol/renderer/eContext.cpp @@ -230,7 +230,7 @@ ewol::eContext::eContext(int32_t _argc, const char* _argv[]) : // set the curent interface : lockContext(); // parse the debug level: - for(esize_t iii=m_commandLine.size()-1 ; iii >= 0 ; --iii) { + for(int32_t iii=m_commandLine.size()-1 ; iii >= 0 ; --iii) { if (m_commandLine.get(iii) == "-l0") { debug::setGeneralLevel(etk::logLevelNone); } else if (m_commandLine.get(iii) == "-l1") { diff --git a/sources/ewol/resources/ConfigFile.cpp b/sources/ewol/resources/ConfigFile.cpp index 614e270f..3993ca1e 100644 --- a/sources/ewol/resources/ConfigFile.cpp +++ b/sources/ewol/resources/ConfigFile.cpp @@ -46,7 +46,7 @@ ewol::ConfigFile::ConfigFile(const std::string& _filename) : ewol::ConfigFile::~ConfigFile(void) { // remove all element - for (int32_t iii=0; iiiparse(""); } @@ -113,7 +113,7 @@ void ewol::ConfigFile::reload(void) { EWOL_DEBUG(" param name=\"" << paramName << "\" val=\"" << paramValue << "\""); // check if the parameters existed : bool findParam = false; - for (int32_t iii=0; iiim_paramName == paramName) { m_list[iii]->parse(paramValue); @@ -140,7 +140,7 @@ void ewol::ConfigFile::reload(void) { int32_t ewol::ConfigFile::request(const std::string& _paramName) { // check if the parameters existed : - for (int32_t iii=0; iiim_paramName == _paramName) { return iii; diff --git a/sources/ewol/resources/FontFreeType.cpp b/sources/ewol/resources/FontFreeType.cpp index a5c6cb61..30f40c15 100644 --- a/sources/ewol/resources/FontFreeType.cpp +++ b/sources/ewol/resources/FontFreeType.cpp @@ -241,9 +241,9 @@ void ewol::FontFreeType::generateKerning(int32_t fontSize, std::vector& tmppFaces = m_listFaces.getValue(kkk).m_faces; //std::vector& tmppIndex = m_listFaces.getValue(kkk).m_index; if (normalModeFace == m_normalMode) { - for(int32_t iii=0; iii= 0.0f) { tmpIndexResult.push_back(iii*3); tmpIndexResult.push_back(iii*3+1); @@ -146,7 +146,7 @@ void ewol::Mesh::draw(mat4& _positionMatrix, } } } else { - for(int32_t iii=0; iii= -0.2f) || (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[1]], cameraNormal) >= -0.2f) || (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[2]], cameraNormal) >= -0.2f) ) { @@ -182,7 +182,7 @@ void ewol::Mesh::calculateNormaleFace(void) { m_listFacesNormal.clear(); if (m_normalMode != ewol::Mesh::normalModeFace) { std::vector& tmpFaceList = m_listFaces.getValue(0).m_faces; - for(int32_t iii=0 ; iii& tmpFaceList = m_listFaces.getValue(0).m_faces; vec3 normal(0,0,0); // add the vertex from all the element in the list for face when the element in the face ... - for(int32_t jjj=0 ; jjjpushOnBuffer(MESH_VBO_VERTICES_NORMAL, normal); - if( tmpFaceList[jjj].m_vertex[0] == iii - || tmpFaceList[jjj].m_vertex[1] == iii - || tmpFaceList[jjj].m_vertex[2] == iii) { + if( tmpFaceList[jjj].m_vertex[0] == (int32_t)iii + || tmpFaceList[jjj].m_vertex[1] == (int32_t)iii + || tmpFaceList[jjj].m_vertex[2] == (int32_t)iii) { normal += m_listFacesNormal[jjj]; } } @@ -230,16 +230,16 @@ void ewol::Mesh::generateVBO(void) { // generate element in 2 pass : // - create new index dependeng a vertex is a unique componenet of position, texture, normal // - the index list generation (can be dynamic ... (TODO later) - for (esize_t kkk=0; kkksizeOnBufferVec3(MESH_VBO_VERTICES)-1; } } - for(int32_t indice=0 ; indice<3; indice++) { + for(size_t indice=0 ; indice<3; indice++) { tmpFaceList.m_index.push_back(vertexVBOId[indice]); } } @@ -826,7 +826,6 @@ bool ewol::Mesh::loadEMF(const std::string& _fileName) { if (meshFaceMaterialID < 0) { continue; } - int32_t matches; uint32_t vertexIndex[3], uvIndex[3], normalIndex[3]; vertexIndex[0] = 0; vertexIndex[1] = 0; @@ -837,10 +836,10 @@ bool ewol::Mesh::loadEMF(const std::string& _fileName) { normalIndex[0] = 0; normalIndex[1] = 0; normalIndex[2] = 0; - matches = sscanf(inputDataLine, "%d/%d/%d %d/%d/%d %d/%d/%d", - &vertexIndex[0], &uvIndex[0], &normalIndex[0], - &vertexIndex[1], &uvIndex[1], &normalIndex[1], - &vertexIndex[2], &uvIndex[2], &normalIndex[2] ); + scanf(inputDataLine, "%d/%d/%d %d/%d/%d %d/%d/%d", + &vertexIndex[0], &uvIndex[0], &normalIndex[0], + &vertexIndex[1], &uvIndex[1], &normalIndex[1], + &vertexIndex[2], &uvIndex[2], &normalIndex[2] ); m_listFaces.getValue(meshFaceMaterialID).m_faces.push_back(Face(vertexIndex[0], uvIndex[0], normalIndex[0], vertexIndex[1], uvIndex[1], normalIndex[1], vertexIndex[2], uvIndex[2], normalIndex[2])); diff --git a/sources/ewol/resources/Program.cpp b/sources/ewol/resources/Program.cpp index 37ad1aa4..e8bbe6ad 100644 --- a/sources/ewol/resources/Program.cpp +++ b/sources/ewol/resources/Program.cpp @@ -96,7 +96,7 @@ ewol::Program::Program(const std::string& _filename) : } ewol::Program::~Program(void) { - for (int32_t iii=0; iii= 256) { tmpLog[idOut] = '\0'; @@ -224,7 +224,7 @@ void ewol::Program::updateContext(void) { } m_exist = true; // now get the old attribute requested priviously ... - for(int32_t iii=0; iiim_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -337,7 +337,7 @@ void ewol::Program::sendAttributePointer(int32_t _idElem, if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -362,7 +362,7 @@ void ewol::Program::uniformMatrix4fv(int32_t _idElem, int32_t _nbElement, mat4 _ if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -383,7 +383,7 @@ void ewol::Program::uniform1f(int32_t _idElem, float _value1) { if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -397,7 +397,7 @@ void ewol::Program::uniform2f(int32_t _idElem, float _value1, float _value2) { if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -411,7 +411,7 @@ void ewol::Program::uniform3f(int32_t _idElem, float _value1, float _value2, flo if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -425,7 +425,7 @@ void ewol::Program::uniform4f(int32_t _idElem, float _value1, float _value2, flo if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -442,7 +442,7 @@ void ewol::Program::uniform1i(int32_t _idElem, int32_t _value1) { if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -456,7 +456,7 @@ void ewol::Program::uniform2i(int32_t _idElem, int32_t _value1, int32_t _value2) if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -470,7 +470,7 @@ void ewol::Program::uniform3i(int32_t _idElem, int32_t _value1, int32_t _value2, if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -484,7 +484,7 @@ void ewol::Program::uniform4i(int32_t _idElem, int32_t _value1, int32_t _value2, if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -502,7 +502,7 @@ void ewol::Program::uniform1fv(int32_t _idElem, int32_t _nbElement, const float if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -524,7 +524,7 @@ void ewol::Program::uniform2fv(int32_t _idElem, int32_t _nbElement, const float if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -546,7 +546,7 @@ void ewol::Program::uniform3fv(int32_t _idElem, int32_t _nbElement, const float if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -568,7 +568,7 @@ void ewol::Program::uniform4fv(int32_t _idElem, int32_t _nbElement, const float if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -593,7 +593,7 @@ void ewol::Program::uniform1iv(int32_t _idElem, int32_t _nbElement, const int32_ if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -615,7 +615,7 @@ void ewol::Program::uniform2iv(int32_t _idElem, int32_t _nbElement, const int32_ if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -637,7 +637,7 @@ void ewol::Program::uniform3iv(int32_t _idElem, int32_t _nbElement, const int32_ if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -659,7 +659,7 @@ void ewol::Program::uniform4iv(int32_t _idElem, int32_t _nbElement, const int32_ if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { EWOL_ERROR("idElem = " << _idElem << " not in [0.." << (m_elementList.size()-1) << "]"); return; } @@ -700,7 +700,7 @@ void ewol::Program::setTexture0(int32_t _idElem, GLint _textureOpenGlID) { if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { return; } if (false == m_elementList[_idElem].m_isLinked) { @@ -725,7 +725,7 @@ void ewol::Program::setTexture1(int32_t _idElem, GLint _textureOpenGlID) { if (0 == m_program) { return; } - if (_idElem<0 || _idElem>m_elementList.size()) { + if (_idElem<0 || (size_t)_idElem>m_elementList.size()) { return; } if (false == m_elementList[_idElem].m_isLinked) { diff --git a/sources/ewol/resources/ResourceManager.cpp b/sources/ewol/resources/ResourceManager.cpp index e4d7df6a..fcdf916c 100644 --- a/sources/ewol/resources/ResourceManager.cpp +++ b/sources/ewol/resources/ResourceManager.cpp @@ -40,7 +40,7 @@ void ewol::ResourceManager::unInit(void) { display(); m_resourceListToUpdate.clear(); // remove all resources ... - for (int32_t iii=m_resourceList.size()-1; iii >= 0; iii--) { + for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) { if (m_resourceList[iii] != NULL) { EWOL_WARNING("Find a resource that is not removed : [" << m_resourceList[iii]->getId() << "]" << "=\"" << m_resourceList[iii]->getName() << "\" " @@ -55,7 +55,7 @@ void ewol::ResourceManager::unInit(void) { void ewol::ResourceManager::display(void) { EWOL_INFO("Resources loaded : "); // remove all resources ... - for (int32_t iii=m_resourceList.size()-1; iii >= 0; iii--) { + for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) { if (m_resourceList[iii] != NULL) { EWOL_INFO(" [" << m_resourceList[iii]->getId() << "]" << m_resourceList[iii]->getObjectType() @@ -70,9 +70,9 @@ void ewol::ResourceManager::reLoadResources(void) { EWOL_INFO("------------- Resources re-loaded -------------"); // remove all resources ... if (m_resourceList.size() != 0) { - for (int32_t jjj=0; jjj= 0; iii--) { + for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) { if(m_resourceList[iii] != NULL) { if (jjj == m_resourceList[iii]->getResourceLevel()) { m_resourceList[iii]->reload(); @@ -89,7 +89,7 @@ void ewol::ResourceManager::reLoadResources(void) { void ewol::ResourceManager::update(ewol::Resource* _object) { // chek if not added before - for (int32_t iii=0; iiigetResourceLevel()) { //EWOL_DEBUG("Update context of " << iii << " named : " << l_resourceList[iii]->getName()); @@ -121,9 +121,9 @@ void ewol::ResourceManager::updateContext(void) { } }else { if (m_resourceListToUpdate.size() != 0) { - for (int32_t jjj=0; jjjgetResourceLevel()) { m_resourceListToUpdate[iii]->updateContext(); @@ -139,7 +139,7 @@ void ewol::ResourceManager::updateContext(void) { // in this case, it is really too late ... void ewol::ResourceManager::contextHasBeenDestroyed(void) { - for (int32_t iii=0; iiiremoveContextToLate(); } @@ -151,7 +151,7 @@ void ewol::ResourceManager::contextHasBeenDestroyed(void) { // internal generic keeper ... ewol::Resource* ewol::ResourceManager::localKeep(const std::string& _filename) { EWOL_VERBOSE("KEEP (DEFAULT) : file : \"" << _filename << "\""); - for (int32_t iii=0; iiigetName() == _filename) { m_resourceList[iii]->increment(); @@ -166,7 +166,7 @@ ewol::Resource* ewol::ResourceManager::localKeep(const std::string& _filename) { // internal generic keeper ... void ewol::ResourceManager::localAdd(ewol::Resource* _object) { //Add ... find empty slot - for (int32_t iii=0; iiigetName() << "\""); - for (int32_t iii=m_resourceList.size()-1; iii >= 0; iii--) { + for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) { if (m_resourceList[iii] == NULL) { continue; } diff --git a/sources/ewol/resources/Shader.cpp b/sources/ewol/resources/Shader.cpp index dd37b1dd..0d2f7741 100644 --- a/sources/ewol/resources/Shader.cpp +++ b/sources/ewol/resources/Shader.cpp @@ -88,7 +88,7 @@ void ewol::Shader::updateContext(void) { EWOL_ERROR("Could not compile \"" << tmpShaderType << "\" name='" << m_name << "'"); EWOL_ERROR("Error " << l_bufferDisplayError); std::vector lines = string_split(m_fileData, '\n'); - for (esize_t iii=0 ; iii output; @@ -102,9 +102,9 @@ ewol::TexturedFont::TexturedFont(const std::string& _fontName) : EWOL_INFO("try to find font named : " << split << " in: " << myFolder); //EWOL_CRITICAL("parse string : " << split); bool hasFindAFont = false; - for (int32_t jjj=0; jjj(0)); // note : need to rework all the lyer due to the fact that the texture is used by the faur type... - for (int32_t kkk=0; kkk<4 ; kkk++) { + for (size_t kkk=0; kkk<4 ; kkk++) { // change the coordonate on the element in the texture - for (int32_t jjj=0 ; jjj wrapping index : " << m_modeWraping[_displayMode]); int32_t index = getIndex(_charcode, _displayMode); if( index < 0 - || index >= m_listElement[_displayMode].size() ) { + || (size_t)index >= m_listElement[_displayMode].size() ) { EWOL_ERROR(" Try to get glyph index inexistant ... == > return the index 0 ... id=" << index); - if (m_listElement[_displayMode].size() >= 0) { + if (m_listElement[_displayMode].size() > 0) { return &((m_listElement[_displayMode])[0]); } return NULL; diff --git a/sources/ewol/resources/TexturedFont.h b/sources/ewol/resources/TexturedFont.h index 71c23ef6..a35a0807 100644 --- a/sources/ewol/resources/TexturedFont.h +++ b/sources/ewol/resources/TexturedFont.h @@ -68,7 +68,7 @@ namespace ewol { * @param[in] _displayMode Mode to display the currrent font * @return The ID in the table (if it does not exist : return 0) */ - int32_t getIndex(const char32_t& _charcode, const enum ewol::font::mode _displayMode); + int32_t getIndex(char32_t _charcode, const enum ewol::font::mode _displayMode); /** * @brief get the pointer on the coresponding glyph * @param[in] _charcode The unicodeValue diff --git a/sources/ewol/resources/VirtualBufferObject.cpp b/sources/ewol/resources/VirtualBufferObject.cpp index cb4dc36c..71460fc7 100644 --- a/sources/ewol/resources/VirtualBufferObject.cpp +++ b/sources/ewol/resources/VirtualBufferObject.cpp @@ -19,7 +19,7 @@ ewol::VirtualBufferObject::VirtualBufferObject(int32_t _number) : m_exist(false) { addObjectType("ewol::VirtualBufferObject"); m_nbVBO = etk_avg(1, _number, NB_VBO_MAX); - for (int32_t iii=0; iiim_buffer[_id].size()) { + if ((size_t)_elementID*3 > m_buffer[_id].size()) { return vec3(0,0,0); } return vec3(m_buffer[_id][3*_elementID], @@ -113,7 +113,7 @@ void ewol::VirtualBufferObject::pushOnBuffer(int32_t _id, const vec2& _data) { } vec2 ewol::VirtualBufferObject::getOnBufferVec2(int32_t _id, int32_t _elementID) { - if (_elementID*2>m_buffer[_id].size()) { + if ((size_t)_elementID*2 > m_buffer[_id].size()) { return vec2(0,0); } return vec2(m_buffer[_id][2*_elementID], diff --git a/sources/ewol/resources/VirtualBufferObject.h b/sources/ewol/resources/VirtualBufferObject.h index 11e7e390..ccb243c1 100644 --- a/sources/ewol/resources/VirtualBufferObject.h +++ b/sources/ewol/resources/VirtualBufferObject.h @@ -23,7 +23,7 @@ namespace ewol { */ class VirtualBufferObject : public ewol::Resource { private : - int32_t m_nbVBO; + size_t m_nbVBO; bool m_exist; //!< This data is availlable in the Graphic card GLuint m_vbo[NB_VBO_MAX]; //!< openGl ID of this VBO bool m_vboUsed[NB_VBO_MAX]; //!< true if the VBO is allocated or used ... diff --git a/sources/ewol/widget/Button.cpp b/sources/ewol/widget/Button.cpp index 9765808e..2c5f5191 100644 --- a/sources/ewol/widget/Button.cpp +++ b/sources/ewol/widget/Button.cpp @@ -407,7 +407,7 @@ bool widget::Button::loadXML(exml::Element* _element) { setSubWidgetToggle(NULL); // parse all the elements : - for(int32_t iii=0; iii< _element->size(); iii++) { + for(size_t iii=0; iii< _element->size(); iii++) { exml::Element* pNode = _element->getElement(iii); if (pNode == NULL) { // trash here all that is not element diff --git a/sources/ewol/widget/Container.cpp b/sources/ewol/widget/Container.cpp index f31aa46e..688aac13 100644 --- a/sources/ewol/widget/Container.cpp +++ b/sources/ewol/widget/Container.cpp @@ -163,7 +163,7 @@ bool widget::Container::loadXML(exml::Element* _node) { subWidgetRemoveDelayed(); // parse all the elements : - for(int32_t iii=0; iii< _node->size(); iii++) { + for(size_t iii=0; iii< _node->size(); iii++) { exml::Element* pNode = _node->getElement(iii); if (pNode == NULL) { // trash here all that is not element diff --git a/sources/ewol/widget/ContainerN.cpp b/sources/ewol/widget/ContainerN.cpp index 32669c05..e2d2599f 100644 --- a/sources/ewol/widget/ContainerN.cpp +++ b/sources/ewol/widget/ContainerN.cpp @@ -85,8 +85,8 @@ void widget::ContainerN::subWidgetRemove(ewol::Widget* _newWidget) { if (NULL == _newWidget) { return; } - int32_t errorControl = m_subWidget.size(); - for (int32_t iii=0; iiiremoveUpperWidget(); delete(m_subWidget[iii]); @@ -107,7 +107,7 @@ void widget::ContainerN::subWidgetUnLink(ewol::Widget* _newWidget) { if (NULL == _newWidget) { return; } - for (int32_t iii=0; iiiremoveUpperWidget(); m_subWidget[iii] = NULL; @@ -120,7 +120,7 @@ void widget::ContainerN::subWidgetUnLink(ewol::Widget* _newWidget) { } void widget::ContainerN::subWidgetRemoveAll(void) { - int32_t errorControl = m_subWidget.size(); + size_t errorControl = m_subWidget.size(); // the size automaticly decrement with the auto call of the onObjectRemove function while (m_subWidget.size() > 0 ) { if (NULL != m_subWidget[0]) { @@ -142,7 +142,7 @@ void widget::ContainerN::subWidgetRemoveAll(void) { void widget::ContainerN::subWidgetRemoveAllDelayed(void) { // the size automaticly decrement with the auto call of the onObjectRemove function - for(int32_t iii=0; iiiremoveUpperWidget(); m_subWidget[iii]->removeObject(); @@ -159,7 +159,7 @@ ewol::Widget* widget::ContainerN::getWidgetNamed(const std::string& _widgetName) if (NULL!=tmpUpperWidget) { return tmpUpperWidget; } - for (int32_t iii=0; iiigetWidgetNamed(_widgetName); if (NULL != tmpWidget) { @@ -174,7 +174,7 @@ void widget::ContainerN::onObjectRemove(ewol::EObject* _removeObject) { // First step call parrent : ewol::Widget::onObjectRemove(_removeObject); // second step find if in all the elements ... - for(int32_t iii=m_subWidget.size()-1; iii >= 0; iii--) { + for (int64_t iii=m_subWidget.size()-1; iii >= 0; iii--) { if(m_subWidget[iii] == _removeObject) { EWOL_VERBOSE("[" << getId() << "] {" << getObjectType() << "} remove sizer sub Element [" << iii << "/" << m_subWidget.size()-1 << "] == > destroyed object"); m_subWidget[iii] = NULL; @@ -193,7 +193,7 @@ void widget::ContainerN::systemDraw(const ewol::DrawProperty& _displayProp) { // subwidget draw ewol::DrawProperty prop = _displayProp; prop.limit(m_origin, m_size); - for (int32_t iii=m_subWidget.size()-1; iii >= 0; iii--) { + for (int64_t iii=m_subWidget.size()-1; iii >= 0; iii--) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->systemDraw(prop); } @@ -202,7 +202,7 @@ void widget::ContainerN::systemDraw(const ewol::DrawProperty& _displayProp) { void widget::ContainerN::calculateSize(const vec2& _availlable) { m_size = _availlable; - for (int32_t iii=0; iiisetOrigin(m_origin+m_offset); m_subWidget[iii]->calculateSize(m_size); @@ -216,7 +216,7 @@ void widget::ContainerN::calculateMinMaxSize(void) { m_minSize.setValue(0,0); m_maxSize.setValue(ULTIMATE_MAX_SIZE,ULTIMATE_MAX_SIZE); //EWOL_ERROR("[" << getId() << "] {" << getObjectType() << "} set min size : " << m_minSize); - for (int32_t iii=0; iiicalculateMinMaxSize(); bvec2 subExpendProp = m_subWidget[iii]->canExpand(); @@ -235,7 +235,7 @@ void widget::ContainerN::calculateMinMaxSize(void) { } void widget::ContainerN::onRegenerateDisplay(void) { - for (int32_t iii=0; iiionRegenerateDisplay(); } @@ -247,7 +247,7 @@ ewol::Widget* widget::ContainerN::getWidgetAtPos(const vec2& _pos) { return NULL; } // for all element in the sizer ... - for (int32_t iii=0; iiigetSize(); vec2 tmpOrigin = m_subWidget[iii]->getOrigin(); @@ -286,7 +286,7 @@ bool widget::ContainerN::loadXML(exml::Element* _node) { invertAdding=true; } // parse all the elements : - for(int32_t iii=0; iii< _node->size(); iii++) { + for (size_t iii=0; iii < _node->size(); iii++) { exml::Element* pNode = _node->getElement(iii); if (pNode == NULL) { // trash here all that is not element diff --git a/sources/ewol/widget/Entry.cpp b/sources/ewol/widget/Entry.cpp index 72acde81..5662ccc6 100644 --- a/sources/ewol/widget/Entry.cpp +++ b/sources/ewol/widget/Entry.cpp @@ -114,7 +114,7 @@ void widget::Entry::calculateMinMaxSize(void) { void widget::Entry::setValue(const std::string& _newData) { std::string newData = _newData; - if (newData.size()>m_maxCharacter) { + if ((int64_t)newData.size() > m_maxCharacter) { newData = std::string(_newData, 0, m_maxCharacter); EWOL_DEBUG("Limit entry set of data... " << std::string(_newData, m_maxCharacter)); } @@ -197,7 +197,7 @@ void widget::Entry::updateCursorPosition(const vec2& _pos, bool _selection) { //EWOL_DEBUG("hidenSize : " << displayHidenSize); int32_t newCursorPosition = -1; int32_t tmpTextOriginX = padding.x(); - for (int32_t iii=0; iii= relPos.x()-tmpTextOriginX) { @@ -272,7 +272,7 @@ bool widget::Entry::onEventInput(const ewol::EventInput& _event) { // select word m_displayCursorPosSelection = m_displayCursorPos-1; // search forward - for (int32_t iii=m_displayCursorPos; iii <= m_data.size(); iii++) { + for (size_t iii=m_displayCursorPos; iii <= m_data.size(); iii++) { if(iii == m_data.size()) { m_displayCursorPos = iii; break; @@ -291,7 +291,7 @@ bool widget::Entry::onEventInput(const ewol::EventInput& _event) { } } // search backward - for (int32_t iii=m_displayCursorPosSelection; iii >= -1; iii--) { + for (int64_t iii=m_displayCursorPosSelection; iii >= -1; iii--) { if(iii == -1) { m_displayCursorPosSelection = 0; break; @@ -365,7 +365,7 @@ bool widget::Entry::onEventEntry(const ewol::EventEntry& _event) { return true; } else if (_event.getChar() == 0x7F) { // SUPPR : - if (m_data.size() > 0 && m_displayCursorPos 0 && m_displayCursorPos < (int64_t)m_data.size()) { m_data.erase(m_displayCursorPos, 1); m_displayCursorPos = etk_max(m_displayCursorPos, 0); m_displayCursorPosSelection = m_displayCursorPos; @@ -379,7 +379,7 @@ bool widget::Entry::onEventEntry(const ewol::EventEntry& _event) { m_displayCursorPosSelection = m_displayCursorPos; } } else if(_event.getChar() >= 20) { - if (m_data.size() > m_maxCharacter) { + if ((int64_t)m_data.size() > m_maxCharacter) { EWOL_INFO("Reject data for entry : '" << _event.getChar() << "'"); } else { std::string newData = m_data; @@ -415,7 +415,7 @@ bool widget::Entry::onEventEntry(const ewol::EventEntry& _event) { default: return false; } - m_displayCursorPos = etk_avg(0, m_displayCursorPos, m_data.size()); + m_displayCursorPos = etk_avg(0, m_displayCursorPos, (int64_t)m_data.size()); m_displayCursorPosSelection = m_displayCursorPos; markToRedraw(); return true; @@ -434,7 +434,7 @@ void widget::Entry::setInternalValue(const std::string& _newData) { } //EWOL_INFO("find regExp : \"" << m_data << "\" start=" << m_regExp.Start() << " stop=" << m_regExp.Stop() ); if( 0 != m_regExp.start() - || _newData.size() != m_regExp.stop() ) { + || _newData.size() != (size_t)m_regExp.stop() ) { EWOL_INFO("The input data match not entirely with the regExp \"" << _newData << "\" RegExp=\"" << m_regExp.getRegExp() << "\" start=" << m_regExp.start() << " stop=" << m_regExp.stop() ); return; } diff --git a/sources/ewol/widget/Gird.cpp b/sources/ewol/widget/Gird.cpp index 8ef88479..23c8ebf9 100644 --- a/sources/ewol/widget/Gird.cpp +++ b/sources/ewol/widget/Gird.cpp @@ -58,7 +58,7 @@ void widget::Gird::calculateSize(const vec2& _availlable) { m_size = _availlable; m_size -= m_borderSize*2; - for (int32_t iii=0; iii lastLineID) { // change of line : lastLineID = m_subWidget[iii].row; @@ -125,7 +125,7 @@ void widget::Gird::calculateMinMaxSize(void) { m_uniformSizeRow = m_sizeRow; } int32_t tmpSizeWidth = 0; - for (int32_t iii=0; iii _colId) { + if ((int64_t)m_sizeCol.size() > _colId) { if (m_sizeCol[_colId] <= 0) { return 0; } @@ -198,7 +198,7 @@ int32_t widget::Gird::getRowSize(void) { } void widget::Gird::subWidgetRemoveAll(void) { - int32_t errorControl = m_subWidget.size(); + size_t errorControl = m_subWidget.size(); // the size automaticly decrement with the auto call of the onObjectRemove function while (m_subWidget.size() > 0 ) { if (NULL != m_subWidget[0].widget) { @@ -228,7 +228,7 @@ void widget::Gird::subWidgetAdd(int32_t _colId, int32_t _rowId, ewol::Widget* _n prop.widget = _newWidget; // need to find the correct position : - for (int32_t iii=0; iii prop.row) { @@ -265,8 +265,8 @@ void widget::Gird::subWidgetRemove(ewol::Widget* _newWidget) if (NULL == _newWidget) { return; } - int32_t errorControl = m_subWidget.size(); - for (int32_t iii=0; iii it does not exist anymore ... @@ -286,9 +286,9 @@ void widget::Gird::subWidgetRemove(int32_t _colId, int32_t _rowId) { EWOL_WARNING("[" << getId() << "] try to remove widget with id < 0 col=" << _colId << " row=" << _rowId); return; } - int32_t errorControl = m_subWidget.size(); + size_t errorControl = m_subWidget.size(); // try to find it ... - for (int32_t iii=0; iiisystemDraw(_displayProp); } @@ -351,7 +351,7 @@ void widget::Gird::systemDraw(const ewol::DrawProperty& _displayProp) { } void widget::Gird::onRegenerateDisplay(void) { - for (int32_t iii=0; iiionRegenerateDisplay(); } @@ -363,7 +363,7 @@ ewol::Widget * widget::Gird::getWidgetAtPos(const vec2& _pos) { return NULL; } // for all element in the sizer ... - for (int32_t iii=0; iiigetSize(); vec2 tmpOrigin = m_subWidget[iii].widget->getOrigin(); diff --git a/sources/ewol/widget/Image.cpp b/sources/ewol/widget/Image.cpp index 4454967c..36ad5871 100644 --- a/sources/ewol/widget/Image.cpp +++ b/sources/ewol/widget/Image.cpp @@ -115,11 +115,6 @@ void widget::Image::onRegenerateDisplay(void) { vec2 imageRealSize = m_minSize - imageBoder; vec2 imageRealSizeMax = m_size - imageBoder; - bool xSizeBigger = false; - if (imageRealSize.x() > imageRealSize.y()) { - xSizeBigger = true; - } - if (m_userFill.x() == true) { imageRealSize.setX(imageRealSizeMax.x()); } else { diff --git a/sources/ewol/widget/Layer.cpp b/sources/ewol/widget/Layer.cpp index e8ee966e..419dbffa 100644 --- a/sources/ewol/widget/Layer.cpp +++ b/sources/ewol/widget/Layer.cpp @@ -34,7 +34,7 @@ ewol::Widget* widget::Layer::getWidgetAtPos(const vec2& _pos) { return NULL; } // for all element in the sizer ... - for (int32_t iii=0; iiigetSize(); vec2 tmpOrigin = m_subWidget[iii]->getOrigin(); diff --git a/sources/ewol/widget/List.cpp b/sources/ewol/widget/List.cpp index 9b5e5185..828fe6b7 100644 --- a/sources/ewol/widget/List.cpp +++ b/sources/ewol/widget/List.cpp @@ -30,7 +30,7 @@ widget::List::List(void) { widget::List::~List(void) { //clean all the object - for (int32_t iii=0; iiigetNuberOfRaw()) { + if (m_displayStartRaw > (int32_t)getNuberOfRaw()) { m_displayStartRaw = getNuberOfRaw()-2; } if (m_displayStartRaw<0) { @@ -78,7 +78,7 @@ void widget::List::addOObject(ewol::Compositing* _newObject, int32_t _pos) { EWOL_ERROR("Try to add an empty object in the Widget generic display system"); return; } - if (_pos < 0 || _pos >= m_listOObject.size() ) { + if (_pos < 0 || (size_t)_pos >= m_listOObject.size() ) { m_listOObject.push_back(_newObject); } else { m_listOObject.insert(m_listOObject.begin()+_pos, _newObject); @@ -86,7 +86,7 @@ void widget::List::addOObject(ewol::Compositing* _newObject, int32_t _pos) { } void widget::List::clearOObjectList(void) { - for (int32_t iii=0; iiidraw(); } @@ -162,11 +162,11 @@ void widget::List::onRegenerateDisplay(void) { // add the default position raw : m_lineSize.push_back(tmpRegister); - for(int32_t jjj=0; jjj= 0; iii++) { + for (int32_t iii=startRaw; iii= 0; iii++) { m_nbVisibleRaw++; std::string myTextToWrite; etk::Color<> fg; @@ -222,7 +222,7 @@ bool widget::List::onEventInput(const ewol::EventInput& _event) { } // parse all the loged row position to find the good one... int32_t rawID = -1; - for(int32_t iii=0; iii= m_lineSize[iii+1].y() ) { // we find the raw : diff --git a/sources/ewol/widget/ListFileSystem.cpp b/sources/ewol/widget/ListFileSystem.cpp index 9a28da88..5fce4dbc 100644 --- a/sources/ewol/widget/ListFileSystem.cpp +++ b/sources/ewol/widget/ListFileSystem.cpp @@ -41,7 +41,7 @@ widget::ListFileSystem::ListFileSystem(void) { }; widget::ListFileSystem::~ListFileSystem(void) { - for (int32_t iii=0; iii widget::ListFileSystem::getBasicBG(void) { void widget::ListFileSystem::regenerateView(void) { // clean the list of files : - for (esize_t iii=0; iiigetNameFile() == _data) { // we find the line : @@ -157,7 +157,7 @@ bool widget::ListFileSystem::getElement(int32_t _colomn, int32_t _raw, std::stri } } if( _raw-offset >= 0 - && _raw-offset < m_list.size() + && _raw-offset < (int32_t)m_list.size() && NULL != m_list[_raw-offset]) { /*if (etk::FSN_FILE == m_list[raw-offset]->getNodeType()) { myTextToWrite = m_list[raw-offset]->getRight().getRight(); @@ -194,26 +194,25 @@ bool widget::ListFileSystem::onItemEvent(int32_t _IdInput, EWOL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw ); if (1 == _IdInput) { int32_t previousRaw = m_selectedLine; - if (_raw > m_list.size()+offset ) { + if (_raw > (int32_t)m_list.size()+offset ) { m_selectedLine = -1; } else { m_selectedLine = _raw; } if (previousRaw != m_selectedLine) { - if( true == m_showFolder - && m_selectedLine == 0) { + if( m_showFolder == true + && m_selectedLine == 0) { // "." folder generateEventId(ewolEventFSFolderSelect, "."); - } else if ( true == m_showFolder - && m_selectedLine == 1) { + } else if ( m_showFolder == true + && m_selectedLine == 1) { // ".." folder generateEventId(ewolEventFSFolderSelect, ".."); } else if( m_selectedLine-offset >= 0 - && m_selectedLine-offset < m_list.size() + && m_selectedLine-offset < (int32_t)m_list.size() && NULL != m_list[m_selectedLine-offset] ) { // generate event extern : - switch(m_list[m_selectedLine-offset]->getNodeType()) - { + switch(m_list[m_selectedLine-offset]->getNodeType()) { case etk::FSN_FILE : generateEventId(ewolEventFSFileSelect, m_list[m_selectedLine-offset]->getNameFile()); break; @@ -226,16 +225,16 @@ bool widget::ListFileSystem::onItemEvent(int32_t _IdInput, } } } else { - if( true == m_showFolder - && m_selectedLine == 0) { + if( m_showFolder == true + && m_selectedLine == 0) { // "." folder generateEventId(ewolEventFSFolderValidate, "."); - } else if ( true == m_showFolder - && m_selectedLine == 1) { + } else if ( m_showFolder == true + && m_selectedLine == 1) { // ".." folder generateEventId(ewolEventFSFolderValidate, ".."); - } else if( m_selectedLine-offset >= 0 - && m_selectedLine-offset < m_list.size() + } else if( m_selectedLine-offset >= 0 + && m_selectedLine-offset < (int32_t)m_list.size() && NULL != m_list[m_selectedLine-offset] ) { switch(m_list[m_selectedLine-offset]->getNodeType()) { diff --git a/sources/ewol/widget/Menu.cpp b/sources/ewol/widget/Menu.cpp index 4ef536dd..853d4a8f 100644 --- a/sources/ewol/widget/Menu.cpp +++ b/sources/ewol/widget/Menu.cpp @@ -47,7 +47,7 @@ void widget::Menu::subWidgetUnLink(ewol::Widget* _newWidget) { } void widget::Menu::clear(void) { - for( int32_t iii=0; iii < m_listElement.size(); iii++) { + for (size_t iii=0; iii < m_listElement.size(); iii++) { if (m_listElement[iii] != NULL) { delete(m_listElement[iii]); m_listElement[iii] = NULL; @@ -123,7 +123,7 @@ void widget::Menu::onReceiveMessage(const ewol::EMessage& _msg) { */ EWOL_ERROR(" receive message : " << _msg); if (_msg.getMessage() == widget::Button::eventPressed) { - for(int32_t iii=0; iiim_widgetPointer) { // 2 posible case (have a message or have a child ... if (m_listElement[iii]->m_generateEvent != NULL) { @@ -139,7 +139,7 @@ void widget::Menu::onReceiveMessage(const ewol::EMessage& _msg) { } else{ EWOL_DEBUG("Menu == > load Sub Menu"); bool findChild = false; - for(int32_t jjj=0; jjjm_localId == m_listElement[jjj]->m_parentId) { findChild = true; break; @@ -178,7 +178,7 @@ void widget::Menu::onReceiveMessage(const ewol::EMessage& _msg) { m_widgetContextMenu->setSubWidget(mySizer); bool menuHaveImage = false; - for(int32_t jjj=m_listElement.size()-1; jjj >= 0; jjj--) { + for (int64_t jjj=m_listElement.size()-1; jjj >= 0; jjj--) { if (m_listElement[iii]!=NULL) { if (m_listElement[iii]->m_localId == m_listElement[jjj]->m_parentId) { if (m_listElement[jjj]->m_image.size()!=0) { @@ -188,7 +188,7 @@ void widget::Menu::onReceiveMessage(const ewol::EMessage& _msg) { } } } - for(int32_t jjj=m_listElement.size()-1; jjj >= 0; jjj--) { + for (int64_t jjj=m_listElement.size()-1; jjj >= 0; jjj--) { if (m_listElement[iii]!=NULL) { if (m_listElement[iii]->m_localId == m_listElement[jjj]->m_parentId) { myButton = new widget::Button(); @@ -256,7 +256,7 @@ void widget::Menu::onObjectRemove(ewol::EObject * _removeObject) { if (m_widgetContextMenu == _removeObject) { m_widgetContextMenu = NULL; } - for(int32_t jjj=0; jjjm_widgetPointer == _removeObject) { m_listElement[jjj]->m_widgetPointer = NULL; diff --git a/sources/ewol/widget/PopUp.cpp b/sources/ewol/widget/PopUp.cpp index 47de59d2..b9deecff 100644 --- a/sources/ewol/widget/PopUp.cpp +++ b/sources/ewol/widget/PopUp.cpp @@ -42,7 +42,6 @@ widget::PopUp::PopUp(const std::string& _shaperName) : registerConfig(configLockExpand, "bool", NULL, "Lock expand contamination"); registerConfig(configAnimation, "list", "none;increase", "Annimation type"); - setAnimationMode(animationNone); // Add annimations : addAnnimationType(ewol::Widget::annimationModeEnableAdd, annimationIncrease); } @@ -172,14 +171,6 @@ bool widget::PopUp::onSetConfig(const ewol::EConfig& _conf) { lockExpand(_conf.getData()); return true; } - if (_conf.getConfig() == configAnimation) { - if (compare_no_case(_conf.getData(), "increase") == true) { - setAnimationMode(animationIncrease); - } else { - setAnimationMode(animationNone); - } - return true; - } return false; } @@ -203,14 +194,6 @@ bool widget::PopUp::onGetConfig(const char* _config, std::string& _result) const } return true; } - if (_config == configAnimation) { - if (m_animation == animationIncrease) { - _result = "increase"; - } else { - _result = "none"; - } - return true; - } return false; } @@ -240,16 +223,25 @@ bool widget::PopUp::onEventInput(const ewol::EventInput& _event) { return false; } -void widget::PopUp::setAnimationMode(enum animation _animation) { - m_animation = _animation; - if (true == m_shaper.changeStatusIn((int32_t)_animation) ) { - periodicCallEnable(); + +bool widget::PopUp::onStartAnnimation(enum ewol::Widget::annimationMode _mode) { + if (m_annimationType[_mode] != annimationIncrease) { + return false; } + if (true == m_shaper.changeStatusIn(1) ) { + periodicCallEnable(); + return true; + } + return false; +} + +void widget::PopUp::onStopAnnimation(void) { + periodicCallDisable(); } void widget::PopUp::periodicCall(const ewol::EventTime& _event) { if (false == m_shaper.periodicCall(_event) ) { - periodicCallDisable(); + stopAnnimation(); } markToRedraw(); } diff --git a/sources/ewol/widget/PopUp.h b/sources/ewol/widget/PopUp.h index 433b487d..c58d7545 100644 --- a/sources/ewol/widget/PopUp.h +++ b/sources/ewol/widget/PopUp.h @@ -71,29 +71,6 @@ namespace widget { bool getRemoveOnExternClick(void) const { return m_closeOutEvent; }; - private: - //float m_slidingProgress; //!< ratio progression of a sliding - public: - enum animation { - animationNone, //!< No annimation - animationIncrease, //!< element came strart with no size and increase with the corect size. - }; - private: - enum animation m_animation; //!< Methode add and remove element (animation) - public: - /** - * @brief set an animation mode for the new element set in the Widget container. - * @param[in] _animation The new animation mode. - */ - void setAnimationMode(enum animation _animation); - /** - * @brief get the current animation mode. - * @return The animation mode. - */ - enum animation getAnimationMode(void) const { - return m_animation; - }; - protected: // Derived function virtual void onDraw(void); virtual bool onSetConfig(const ewol::EConfig& _conf); @@ -105,6 +82,9 @@ namespace widget { virtual void calculateSize(const vec2& _available); virtual bool onEventInput(const ewol::EventInput& _event); virtual ewol::Widget* getWidgetAtPos(const vec2& pos); + protected: + virtual bool onStartAnnimation(enum ewol::Widget::annimationMode _mode); + virtual void onStopAnnimation(void); }; }; diff --git a/sources/ewol/widget/Sizer.cpp b/sources/ewol/widget/Sizer.cpp index dc23d2d5..ac71acb8 100644 --- a/sources/ewol/widget/Sizer.cpp +++ b/sources/ewol/widget/Sizer.cpp @@ -64,7 +64,7 @@ void widget::Sizer::calculateSize(const vec2& _availlable) { float unexpandableSize=0.0; int32_t nbWidgetFixedSize=0; int32_t nbWidgetNotFixedSize=0; - for (int32_t iii=0; iiigetCalculateMinSize(); if (m_mode == widget::Sizer::modeVert) { @@ -98,7 +98,7 @@ void widget::Sizer::calculateSize(const vec2& _availlable) { } } vec2 tmpOrigin = m_origin + tmpBorderSize; - for (int32_t iii=0; iiigetCalculateMinSize(); // set the origin : diff --git a/sources/ewol/widget/WSlider.cpp b/sources/ewol/widget/WSlider.cpp index c1ab01b3..4b183e00 100644 --- a/sources/ewol/widget/WSlider.cpp +++ b/sources/ewol/widget/WSlider.cpp @@ -62,7 +62,7 @@ void widget::WSlider::calculateSize(const vec2& _availlable) { if (m_windowsDestination == m_windowsSources) { int32_t iii = m_windowsDestination; - if (iii < m_subWidget.size()) { + if (iii < (int32_t)m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->setOrigin(m_origin+m_offset); m_subWidget[iii]->calculateSize(m_size); @@ -74,7 +74,7 @@ void widget::WSlider::calculateSize(const vec2& _availlable) { factor = 1.0f; } int32_t iii = m_windowsSources; - if (iii < m_subWidget.size()) { + if (iii < (int32_t)m_subWidget.size()) { if (NULL != m_subWidget[iii]) { if (m_transitionSlide == sladingTransitionHori) { m_subWidget[iii]->setOrigin( vec2(m_origin.x() + factor*(m_size.x()*m_slidingProgress), @@ -89,7 +89,7 @@ void widget::WSlider::calculateSize(const vec2& _availlable) { } } iii = m_windowsDestination; - if (iii < m_subWidget.size()) { + if (iii < (int32_t)m_subWidget.size()) { if (NULL != m_subWidget[iii]) { if (m_transitionSlide == sladingTransitionHori) { m_subWidget[iii]->setOrigin( vec2(m_origin.x() + factor*(m_size.x()*m_slidingProgress - m_size.x()), @@ -110,7 +110,7 @@ void widget::WSlider::calculateSize(const vec2& _availlable) { void widget::WSlider::subWidgetSelectSet(int32_t _id) { int32_t elementID = -1; // search element in the list : - for( int32_t iii=0 ; iiigetId() == _id) { elementID = iii; @@ -135,7 +135,7 @@ void widget::WSlider::subWidgetSelectSet(ewol::Widget* _widgetPointer) { EWOL_ERROR("Can not change to a widget NULL"); return; } - for (int32_t iii=0; iiigetName() == _widgetName) { subWidgetSelectSet(iii); @@ -217,7 +217,7 @@ void widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) { if (m_windowsDestination == m_windowsSources) { //EWOL_DEBUG("Draw : " << m_windowsDestination); int32_t iii = m_windowsDestination; - if (iii >= 0 || iii < m_subWidget.size()) { + if (iii >= 0 || (size_t)iii < m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->systemDraw(prop); } @@ -226,14 +226,14 @@ void widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) { //EWOL_DEBUG("Draw : " << m_windowsSources << "=>" << m_windowsDestination << "progress=" << ((float)m_slidingProgress/1000.) ); // draw Sources : int32_t iii = m_windowsSources; - if (iii >= 0 || iii < m_subWidget.size()) { + if (iii >= 0 || (size_t)iii < m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->systemDraw(prop); } } // draw Destination : iii = m_windowsDestination; - if (iii >= 0 || iii < m_subWidget.size()) { + if (iii >= 0 || (size_t)iii < m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->systemDraw(prop); } @@ -244,20 +244,20 @@ void widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) { void widget::WSlider::onRegenerateDisplay(void) { if (m_windowsDestination == m_windowsSources) { int32_t iii = m_windowsDestination; - if (iii >= 0 || iii < m_subWidget.size()) { + if (iii >= 0 || (size_t)iii < m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->onRegenerateDisplay(); } } } else { int32_t iii = m_windowsSources; - if (iii >= 0 || iii < m_subWidget.size()) { + if (iii >= 0 || (size_t)iii < m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->onRegenerateDisplay(); } } iii = m_windowsDestination; - if (iii >= 0 || iii < m_subWidget.size()) { + if (iii >= 0 || (size_t)iii < m_subWidget.size()) { if (NULL != m_subWidget[iii]) { m_subWidget[iii]->onRegenerateDisplay(); } @@ -306,7 +306,7 @@ ewol::Widget* widget::WSlider::getWidgetAtPos(const vec2& _pos) { return NULL; } if (m_windowsDestination == m_windowsSources) { - if (m_windowsDestinationgetSize(); vec2 tmpOrigin = m_subWidget[m_windowsDestination]->getOrigin(); if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x()) @@ -320,7 +320,7 @@ ewol::Widget* widget::WSlider::getWidgetAtPos(const vec2& _pos) { } } } else { - if (m_windowsDestinationgetSize(); vec2 tmpOrigin = m_subWidget[m_windowsDestination]->getOrigin(); if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x()) @@ -333,7 +333,7 @@ ewol::Widget* widget::WSlider::getWidgetAtPos(const vec2& _pos) { return NULL; } } - if (m_windowsSourcesgetSize(); vec2 tmpOrigin = m_subWidget[m_windowsSources]->getOrigin(); if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x()) diff --git a/sources/ewol/widget/Widget.cpp b/sources/ewol/widget/Widget.cpp index dc06b3e3..69374534 100644 --- a/sources/ewol/widget/Widget.cpp +++ b/sources/ewol/widget/Widget.cpp @@ -625,7 +625,7 @@ void ewol::Widget::shortCutAdd(const char * _descriptiveString, } void ewol::Widget::shortCutClean(void) { - for (int32_t iii=0; iii m_annimationList[2]; //!< List of all annimation type ADD + protected: const char* m_annimationType[2]; //!< type of start annimation (default NULL ==> no annimation) float m_annimationTime[2]; //!< time to produce start annimation protected: diff --git a/sources/ewol/widget/WidgetManager.cpp b/sources/ewol/widget/WidgetManager.cpp index 56f2e7bc..9903891d 100644 --- a/sources/ewol/widget/WidgetManager.cpp +++ b/sources/ewol/widget/WidgetManager.cpp @@ -154,12 +154,12 @@ void ewol::WidgetManager::focusRemoveIfRemove(ewol::Widget* _newWidget) { } void ewol::WidgetManager::periodicCallAdd(ewol::Widget* _pWidget) { - for (int32_t iii=0; iii < m_listOfPeriodicWidget.size(); iii++) { + for (size_t iii=0; iii < m_listOfPeriodicWidget.size(); iii++) { if (m_listOfPeriodicWidget[iii] == _pWidget) { return; } } - for (int32_t iii=0; iii < m_listOfPeriodicWidget.size(); iii++) { + for (size_t iii=0; iii < m_listOfPeriodicWidget.size(); iii++) { if (NULL == m_listOfPeriodicWidget[iii]) { m_listOfPeriodicWidget[iii] = _pWidget; return; diff --git a/sources/ewol/widget/Windows.cpp b/sources/ewol/widget/Windows.cpp index 2c962834..5c6098c5 100644 --- a/sources/ewol/widget/Windows.cpp +++ b/sources/ewol/widget/Windows.cpp @@ -37,7 +37,7 @@ ewol::Windows::~Windows(void) { delete(m_subWidget); m_subWidget=NULL; } - for(int32_t iii=0; iiicalculateSize(m_size); } - for(int32_t iii=0; iiicalculateMinMaxSize(); m_popUpWidgetList[iii]->calculateSize(m_size); @@ -117,7 +117,7 @@ void ewol::Windows::onRegenerateDisplay(void) { if (NULL != m_subWidget) { m_subWidget->onRegenerateDisplay(); } - for(int32_t iii=0; iiionRegenerateDisplay(); } @@ -157,7 +157,7 @@ void ewol::Windows::systemDraw(const ewol::DrawProperty& _displayProp) { int64_t ___startTime2 = ewol::getTime(); #endif // second display the pop-up - for(int32_t iii=0; iiisystemDraw(_displayProp); //EWOL_DEBUG("Draw Pop-up"); diff --git a/sources/ewol/widget/meta/ParameterList.cpp b/sources/ewol/widget/meta/ParameterList.cpp index 1fdbd65c..60a61bb7 100644 --- a/sources/ewol/widget/meta/ParameterList.cpp +++ b/sources/ewol/widget/meta/ParameterList.cpp @@ -37,7 +37,7 @@ widget::ParameterList::ParameterList(void) { widget::ParameterList::~ParameterList(void) { //clean all the object - for (int32_t iii=0; iii= m_listOObject.size() ) { + if (_pos < 0 || (size_t)_pos >= m_listOObject.size() ) { m_listOObject.push_back(_newObject); } else { m_listOObject.insert(m_listOObject.begin()+_pos, _newObject); @@ -68,7 +68,7 @@ void widget::ParameterList::addOObject(ewol::Compositing* _newObject, int32_t _p } void widget::ParameterList::clearOObjectList(void) { - for (int32_t iii=0; iiidraw(); } @@ -138,7 +138,7 @@ void widget::ParameterList::onRegenerateDisplay(void) { // calculate the real position ... tmpOriginY = m_size.y() - (-m_originScrooled.y() + (startRaw+1)*(minHeight + 2*m_paddingSizeY)); - for(int32_t iii=startRaw; iii fg(0x000000FF); if (m_list[iii] != NULL) { @@ -186,7 +186,7 @@ bool widget::ParameterList::onEventInput(const ewol::EventInput& _event) { int32_t minHeight = 20; int32_t rawID = (relativePos.y()+m_originScrooled.y()) / (minHeight + 2*m_paddingSizeY); // generate an event on a rawId if the element request change and Select it ... - if (rawID >= 0 && rawID= 0 && (size_t)rawID < m_list.size()) { if (m_list[rawID]!=NULL) { if (m_list[rawID]->m_refId >= 0) { generateEventId(ewolEventParameterListSelect, std::to_string(m_list[rawID]->m_refId)); @@ -230,7 +230,7 @@ void widget::ParameterList::menuAddGroup(std::string& _label) { void widget::ParameterList::menuClear(void) { m_idSelected = -1; - for (int32_t iii=0; iii