77 lines
1.0 KiB
C
77 lines
1.0 KiB
C
#ifndef MYWIN_STOPWATCH_H__
|
|
#define MYWIN_STOPWATCH_H__
|
|
|
|
|
|
|
|
|
|
//定义可以保存的计时组数
|
|
#define STOPWATCH_TIMESAVE_MAX 20
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
{
|
|
WIN_TouchWinStruct win;
|
|
int timerId; //软件定时器id
|
|
int index;
|
|
int power;
|
|
int spend;
|
|
u32 timeNow;
|
|
int saveNum;
|
|
u32 timeSave[STOPWATCH_TIMESAVE_MAX];
|
|
u32 selectTxtColor;
|
|
u32 txtColor;
|
|
u32 selectRectColor;
|
|
u32 rectColor;
|
|
char *title;
|
|
u8 *icon; //图标
|
|
|
|
RECT_Struct rect_ok;
|
|
RECT_Struct rect_back;
|
|
|
|
}WIN_StopWatchStruct;
|
|
|
|
|
|
|
|
|
|
|
|
WIN_StopWatchStruct *WIN_CreatStopWatch (WIN_WindowStruct *base,
|
|
void (*msgLoop)(struct _WIN_WindowStruct *win,WIN_MsgStruct *msg),
|
|
int x,int y,int x_size,int y_size);
|
|
|
|
|
|
|
|
|
|
//删除秒表
|
|
void WIN_DeleteStopWatch (WIN_StopWatchStruct *stopwatch );
|
|
|
|
|
|
|
|
//消息框的绘制函数
|
|
void STOPWATCH_DefaultPaint (WIN_StopWatchStruct *stopwatch);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//消息框的消息处理函数
|
|
void STOPWATCH_defaultMsgLoop (WIN_StopWatchStruct *stopwatch,WIN_MsgStruct *msg);
|
|
|
|
|
|
|
|
WIN_StopWatchStruct *STOPWATCH_RecordTime (WIN_WindowStruct *base);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|