2025-06-27 00:32:57 +08:00
|
|
|
|
#ifndef MYWIN_USER_ANIMATION_H__
|
|
|
|
|
|
#define MYWIN_USER_ANIMATION_H__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "mywin_inc.h"
|
|
|
|
|
|
#include "ff.h"
|
|
|
|
|
|
#include "gif.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><><EFBFBD>嶯<EFBFBD><E5B6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD><D6A1>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
#define WIN_ANIMATION_FRAMERATE 14
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
|
{
|
|
|
|
|
|
WIN_WindowStruct win;
|
|
|
|
|
|
WIN_PicStruct pic;
|
|
|
|
|
|
GIF_DecodeStruct *gif;
|
2025-07-05 19:47:28 +08:00
|
|
|
|
int frameNow; //<2F><>ǰ֡<C7B0><D6A1>
|
|
|
|
|
|
int timerId; //<2F><><EFBFBD>Ŷ<EFBFBD><C5B6><EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ʱ<EFBFBD><CAB1>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
int timerIdReturn; //<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>ʱ<EFBFBD>䳤<EFBFBD>ȵĶ<C8B5>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
int once; //ֻ<><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
int x_off;
|
|
|
|
|
|
int y_off;
|
|
|
|
|
|
}WIN_AnimationStruct;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WIN_AnimationStruct *WIN_CreatAnimation (WIN_WindowStruct *base,
|
|
|
|
|
|
void (*msgLoop)(struct _WIN_WindowStruct *win,WIN_MsgStruct *msg),
|
|
|
|
|
|
int x,int y,int x_size,int y_size);
|
|
|
|
|
|
|
|
|
|
|
|
void WIN_DeleteAnimation (WIN_AnimationStruct *animation);
|
|
|
|
|
|
|
|
|
|
|
|
|
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 ANIMATION_DefaultPaint (WIN_AnimationStruct *animation);
|
|
|
|
|
|
|
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 ANIMATION_defaultMsgLoop (WIN_AnimationStruct *animation,WIN_MsgStruct *msg);
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><>ʾһ<CABE><D2BB>ͼƬ
|
2025-06-27 00:32:57 +08:00
|
|
|
|
WIN_AnimationStruct *ANIMATION_ShowGif (WIN_WindowStruct *base,char *name);
|
|
|
|
|
|
|
2025-07-05 19:47:28 +08:00
|
|
|
|
//<2F><>ʾһ<CABE><D2BB>ͼƬָ<C6AC><D6B8>ʱ<EFBFBD><CAB1>
|
2025-06-27 00:32:57 +08:00
|
|
|
|
WIN_AnimationStruct *ANIMATION_ShowGifTime (WIN_WindowStruct *base,char *name,u32 ms);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|