2025-06-27 00:32:57 +08:00
|
|
|
|
#ifndef MYWIN_RECORD_H__
|
|
|
|
|
|
#define MYWIN_RECORD_H__
|
|
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
#define RECORD_MAX_MSG_NUM 100
|
2025-07-06 18:46:13 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
#define RECORD_MAX_MSG_LEN 100
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
int x_size;
|
|
|
|
|
|
int y_size;
|
|
|
|
|
|
char msg_type;
|
|
|
|
|
|
char msg[RECORD_MAX_MSG_LEN];
|
|
|
|
|
|
} Record_MsgStruct;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
WIN_WindowStruct win;
|
|
|
|
|
|
Record_MsgStruct msgs[RECORD_MAX_MSG_NUM];
|
|
|
|
|
|
int msg_start; // ָ<><EFBFBD>
|
|
|
|
|
|
int msg_end; // ָ<><D6B8><EFBFBD>ײ<EFBFBD><D7B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣλ<CFA2>ڴ<EFBFBD>
|
|
|
|
|
|
int msg_used; // ʹ<><CAB9><EFBFBD><EFBFBD>
|
|
|
|
|
|
int press;
|
|
|
|
|
|
int y_off; // y<><79><EFBFBD><EFBFBD>ƫ<EFBFBD><C6AB>
|
|
|
|
|
|
int msg_x_size; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾx<CABE><78><EFBFBD><EFBFBD>
|
|
|
|
|
|
int font_size; // <20><><EFBFBD>ֳߴ<D6B3>
|
2025-10-18 01:02:27 +08:00
|
|
|
|
uint32_t color_light;
|
|
|
|
|
|
uint32_t color_dark;
|
2025-07-06 18:46:13 +08:00
|
|
|
|
} WIN_RecordStruct;
|
|
|
|
|
|
|
|
|
|
|
|
WIN_RecordStruct *WIN_CreatRecord(WIN_WindowStruct *base,
|
|
|
|
|
|
void (*msgLoop)(struct _WIN_WindowStruct *win,
|
|
|
|
|
|
WIN_MsgStruct *msg),
|
|
|
|
|
|
int x, int y, int x_size, int y_size);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>msg_type='s',<2C><><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>Ϣ<EFBFBD><CFA2>msg_type='r',<2C><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ϣ
|
|
|
|
|
|
int RECORD_AddMsg(WIN_RecordStruct *box, char msg_type, char *msg);
|
|
|
|
|
|
|
|
|
|
|
|
void RECORD_DefaultMsgLoop(WIN_RecordStruct *box, WIN_MsgStruct *msg);
|
|
|
|
|
|
|
|
|
|
|
|
WIN_RecordStruct *RECORD_DrawRecord(WIN_WindowStruct *base, int x, int y,
|
|
|
|
|
|
int x_size, int y_size);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
|
|
|
|
|
#endif
|