MiniGUI API Reference (MiniGUI-Threads)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Structures | Macros | Typedefs | Functions
Message or event hook functions

Data Structures

struct  _HOOKINFO
 

Macros

#define HOOK_GOON   0
 
#define HOOK_STOP   1
 

Typedefs

typedef int(* MSGHOOK) (void *context, HWND dst_wnd, UINT msg, WPARAM wparam, LPARAM lparam)
 Type of message hook function. More...
 
typedef struct _HOOKINFO HOOKINFO
 

Functions

MG_EXPORT MSGHOOK GUIAPI RegisterKeyMsgHook (void *context, MSGHOOK hook)
 Registers a key message hook. More...
 
MG_EXPORT MSGHOOK GUIAPI RegisterMouseMsgHook (void *context, MSGHOOK hook)
 Registers a mouse message hook. More...
 

Detailed Description

Macro Definition Documentation

#define HOOK_GOON   0
See also
SRVEVTHOOK RegisterKeyHookWindow RegisterMouseHookWindow

Definition at line 2892 of file window.h.

#define HOOK_STOP   1
See also
SRVEVTHOOK RegisterKeyHookWindow RegisterMouseHookWindow

Definition at line 2898 of file window.h.

Typedef Documentation

typedef struct _HOOKINFO HOOKINFO

Structure defines a message hook.

typedef int(* MSGHOOK)(void *context, HWND dst_wnd, UINT msg, WPARAM wparam, LPARAM lparam)

Type of message hook function.

Definition at line 2908 of file window.h.

Function Documentation

MSGHOOK GUIAPI RegisterKeyMsgHook ( void *  context,
MSGHOOK  hook 
)

Registers a key message hook.

This function registers a key message hook pointed to by hook.

When the desktop receives a key message, it will send it to the hook first, and passes the context value to the hook as the first argument.

Parameters
contextThe context value will be passed to the hook.
hookThe hook. This function will unregister the old hook if hook is NULL.
Returns
The old hook.
See also
UnregisterHook, KEYMSGHOOK
MSGHOOK GUIAPI RegisterMouseMsgHook ( void *  context,
MSGHOOK  hook 
)

Registers a mouse message hook.

This function registers a mouse message hook pointed to by hook.

When the desktop receives a mouse message, it will send it to the hook first, and passes the context value to the hook as the first argument.

Parameters
contextThe context value will be passed to the hook.
hookThe hook. This function will unregister the old hook if hook is NULL.
Returns
The old hook.
See also
UnregisterHook, KEYMSGHOOK