mGEff API Reference  v1.2.0
An animation framework for MiniGUI apps
mgeff-window-animation.h
Go to the documentation of this file.
1 
42 #ifndef _MGEFF_WINDOW_ANIMATION_H_
43 #define _MGEFF_WINDOW_ANIMATION_H_
44 
48 MGEFF_DECLARE_HANDLE(MGEFF_WINDOW_ANIMATION_CONTEXT);
49 
53 typedef struct _MGEFF_WindowAnimCtxt {
54  HDC src_dc;
55  HDC dst_dc;
56  HDC sink_dc;
57  HWND hwnd;
58  int duration;
59  int curve_type;
61 
69 typedef void (*SET_BKGND_CB)(HDC hdc, RECT *rc);
70 
79 typedef void (*DRAW_WND_CB)(HDC hdc1, HDC hdc2, RECT *rc);
80 
87 typedef void (*RENDER_HANDLER)(MGEFF_EFFECTOR effector);
88 
98 
114 HDC mGEffGetWindowForeground(HWND hwnd, BOOL set_foreground);
115 
137 MGEFF_WINDOW_ANIMATION_CONTEXT mGEffCreateWindowAnimationContext(int time,
138  int effector_type, int curve_type,
139  SET_BKGND_CB set_bkgnd_cb, DRAW_WND_CB draw_wnd_cb);
140 
154 void mGEffDestroyWindowAnimationContext(MGEFF_WINDOW_ANIMATION_CONTEXT hctxt);
155 
156 
175 HWND mGEffCreateMainWindow (PMAINWINCREATE pCreateInfo,
176  MGEFF_WINDOW_ANIMATION_CONTEXT hctxt);
177 
178 
199 BOOL mGEffShowWindow (HWND hwnd, int iCmdShow,
200  MGEFF_WINDOW_ANIMATION_CONTEXT hctxt);
201 
224 BOOL mGEffMoveWindow (HWND hWnd, int x, int y, int w, int h,
225  BOOL fPaint, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt);
226 
244 BOOL ControlExtract(HWND mainHwnd, int ctrl_id, PMAINWINCREATE pCreateInfo);
245 
265 BOOL WindowExtract(HWND mainHwnd, RECT *rc, PMAINWINCREATE pCreateInfo);
266 
288 BOOL mGEffShowWindowEx (HWND hwnd, int iCmdShow,
289  MGEFF_WINDOW_ANIMATION_CONTEXT hctxt, MGEFF_WINDOWANIM_CB cb);
290 
310 HWND mGEffCreateMainWindowEx(PMAINWINCREATE pCreateInfo,
311  MGEFF_WINDOW_ANIMATION_CONTEXT hctxt, MGEFF_WINDOWANIM_CB cb);
312 
329 RENDER_HANDLER mGEffSetEffectorPropertyHandler(MGEFF_WINDOW_ANIMATION_CONTEXT hctxt,
330  RENDER_HANDLER new_cb);
331 
355 MGEFF_ANIMATION mGEffMoveWindowPreparation(HWND hWnd,
356  int x, int y, int w, int h,
357  BOOL fPaint, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt);
358 
359 #endif
360 
Structure defines windows animation context.
Definition: mgeff-window-animation.h:53
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...
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...
HDC sink_dc
Definition: mgeff-window-animation.h:56
void(* SET_BKGND_CB)(HDC hdc, RECT *rc)
call back used when updating backgroudn.
Definition: mgeff-window-animation.h:69
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.
int curve_type
Definition: mgeff-window-animation.h:59
struct _MGEFF_WindowAnimCtxt MGEFF_WindowAnimCtxt
Structure defines windows animation context.
void(* RENDER_HANDLER)(MGEFF_EFFECTOR effector)
call back used to handle animation property.
Definition: mgeff-window-animation.h:87
HDC dst_dc
Definition: mgeff-window-animation.h:55
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 rectan...
HDC src_dc
Definition: mgeff-window-animation.h:54
RENDER_HANDLER mGEffSetEffectorPropertyHandler(MGEFF_WINDOW_ANIMATION_CONTEXT hctxt, RENDER_HANDLER new_cb)
Sets a new animation handle.
BOOL mGEffMoveWindow(HWND hWnd, int x, int y, int w, int h, BOOL fPaint, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt)
Moves window with animation.
HWND hwnd
Definition: mgeff-window-animation.h:57
BOOL mGEffShowWindow(HWND hwnd, int iCmdShow, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt)
show main window with animation.
int duration
Definition: mgeff-window-animation.h:58
HDC mGEffGetWindowForeground(HWND hwnd, BOOL set_foreground)
Get window foreground.
void(* DRAW_WND_CB)(HDC hdc1, HDC hdc2, RECT *rc)
call back used to drawing window when window is moving.
Definition: mgeff-window-animation.h:79
void mGEffDestroyWindowAnimationContext(MGEFF_WINDOW_ANIMATION_CONTEXT hctxt)
Deletes window animation context.
void(* MGEFF_WINDOWANIM_CB)(MGEFF_WindowAnimCtxt *ctxt)
Get the window foreground content(means snapshot) DC.
Definition: mgeff-window-animation.h:97
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...
MGEFF_DECLARE_HANDLE(MGEFF_WINDOW_ANIMATION_CONTEXT)
The handle to the motioncurve.
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.
HWND mGEffCreateMainWindow(PMAINWINCREATE pCreateInfo, MGEFF_WINDOW_ANIMATION_CONTEXT hctxt)
create a main window and show the window with animation.