41 #ifndef _MGEFF_ANIMATION_H_ 42 #define _MGEFF_ANIMATION_H_ 56 #define MGEFF_INFINITE -1 179 void *target, intptr_t id,
void *value);
196 void *s,
void *e,
void *v,
float factor);
209 typedef void *(*MGEFF_VARMALLOC_CB)(MGEFF_ANIMATION handle);
362 static inline void mGEffAnimationSetDuration(MGEFF_ANIMATION handle,
380 static inline int mGEffAnimationGetDuration(MGEFF_ANIMATION handle)
Definition: mgeff-animation.h:69
void(* MGEFF_STATECHANGED_CB)(MGEFF_ANIMATION handle, enum EffState newEffState, enum EffState oldEffState)
Type of animation state change callback function.
Definition: mgeff-animation.h:142
MGEFF_EXPORT void mGEffAnimationSetContext(MGEFF_ANIMATION handle, void *context)
Sets the animation context.
MGEFF_EXPORT void mGEffAnimationStop(MGEFF_ANIMATION handle)
Stops a running animation.
int duration
Definition: mgeff-animation.h:646
EffDirection
animation direction
Definition: mgeff-animation.h:89
MGEFF_EXPORT void mGEffAnimationSetCurveEx(MGEFF_ANIMATION handle, MGEFF_MOTIONCURVE_CB cb)
Sets the motion cureve of the animation.
Definition: mgeff-animation.h:82
MGEFF_EXPORT int mGEffAnimationGetProperty(MGEFF_ANIMATION handle, enum EffAnimProperty id)
Gets property of an animation.
Definition: mgeff-animation.h:105
Definition: mgeff-animation.h:116
Definition: mgeff-animation.h:100
MGEFF_EXPORT MGEFF_ANIMATION mGEffAnimationCreateEx(void *target, MGEFF_SETPROPERTY_CB setproperty, intptr_t id, int size, MGEFF_VARMALLOC_CB cb1, MGEFF_CALCVALUE_CB cb2)
Create an animation.
EffMotionType
the type of predefined motion curve
Definition: mgeff-motioncurve.h:71
Definition: mgeff-animation.h:67
Definition: mgeff-animation.h:64
MGEFF_EXPORT MGEFF_MOTIONCURVE mGEffAnimationGetCurve(MGEFF_ANIMATION handle)
Gets the motion cureve of the animation.
MGEFF_EXPORT int mGEffAnimationSyncRun(MGEFF_ANIMATION handle)
Run the animation in the default schedular synchronous.
MGEFF_EXPORT void mGEffAnimationSetCurLoopChangedCb(MGEFF_ANIMATION handle, MGEFF_CURLOOPCHANGED_CB cb)
Sets the animation CurLoopChanged callback function.
float(* MGEFF_MOTIONCURVE_CB)(float progress)
Type of the value calculating callback of the motion curve fuction.
Definition: mgeff-motioncurve.h:55
MGEFF_EXPORT void mGEffAnimationPause(MGEFF_ANIMATION handle)
Pauses a running animation.
Definition: mgeff-animation.h:102
Definition: mgeff-animation.h:65
MGEFF_EXPORT int mGEffAnimationAsyncRun(MGEFF_ANIMATION handle)
Run the animation in the default schedular asynchronous.
Definition: mgeff-animation.h:68
enum EffVariantType type
Definition: mgeff-animation.h:642
void(* MGEFF_SETPROPERTY_CB)(MGEFF_ANIMATION handle, void *target, intptr_t id, void *value)
Type of animation set property function. This fuction is used to produce every animation frame when a...
Definition: mgeff-animation.h:178
void(* MGEFF_CURLOOPCHANGED_CB)(MGEFF_ANIMATION handle)
Type of animation current loop changed callback function.
Definition: mgeff-animation.h:153
void(* MGEFF_FINISHED_CB)(MGEFF_ANIMATION handle)
Type of animation finished callback function.
Definition: mgeff-animation.h:128
MGEFF_EXPORT const void * mGEffAnimationGetStartValue(MGEFF_ANIMATION handle)
Get the animation start value.
MGEFF_EXPORT void * mGEffAnimationGetTarget(MGEFF_ANIMATION handle)
Gets the target of the animation.
Definition: mgeff-animation.h:91
Definition: mgeff-animation.h:90
Definition: mgeff-animation.h:107
Definition: mgeff-animation.h:63
EffAnimationType
group animation
Definition: mgeff-animation.h:115
Definition: mgeff-animation.h:640
Definition: mgeff-animation.h:80
MGEFF_EXPORT void mGEffAnimationDelete(MGEFF_ANIMATION handle)
Deletes an animation.
MGEFF_DECLARE_HANDLE(MGEFF_ANIMATION)
The handle to the animation.
Definition: mgeff-animation.h:101
EffAnimProperty
animation property
Definition: mgeff-animation.h:62
MGEFF_EXPORT void mGEffAnimationSetProperty(MGEFF_ANIMATION handle, enum EffAnimProperty id, int value)
Sets property of an animation.
const void * end_value
Definition: mgeff-animation.h:644
#define MGEFF_EXPORT
Definition: mgeff-common.h:52
void * property
Definition: mgeff-animation.h:641
enum EffMotionType curve
Definition: mgeff-animation.h:645
const void * start_value
Definition: mgeff-animation.h:643
int MGEFF_BOOL
type of MGEFF_BOOL
Definition: mgeff-common.h:67
MGEFF_EXPORT void mGEffAnimationSetStateChangedCb(MGEFF_ANIMATION handle, MGEFF_STATECHANGED_CB cb)
Sets the animation StateChanged callback function.
Definition: mgeff-animation.h:99
void(* MGEFF_CALCVALUE_CB)(MGEFF_ANIMATION handle, void *s, void *e, void *v, float factor)
Type of animation motion curve callback function.
Definition: mgeff-animation.h:195
void *(* MGEFF_VARMALLOC_CB)(MGEFF_ANIMATION handle)
Type of animation memory allocating callback function.
Definition: mgeff-animation.h:209
MGEFF_EXPORT const void * mGEffAnimationGetEndValue(MGEFF_ANIMATION handle)
Get the animation end value.
MGEFF_EXPORT void mGEffAnimationSetEndValue(MGEFF_ANIMATION handle, const void *value)
set the animation end value.
MGEFF_EXPORT MGEFF_BOOL mGEffAnimationWait(void *hWnd, MGEFF_ANIMATION handle)
Wait an animation.
EffVariantType
animation variant
Definition: mgeff-animation.h:98
Definition: mgeff-animation.h:117
MGEFF_EXPORT void mGEffAnimationSetDirChangedCb(MGEFF_ANIMATION handle, MGEFF_DIRCHANGED_CB cb)
Sets the animation DirChanged callback function.
Definition: mgeff-animation.h:78
MGEFF_EXPORT void mGEffAnimationSetFinishedCb(MGEFF_ANIMATION handle, MGEFF_FINISHED_CB cb)
Sets the animation Finished callback function.
Definition: mgeff-animation.h:103
Definition: mgeff-animation.h:81
Definition: mgeff-animation.h:66
void(* MGEFF_DIRCHANGED_CB)(MGEFF_ANIMATION handle)
Type of animation direction changed callback function.
Definition: mgeff-animation.h:163
Definition: mgeff-animation.h:106
MGEFF_FINISHED_CB cb
Definition: mgeff-animation.h:647
MGEFF_EXPORT void * mGEffAnimationGetContext(MGEFF_ANIMATION handle)
Gets the animation context.
struct _PropertyAnimationSetting EffPropertyAnimationSetting
MGEFF_EXPORT MGEFF_ANIMATION mGEffAnimationCreate(void *target, MGEFF_SETPROPERTY_CB setproperty, intptr_t id, enum EffVariantType varianttype)
Creates an animation.
MGEFF_EXPORT void mGEffAnimationSetCurve(MGEFF_ANIMATION handle, enum EffMotionType type)
Sets the motion cureve of the animation.
EffState
animation state
Definition: mgeff-animation.h:77
Definition: mgeff-animation.h:79
MGEFF_EXPORT void mGEffAnimationSetStartValue(MGEFF_ANIMATION handle, const void *value)
set the animation start value.
Definition: mgeff-animation.h:104
MGEFF_EXPORT MGEFF_ANIMATION mGEffCreatePropertyAnimation(const EffPropertyAnimationSetting *settings)
Create an animation group ready to run.
MGEFF_EXPORT void mGEffAnimationResume(MGEFF_ANIMATION handle)
Resumes a paused animation.