mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
manimateframes.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_ANIMATEFRAMES_H
55 #define _MGUI_NCSCTRL_ANIMATEFRAMES_H
56 
57 #ifdef _cplusplus
58 extern "C"{
59 #endif
60 
61 #define NCSCTRL_ANIMATEFRAMES NCSCLASSNAME("animateframes")
62 
63 typedef struct _mAnimateFrames mAnimateFrames;
64 typedef struct _mAnimateFramesClass mAnimateFramesClass;
65 
66 #define mAnimateFramesHeader(clss) \
67  mObjectHeader(clss) \
68  int max_width; \
69  int max_height; \
70  int nr_frames; \
71  void * cur_frame;
72 
73 struct _mAnimateFrames{
74  mAnimateFramesHeader(mAnimateFrames)
75 };
76 
77 #define NCSR_ANIMATEFRAME_OK 0
78 #define NCSR_ANIMATEFRAME_LASTFRAME 1
79 #define NCSR_ANIMATEFRAME_FAILED -1
80 
81 #define mAnimateFramesClassHeader(clss, superCls) \
82  mObjectClassHeader(clss, superCls) \
83  BOOL (*getMaxFrameSize)(mAnimateFrames* self, int *pwidth, int *pheight); \
84  int (*drawFrame)(mAnimateFrames* self, HDC hdc, mObject *owner, RECT *pRect, int align, int valign, BOOL bScale); \
85  int (*nextFrame)(mAnimateFrames* self);
86 
87 struct _mAnimateFramesClass{
88  mAnimateFramesClassHeader(mAnimateFrames, mObject)
89 };
90 
91 MGNCS_EXPORT extern mAnimateFramesClass g_stmAnimateFramesCls;
92 
93 #ifdef _cplusplus
94 }
95 #endif
96 
97 #endif
mObject
the Object struct