[DEV] UniChar ==> UChar & Hach ==> Hash
This commit is contained in:
parent
739082cf36
commit
1127ed0543
2
external/ejson
vendored
2
external/ejson
vendored
@ -1 +1 @@
|
||||
Subproject commit 61f4b68621a3ba5cc137901956d8f021fc7ef7a2
|
||||
Subproject commit b442284f092295f31f6016aa060643d3d42ceb61
|
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
||||
Subproject commit 21c190edeec50092bf76b7c5841b63082c107c40
|
||||
Subproject commit 5ceab908cf8d069404e62c107db2807bad486925
|
2
external/exml
vendored
2
external/exml
vendored
@ -1 +1 @@
|
||||
Subproject commit 6a652e96c9b07919882a82d6f11f7d331f7414d6
|
||||
Subproject commit 83786689c4fa6abd688ea2318b54d97233b01075
|
2
external/portaudio
vendored
2
external/portaudio
vendored
@ -1 +1 @@
|
||||
Subproject commit 6c815e5adec48a48a9b22b6bc61c5c91ab22b055
|
||||
Subproject commit aaca1592f23a89bf4fe55b8890d273fec5caef4d
|
@ -561,7 +561,7 @@ void ewol::Text::print(const etk::UString& _text, const etk::Vector<TextDecorati
|
||||
if (m_stopTextPos < m_position.x()) {
|
||||
forceLineReturn();
|
||||
}
|
||||
float basicSpaceWidth = calculateSize(etk::UniChar(' ')).x();
|
||||
float basicSpaceWidth = calculateSize(etk::UChar(' ')).x();
|
||||
int32_t currentId = 0;
|
||||
int32_t stop;
|
||||
int32_t space;
|
||||
@ -624,7 +624,7 @@ void ewol::Text::print(const etk::UString& _text, const etk::Vector<TextDecorati
|
||||
}
|
||||
}
|
||||
// special for the justify mode
|
||||
if (_text[iii] == etk::UniChar::Space) {
|
||||
if (_text[iii] == etk::UChar::Space) {
|
||||
//EWOL_DEBUG(" generateString : \" \"");
|
||||
if( m_needDisplay == true
|
||||
&& m_colorBg.a() != 0) {
|
||||
@ -662,14 +662,14 @@ void ewol::Text::print(const etk::UString& _text, const etk::Vector<TextDecorati
|
||||
}
|
||||
if (currentId == stop) {
|
||||
currentId++;
|
||||
} else if(_text[stop] == etk::UniChar::Space) {
|
||||
} else if(_text[stop] == etk::UChar::Space) {
|
||||
currentId = stop+1;
|
||||
// reset position :
|
||||
setPos(vec3(m_startTextpos,
|
||||
(float)(m_position.y() - m_font->getHeight(m_mode)),
|
||||
m_position.z()) );
|
||||
m_nbCharDisplayed++;
|
||||
} else if(_text[stop] == etk::UniChar::Return) {
|
||||
} else if(_text[stop] == etk::UChar::Return) {
|
||||
currentId = stop+1;
|
||||
// reset position :
|
||||
setPos(vec3(m_startTextpos,
|
||||
@ -685,7 +685,7 @@ void ewol::Text::print(const etk::UString& _text, const etk::Vector<TextDecorati
|
||||
}
|
||||
|
||||
|
||||
void ewol::Text::print(const etk::UniChar& _charcode) {
|
||||
void ewol::Text::print(const etk::UChar& _charcode) {
|
||||
if (NULL == m_font) {
|
||||
EWOL_ERROR("Font Id is not corectly defined");
|
||||
return;
|
||||
@ -936,7 +936,7 @@ vec3 ewol::Text::calculateSize(const etk::UString& _text) {
|
||||
return outputSize;
|
||||
}
|
||||
|
||||
vec3 ewol::Text::calculateSize(const etk::UniChar& _charcode) {
|
||||
vec3 ewol::Text::calculateSize(const etk::UChar& _charcode) {
|
||||
if (m_font == NULL) {
|
||||
EWOL_ERROR("Font Id is not corectly defined");
|
||||
return vec3(0,0,0);
|
||||
@ -978,7 +978,7 @@ bool ewol::Text::extrapolateLastId(const etk::UString& _text,
|
||||
int32_t& _space,
|
||||
int32_t& _freeSpace) {
|
||||
// store previous :
|
||||
etk::UniChar storePrevious = m_previousCharcode;
|
||||
etk::UChar storePrevious = m_previousCharcode;
|
||||
|
||||
_stop = _text.size();
|
||||
_space = 0;
|
||||
@ -1003,11 +1003,11 @@ bool ewol::Text::extrapolateLastId(const etk::UString& _text,
|
||||
break;
|
||||
}
|
||||
// save number of space :
|
||||
if (_text[iii] == etk::UniChar::Space) {
|
||||
if (_text[iii] == etk::UChar::Space) {
|
||||
_space++;
|
||||
lastSpacePosition = iii;
|
||||
lastSpacefreeSize = stopPosition - endPos;
|
||||
} else if (_text[iii] == etk::UniChar::Return) {
|
||||
} else if (_text[iii] == etk::UChar::Return) {
|
||||
_stop = iii;
|
||||
endOfLine = true;
|
||||
break;
|
||||
|
@ -67,7 +67,7 @@ namespace ewol {
|
||||
ewol::font::mode_te m_mode; //!< font display property : Regular/Bold/Italic/BoldItalic
|
||||
bool m_kerning; //!< Kerning enable or disable on the next elements displayed
|
||||
bool m_distanceField; //!< Texture in distance Field mode == > maybe move this in the font property.
|
||||
uniChar_t m_previousCharcode; //!< we remember the previous charcode to perform the kerning. @ref Kerning
|
||||
etk::UChar m_previousCharcode; //!< we remember the previous charcode to perform the kerning. @ref Kerning
|
||||
private:
|
||||
float m_startTextpos; //!< start position of the Alignement (when \n the text return at this position)
|
||||
float m_stopTextPos; //!< end of the alignement (when a string is too hight it cut at the word previously this virtual line and the center is perform with this one)
|
||||
@ -306,7 +306,7 @@ namespace ewol {
|
||||
* @brief display the current char in the current element (note that the kerning is availlable if the position is not changed)
|
||||
* @param[in] _charcode Char that might be dispalyed
|
||||
*/
|
||||
void print(const uniChar_t& _charcode);
|
||||
void print(const etk::UChar& _charcode);
|
||||
/**
|
||||
* @brief This generate the line return == > it return to the alignement position start and at the correct line position ==> it might be use to not know the line height
|
||||
*/
|
||||
@ -358,7 +358,7 @@ namespace ewol {
|
||||
* @param[in] _charcode The µUnicode value to calculate dimention.
|
||||
* @return The theoric size used.
|
||||
*/
|
||||
vec3 calculateSize(const uniChar_t& _charcode);
|
||||
vec3 calculateSize(const etk::UChar& _charcode);
|
||||
/**
|
||||
* @brief draw a cursor at the specify position
|
||||
* @param[in] _isInsertMode True if the insert mode is activated
|
||||
|
@ -385,7 +385,7 @@ class AndroidContext : public ewol::eContext {
|
||||
ewol::eContext::OS_SetMouseState(_pointerID, _isDown, vec2(_pos.x(),m_currentHeight-_pos.y()) );
|
||||
}
|
||||
|
||||
void ANDROID_SetKeyboard(uniChar_t _myChar, bool _isDown, bool _isARepeateKey=false) {
|
||||
void ANDROID_SetKeyboard(etk::UChar _myChar, bool _isDown, bool _isARepeateKey=false) {
|
||||
OS_SetKeyboard(m_guiKeyBoardSpecialKeyMode, _myChar, _isDown, _isARepeateKey);
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,12 @@ namespace ewol {
|
||||
ewol::keyEvent::keyboard_te m_type; //!< type of hardware event
|
||||
ewol::keyEvent::status_te m_status; //!< status of hardware event
|
||||
ewol::SpecialKey m_specialKey; //!< input key status (prevent change in time..)
|
||||
uniChar_t m_unicodeData; //!< Unicode data (in some case)
|
||||
etk::UChar m_unicodeData; //!< Unicode data (in some case)
|
||||
public:
|
||||
EventEntry(ewol::keyEvent::keyboard_te _type,
|
||||
ewol::keyEvent::status_te _status,
|
||||
ewol::SpecialKey _specialKey,
|
||||
uniChar_t _char) :
|
||||
etk::UChar _char) :
|
||||
m_type(_type),
|
||||
m_status(_status),
|
||||
m_specialKey(_specialKey),
|
||||
@ -47,10 +47,10 @@ namespace ewol {
|
||||
inline const ewol::SpecialKey& getSpecialKey(void) const {
|
||||
return m_specialKey;
|
||||
};
|
||||
void setChar(uniChar_t _char) {
|
||||
void setChar(etk::UChar _char) {
|
||||
m_unicodeData = _char;
|
||||
};
|
||||
inline const uniChar_t& getChar(void) const {
|
||||
inline const etk::UChar& getChar(void) const {
|
||||
return m_unicodeData;
|
||||
};
|
||||
};
|
||||
@ -61,7 +61,7 @@ namespace ewol {
|
||||
EventEntrySystem(ewol::keyEvent::keyboard_te _type,
|
||||
ewol::keyEvent::status_te _status,
|
||||
ewol::SpecialKey _specialKey,
|
||||
uniChar_t _char) :
|
||||
etk::UChar _char) :
|
||||
m_event(_type, _status, _specialKey, _char)
|
||||
{ };
|
||||
ewol::EventEntry m_event;
|
||||
|
@ -277,7 +277,7 @@ class WindowsContext : public ewol::eContext {
|
||||
case WM_KEYUP:
|
||||
buttonIsDown = false;
|
||||
case WM_KEYDOWN: {
|
||||
etk::UniChar tmpChar = 0;
|
||||
etk::UChar tmpChar = 0;
|
||||
ewol::keyEvent::keyboard_te keyInput;
|
||||
switch (_wParam) {
|
||||
//case 80: // keypad
|
||||
|
@ -658,7 +658,7 @@ class X11Interface : public ewol::eContext {
|
||||
}
|
||||
if (count>0) {
|
||||
// transform it in unicode
|
||||
etk::UniChar tmpChar = 0;
|
||||
etk::UChar tmpChar = 0;
|
||||
tmpChar.setUtf8(buf);
|
||||
//EWOL_INFO("event Key : " << event.xkey.keycode << " char=\"" << buf << "\"'len=" << strlen(buf) << " unicode=" << unicodeValue);
|
||||
OS_SetKeyboard(m_guiKeyBoardMode, tmpChar, (event.type == KeyPress), thisIsAReapeateKey);
|
||||
|
@ -363,7 +363,7 @@ void ewol::eContext::OS_SetMouseState(int _pointerID, bool _isDown, const vec2&
|
||||
}
|
||||
|
||||
void ewol::eContext::OS_SetKeyboard(ewol::SpecialKey& _special,
|
||||
uniChar_t _myChar,
|
||||
etk::UChar _myChar,
|
||||
bool _isDown,
|
||||
bool _isARepeateKey) {
|
||||
eSystemMessage data;
|
||||
|
@ -56,7 +56,7 @@ class eSystemMessage {
|
||||
// keyboard events :
|
||||
bool repeateKey; //!< special flag for the repeating key on the PC interface
|
||||
bool stateIsDown;
|
||||
uniChar_t keyboardChar;
|
||||
etk::UChar keyboardChar;
|
||||
ewol::keyEvent::keyboard_te keyboardMove;
|
||||
ewol::SpecialKey keyboardSpecial;
|
||||
|
||||
@ -142,7 +142,7 @@ namespace ewol {
|
||||
virtual void OS_SetMouseState(int _pointerID, bool _isDown, const vec2& _pos);
|
||||
|
||||
virtual void OS_SetKeyboard(ewol::SpecialKey& _special,
|
||||
uniChar_t _myChar,
|
||||
etk::UChar _myChar,
|
||||
bool _isDown,
|
||||
bool _isARepeateKey=false);
|
||||
virtual void OS_SetKeyboardMove(ewol::SpecialKey& _special,
|
||||
|
@ -10,7 +10,7 @@
|
||||
#define __MESH_H__
|
||||
|
||||
#include <etk/types.h>
|
||||
#include <etk/Hach.h>
|
||||
#include <etk/Hash.h>
|
||||
#include <ewol/resources/Resource.h>
|
||||
#include <ewol/resources/Image.h>
|
||||
#include <ewol/resources/Shader.h>
|
||||
|
@ -205,13 +205,13 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
|
||||
}
|
||||
// add error glyph
|
||||
{
|
||||
etk::UniChar tmpchar;
|
||||
etk::UChar tmpchar;
|
||||
tmpchar.set(0);
|
||||
addGlyph(tmpchar);
|
||||
}
|
||||
// by default we set only the first AINSI char availlable
|
||||
for (int32_t iii=0x20; iii<0x7F; iii++) {
|
||||
etk::UniChar tmpchar;
|
||||
etk::UChar tmpchar;
|
||||
tmpchar.set(iii);
|
||||
addGlyph(tmpchar);
|
||||
}
|
||||
@ -229,7 +229,7 @@ ewol::TexturedFont::~TexturedFont(void) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ewol::TexturedFont::addGlyph(const etk::UniChar& _val) {
|
||||
bool ewol::TexturedFont::addGlyph(const etk::UChar& _val) {
|
||||
bool hasChange = false;
|
||||
// for each font :
|
||||
for (int32_t iii=0; iii<4 ; iii++) {
|
||||
@ -306,7 +306,7 @@ bool ewol::TexturedFont::hasName(const etk::UString& _fileName) {
|
||||
}
|
||||
|
||||
|
||||
int32_t ewol::TexturedFont::getIndex(const uniChar_t& _charcode, const ewol::font::mode_te _displayMode) {
|
||||
int32_t ewol::TexturedFont::getIndex(const etk::UChar& _charcode, const ewol::font::mode_te _displayMode) {
|
||||
if (_charcode.get() < 0x20) {
|
||||
return 0;
|
||||
} else if (_charcode.get() < 0x80) {
|
||||
@ -332,7 +332,7 @@ int32_t ewol::TexturedFont::getIndex(const uniChar_t& _charcode, const ewol::fon
|
||||
return 0;
|
||||
}
|
||||
|
||||
ewol::GlyphProperty* ewol::TexturedFont::getGlyphPointer(const uniChar_t& _charcode, const ewol::font::mode_te _displayMode) {
|
||||
ewol::GlyphProperty* ewol::TexturedFont::getGlyphPointer(const etk::UChar& _charcode, const ewol::font::mode_te _displayMode) {
|
||||
//EWOL_DEBUG("Get glyph property for mode: " << _displayMode << " == > wrapping index : " << m_modeWraping[_displayMode]);
|
||||
int32_t index = getIndex(_charcode, _displayMode);
|
||||
if( index < 0
|
||||
|
@ -69,14 +69,14 @@ 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 uniChar_t& _charcode, const ewol::font::mode_te _displayMode);
|
||||
int32_t getIndex(const etk::UChar& _charcode, const ewol::font::mode_te _displayMode);
|
||||
/**
|
||||
* @brief get the pointer on the coresponding glyph
|
||||
* @param[in] _charcode The unicodeValue
|
||||
* @param[in] _displayMode Mode to display the currrent font
|
||||
* @return The pointer on the glyph == > never NULL
|
||||
*/
|
||||
ewol::GlyphProperty* getGlyphPointer(const uniChar_t& _charcode, const ewol::font::mode_te _displayMode);
|
||||
ewol::GlyphProperty* getGlyphPointer(const etk::UChar& _charcode, const ewol::font::mode_te _displayMode);
|
||||
/**
|
||||
* @brief The wrapping mode is used to prevent the non existance of a specific mode.
|
||||
* For exemple when a blod mode does not exist, this resend a regular mode.
|
||||
@ -105,7 +105,7 @@ namespace ewol {
|
||||
* @param[in] _val Char value to add.
|
||||
* @return true if the image size have change, false otherwise
|
||||
*/
|
||||
bool addGlyph(const etk::UniChar& _val);
|
||||
bool addGlyph(const etk::UChar& _val);
|
||||
};
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace ewol {
|
||||
|
||||
class GlyphProperty {
|
||||
public:
|
||||
uniChar_t m_UVal; //!< Unicode value
|
||||
etk::UChar m_UVal; //!< Unicode value
|
||||
private:
|
||||
bool m_exist;
|
||||
public:
|
||||
@ -74,7 +74,7 @@ namespace ewol {
|
||||
m_texturePosSize(0,0) {
|
||||
|
||||
};
|
||||
float kerningGet(const uniChar_t _charcode) {
|
||||
float kerningGet(const etk::UChar _charcode) {
|
||||
for(esize_t iii=0; iii<m_kerning.size(); iii++ ) {
|
||||
if (m_kerning[iii].m_UVal == _charcode) {
|
||||
return m_kerning[iii].m_value;
|
||||
@ -82,7 +82,7 @@ namespace ewol {
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
void kerningAdd(const uniChar_t _charcode, float _value)
|
||||
void kerningAdd(const etk::UChar _charcode, float _value)
|
||||
{
|
||||
m_kerning.pushBack(ewol::Kerning(_charcode, _value));
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ namespace ewol {
|
||||
*/
|
||||
class Kerning {
|
||||
public:
|
||||
uniChar_t m_UVal; //!< unicode value (the previous character that must be before)
|
||||
etk::UChar m_UVal; //!< unicode value (the previous character that must be before)
|
||||
float m_value; //!< kerning real offset
|
||||
public:
|
||||
/**
|
||||
@ -54,7 +54,7 @@ namespace ewol {
|
||||
* @param[in] _charcode The Unicode value of the coresponding character that might be before
|
||||
* @param[in] _value The Kerning value of the offset (nb pixel number)
|
||||
*/
|
||||
Kerning(const uniChar_t _charcode, const float _value) :
|
||||
Kerning(const etk::UChar _charcode, const float _value) :
|
||||
m_UVal(_charcode),
|
||||
m_value(_value) {
|
||||
|
||||
|
@ -101,7 +101,7 @@ void widget::Entry::calculateMinMaxSize(void) {
|
||||
ewol::Widget::calculateMinMaxSize();
|
||||
// get generic padding
|
||||
vec2 padding = m_shaper.getPadding();
|
||||
int32_t minHeight = m_oObjectText.calculateSize(etk::UniChar('A')).y();
|
||||
int32_t minHeight = m_oObjectText.calculateSize(etk::UChar('A')).y();
|
||||
vec2 minimumSizeBase(20, minHeight);
|
||||
// add padding :
|
||||
minimumSizeBase += padding*2.0f;
|
||||
@ -153,7 +153,7 @@ void widget::Entry::onRegenerateDisplay(void) {
|
||||
vec2 tmpSizeText = tmpSizeShaper - padding * 2.0f;
|
||||
vec2 tmpOriginText = (m_size - tmpSizeText) / 2.0f;
|
||||
// sometimes, the user define an height bigger than the real size needed == > in this case we need to center the text in the shaper ...
|
||||
int32_t minHeight = m_oObjectText.calculateSize(etk::UniChar('A')).y();
|
||||
int32_t minHeight = m_oObjectText.calculateSize(etk::UChar('A')).y();
|
||||
if (tmpSizeText.y()>minHeight) {
|
||||
tmpOriginText += vec2(0,(tmpSizeText.y()-minHeight)/2.0f);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void widget::Label::onRegenerateDisplay(void) {
|
||||
|
||||
vec2 tmpMax = m_userMaxSize.getPixel();
|
||||
// to know the size of one line :
|
||||
vec3 minSize = m_text.calculateSize(etk::UniChar('A'));
|
||||
vec3 minSize = m_text.calculateSize(etk::UChar('A'));
|
||||
if (tmpMax.x() <= 999999) {
|
||||
m_text.setTextAlignement(0, tmpMax.x()-2*paddingSize, ewol::Text::alignLeft);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ void widget::List::onRegenerateDisplay(void) {
|
||||
ewol::Text * tmpText = new ewol::Text();
|
||||
if (NULL != tmpText) {
|
||||
// get font size :
|
||||
int32_t tmpFontHeight = tmpText->calculateSize(etk::UniChar('A')).y();
|
||||
int32_t tmpFontHeight = tmpText->calculateSize(etk::UChar('A')).y();
|
||||
displayPositionY-=(tmpFontHeight+m_paddingSizeY);
|
||||
|
||||
BGOObjects->setColor(bg);
|
||||
|
@ -605,7 +605,7 @@ void ewol::Widget::shortCutClean(void) {
|
||||
}
|
||||
|
||||
bool ewol::Widget::onEventShortCut(ewol::SpecialKey& _special,
|
||||
uniChar_t _unicodeValue,
|
||||
etk::UChar _unicodeValue,
|
||||
ewol::keyEvent::keyboard_te _kbMove,
|
||||
bool _isDown) {
|
||||
if (_unicodeValue >= 'A' && _unicodeValue <= 'Z') {
|
||||
|
@ -85,7 +85,7 @@ namespace ewol {
|
||||
const char* generateEventId; //!< Local generated event
|
||||
etk::UString eventData; //!< data link with the event
|
||||
ewol::SpecialKey specialKey; //!< special board key
|
||||
uniChar_t unicodeValue; //!< 0 if not used
|
||||
etk::UChar unicodeValue; //!< 0 if not used
|
||||
ewol::keyEvent::keyboard_te keyboardMoveValue; //!< ewol::EVENT_KB_MOVE_TYPE_NONE if not used
|
||||
EventShortCut(void) {
|
||||
broadcastEvent = false;
|
||||
@ -605,7 +605,7 @@ namespace ewol {
|
||||
* @note To prevent some error when you get an event get it if it is down and Up ... == > like this it could not generate some ununderstanding error.
|
||||
*/
|
||||
virtual bool onEventShortCut(ewol::SpecialKey& _special,
|
||||
uniChar_t _unicodeValue,
|
||||
etk::UChar _unicodeValue,
|
||||
ewol::keyEvent::keyboard_te _kbMove,
|
||||
bool _isDown);
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <etk/types.h>
|
||||
#include <ewol/debug.h>
|
||||
#include <etk/Vector.h>
|
||||
#include <etk/Hach.h>
|
||||
#include <etk/Hash.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
||||
namespace ewol {
|
||||
|
Loading…
x
Reference in New Issue
Block a user