mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
mgifanimateframes.h
Go to the documentation of this file.
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 
54 #ifndef _MGUI_NCSCTRL_GIFANIMATEFRAMES_H
55 #define _MGUI_NCSCTRL_GIFANIMATEFRAMES_H
56 
57 #ifdef _cplusplus
58 extern "C"{
59 #endif
60 
61 typedef struct _mGIFAnimateFrames mGIFAnimateFrames;
62 typedef struct _mGIFAnimateFramesClass mGIFAnimateFramesClass;
63 
64 typedef struct _mGIFAnimateFrame{
65  int off_x;
66  int off_y;
67  int disposal;
68  unsigned int delay_time;
69  BITMAP bmp;
70  struct _mGIFAnimateFrame* next;
71  struct _mGIFAnimateFrame* prev;
72 }mGIFAnimateFrame;
73 
74 
75 #define mGIFAnimateFramesHeader(clsName) \
76  mAnimateFramesHeader(clsName) \
77  /*RGB bk;*/ \
78  mGIFAnimateFrame *frames; \
79  HDC mem_dc;
80 
81 struct _mGIFAnimateFrames{
82  mGIFAnimateFramesHeader(mAnimateFrames)
83 };
84 
85 #define mGIFAnimateFramesClassHeader(clss, superCls) \
86  mAnimateFramesClassHeader(clss, superCls)
87 
88 struct _mGIFAnimateFramesClass{
89  mGIFAnimateFramesClassHeader(mGIFAnimateFrames, mAnimateFrames)
90 };
91 
92 MGNCS_EXPORT extern mGIFAnimateFramesClass g_stmGIFAnimateFramesCls;
93 
94 MGNCS_EXPORT mGIFAnimateFrames * ncsCreateAnimateFramesFromGIFFile(const char* gif_file);
95 
96 MGNCS_EXPORT mGIFAnimateFrames * ncsCreateAnimateFramesFromGIFMem(const void* mem, int size);
97 
98 #ifdef _cplusplus
99 }
100 #endif
101 
102 #endif