2017-05-29 07:54:57 +00:00
|
|
|
#ifndef _INCLUDE_GUI_FONT_H_
|
|
|
|
#define _INCLUDE_GUI_FONT_H_
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
//= Include files. =//
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2017-08-02 14:24:26 +00:00
|
|
|
#include "SGUI_Common.h"
|
|
|
|
#include "SGUI_Basic.h"
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-10-08 16:31:30 +00:00
|
|
|
//= Macro definition. =//
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
#define FONT_LIB_ADDR 0X00000
|
2017-05-29 07:54:57 +00:00
|
|
|
// Max font size is 64 pix, maximum of font data size is 64 * 8 = 512 Bytes.
|
2021-04-13 15:09:25 +00:00
|
|
|
#define TEXT_NUMBER_STR_LENGTH_MAX (12)
|
|
|
|
#define TEXT_PLACEHOLDER_CHARACTER ('*')
|
|
|
|
#define SGUI_IS_VISIBLE_CHAR(C) ((C>0x1F) && (C<0x7F))
|
2022-05-31 10:59:24 +00:00
|
|
|
#define SGUI_T(TEXT) (TEXT)
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
//= Public variable declaration. =//
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-10-08 16:31:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"{
|
|
|
|
#endif
|
2021-04-13 15:09:25 +00:00
|
|
|
extern SGUI_CSZSTR SGUI_EMPTY_STRING;
|
2021-10-08 16:31:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2017-05-29 07:54:57 +00:00
|
|
|
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
//= Public function declaration. =//
|
2017-06-02 12:33:13 +00:00
|
|
|
//=======================================================================//
|
2021-10-08 16:31:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"{
|
|
|
|
#endif
|
2021-04-13 15:09:25 +00:00
|
|
|
void SGUI_Text_GetTextExtent(SGUI_CSZSTR cszTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_AREA_SIZE* pstTextExtent);
|
2021-07-15 16:35:28 +00:00
|
|
|
void SGUI_Text_DrawASCIICharacter(SGUI_SCR_DEV* pstDeviceIF, SGUI_CHAR cChar, const SGUI_FONT_RES* pstFontRes, const SGUI_RECT* pstDisplayArea, const SGUI_POINT* pstInnerPos, SGUI_DRAW_MODE eFontMode);
|
|
|
|
void SGUI_Text_DrawText(SGUI_SCR_DEV* pstDeviceIF, SGUI_CSZSTR cszTextBuffer, const SGUI_FONT_RES* pstFontRes, const SGUI_RECT* pstDisplayArea, const SGUI_POINT* pstInnerPos, SGUI_DRAW_MODE eFontMode);
|
2021-04-13 15:09:25 +00:00
|
|
|
SGUI_SIZE SGUI_Text_DrawMultipleLinesText(SGUI_SCR_DEV* pstDeviceIF, SGUI_CSZSTR szTextBuffer, const SGUI_FONT_RES* pstFontRes, SGUI_RECT* pstDisplayArea, SGUI_INT iTopOffset, SGUI_DRAW_MODE eFontMode);
|
|
|
|
SGUI_SIZE SGUI_Text_GetMultiLineTextLines(SGUI_CSZSTR cszText, const SGUI_FONT_RES* pstFontRes, SGUI_SIZE uiDisplayAreaWidth);
|
2019-12-01 15:04:02 +00:00
|
|
|
SGUI_SIZE SGUI_Text_GetCharacterData(const SGUI_FONT_RES* pstFontRes, SGUI_UINT32 uiCode, SGUI_BYTE* pDataBuffer, SGUI_SIZE sBufferSize);
|
2021-10-08 16:31:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2017-05-29 07:54:57 +00:00
|
|
|
|
|
|
|
#endif
|