2025-06-27 00:32:57 +08:00
|
|
|
|
#ifndef WIN_USER_CALENDAR_H__
|
|
|
|
|
#define WIN_USER_CALENDAR_H__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
#define CALENDAR_TXT_MAXLEN 20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
int x_size;
|
|
|
|
|
int y_size;
|
|
|
|
|
int select;
|
|
|
|
|
char txt[3];
|
|
|
|
|
}CALENDAR_BoxStruct;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
WIN_TouchWinStruct win;
|
|
|
|
|
char title[CALENDAR_TXT_MAXLEN];
|
2025-07-05 19:47:28 +08:00
|
|
|
|
u8 *icon; //ͼ<><CDBC>
|
|
|
|
|
int tip_y; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
CALENDAR_BoxStruct box[7*7];
|
|
|
|
|
u32 txtColor;
|
|
|
|
|
u32 selectRectColor;
|
|
|
|
|
u32 backRectColor;
|
2025-07-05 19:47:28 +08:00
|
|
|
|
int margin; //<2F>߾<EFBFBD>
|
|
|
|
|
int year_const; //<2F><>ǰ<EFBFBD><C7B0>
|
|
|
|
|
int month_const; //<2F><>ǰ<EFBFBD><C7B0>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
int year;
|
|
|
|
|
int month;
|
|
|
|
|
int day;
|
|
|
|
|
|
|
|
|
|
WIN_ButtonStruct *key_back;
|
|
|
|
|
WIN_ButtonStruct *key_sub;
|
|
|
|
|
WIN_ButtonStruct *key_add;
|
|
|
|
|
}WIN_CalendarStruct;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WIN_CalendarStruct *WIN_CreatCalendar (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
|
|
|
|
//<2F><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void CALENDAR_SetTitle (WIN_CalendarStruct *calendar,char *txt);
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void CALENDAR_IndexAdd (WIN_CalendarStruct *calendar);
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void CALENDAR_IndexSub (WIN_CalendarStruct *calendar);
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//ˢ<><CBA2>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void CALENDAR_Refresh (WIN_CalendarStruct *calendar);
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//Ĭ<>ϻ<EFBFBD><CFBB>ƺ<EFBFBD><C6BA><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void CALENDAR_DefaultPaint (WIN_CalendarStruct *calendar);
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//Ĭ<><C4AC><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
void CALENDAR_DefaultMsgLoop (WIN_CalendarStruct *calendar,WIN_MsgStruct *msg);
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
WIN_CalendarStruct *CALENDAR_SelectDate (WIN_WindowStruct *base);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|