mGNCS API Reference  v1.2.0
A new control set and a new framework for MiniGUI apps
manimateframes.h
Go to the documentation of this file.
1 
42 #ifndef _MGUI_NCSCTRL_ANIMATEFRAMES_H
43 #define _MGUI_NCSCTRL_ANIMATEFRAMES_H
44 
45 #ifdef _cplusplus
46 extern "C"{
47 #endif
48 
49 #define NCSCTRL_ANIMATEFRAMES NCSCLASSNAME("animateframes")
50 
51 typedef struct _mAnimateFrames mAnimateFrames;
52 typedef struct _mAnimateFramesClass mAnimateFramesClass;
53 
54 #define mAnimateFramesHeader(clss) \
55  mObjectHeader(clss) \
56  int max_width; \
57  int max_height; \
58  int nr_frames; \
59  void * cur_frame;
60 
61 struct _mAnimateFrames{
62  mAnimateFramesHeader(mAnimateFrames)
63 };
64 
65 #define NCSR_ANIMATEFRAME_OK 0
66 #define NCSR_ANIMATEFRAME_LASTFRAME 1
67 #define NCSR_ANIMATEFRAME_FAILED -1
68 
69 #define mAnimateFramesClassHeader(clss, superCls) \
70  mObjectClassHeader(clss, superCls) \
71  BOOL (*getMaxFrameSize)(mAnimateFrames* self, int *pwidth, int *pheight); \
72  int (*drawFrame)(mAnimateFrames* self, HDC hdc, mObject *owner, RECT *pRect, int align, int valign, BOOL bScale); \
73  int (*nextFrame)(mAnimateFrames* self);
74 
75 struct _mAnimateFramesClass{
76  mAnimateFramesClassHeader(mAnimateFrames, mObject)
77 };
78 
79 MGNCS_EXPORT extern mAnimateFramesClass g_stmAnimateFramesCls;
80 
81 #ifdef _cplusplus
82 }
83 #endif
84 
85 #endif
the Object struct