2025-06-27 00:32:57 +08:00
|
|
|
|
#ifndef MYWIN_WORKING_H__
|
|
|
|
|
|
#define MYWIN_WORKING_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include "mywin_inc.h"
|
|
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
typedef struct {
|
2025-06-27 00:32:57 +08:00
|
|
|
|
WIN_WindowStruct win;
|
2025-10-18 01:02:27 +08:00
|
|
|
|
uint32_t rectColor;
|
|
|
|
|
|
uint32_t txtColor;
|
2025-06-27 00:32:57 +08:00
|
|
|
|
int time_id1;
|
|
|
|
|
|
int time_id2;
|
2025-07-06 18:46:13 +08:00
|
|
|
|
WIN_WorkFunStruct *work; // <20><><EFBFBD><EFBFBD><EFBFBD>ṹ<EFBFBD><E1B9B9>
|
|
|
|
|
|
int ret; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ֵ
|
|
|
|
|
|
void (*break_fun)(void *ptr); // <20>߳<EFBFBD><DFB3>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void *ptr; // <20>߳<EFBFBD><DFB3>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
|
|
|
|
|
void (*get_progress)(int *now, int *all); // <20><><EFBFBD>ڻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>ȵĺ<C8B5><C4BA><EFBFBD>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
char msg[50];
|
|
|
|
|
|
char msg_draw[100];
|
|
|
|
|
|
int msg_h_index;
|
2025-07-06 18:46:13 +08:00
|
|
|
|
} WIN_WorkingStruct;
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
WIN_WorkingStruct *WIN_CreatWorking(
|
|
|
|
|
|
WIN_WindowStruct *base,
|
|
|
|
|
|
void (*msgLoop)(struct _WIN_WindowStruct *win, WIN_MsgStruct *msg), int x,
|
|
|
|
|
|
int y, int x_size, int y_size);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
// Ĭ<>ϻ<EFBFBD><CFBB>ƺ<EFBFBD><C6BA><EFBFBD>
|
|
|
|
|
|
void WORKING_DefaultPaint(WIN_WorkingStruct *working);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
// Ĭ<><C4AC><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void WORKING_DefaultMsgLoop(WIN_WorkingStruct *working, WIN_MsgStruct *msg);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
// <20><>ʾ<EFBFBD><CABE>ʾ<EFBFBD><EFBFBD><F2B2A2BD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ֵ
|
|
|
|
|
|
int WORKING_DoWork(WIN_WindowStruct *base, char *msg, int (*fun)(void *),
|
|
|
|
|
|
void *ptr);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
// <20><>ʾ<EFBFBD><CABE>ʾ<EFBFBD><EFBFBD><F2B2A2BD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ֵ
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҿ<EFBFBD><D2BF><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>˳<EFBFBD>,<2C><><EFBFBD>Ի<EFBFBD>ȡ<EFBFBD>߳̽<DFB3><CCBD><EFBFBD>
|
|
|
|
|
|
int WORKING_DoWorkPro(WIN_WindowStruct *base, char *msg, int (*fun)(void *),
|
|
|
|
|
|
void *ptr, void (*break_fun)(void *), void *b_ptr,
|
2025-10-18 01:02:27 +08:00
|
|
|
|
void (*get_progress)(int *now, int *all), uint8_t pro);
|
2025-06-27 00:32:57 +08:00
|
|
|
|
|
2025-07-06 18:46:13 +08:00
|
|
|
|
#endif
|