mGEff API Reference  v1.2.0
An animation framework for MiniGUI apps
Data Structures | Macros | Typedefs | Enumerations | Functions
mgeff-effector.h File Reference

Effector headfile. More...

#include <stdint.h>
#include <minigui/common.h>
#include <minigui/minigui.h>
#include <minigui/gdi.h>
#include <minigui/window.h>
#include "mgeff-common.h"
#include "mgeff-animation.h"
#include "mgeff-effector-source.h"
#include "mgeff-effector-sink.h"

Go to the source code of this file.

Data Structures

struct  _EFFECTOROPS
 it contains whole info of an effector, if you want to custom an effector, implement it More...
 

Macros

#define EFFECTORNAME_MAX_LEN   31
 
#define MGEFF_MINOR_leafwindow   "leafwindow"
 
#define MGEFF_MINOR_zip   "zip"
 
#define MGEFF_MINOR_flip   "flip"
 
#define MGEFF_MINOR_cubicrotate   "cubicrotate"
 
#define MGEFF_MINOR_alpha   "alphablending"
 
#define MGEFF_MINOR_scroll   "scrollpage"
 
#define MGEFF_MINOR_zoom   "zoominzoomout"
 
#define MGEFF_MINOR_push   "pushpoll"
 
#define MGEFF_MINOR_clear   "clear"
 
#define MGEFF_MINOR_centersplit   "centersplit"
 
#define MGEFF_MINOR_radarscan   "radarscan"
 
#define MGEFF_MINOR_fivepointedstar   "fivepointedstar"
 
#define MGEFF_MINOR_roller   "roller"
 
#define MGEFF_MINOR_blockflip   "blockflip"
 
#define MGEFF_MINOR_es_cubicrotate   "opengles-cubicrotate"
 
#define MGEFF_MINOR_es_rectrotate   "opengles-rectrotate"
 
#define MGEFF_MINOR_es_coverflow   "opengles-coverflow"
 
#define MGEFF_MINOR_mgplus_rotate   "mgplus-rotate"
 
#define MGEFF_MINOR_mgplus_cubicrotate   "mgplus-cubicrotate"
 
#define MGEFF_MINOR_mgplus_flip   "mgplus-flip"
 
#define MGEFF_EFFECTOR_LEAFWINDOW   mGEffStr2Key(MGEFF_MINOR_leafwindow)
 
#define MGEFF_EFFECTOR_ZIP   mGEffStr2Key(MGEFF_MINOR_zip)
 
#define MGEFF_EFFECTOR_FLIP   mGEffStr2Key(MGEFF_MINOR_flip)
 
#define MGEFF_EFFECTOR_CUBIC_ROTATE   mGEffStr2Key(MGEFF_MINOR_cubicrotate)
 
#define MGEFF_EFFECTOR_ALPHA   mGEffStr2Key(MGEFF_MINOR_alpha)
 
#define MGEFF_EFFECTOR_SCROLL   mGEffStr2Key(MGEFF_MINOR_scroll)
 
#define MGEFF_EFFECTOR_ZOOM   mGEffStr2Key(MGEFF_MINOR_zoom)
 
#define MGEFF_EFFECTOR_PUSH   mGEffStr2Key(MGEFF_MINOR_push)
 
#define MGEFF_EFFECTOR_CLEAR   mGEffStr2Key(MGEFF_MINOR_clear)
 
#define MGEFF_EFFECTOR_CENTERSPLIT   mGEffStr2Key(MGEFF_MINOR_centersplit)
 
#define MGEFF_EFFECTOR_RADARSCAN   mGEffStr2Key(MGEFF_MINOR_radarscan)
 
#define MGEFF_EFFECTOR_FIVEPOINTEDSTAR   mGEffStr2Key(MGEFF_MINOR_fivepointedstar)
 
#define MGEFF_EFFECTOR_ROLLER   mGEffStr2Key(MGEFF_MINOR_roller)
 
#define MGEFF_EFFECTOR_BLOCKFLIP   mGEffStr2Key(MGEFF_MINOR_blockflip)
 
#define MGEFF_EFFECTOR_OPENGL_CUBICROTATE   mGEffStr2Key(MGEFF_MINOR_es_cubicrotate)
 
#define MGEFF_EFFECTOR_OPENGL_RECTROTATE   mGEffStr2Key(MGEFF_MINOR_es_rectrotate)
 
#define MGEFF_EFFECTOR_OPENGL_COVERFLOW   mGEffStr2Key(MGEFF_MINOR_es_coverflow)
 
#define MGEFF_EFFECTOR_MGPLUS_ROTATE   mGEffStr2Key(MGEFF_MINOR_mgplus_rotate)
 
#define MGEFF_EFFECTOR_MGPLUS_CUBIC_ROTATE   mGEffStr2Key(MGEFF_MINOR_mgplus_cubicrotate)
 
#define MGEFF_EFFECTOR_MGPLUS_FLIP   mGEffStr2Key(MGEFF_MINOR_mgplus_flip)
 
#define MGEFF_PROPERTY_DIRECTION   1
 effector property More...
 
#define MGEFF_PROPERTY_AXIS   2
 
#define MGEFF_PROPERTY_LEAFROWS   4
 
#define MGEFF_PROPERTY_LEAFVERTICAL   5
 
#define MGEFF_PROPERTY_ZOOM   6
 
#define MGEFF_PROPERTY_RESOURCE   7
 
#define MGEFF_PROPERTY_BACKGROUND   8
 
#define MGEFF_PROPERTY_PIECES   9
 
#define MGEFF_PROPERTY_STARTANGLE   10
 

Typedefs

typedef int(* MGEFF_EFFECTOR_SETPROPERTY) (MGEFF_EFFECTOR effector, int property_id, int value)
 effector callback More...
 
typedef int(* MGEFF_EFFECTOR_GETPROPERTY) (MGEFF_EFFECTOR effector, int property_id, int *pValue)
 Type of effector get property callback functio. More...
 
typedef 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. More...
 
typedef void(* MGEFF_EFFECTOR_ONBEGINDRAW) (MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector)
 Type of effector begin draw callback function. More...
 
typedef void(* MGEFF_EFFECTOR_ONENDDRAW) (MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector)
 Type of effector end draw callback function. More...
 
typedef MGEFF_EFFECTOR(* MGEFF_EFFECTOR_INIT) (MGEFF_EFFECTOR effector)
 Type of effector init callback function. More...
 
typedef void(* MGEFF_EFFECTOR_FINALIZE) (MGEFF_EFFECTOR effector)
 Type of effector finalize callback function. More...
 
typedef struct _EFFECTOROPS MGEFF_EFFECTOROPS
 it contains whole info of an effector, if you want to custom an effector, implement it
 

Enumerations

enum  LeafProperty { MGEFF_DIRECTION_LEFT2RIGHT = 0, MGEFF_DIRECTION_RIGHT2LEFT = 1, MGEFF_DIRECTION_TOP2BOTTOM = 2, MGEFF_DIRECTION_BOTTOM2TOP = 3 }
 LeafProperty.
 
enum  CenterSplitProperty { MGEFF_DIRECTION_CENTER2OUTSIDE_4 = 0, MGEFF_DIRECTION_OUTSIDE2CENTER_4 = 1, MGEFF_DIRECTION_CENTER2OUTSIDE_2 = 2, MGEFF_DIRECTION_OUTSIDE2CENTER_2 = 3 }
 CenterSplitProperty.
 
enum  AxisProperty { MGEFF_AXIS_X = 1, MGEFF_AXIS_Y = 2, MGEFF_AXIS_Z = 3 }
 AxisProperty.
 
enum  RotateDirectionProperty { MGEFF_CLOCKWISE = 0, MGEFF_CLOCKINVERSE = 1 }
 RotateDirectionProperty.
 
enum  ZoomProperty {
  MGEFF_DIRECTION_CENTER = 0, MGEFF_DIRECTION_LUP2RDOWN = 1, MGEFF_DIRECTION_LDOWN2RUP = 2, MGEFF_DIRECTION_RDOWN2LUP = 3,
  MGEFF_DIRECTION_RUP2LDOWN = 4
}
 ZoomProperty.
 
enum  ZoomTypeProperty { MGEFF_ZOOMIN, MGEFF_ZOOMOUT }
 ZoomTypeProperty. More...
 

Functions

 MGEFF_DECLARE_HANDLE (MGEFF_EFFECTOR)
 The handle to the effector.
 
MGEFF_EXPORT unsigned long mGEffStr2Key (const char *str)
 Generate hash key of string. More...
 
MGEFF_EXPORT MGEFF_EFFECTOR mGEffEffectorCreate (unsigned long key)
 Creates a effector. More...
 
MGEFF_EXPORT void mGEffEffectorDelete (MGEFF_EFFECTOR handle)
 Deletes a effector. More...
 
MGEFF_EXPORT void mGEffEffectorDeleteWithoutSink (MGEFF_EFFECTOR handle)
 Deletes a effector. More...
 
MGEFF_EXPORT int mGEffEffectorAppendSource (MGEFF_EFFECTOR effector, MGEFF_SOURCE source)
 Appends a source to effector. More...
 
MGEFF_EXPORT int mGEffEffectorSetSink (MGEFF_EFFECTOR effector, MGEFF_SINK sink)
 Sets the sink of a effector. More...
 
MGEFF_EXPORT MGEFF_SINK mGEffEffectorGetSink (MGEFF_EFFECTOR effector)
 Gets the sink of a effector. More...
 
MGEFF_EXPORT HDC mGEffEffectorGetSourceDC (MGEFF_EFFECTOR effector, int index)
 Gets the underlying DC of the source of a effector. More...
 
MGEFF_EXPORT int mGEffEffectorSetProperty (MGEFF_EFFECTOR handle, int property_id, int value)
 Sets the property of a effector. More...
 
MGEFF_EXPORT int mGEffEffectorGetProperty (MGEFF_EFFECTOR handle, int property_id, int *pValue)
 Sets the property of a effector. More...
 
MGEFF_EXPORT MGEFF_ANIMATION mGEffAnimationCreateWithEffector (MGEFF_EFFECTOR effector)
 Creates a animation with a effector. More...
 
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. More...
 
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. More...
 
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. More...
 
MGEFF_EXPORT MGEFF_BOOL mGEffEffectorRegister (const MGEFF_EFFECTOROPS *info)
 Register specail effector info. More...
 
MGEFF_EXPORT MGEFF_BOOL mGEffEffectorUnRegister (const MGEFF_EFFECTOROPS *info)
 UnRegister specail effector info. More...
 
MGEFF_EXPORT MGEFF_ANIMATION mGEffCreateRollerAnimation (HDC dc_rollup, HDC dc_expand, HDC dc_dst)
 create a roller animation from specail dc. More...
 
MGEFF_EXPORT void mGEffEffectorSetContext (MGEFF_EFFECTOR handle, void *context)
 Sets the effector context. More...
 
MGEFF_EXPORT void * mGEffEffectorGetContext (MGEFF_EFFECTOR handle)
 Gets the effector context. More...
 
MGEFF_EXPORT MGEFF_SOURCE mGEffEffectorGetSource (MGEFF_EFFECTOR handle, int index)
 Gets the effector source. More...
 
MGEFF_EXPORT MGEFF_EFFECTOROPSmGEffEffectorGetOps (unsigned long key)
 Gets the effector MGEFF_EFFECTOROPS ops. More...
 

Detailed Description

Effector headfile.

============================================================================

Author
Houhuihua
Version
1.0
Date
02/03/2010 05:18:25 PM
   This file is part of mGEff, a component for MiniGUI.

   Copyright (C) 2008~2018, Beijing FMSoft Technologies Co., Ltd.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.

   Or,

   As this program is a library, any link to this program must follow
   GNU General Public License version 3 (GPLv3). If you cannot accept
   GPLv3, you need to be licensed from FMSoft.

   If you have got a commercial license of this program, please use it
   under the terms and conditions of the commercial license.

   For more information about the commercial license, please refer to
   <http://www.minigui.com/en/about/licensing-policy/>.

Macro Definition Documentation

#define EFFECTORNAME_MAX_LEN   31

effector name max length

#define MGEFF_EFFECTOR_ALPHA   mGEffStr2Key(MGEFF_MINOR_alpha)

alpha

#define MGEFF_EFFECTOR_BLOCKFLIP   mGEffStr2Key(MGEFF_MINOR_blockflip)

block flip

#define MGEFF_EFFECTOR_CENTERSPLIT   mGEffStr2Key(MGEFF_MINOR_centersplit)

center split

#define MGEFF_EFFECTOR_CLEAR   mGEffStr2Key(MGEFF_MINOR_clear)

clear

#define MGEFF_EFFECTOR_CUBIC_ROTATE   mGEffStr2Key(MGEFF_MINOR_cubicrotate)

cubic rotate

#define MGEFF_EFFECTOR_FIVEPOINTEDSTAR   mGEffStr2Key(MGEFF_MINOR_fivepointedstar)

five pointed star

#define MGEFF_EFFECTOR_FLIP   mGEffStr2Key(MGEFF_MINOR_flip)

flip

#define MGEFF_EFFECTOR_LEAFWINDOW   mGEffStr2Key(MGEFF_MINOR_leafwindow)

leaf window

#define MGEFF_EFFECTOR_MGPLUS_CUBIC_ROTATE   mGEffStr2Key(MGEFF_MINOR_mgplus_cubicrotate)

mGPlus cubic rotate

#define MGEFF_EFFECTOR_MGPLUS_FLIP   mGEffStr2Key(MGEFF_MINOR_mgplus_flip)

mGPlus flip

#define MGEFF_EFFECTOR_MGPLUS_ROTATE   mGEffStr2Key(MGEFF_MINOR_mgplus_rotate)

mGPlus rotate

#define MGEFF_EFFECTOR_OPENGL_COVERFLOW   mGEffStr2Key(MGEFF_MINOR_es_coverflow)

OpenGL ES cover flow

#define MGEFF_EFFECTOR_OPENGL_CUBICROTATE   mGEffStr2Key(MGEFF_MINOR_es_cubicrotate)

OpenGL ES cubic rotate

#define MGEFF_EFFECTOR_OPENGL_RECTROTATE   mGEffStr2Key(MGEFF_MINOR_es_rectrotate)

OpenGL ES rect rotate

#define MGEFF_EFFECTOR_PUSH   mGEffStr2Key(MGEFF_MINOR_push)

push

#define MGEFF_EFFECTOR_RADARSCAN   mGEffStr2Key(MGEFF_MINOR_radarscan)

radar scan

#define MGEFF_EFFECTOR_ROLLER   mGEffStr2Key(MGEFF_MINOR_roller)

roller

#define MGEFF_EFFECTOR_SCROLL   mGEffStr2Key(MGEFF_MINOR_scroll)

scroll

#define MGEFF_EFFECTOR_ZIP   mGEffStr2Key(MGEFF_MINOR_zip)

zip

#define MGEFF_EFFECTOR_ZOOM   mGEffStr2Key(MGEFF_MINOR_zoom)

zoom

#define MGEFF_MINOR_alpha   "alphablending"

alpha blending

#define MGEFF_MINOR_blockflip   "blockflip"

block flip

#define MGEFF_MINOR_centersplit   "centersplit"

center split

#define MGEFF_MINOR_clear   "clear"

clear

#define MGEFF_MINOR_cubicrotate   "cubicrotate"

cubic rotate

#define MGEFF_MINOR_es_coverflow   "opengles-coverflow"

OpenGL ES cover flow

#define MGEFF_MINOR_es_cubicrotate   "opengles-cubicrotate"

OpenGL ES cubic rotate

#define MGEFF_MINOR_es_rectrotate   "opengles-rectrotate"

OpenGL ES rect rotate

#define MGEFF_MINOR_fivepointedstar   "fivepointedstar"

five pointed star

#define MGEFF_MINOR_flip   "flip"

flip

#define MGEFF_MINOR_leafwindow   "leafwindow"

leaf window

#define MGEFF_MINOR_mgplus_cubicrotate   "mgplus-cubicrotate"

mGPlus cubic rotate

#define MGEFF_MINOR_mgplus_flip   "mgplus-flip"

mGPlus flip

#define MGEFF_MINOR_mgplus_rotate   "mgplus-rotate"

mGPlus rotate

#define MGEFF_MINOR_push   "pushpoll"

push

#define MGEFF_MINOR_radarscan   "radarscan"

radar scan

#define MGEFF_MINOR_roller   "roller"

roller

#define MGEFF_MINOR_scroll   "scrollpage"

scroll page

#define MGEFF_MINOR_zip   "zip"

zip

#define MGEFF_MINOR_zoom   "zoominzoomout"

zoom

#define MGEFF_PROPERTY_AXIS   2

property axis

#define MGEFF_PROPERTY_BACKGROUND   8

property background

#define MGEFF_PROPERTY_DIRECTION   1

effector property

property direction

#define MGEFF_PROPERTY_LEAFROWS   4

property leaf rows

#define MGEFF_PROPERTY_LEAFVERTICAL   5

property leaf vertical

#define MGEFF_PROPERTY_PIECES   9

property pieces

#define MGEFF_PROPERTY_RESOURCE   7

property resource

#define MGEFF_PROPERTY_STARTANGLE   10

property startangle

#define MGEFF_PROPERTY_ZOOM   6

property zoom

Typedef Documentation

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.

It is going to be called every frame

Parameters
animationanimation handle
effectoreffector handle
sink_dcsink dc
idanimation id
valueanimation current value, startvalue <= value <= endvalue
void(* MGEFF_EFFECTOR_FINALIZE)(MGEFF_EFFECTOR effector)

Type of effector finalize callback function.

It is going to be called when you delete the effector with calling mGEffEffectorDelete.

Parameters
effectoreffector handle
int(* MGEFF_EFFECTOR_GETPROPERTY)(MGEFF_EFFECTOR effector, int property_id, int *pValue)

Type of effector get property callback functio.

Parameters
effectoreffector handle.
property_idproperty id.
pValueproperty value.
Returns
If success return *pValue, otherwise return -1.
MGEFF_EFFECTOR(* MGEFF_EFFECTOR_INIT)(MGEFF_EFFECTOR effector)

Type of effector init callback function.

It is going to be called when you create an effector with calling mGEffEffectorCreate or mGEffEffectorCreateEx.

Parameters
effector
Returns
if success, return effector handle, otherwise NULL.
void(* MGEFF_EFFECTOR_ONBEGINDRAW)(MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector)

Type of effector begin draw callback function.

It is going to be called when you create an animation with calling mGEffAnimationCreateWithEffector.

Parameters
animationanimation handle
effectoreffector handle
void(* MGEFF_EFFECTOR_ONENDDRAW)(MGEFF_ANIMATION animation, MGEFF_EFFECTOR effector)

Type of effector end draw callback function.

It is going to be called when the animation specified by animation is finished.

Parameters
animationanimation handle
effectoreffector handle
int(* MGEFF_EFFECTOR_SETPROPERTY)(MGEFF_EFFECTOR effector, int property_id, int value)

effector callback

Note
you will implement them, if you want to define custom effector.

Type of effector set property callback function .

Parameters
effectoreffector handle.
property_idproperty id.
valueproperty value.
Returns
If success return 0, otherwise return -1.

Enumeration Type Documentation

ZoomTypeProperty.

Enumerator
MGEFF_ZOOMIN 

zoom in

MGEFF_ZOOMOUT 

zoom out

Function Documentation

MGEFF_ANIMATION mGEffAnimationCreateWithEffector ( MGEFF_EFFECTOR  effector)

Creates a animation with a effector.

This function creates an animation whose SetProperty callback is a effector specified by effector and the id of the animation is specified by id.

Parameters
effectorthe handle of the effector.
Returns
the handle of the newly created animaiton.
See also
mGEffAnimationCreate, mGEffEffectorCreate.
MGEFF_ANIMATION mGEffCreateRollerAnimation ( HDC  dc_rollup,
HDC  dc_expand,
HDC  dc_dst 
)

create a roller animation from specail dc.

This function create a roller animation group with specified by dc_rollup, and dc_expand, the background is white.

Parameters
dc_rollupThe rollup dc.
dc_expandThe expand dc.
dc_dstThe output dc.
Returns
return animation handle.
See also
.
int mGEffEffectorAppendSource ( MGEFF_EFFECTOR  effector,
MGEFF_SOURCE  source 
)

Appends a source to effector.

This function appends a source specified by source to a effector specified by effector.

Note
a effector usually has two sources.
Parameters
effectorthe handle of the effector to which source is appended.
sourcethe source to be appended.
See also
mGEffEffectorSetSink.
MGEFF_EFFECTOR mGEffEffectorCreate ( unsigned long  key)

Creates a effector.

This function creates a effector of certain type specified by type.

Parameters
keythe hash key of the effector.
Returns
handle the handle of the effector.
See also
mGEffEffectorDelete.
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.

This function creates a effector with source DCs specified by src1_dc and by src2_dc and the destination DC specified by dst_dc. The effector type is specified by type.

  • Parameters
    src1_dcThe first DC of the effector.
    src2_dcThe secondary DC of the effector.
    dst_dcThe destination DC of the effector.
    keyThe hash key of the effector to be used.
    Returns
    The handle to the newly created effector.
    See also
    mGEffAnimationCreate, mGEffEffectorCreate.
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.

This function creates a effector with source DCs specified by src1_dc and by src2_dc. The effector type is specified by type.

  • Parameters
    src1_dcThe first DC of the effector.
    src2_dcThe secondary DC of the effector.
    keyThe hash key of the effector to be used.
    Returns
    The handle to the newly created effector.
    See also
    mGEffEffectorCreateEx, mGEffEffectorCreate.
void mGEffEffectorDelete ( MGEFF_EFFECTOR  handle)

Deletes a effector.

This function deletes a effector specified by handle. source sink and destination sink will also be deleted.

Parameters
handlethe handle of the effector.
See also
mGEffEffectorCreate.
void mGEffEffectorDeleteWithoutSink ( MGEFF_EFFECTOR  handle)

Deletes a effector.

This function deletes a effector specified by handle. source sink and destination sink will NOT be deleted.

Parameters
handlethe handle of the effector.
See also
mGEffEffectorDelete.
void * mGEffEffectorGetContext ( MGEFF_EFFECTOR  handle)

Gets the effector context.

This function gets the context of the effector specified by handle.

Parameters
handleThe hanle of the effector.
Returns
The context of the effector.
Note
See also
mGEffEffectorSetContext.
MGEFF_EFFECTOROPS * mGEffEffectorGetOps ( unsigned long  key)

Gets the effector MGEFF_EFFECTOROPS ops.

This function gets the ops of the effector specified by hash key.

Parameters
keyThe hash key of the effector.
Returns
The ops of the effector.
See also
int mGEffEffectorGetProperty ( MGEFF_EFFECTOR  handle,
int  property_id,
int *  pValue 
)

Sets the property of a effector.

This function gets the property specified by property_id of a effector specified by effector.

Parameters
handlethe handle of the effector.
property_idthe identifier of the property.
pValuethe address of the property value.
Returns
0 when successful, otherwise -1;
See also
mGEffEffectorSetProperty.
MGEFF_SINK mGEffEffectorGetSink ( MGEFF_EFFECTOR  effector)

Gets the sink of a effector.

This function gets the sink of a effector specified by effector.

Parameters
effectorthe handle of the effector.
Returns
sink the handle of the sink of the effector.
See also
mGEffEffectorSetSink.
MGEFF_SOURCE mGEffEffectorGetSource ( MGEFF_EFFECTOR  handle,
int  index 
)

Gets the effector source.

This function gets the source of effector specified by index of source, first source add to effector is zero, next increase sequence.

Parameters
handleThe hanle of the effector.
indexThe index of the effector source.
Returns
The source handle of the source.
See also
HDC mGEffEffectorGetSourceDC ( MGEFF_EFFECTOR  effector,
int  index 
)

Gets the underlying DC of the source of a effector.

This function gets the DC of the source of a effector specified by effector by index specified by index.

Note
the sources of a effector are indexed according to the timing when they are appended to the effector.
Parameters
effectorthe handle of the effector.
indexof the source in the effector.
Returns
the underlying DC of the source.
See also
.
MGEFF_BOOL mGEffEffectorRegister ( const MGEFF_EFFECTOROPS info)

Register specail effector info.

This function register a effector with specified by info, Before user create effector it must be register first.

Parameters
infoThe effector info.
Returns
MGEE_TRUE if UnRegister success, else return MGEFF_FALSE.
See also
mGEffEffectorUnRegister.
void mGEffEffectorSetContext ( MGEFF_EFFECTOR  handle,
void *  context 
)

Sets the effector context.

This function sets the context of the effector specified by handle to context.

Parameters
handleThe hanle of the effector.
contextThe context to be set.
Note
See also
mGEffEffectorGetContext.
int mGEffEffectorSetProperty ( MGEFF_EFFECTOR  handle,
int  property_id,
int  value 
)

Sets the property of a effector.

This function sets the property specified by property_id of a effector specified by effector to new value specified by value.

Parameters
handlethe handle of the effector.
property_idthe identifier of the property.
valuenew value of the property.
Returns
0 when successful, otherwise -1;
See also
mGEffEffectorAppendSource.
int mGEffEffectorSetSink ( MGEFF_EFFECTOR  effector,
MGEFF_SINK  sink 
)

Sets the sink of a effector.

This function sets the sink of a effector specified by effector to sink specified by sink.

Note
a effector contains one and only one sink which is used to present the result the effector produce.
Parameters
effectorthe handle of the effector to which source is appended.
sinksource the source to be appended.
See also
mGEffEffectorGetSink.
MGEFF_BOOL mGEffEffectorUnRegister ( const MGEFF_EFFECTOROPS info)

UnRegister specail effector info.

This function unregister a effector with specified by info.

Parameters
infoThe effector info.
Returns
MGEE_TRUE if UnRegister success, else return MGEFF_FALSE.
See also
mGEffEffectorRegister.
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.

This function creates and run an animation whose SetProperty callback is a effector specified by type. The sources of the effector are specified by src1_dc and src2_dc respectively. The destination DC of the effector is specified by dst_dc. The duration of the animation is specified by duration.

Parameters
hwndThe window handle in animation thread.
src1_dcThe first DC of the effector.
src2_dcThe secondary DC of the effector.
dst_dcThe destination DC of the effector.
keyThe hash key of the effector to be used.
durationThe duaration of the animation to be run.
Returns
0 if successful, otherwise -1;
See also
mGEffAnimationCreate, mGEffEffectorCreate.
unsigned long mGEffStr2Key ( const char *  str)

Generate hash key of string.

This function return the hash key of specified by string.

Parameters
strThe input string.
Returns
The hash key of the special string
See also
mGEffEffectorCreateEx, mGEffEffectorCreate.