MiniGUI API Reference (MiniGUI-Standalone)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Macros | |
#define | NotifyParent(hwnd, id, code) NotifyParentEx(hwnd, id, code, 0) |
Sends a notification message to the parent, but without additional data. More... | |
#define | Beep Ping |
Alias of Ping. More... | |
Typedefs | |
typedef int(* | STRCMP) (const char *s1, const char *s2, size_t n) |
Type of general strncmp function. More... | |
Enumerations |
Functions | |
MG_EXPORT void GUIAPI | DisabledTextOutEx (HDC hdc, HWND hwnd, int x, int y, const char *szText) |
Outputs disabled (grayed) text. More... | |
MG_EXPORT HWND | CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms, const char *text,...) |
Creates a tool tip window. More... | |
MG_EXPORT void | ResetToolTipWin (HWND hwnd, int x, int y, const char *text,...) |
Resets a tool tip window. More... | |
MG_EXPORT void | DestroyToolTipWin (HWND hwnd) |
Destroies a tool tip window. More... | |
MG_EXPORT void GUIAPI | NotifyParentEx (HWND hwnd, LINT id, int code, DWORD add_data) |
Sends a notification message to the parent. More... | |
MG_EXPORT void GUIAPI | Ping (void) |
Makes a beep sound. More... | |
MG_EXPORT void GUIAPI | Tone (int frequency_hz, int duration_ms) |
Makes a tone. More... | |
MG_EXPORT void *GUIAPI | GetOriginalTermIO (void) |
Gets termios structure of the original terminal before initializing MiniGUI. More... | |
#define NotifyParent | ( | hwnd, | |
id, | |||
code | |||
) | NotifyParentEx(hwnd, id, code, 0) |
Sends a notification message to the parent, but without additional data.
hwnd | The handle to current control window. |
id | The identifier of current control. |
code | The notification code. |
Definition at line 218 of file ctrlhelper.h.
typedef int(* STRCMP)(const char *s1, const char *s2, size_t n) |
Type of general strncmp function.
The function compares the two strings s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
Note that it only compares the first (at most) n characters of s1 and s2.
Definition at line 231 of file ctrlhelper.h.
enum SBPolicyType |
Scroll bar display policies in scrolled window.
Enumerator | |
---|---|
SB_POLICY_ALWAYS |
The scroll bar is always visible |
SB_POLICY_AUTOMATIC |
The scroll bar is shown or hided automatically |
SB_POLICY_NEVER |
The scroll bar is never visbile |
Definition at line 77 of file ctrlhelper.h.
Creates a tool tip window.
This function creates a tool tip window and returns the handle to it. You can call DestroyToolTipWin to destroy it. This function also receives printf-like arguments to format a string.
Note that the tool tip window will disappear automatically after the specified milliseconds by timeout_ms if timeout_ms is larger than 9 ms.
hParentWnd | The hosting main window. |
x | The position of the tool tip window. |
y | The position of the tool tip window. |
timeout_ms | The timeout value of the tool tip window. |
text | The format string. |
void DestroyToolTipWin | ( | HWND | hwnd | ) |
Destroies a tool tip window.
This function destroies the specified tool tip window hwnd, which is returned by CreateToolTipWin.
hwnd | The handle to the tool tip window. |
Outputs disabled (grayed) text.
This function outputs a grayed text at the specified position.
hdc | The device context. |
hwnd | Tell the function to draw with the color definitions of this window. |
x | The x-coordinate of start point. |
y | The y-coordinate of start point. |
szText | The null-terminated text to be output. |
void *GUIAPI GetOriginalTermIO | ( | void | ) |
Gets termios structure of the original terminal before initializing MiniGUI.
Sends a notification message to the parent.
By default, the notification from a control will be sent to its parent window within a MSG_COMMAND messsage.
Since version 1.2.6, MiniGUI defines the Nofication Callback Procedure for control. You can specify a callback function for a control by calling SetNotificationCallback to receive and handle the notification from the control.
If you have defined the Notificaton Callback Procedure for the control, calling NotifyParentEx will call the notification callback procedure, not send the notification message to the parent.
Note that if the control has WS_EX_NOPARENTNOTIFY style, this function will not notify the parent.
hwnd | The handle to current control window. |
id | The identifier of current control. |
code | The notification code. |
add_data | The additional data of the notification. |
void GUIAPI Ping | ( | void | ) |
Makes a beep sound.
void ResetToolTipWin | ( | HWND | hwnd, |
int | x, | ||
int | y, | ||
const char * | text, | ||
... | |||
) |
Resets a tool tip window.
This function resets the tool tip window specified by hwnd, including its position, text displayed in it, and the visible status. If the tool tip is invisible, it will become visible.
This function also receives printf-like arguments to format a string.
hwnd | The tool tip window handle returned by CreateToolTipWin. |
x | The new position of the tool tip window. |
y | The new position of the tool tip window. |
text | The new format string. |
void GUIAPI Tone | ( | int | frequency_hz, |
int | duration_ms | ||
) |
Makes a tone.
This function will return after the tone. Thus, your program will be blocked when the tone is being played.
frequency_hz | The frequency of the tone in hertz. |
duration_ms | The duration of the tone in millisecond. |