mGEff API Reference
v1.2.0
An animation framework for MiniGUI apps
|
window animation headfile. More...
Go to the source code of this file.
Data Structures | |
struct | _MGEFF_WindowAnimCtxt |
Structure defines windows animation context. More... | |
Typedefs | |
typedef struct _MGEFF_WindowAnimCtxt | MGEFF_WindowAnimCtxt |
Structure defines windows animation context. | |
typedef void(* | SET_BKGND_CB) (HDC hdc, RECT *rc) |
call back used when updating backgroudn. More... | |
typedef void(* | DRAW_WND_CB) (HDC hdc1, HDC hdc2, RECT *rc) |
call back used to drawing window when window is moving. More... | |
typedef void(* | RENDER_HANDLER) (MGEFF_EFFECTOR effector) |
call back used to handle animation property. More... | |
typedef void(* | MGEFF_WINDOWANIM_CB) (MGEFF_WindowAnimCtxt *ctxt) |
Get the window foreground content(means snapshot) DC. More... | |
Functions | |
MGEFF_DECLARE_HANDLE (MGEFF_WINDOW_ANIMATION_CONTEXT) | |
The handle to the motioncurve. | |
HDC | mGEffGetWindowForeground (HWND hwnd, BOOL set_foreground) |
Get window foreground. More... | |
MGEFF_WINDOW_ANIMATION_CONTEXT | mGEffCreateWindowAnimationContext (int time, int effector_type, int curve_type, SET_BKGND_CB set_bkgnd_cb, DRAW_WND_CB draw_wnd_cb) |
Create window animation context. More... | |
void | mGEffDestroyWindowAnimationContext (MGEFF_WINDOW_ANIMATION_CONTEXT hctxt) |
Deletes window animation context. More... | |
HWND | mGEffCreateMainWindow (PMAINWINCREATE pCreateInfo, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt) |
create a main window and show the window with animation. More... | |
BOOL | mGEffShowWindow (HWND hwnd, int iCmdShow, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt) |
show main window with animation. More... | |
BOOL | mGEffMoveWindow (HWND hWnd, int x, int y, int w, int h, BOOL fPaint, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt) |
Moves window with animation. More... | |
BOOL | ControlExtract (HWND mainHwnd, int ctrl_id, PMAINWINCREATE pCreateInfo) |
Extracts a control from main window, and create a new main window take that control content. More... | |
BOOL | WindowExtract (HWND mainHwnd, RECT *rc, PMAINWINCREATE pCreateInfo) |
Extracts a rectangle from a main window, and create a new main window take the content in that rectangle. More... | |
BOOL | mGEffShowWindowEx (HWND hwnd, int iCmdShow, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt, MGEFF_WINDOWANIM_CB cb) |
show main window with animation which has a user defined window animation callback function. More... | |
HWND | mGEffCreateMainWindowEx (PMAINWINCREATE pCreateInfo, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt, MGEFF_WINDOWANIM_CB cb) |
show main window with animation which has a user defined window animation callback function. More... | |
RENDER_HANDLER | mGEffSetEffectorPropertyHandler (MGEFF_WINDOW_ANIMATION_CONTEXT hctxt, RENDER_HANDLER new_cb) |
Sets a new animation handle. More... | |
MGEFF_ANIMATION | mGEffMoveWindowPreparation (HWND hWnd, int x, int y, int w, int h, BOOL fPaint, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt) |
create an window animation ready to run. More... | |
window animation headfile.
============================================================================
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/>.
void(* DRAW_WND_CB)(HDC hdc1, HDC hdc2, RECT *rc) |
call back used to drawing window when window is moving.
hdc1 | The DC holds the content of the animated window. |
hdc2 | The DC to be drawn. |
rect | The area to be drawn. |
void(* MGEFF_WINDOWANIM_CB)(MGEFF_WindowAnimCtxt *ctxt) |
Get the window foreground content(means snapshot) DC.
hwnd | Which window will be snapshot. |
void(* RENDER_HANDLER)(MGEFF_EFFECTOR effector) |
call back used to handle animation property.
The | effector used to handle animation property. |
void(* SET_BKGND_CB)(HDC hdc, RECT *rc) |
call back used when updating backgroudn.
hdc | The background DC, a DC on which background is drawn. |
rc | The rectangle to be updated in the background. |
BOOL ControlExtract | ( | HWND | mainHwnd, |
int | ctrl_id, | ||
PMAINWINCREATE | pCreateInfo | ||
) |
Extracts a control from main window, and create a new main window take that control content.
This function creates a window according to pCreateInfo which contains the control specified by ctrl_id in window specifed by mainHwnd.
mainHwnd | handle of the window which contains the control. |
ctrl_id | id of the control. |
pCreateInfo | main window creating info for creating new window containing the control. |
HWND mGEffCreateMainWindow | ( | PMAINWINCREATE | pCreateInfo, |
MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt | ||
) |
create a main window and show the window with animation.
This function creates a window according to pCreateInfo and show the window with animation created according to hctxt.
pCreateInfo | main window creating info. |
hctxt | handle of the window animation context. |
HWND mGEffCreateMainWindowEx | ( | PMAINWINCREATE | pCreateInfo, |
MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt, | ||
MGEFF_WINDOWANIM_CB | cb | ||
) |
show main window with animation which has a user defined window animation callback function.
This function shows or hide an window with animation. iCmdShow determins show or hide the window. hctxt is the handle of window animation context based on which the window animation is created and cb is the window animation callback.
pCreateInfo | information of create window. |
hctxt | handle of the window animation context. |
cb | user defined window animation callback. |
MGEFF_WINDOW_ANIMATION_CONTEXT mGEffCreateWindowAnimationContext | ( | int | time, |
int | effector_type, | ||
int | curve_type, | ||
SET_BKGND_CB | set_bkgnd_cb, | ||
DRAW_WND_CB | draw_wnd_cb | ||
) |
Create window animation context.
This function creates a window animation context
time | duration of window animation. |
effector_type | the type of the effector used in window animation creation. |
curve_type | motion curve type of window animation. |
set_bkgnd_cb | the function for drawing background. |
draw_wnd_cb | function for drawing window. |
void mGEffDestroyWindowAnimationContext | ( | MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt | ) |
Deletes window animation context.
This function deletes a window animation context
hctxt | handle of the window animation context to be deleted. |
HDC mGEffGetWindowForeground | ( | HWND | hwnd, |
BOOL | set_foreground | ||
) |
Get window foreground.
This function return a DC which contain the foreground of the window specified by hwnd.
hwnd | window handle. |
set_foreground | whether change the visible property of window. |
BOOL mGEffMoveWindow | ( | HWND | hWnd, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
BOOL | fPaint, | ||
MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt | ||
) |
Moves window with animation.
This function moves the window specified by hWnd with animaiton. The end value of the animation is the window position and size specified by x, y, w, h respectively. The context of the window animation is specified by hctext.
hWnd | window handle. |
x | The x postion of the window when animation is finnished. |
y | The y postion of the window when animation is finnished. |
w | The w width of the window when animation is finnished. |
h | The h height of the window when animation is finnished. |
fPaint | Indicates whether the window should be repainted. |
hctxt | The window animation context. |
MGEFF_ANIMATION mGEffMoveWindowPreparation | ( | HWND | hWnd, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
BOOL | fPaint, | ||
MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt | ||
) |
create an window animation ready to run.
This function creates an animation for the window specified by hWnd. The end value of the animation is the window position and size specified by x, y, w, h respectively. The context of the window animation is specified by hctext.
hWnd | window handle. |
x | The x postion of the window when animation is finnished. |
y | The y postion of the window when animation is finnished. |
w | The w width of the window when animation is finnished. |
h | The h height of the window when animation is finnished. |
fPaint | Indicates whether the window should be repainted. |
hctxt | The window animation context. |
RENDER_HANDLER mGEffSetEffectorPropertyHandler | ( | MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt, |
RENDER_HANDLER | new_cb | ||
) |
Sets a new animation handle.
This function sets a new animation handler specified by new_cb to animation context specified by hctxt.
hctxt | handle of the window animation context to be set. |
new_cb | new window animation handler |
BOOL mGEffShowWindow | ( | HWND | hwnd, |
int | iCmdShow, | ||
MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt | ||
) |
show main window with animation.
This function shows or hide an window with animation. iCmdShow determins show or hide the window and the hctxt is the handle of window animation context based on which the window animation is created.
hwnd | the handle of the window. |
iCmdShow | show or hide the window. |
hctxt | handle of the window animation context |
BOOL mGEffShowWindowEx | ( | HWND | hwnd, |
int | iCmdShow, | ||
MGEFF_WINDOW_ANIMATION_CONTEXT | hctxt, | ||
MGEFF_WINDOWANIM_CB | cb | ||
) |
show main window with animation which has a user defined window animation callback function.
This function shows or hide an window with animation. iCmdShow determins show or hide the window. hctxt is the handle of window animation context based on which the window animation is created and cb is the window animation callback.
hwnd | the handle of the window. |
iCmdShow | show or hide the window. |
hctxt | handle of the window animation context. |
cb | user defined window animation callback. |
BOOL WindowExtract | ( | HWND | mainHwnd, |
RECT * | rc, | ||
PMAINWINCREATE | pCreateInfo | ||
) |
Extracts a rectangle from a main window, and create a new main window take the content in that rectangle.
This function creates a window according to pCreateInfo which contains the content in rectangle specified by rc in main window specifed by mainHwnd.
mainHwnd | handle of the main window from which then content will be extracted. |
rc | the rectangle in which the content will be extract. |
pCreateInfo | main window creating info for creating new window containing the extracted content. |