2025-06-27 00:32:57 +08:00
|
|
|
|
#ifndef MYWIN_STOPWATCH_H__
|
|
|
|
|
#define MYWIN_STOPWATCH_H__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>ļ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
#define STOPWATCH_TIMESAVE_MAX 20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
WIN_TouchWinStruct win;
|
2025-07-05 19:47:28 +08:00
|
|
|
|
int timerId; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>id
|
2025-06-27 00:32:57 +08:00
|
|
|
|
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;
|
2025-07-05 19:47:28 +08:00
|
|
|
|
u8 *icon; //ͼ<><CDBC>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void WIN_DeleteStopWatch (WIN_StopWatchStruct *stopwatch );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><>Ϣ<EFBFBD><CFA2><EFBFBD>Ļ<EFBFBD><C4BB>ƺ<EFBFBD><C6BA><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void STOPWATCH_DefaultPaint (WIN_StopWatchStruct *stopwatch);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void STOPWATCH_defaultMsgLoop (WIN_StopWatchStruct *stopwatch,WIN_MsgStruct *msg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WIN_StopWatchStruct *STOPWATCH_RecordTime (WIN_WindowStruct *base);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|