41 #ifndef _MGEFF_EFFECTOR_H_ 42 #define _MGEFF_EFFECTOR_H_ 46 #include <minigui/common.h> 47 #include <minigui/minigui.h> 48 #include <minigui/gdi.h> 49 #include <minigui/window.h> 78 int property_id,
int value);
92 int property_id,
int* pValue);
108 MGEFF_EFFECTOR effector, HDC sink_dc, intptr_t id,
void *value);
122 MGEFF_EFFECTOR effector);
134 MGEFF_EFFECTOR effector);
160 #define EFFECTORNAME_MAX_LEN 31 165 typedef struct _EFFECTOROPS { 178 #define MGEFF_MINOR_leafwindow "leafwindow" 179 #define MGEFF_MINOR_zip "zip" 180 #define MGEFF_MINOR_flip "flip" 181 #define MGEFF_MINOR_cubicrotate "cubicrotate" 182 #define MGEFF_MINOR_alpha "alphablending" 183 #define MGEFF_MINOR_scroll "scrollpage" 184 #define MGEFF_MINOR_zoom "zoominzoomout" 185 #define MGEFF_MINOR_push "pushpoll" 186 #define MGEFF_MINOR_clear "clear" 187 #define MGEFF_MINOR_centersplit "centersplit" 188 #define MGEFF_MINOR_radarscan "radarscan" 189 #define MGEFF_MINOR_fivepointedstar "fivepointedstar" 190 #define MGEFF_MINOR_roller "roller" 191 #define MGEFF_MINOR_blockflip "blockflip" 192 #define MGEFF_MINOR_es_cubicrotate "opengles-cubicrotate" 193 #define MGEFF_MINOR_es_rectrotate "opengles-rectrotate" 194 #define MGEFF_MINOR_es_coverflow "opengles-coverflow" 195 #define MGEFF_MINOR_mgplus_rotate "mgplus-rotate" 196 #define MGEFF_MINOR_mgplus_cubicrotate "mgplus-cubicrotate" 197 #define MGEFF_MINOR_mgplus_flip "mgplus-flip" 200 #define MGEFF_EFFECTOR_LEAFWINDOW mGEffStr2Key(MGEFF_MINOR_leafwindow) 201 #define MGEFF_EFFECTOR_ZIP mGEffStr2Key(MGEFF_MINOR_zip) 202 #define MGEFF_EFFECTOR_FLIP mGEffStr2Key(MGEFF_MINOR_flip) 203 #define MGEFF_EFFECTOR_CUBIC_ROTATE mGEffStr2Key(MGEFF_MINOR_cubicrotate) 204 #define MGEFF_EFFECTOR_ALPHA mGEffStr2Key(MGEFF_MINOR_alpha) 205 #define MGEFF_EFFECTOR_SCROLL mGEffStr2Key(MGEFF_MINOR_scroll) 206 #define MGEFF_EFFECTOR_ZOOM mGEffStr2Key(MGEFF_MINOR_zoom) 207 #define MGEFF_EFFECTOR_PUSH mGEffStr2Key(MGEFF_MINOR_push) 208 #define MGEFF_EFFECTOR_CLEAR mGEffStr2Key(MGEFF_MINOR_clear) 209 #define MGEFF_EFFECTOR_CENTERSPLIT mGEffStr2Key(MGEFF_MINOR_centersplit) 210 #define MGEFF_EFFECTOR_RADARSCAN mGEffStr2Key(MGEFF_MINOR_radarscan) 211 #define MGEFF_EFFECTOR_FIVEPOINTEDSTAR mGEffStr2Key(MGEFF_MINOR_fivepointedstar) 212 #define MGEFF_EFFECTOR_ROLLER mGEffStr2Key(MGEFF_MINOR_roller) 213 #define MGEFF_EFFECTOR_BLOCKFLIP mGEffStr2Key(MGEFF_MINOR_blockflip) 214 #define MGEFF_EFFECTOR_OPENGL_CUBICROTATE mGEffStr2Key(MGEFF_MINOR_es_cubicrotate) 215 #define MGEFF_EFFECTOR_OPENGL_RECTROTATE mGEffStr2Key(MGEFF_MINOR_es_rectrotate) 216 #define MGEFF_EFFECTOR_OPENGL_COVERFLOW mGEffStr2Key(MGEFF_MINOR_es_coverflow) 217 #define MGEFF_EFFECTOR_MGPLUS_ROTATE mGEffStr2Key(MGEFF_MINOR_mgplus_rotate) 218 #define MGEFF_EFFECTOR_MGPLUS_CUBIC_ROTATE mGEffStr2Key(MGEFF_MINOR_mgplus_cubicrotate) 219 #define MGEFF_EFFECTOR_MGPLUS_FLIP mGEffStr2Key(MGEFF_MINOR_mgplus_flip) 225 #define MGEFF_PROPERTY_DIRECTION 1 226 #define MGEFF_PROPERTY_AXIS 2 227 #define MGEFF_PROPERTY_LEAFROWS 4 228 #define MGEFF_PROPERTY_LEAFVERTICAL 5 229 #define MGEFF_PROPERTY_ZOOM 6 230 #define MGEFF_PROPERTY_RESOURCE 7 231 #define MGEFF_PROPERTY_BACKGROUND 8 232 #define MGEFF_PROPERTY_PIECES 9 233 #define MGEFF_PROPERTY_STARTANGLE 10 240 MGEFF_DIRECTION_LEFT2RIGHT = 0,
241 MGEFF_DIRECTION_RIGHT2LEFT = 1,
242 MGEFF_DIRECTION_TOP2BOTTOM = 2,
243 MGEFF_DIRECTION_BOTTOM2TOP = 3
251 MGEFF_DIRECTION_CENTER2OUTSIDE_4 = 0,
252 MGEFF_DIRECTION_OUTSIDE2CENTER_4 = 1,
253 MGEFF_DIRECTION_CENTER2OUTSIDE_2 = 2,
254 MGEFF_DIRECTION_OUTSIDE2CENTER_2 = 3
273 MGEFF_CLOCKINVERSE = 1
281 MGEFF_DIRECTION_CENTER = 0,
282 MGEFF_DIRECTION_LUP2RDOWN = 1,
283 MGEFF_DIRECTION_LDOWN2RUP = 2,
284 MGEFF_DIRECTION_RDOWN2LUP = 3,
285 MGEFF_DIRECTION_RUP2LDOWN = 4
368 MGEFF_SOURCE source);
436 int property_id,
int value);
455 int property_id,
int *pValue);
495 HDC dst_dc,
unsigned long key,
int duration);
517 HDC dst_dc,
unsigned long key);
537 HDC src2_dc,
unsigned long key);
585 HDC dc_expand, HDC dc_dst);
MGEFF_EXPORT unsigned long mGEffStr2Key(const char *str)
Generate hash key of string.
Definition: mgeff-effector.h:294
MGEFF_EXPORT int mGEffFillEffectorAnimation(HWND hwnd, HDC src1_dc, HDC src2_dc, HDC dst_dc, unsigned long key, int duration)
Fills a DC with a predefined effector.
RotateDirectionProperty
RotateDirectionProperty.
Definition: mgeff-effector.h:271
MGEFF_EXPORT int mGEffEffectorSetSink(MGEFF_EFFECTOR effector, MGEFF_SINK sink)
Sets the sink of a effector.
Definition: mgeff-effector.h:293
void(* MGEFF_EFFECTOR_ONENDDRAW)(MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector)
Type of effector end draw callback function.
Definition: mgeff-effector.h:133
MGEFF_EXPORT MGEFF_EFFECTOR mGEffEffectorCreate(unsigned long key)
Creates a effector.
MGEFF_EXPORT MGEFF_BOOL mGEffEffectorRegister(const MGEFF_EFFECTOROPS *info)
Register specail effector info.
MGEFF_EXPORT void mGEffEffectorDeleteWithoutSink(MGEFF_EFFECTOR handle)
Deletes a effector.
MGEFF_EXPORT MGEFF_SINK mGEffEffectorGetSink(MGEFF_EFFECTOR effector)
Gets the sink of a effector.
void(* MGEFF_EFFECTOR_FINALIZE)(MGEFF_EFFECTOR effector)
Type of effector finalize callback function.
Definition: mgeff-effector.h:158
MGEFF_EXPORT int mGEffEffectorSetProperty(MGEFF_EFFECTOR handle, int property_id, int value)
Sets the property of a effector.
struct _EFFECTOROPS MGEFF_EFFECTOROPS
it contains whole info of an effector, if you want to custom an effector, implement it ...
MGEFF_DECLARE_HANDLE(MGEFF_EFFECTOR)
The handle to the effector.
MGEFF_EFFECTOR_ONENDDRAW enddraw
Definition: mgeff-effector.h:172
MGEFF_EXPORT MGEFF_EFFECTOROPS * mGEffEffectorGetOps(unsigned long key)
Gets the effector MGEFF_EFFECTOROPS ops.
ZoomTypeProperty
ZoomTypeProperty.
Definition: mgeff-effector.h:292
void(* MGEFF_EFFECTOR_ANIM_ONDRAW)(MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector, HDC sink_dc, intptr_t id, void *value)
Type of effector on draw callback function.
Definition: mgeff-effector.h:107
MGEFF_EXPORT void * mGEffEffectorGetContext(MGEFF_EFFECTOR handle)
Gets the effector context.
MGEFF_EXPORT MGEFF_ANIMATION mGEffAnimationCreateWithEffector(MGEFF_EFFECTOR effector)
Creates a animation with a effector.
MGEFF_EFFECTOR_FINALIZE finalize
Definition: mgeff-effector.h:169
MGEFF_EFFECTOR_GETPROPERTY getproperty
Definition: mgeff-effector.h:174
Effector source headfile.
MGEFF_EXPORT MGEFF_EFFECTOR mGEffEffectorCreateEx(HDC src1_dc, HDC src2_dc, HDC dst_dc, unsigned long key)
Creates a effector of certain type with given source DCs and destination DC.
MGEFF_EXPORT MGEFF_EFFECTOR mGEffEffectorCreateWithoutSink(HDC src1_dc, HDC src2_dc, unsigned long key)
Creates a effector of certain type with given source DCs but WITHOUT a destination DC...
MGEFF_EXPORT int mGEffEffectorGetProperty(MGEFF_EFFECTOR handle, int property_id, int *pValue)
Sets the property of a effector.
#define MGEFF_EXPORT
Definition: mgeff-common.h:52
MGEFF_EFFECTOR_ONBEGINDRAW begindraw
Definition: mgeff-effector.h:171
MGEFF_EFFECTOR_ANIM_ONDRAW ondraw
Definition: mgeff-effector.h:170
MGEFF_EXPORT MGEFF_BOOL mGEffEffectorUnRegister(const MGEFF_EFFECTOROPS *info)
UnRegister specail effector info.
MGEFF_EFFECTOR(* MGEFF_EFFECTOR_INIT)(MGEFF_EFFECTOR effector)
Type of effector init callback function.
Definition: mgeff-effector.h:147
MGEFF_EFFECTOR_INIT init
Definition: mgeff-effector.h:168
MGEFF_EXPORT HDC mGEffEffectorGetSourceDC(MGEFF_EFFECTOR effector, int index)
Gets the underlying DC of the source of a effector.
int MGEFF_BOOL
type of MGEFF_BOOL
Definition: mgeff-common.h:67
AxisProperty
AxisProperty.
Definition: mgeff-effector.h:261
MGEFF_EXPORT void mGEffEffectorSetContext(MGEFF_EFFECTOR handle, void *context)
Sets the effector context.
MGEFF_EFFECTOR_SETPROPERTY setproperty
Definition: mgeff-effector.h:173
EffVariantType
animation variant
Definition: mgeff-animation.h:98
MGEFF_EXPORT MGEFF_SOURCE mGEffEffectorGetSource(MGEFF_EFFECTOR handle, int index)
Gets the effector source.
CenterSplitProperty
CenterSplitProperty.
Definition: mgeff-effector.h:250
ZoomProperty
ZoomProperty.
Definition: mgeff-effector.h:280
common macro and type define.
MGEFF_EXPORT void mGEffEffectorDelete(MGEFF_EFFECTOR handle)
Deletes a effector.
#define EFFECTORNAME_MAX_LEN
Definition: mgeff-effector.h:160
MGEFF_EXPORT int mGEffEffectorAppendSource(MGEFF_EFFECTOR effector, MGEFF_SOURCE source)
Appends a source to effector.
int(* MGEFF_EFFECTOR_GETPROPERTY)(MGEFF_EFFECTOR effector, int property_id, int *pValue)
Type of effector get property callback functio.
Definition: mgeff-effector.h:91
void(* MGEFF_EFFECTOR_ONBEGINDRAW)(MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector)
Type of effector begin draw callback function.
Definition: mgeff-effector.h:121
MGEFF_EXPORT MGEFF_ANIMATION mGEffCreateRollerAnimation(HDC dc_rollup, HDC dc_expand, HDC dc_dst)
create a roller animation from specail dc.
int(* MGEFF_EFFECTOR_SETPROPERTY)(MGEFF_EFFECTOR effector, int property_id, int value)
effector callback
Definition: mgeff-effector.h:77
it contains whole info of an effector, if you want to custom an effector, implement it ...
Definition: mgeff-effector.h:165