mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
mbmparrayanimateframes.h
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
47 #ifndef _MGUI_NCSCTRL_BMPARRAYANIMATEFRAMES_H
48 #define _MGUI_NCSCTRL_BMPARRAYANIMATEFRAMES_H
49 
50 #ifdef _cplusplus
51 extern "C"{
52 #endif
53 
54 typedef struct _mBmpArrayAnimateFrames mBmpArrayAnimateFrames;
55 typedef struct _mBmpArrayAnimateFramesClass mBmpArrayAnimateFramesClass;
56 
57 typedef struct _mBmpArrayAnimateFrame{
58  PBITMAP bmp;
59  struct _mBmpArrayAnimateFrame* next;
60  struct _mBmpArrayAnimateFrame* prev;
61 }mBmpArrayAnimateFrame;
62 
63 #define mBmpArrayAnimateFramesHeader(clsName) \
64  mAnimateFramesHeader(clsName) \
65  mBmpArrayAnimateFrame *frames; \
66  PRIVATE DWORD flags;
67 
68 struct _mBmpArrayAnimateFrames{
69  mBmpArrayAnimateFramesHeader(mAnimateFrames)
70 };
71 
72 #define mBmpArrayAnimateFramesClassHeader(clss, superCls) \
73  mAnimateFramesClassHeader(clss, superCls) \
74 
75 struct _mBmpArrayAnimateFramesClass{
76  mBmpArrayAnimateFramesClassHeader(mBmpArrayAnimateFrames, mAnimateFrames)
77 };
78 
79 MGNCS_EXPORT extern mBmpArrayAnimateFramesClass g_stmBmpArrayAnimateFramesCls;
80 
81 MGNCS_EXPORT mBmpArrayAnimateFrames * ncsCreateAnimateFramesFromDIR(const char* dir);
82 
83 MGNCS_EXPORT mBmpArrayAnimateFrames * ncsCreateAnimateFramesFromImageList(const char ** file_list, int count);
84 
85 MGNCS_EXPORT mBmpArrayAnimateFrames * ncsCreateAnimateFramesFromBmpArray(PBITMAP * bmps, int count, BOOL auto_delete);
86 
87 #define ncsCreateAnimateFramesFromMEM(bmps, count) \
88  ncsCreateAnimateFramesFromBmpArray(bmps, count, FALSE)
89 
90 
91 #ifdef _cplusplus
92 }
93 #endif
94 
95 #endif