mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
mtimer.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_TIMER_H
55 #define _MGUI_NCSCTRL_TIMER_H
56 
57 #ifdef __cplusplus
58 extern "C"{
59 #endif
60 
70 #define NCSCTRL_TIMER NCSCLASSNAME("timer")
71 
72 typedef struct _mTimerClass mTimerClass;
73 typedef struct _mTimer mTimer;
74 
75 #define mTimerClassHeader(clss, superCls) \
76  mInvsbCompClassHeader(clss, superCls) \
77  BOOL (*start)(clss *self); \
78  void (*stop)(clss *self); \
79  HWND (*getParent)(clss *self);
80 
99 struct _mTimerClass {
100  mTimerClassHeader(mTimer, mInvsbComp)
101 };
102 
107 MGNCS_EXPORT extern mTimerClass g_stmTimerCls; //Class(mTimer);
108 
109 #define mTimerHeader(clss) \
110  mInvsbCompHeader(clss) \
111  DWORD interval;
112 
121 struct _mTimer {
122  mTimerHeader(mTimer)
123 };
124 
130  NCSP_TIMER_INTERVAL = NCSP_IVCMPT_MAX + 1,
131  NCSP_TIMER_MAX
132 };
150 typedef BOOL (*NCS_CB_ONTIMER)(mTimer* timer, DWORD total_count);
151 
154 #ifdef __cplusplus
155 }
156 #endif
157 
158 #endif
159 
mTimer
the timer member define
ncsTimerProp
ncsTimerProp
the mTimer's property define
Definition: mtimer.h:129
NCSP_TIMER_INTERVAL
@ NCSP_TIMER_INTERVAL
the interval of timer
Definition: mtimer.h:130
g_stmTimerCls
MGNCS_EXPORT mTimerClass g_stmTimerCls
the singleton of mTimerClass
mTimerClass
the class of Timer object
mInvsbComp
define the mInvsbComp members , inherit from mComponent. An Invisible Component is a Component only s...