MiniGUI API Reference (MiniGUI-Standalone)
v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Typedefs | |
typedef int(* | MSGHOOK) (void *context, HWND dst_wnd, UINT msg, WPARAM wparam, LPARAM lparam) |
Type of message hook function. More... | |
typedef int(* | SRVEVTHOOK) (PMSG pMsg) |
The type of the event hook. More... | |
Functions | |
MG_EXPORT MSGHOOK GUIAPI | RegisterEventHookFunc (int event_type, MSGHOOK hook, void *context) |
Registers an input event message hook function. More... | |
static MSGHOOK GUIAPI | RegisterKeyMsgHook (void *context, MSGHOOK hook) |
Register a key message hook function. More... | |
static MSGHOOK GUIAPI | RegisterMouseMsgHook (void *context, MSGHOOK hook) |
Register a mouse message hook function. More... | |
MG_EXPORT BOOL GUIAPI | RegisterEventHookWindow (HWND hwnd, DWORD flags) |
Register an input event message hook window. More... | |
MG_EXPORT BOOL GUIAPI | UnregisterEventHookWindow (HWND hwnd) |
Unregister an input event message hook window. More... | |
MG_EXPORT HWND GUIAPI | RegisterKeyHookWindow (HWND hwnd, DWORD flag) |
Register a key message hook window. More... | |
MG_EXPORT HWND GUIAPI | RegisterMouseHookWindow (HWND hwnd, DWORD flag) |
Registers a mouse message hook window. More... | |
MG_EXPORT SRVEVTHOOK GUIAPI | SetServerEventHook (SRVEVTHOOK SrvEvtHook) |
Set an event hook in the server of MiniGUI-Processes. More... | |
Type of message hook function.
This is the type of a message hook function.
context | The context which was set when you registered the hook function. |
dst_wnd | The handle of the original destination window of the message. |
msg | The message identifier. |
wparam | The first parameter of the message. |
lparam | The second paramter of the message. |
typedef int(* SRVEVTHOOK)(PMSG pMsg) |
The type of the event hook.
You can call SetServerEventHook to set an event hook in the server of the MiniGUI-Processes or under MiniGUI-Standalone runtime mode.
If the event hook returns HOOK_GOON, MiniGUI will continue to handle the event, and post it to the active client. If the hook returns HOOK_STOP, MiniGUI will cancel subsequent handling.
Registers an input event message hook function.
This function registers an input event message hook function pointed to by hook. When the desktop receives an input event message with the specified event type event_type, it will call the hook function first, and passes the context value to the hook as the first argument.
event_type | Which type of event to be hooked. The value of this argument should be a one of the following values:
|
hook | The pointer to the hook function. This function will unregister the old hook for the specified event type if hook is NULL. |
context | The context value will be passed to the hook function. |
Since 5.0.0
Register an input event message hook window.
This function registers the specified window hwnd as an input event message hook window. When MiniGUI receives an input event message, it will post it to the hook window first.
hwnd | The hook hwnd. |
flags | The flags indicating the event types hooked event and whether stop or continue handling the hooked events. The value of this argument should be OR'd with one or more event types and HOOK_GOON or HOOK_STOP:
|
Since 5.0.0.
Register a key message hook window.
This function registers a window specified by hwnd as the key message hook window. When MiniGUI receives a key message, it will post it to the hooked window first.
hwnd | The handle of the hook window. This function will unregister the old hook if hwnd is HWND_NULL. |
flag | Indicating whether stop or continue handling the hooked messages; HOOK_GOON to continue, HOOK_STOP to stop. |
Register a key message hook function.
This function registers a key message hook pointed to by hook. When the desktop receives a key message, it will call the hook function first, and passes the context value to the hook as the first argument.
context | The context value will be passed to the hook. |
hook | The pointer to the hook function. This function will unregister the old hook if hook is NULL. |
Registers a mouse message hook window.
This function registers a window specified by hwnd as the mouse message hook window. When MiniGUI receives a mouse message, it will post it to the hooked window first.
hwnd | The handle of the hook window. This function will unregister the old hook if hwnd is HWND_NULL. |
flag | Indicating whether stop or continue handling the hooked messages; HOOK_GOON to continue, HOOK_STOP to stop. |
Register a mouse message hook function.
This function registers a mouse message hook pointed to by hook. When the desktop receives a mouse message, it will call the hook function first, and passes the context value to the hook as the first argument.
context | The context value will be passed to the hook function. |
hook | The pointer to the hook function. This function will unregister the old hook if hook is NULL. |
SRVEVTHOOK GUIAPI SetServerEventHook | ( | SRVEVTHOOK | SrvEvtHook | ) |
Set an event hook in the server of MiniGUI-Processes.
This function sets the event hook as SrvEvtHook for the server of MiniGUI-Processes or MiniGUI-Standalone.
SrvEvtHook | The pointer to the hook, NULL to cancel the hook. |
Unregister an input event message hook window.
This function unregisters the specified window hwnd from the hook list.
hwnd | The hook hwnd. |
Since 5.0.0.