51 lines
730 B
C
51 lines
730 B
C
#ifndef MYWIN_USER_STAT_H__
|
||
#define MYWIN_USER_STAT_H__
|
||
|
||
|
||
|
||
|
||
//定义字符最大长度
|
||
#define STAT_TXT_MAXLEN 20
|
||
|
||
|
||
|
||
typedef struct
|
||
{
|
||
WIN_WindowStruct win;
|
||
int timerId;
|
||
void (*TimerCallBack)(void *);
|
||
u8 *img;
|
||
char txt[STAT_TXT_MAXLEN];
|
||
}WIN_StatStruct;
|
||
|
||
|
||
|
||
WIN_StatStruct *WIN_CreatStat (WIN_WindowStruct *base,
|
||
void (*msgLoop)(struct _WIN_WindowStruct *win,WIN_MsgStruct *msg),
|
||
int x,int y,int x_size,int y_size);
|
||
|
||
|
||
//设置显示文字,成功返回1
|
||
int STAT_SetTxt (WIN_StatStruct *stat,char *txt);
|
||
|
||
//设置图标
|
||
int STAT_SetImg (WIN_StatStruct *stat,u8 *img);
|
||
|
||
|
||
//默认绘制函数
|
||
void STAT_DefaultPaint (WIN_StatStruct *stat);
|
||
|
||
|
||
//默认消息处理函数
|
||
void STAT_DefaultMsgLoop (WIN_StatStruct *stat,WIN_MsgStruct *msg);
|
||
|
||
|
||
|
||
|
||
#endif
|
||
|
||
|
||
|
||
|
||
|