2025-06-27 00:32:57 +08:00
|
|
|
|
#ifndef MYWIN_USER_STATUS_BAR_H__
|
|
|
|
|
|
#define MYWIN_USER_STATUS_BAR_H__
|
|
|
|
|
|
|
2025-10-18 01:02:27 +08:00
|
|
|
|
#include "mywin_inc.h"
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-10-18 01:02:27 +08:00
|
|
|
|
// ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>̳<EFBFBD><CCB3><EFBFBD>MYWIN<49><4E><EFBFBD><EFBFBD>
|
|
|
|
|
|
// <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD>棬<EFBFBD><E6A3AC><EFBFBD>ݾ<EFBFBD><DDBE><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>;<EFBFBD><CDBE>д<EFBFBD><D0B4>û<EFBFBD><C3BB>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
|
|
|
|
|
#include "elf.h"
|
|
|
|
|
|
|
2025-10-18 01:02:27 +08:00
|
|
|
|
// ״̬<D7B4><CCAC><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>ݽṹ<DDBD><E1B9B9>
|
|
|
|
|
|
typedef struct {
|
2025-10-18 13:58:40 +08:00
|
|
|
|
uint8_t *bluetooth;
|
|
|
|
|
|
uint8_t *heart;
|
|
|
|
|
|
uint8_t *nfc;
|
|
|
|
|
|
uint8_t *betty;
|
2025-10-18 01:02:27 +08:00
|
|
|
|
} STATUSBAR_ResStruct;
|
|
|
|
|
|
|
|
|
|
|
|
// ״̬<D7B4><CCAC><EFBFBD><EFBFBD>
|
|
|
|
|
|
typedef struct {
|
2025-10-18 13:58:40 +08:00
|
|
|
|
uint32_t structType; // <20>ṹ<EFBFBD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-10-18 01:02:27 +08:00
|
|
|
|
char time[20];
|
|
|
|
|
|
char mode[100];
|
|
|
|
|
|
int mode_x; // <20><><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾx<CABE><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƫ<EFBFBD><C6AB>
|
|
|
|
|
|
char betty[10];
|
|
|
|
|
|
int blueState;
|
|
|
|
|
|
int heartState;
|
|
|
|
|
|
int nfcState;
|
|
|
|
|
|
int bettyState;
|
|
|
|
|
|
} STATUSBAR_DataStruct;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
app_struct *app;
|
|
|
|
|
|
RECT_Struct enter;
|
|
|
|
|
|
RECT_Struct exit;
|
|
|
|
|
|
} STATUSBAR_AppStruct;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
WIN_WindowStruct win;
|
|
|
|
|
|
STATUSBAR_ResStruct res; // <20><>ʾ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD>Դ
|
|
|
|
|
|
STATUSBAR_DataStruct stat;
|
|
|
|
|
|
int img_xsize; // ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD>
|
|
|
|
|
|
WIN_PicStruct pic; // ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼƬ
|
2025-10-18 13:58:40 +08:00
|
|
|
|
uint32_t backColor; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
uint32_t color; // ǰ<><C7B0><EFBFBD><EFBFBD>ɫ
|
2025-10-18 01:02:27 +08:00
|
|
|
|
int timerId; // <20><>ʱ<EFBFBD><CAB1>id
|
|
|
|
|
|
int timerIdGet; // <20><><EFBFBD>ڻ<EFBFBD>ȡʱ<C8A1><CAB1>
|
2025-10-18 13:58:40 +08:00
|
|
|
|
uint8_t sec;
|
2025-10-18 01:02:27 +08:00
|
|
|
|
|
|
|
|
|
|
int mov_start; // <20>ƶ<EFBFBD><C6B6><EFBFBD>ʼ
|
|
|
|
|
|
int y_size_def; // Ĭ<>ϵ<EFBFBD>y<EFBFBD>ߴ<EFBFBD>
|
|
|
|
|
|
int dis; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>չ<EFBFBD><D5B9><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>С
|
|
|
|
|
|
|
|
|
|
|
|
int app_num;
|
|
|
|
|
|
int app_y_step;
|
|
|
|
|
|
STATUSBAR_AppStruct app_item[APPM_LIST_MAXLEN];
|
|
|
|
|
|
|
|
|
|
|
|
} WIN_StatusBarStruct;
|
|
|
|
|
|
|
|
|
|
|
|
// <20>ڶ<EFBFBD><DAB6>ﹹ<EFBFBD><EFB9B9>һ<EFBFBD><D2BB>״̬<D7B4><CCAC>
|
|
|
|
|
|
WIN_StatusBarStruct *WIN_CreatStatusBar(
|
|
|
|
|
|
WIN_WindowStruct *base,
|
|
|
|
|
|
void (*msgLoop)(struct _WIN_WindowStruct *win, WIN_MsgStruct *msg), int x,
|
|
|
|
|
|
int y, int x_size, int y_size);
|
|
|
|
|
|
|
|
|
|
|
|
// ״̬<D7B4><CCAC>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
|
void STATUSBAR_StateUpdata(WIN_StatusBarStruct *statusbar,
|
|
|
|
|
|
STATUSBAR_DataStruct *s);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
void STATUSBAR_SetRes(WIN_StatusBarStruct *statusbar, STATUSBAR_ResStruct *r);
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD>ͼƬ
|
|
|
|
|
|
void STATUSBAR_SetBackPic(WIN_StatusBarStruct *statusbar, WIN_PicStruct *pic);
|
|
|
|
|
|
|
|
|
|
|
|
// Ĭ<>ϻ<EFBFBD><CFBB>ƺ<EFBFBD><C6BA><EFBFBD>
|
|
|
|
|
|
void STATUSBAR_DefaultPaint(WIN_StatusBarStruct *statusbar);
|
|
|
|
|
|
|
|
|
|
|
|
// Ĭ<><C4AC><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void STATUSBAR_DefaultMsgLoop(WIN_StatusBarStruct *statusbar,
|
|
|
|
|
|
WIN_MsgStruct *msg);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
|
|
|
|
|
#endif
|