From e438b70f0eaaeee0bb6371ace5e71ac8aa77f48b Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Tue, 22 Nov 2011 14:07:50 +0100 Subject: [PATCH] Some recommandation of namespacing change --- Sources/ewolFont.h | 38 ++++++++++++++++++++++++++++++++++++++ Sources/ewolTexture.h | 8 ++++++++ 2 files changed, 46 insertions(+) diff --git a/Sources/ewolFont.h b/Sources/ewolFont.h index ac6c391a..b2fe125d 100644 --- a/Sources/ewolFont.h +++ b/Sources/ewolFont.h @@ -32,6 +32,44 @@ namespace ewol { + // TODO : Create a subNameSpace: + /* + namespace font { + // set default folder name of the font : + void SetFolder(etk::String folderName); + void SetDefault(etk::String fontName, int32_t size); + // unload all font loaded + void Init(void); + void UnInit(void); + // load the fonts... + int32_t Load(etk::String fontName, int32_t size); // return ID of font + int32_t GetDefaultId(void); + void Unload(int32_t id); + + // get the size of a long string in UTF8 (note that \n and \r represent unknown char...) + int32_t GetWidth(int32_t fontID, const uniChar_t * unicodeString); + int32_t GetWidth(int32_t fontID, const char * utf8String); + int32_t GetHeight(int32_t fontID); + + + void DrawText(int32_t fontID, + coord2D_ts & drawPosition, + const char * utf8String, + uint32_t & fontTextureId, + etk::VectorType & coord, + etk::VectorType & coordTex); + + void DrawText(int32_t fontID, + coord2D_ts & drawPosition, + const uniChar_t * unicodeString, + uint32_t & fontTextureId, + etk::VectorType & coord, + etk::VectorType & coordTex); + + int32_t Load(etk::File fontFileName); + void DrawText(etkFloat_t x, etkFloat_t y, const char * myString); + }; + */ // set default folder name of the font : void SetFontFolder(etk::String folderName); void SetDefaultFont(etk::String fontName, int32_t size); diff --git a/Sources/ewolTexture.h b/Sources/ewolTexture.h index ecfdcab5..5d21c8cf 100644 --- a/Sources/ewolTexture.h +++ b/Sources/ewolTexture.h @@ -31,6 +31,14 @@ namespace ewol { + // TODO : Create a subNameSpace: + /* + namespace texture { + int32_t Load(etk::File fileName); + void UnLoad(uint32_t textureID); + int32_t GetSize(uint32_t textureID); + }; + */ int32_t LoadTexture(etk::File fileName); void UnLoadTexture(uint32_t textureID); int32_t GetTextureSize(uint32_t textureID);