2018-04-19 13:56:06 +00:00
|
|
|
#ifndef __INCLUDE_GUI_COMMON_H__
|
|
|
|
#define __INCLUDE_GUI_COMMON_H__
|
2017-12-27 12:03:30 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
//= Include files. =//
|
2018-04-19 13:56:06 +00:00
|
|
|
//=======================================================================//
|
2019-04-30 14:13:12 +00:00
|
|
|
#include "SGUI_Config.h"
|
2018-04-19 13:56:06 +00:00
|
|
|
#include "SGUI_Typedef.h"
|
2019-01-11 14:03:38 +00:00
|
|
|
#include "SGUI_Interface.h"
|
2018-04-19 13:56:06 +00:00
|
|
|
|
|
|
|
//=======================================================================//
|
2021-10-08 16:31:30 +00:00
|
|
|
//= Macro definition. =//
|
2018-04-19 13:56:06 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
#define NOTICE_ICON_SIZE (16)
|
|
|
|
#define SGUI_NUMBER_STR_LENGTH_MAX (12)
|
|
|
|
#define SGUI_ISDIGIT(C) (((C>='0')&&(C<='9'))?true:false)
|
|
|
|
#define SGUI_ISALPHA(C) ((((C>='A')&&(C<='Z'))||((C>='a')&&(C<='z')))?true:false)
|
|
|
|
#define SGUI_ISHEXDIGIT(C) ((((C>='A')&&(C<='F'))||((C>='a')&&(C<='f'))||((C>='0')&&(C<='9')))?true:false)
|
|
|
|
#define SGUI_ISUPPER(C) (((C>='A')&&(C<='Z'))?true:false)
|
|
|
|
#define SGUI_TOUPPER(C) (SGUI_ISUPPER(C)?(C):(C-32))
|
|
|
|
#define SGUI_SWAP(A, B) {A=A^B; B=A^B; A=A^B;}
|
2022-03-19 12:35:09 +00:00
|
|
|
#define SGUI_MIN_VAL(A, B) ((A)>(B)?(B):(A))
|
|
|
|
#define SGUI_MAX_VAL(A, B) ((A)<(B)?(B):(A))
|
2021-04-13 15:09:25 +00:00
|
|
|
#define LAYOUT(POBJ) ((POBJ)->stParam.stLayout)
|
2020-03-19 14:34:59 +00:00
|
|
|
|
2018-04-19 13:56:06 +00:00
|
|
|
//=======================================================================//
|
2021-04-13 15:09:25 +00:00
|
|
|
//= Public function declaration. =//
|
2018-04-19 13:56:06 +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_Common_AdaptDisplayInfo(SGUI_RECT* pstDisplayArea, SGUI_POINT* pstInnerPos);
|
|
|
|
SGUI_INT SGUI_Common_IntegerToStringWithDecimalPoint(SGUI_INT iInteger, SGUI_INT iDecimalPlaces, SGUI_SZSTR pszStringBuffer, SGUI_INT iAlignment, SGUI_CHAR cFillCharacter);
|
2018-12-12 13:06:03 +00:00
|
|
|
SGUI_SIZE SGUI_Common_IntegerToString(SGUI_INT iInteger, SGUI_SZSTR pszStringBuffer, SGUI_UINT uiBase, SGUI_INT iAlignment, SGUI_CHAR cFillCharacter);
|
|
|
|
SGUI_UINT SGUI_Common_ConvertStringToUnsignedInteger(SGUI_SZSTR szString, SGUI_CHAR** ppcEndPointer, SGUI_UINT uiBase);
|
|
|
|
SGUI_INT SGUI_Common_ConvertStringToInteger(SGUI_SZSTR szString, SGUI_CHAR** ppcEndPointer, SGUI_UINT uiBase);
|
2021-10-08 16:31:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2018-04-19 13:56:06 +00:00
|
|
|
|
|
|
|
#endif // __INCLUDE_GUI_COMMON_H__
|