MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
window.h File Reference

This file includes windowing interfaces of MiniGUI. More...

#include "common.h"
#include <stddef.h>
#include <stdlib.h>
#include <pthread.h>
#include <semaphore.h>

Go to the source code of this file.

Data Structures

struct  _MSG
 
struct  _WINDOW_ELEMENT_ATTR
 
struct  _LFSCROLLBARINFO
 
struct  _SCROLLBARDATA
 
struct  _LFRDR_WINSTYLEINFO
 
struct  _LFRDR_TRACKBARINFO
 
struct  _WINDOW_ELEMENT_RENDERER
 
struct  _WINDOWINFO
 
struct  _MAINWINCREATE
 
struct  _SCROLLINFO
 
struct  _WNDCLASS
 
struct  _IME_TARGET_INFO
 
struct  _MENUITEMINFO
 
struct  _CTRLDATA
 
struct  _DLGTEMPLATE
 

Macros

#define MSG_LBUTTONDOWN   0x0001
 Left mouse button down message. More...
 
#define MSG_LBUTTONUP   0x0002
 Left mouse button up message. More...
 
#define MSG_LBUTTONDBLCLK   0x0003
 Left mouse button double clicked message. More...
 
#define MSG_MOUSEMOVE   0x0004
 The mouse moved message. More...
 
#define MSG_RBUTTONDOWN   0x0005
 Right mouse button down message. More...
 
#define MSG_RBUTTONUP   0x0006
 Right mouse button up message. More...
 
#define MSG_RBUTTONDBLCLK   0x0007
 Right mouse button double clicked message. More...
 
#define MSG_MBUTTONDOWN   0x0008
 Middle mouse button down message. More...
 
#define MSG_MBUTTONUP   0x0009
 Middle mouse button up message. More...
 
#define MSG_MBUTTONDBLCLK   0x000A
 Middle mouse button double clicked message. More...
 
#define MSG_NCLBUTTONDOWN   0x000B
 Left mouse button down message in the non-client area. More...
 
#define MSG_NCLBUTTONUP   0x000C
 Left mouse button up message in the non-client area. More...
 
#define MSG_NCLBUTTONDBLCLK   0x000D
 Left mouse button double clicked in the non-client area. More...
 
#define MSG_NCMOUSEMOVE   0x000E
 Mouse moves in the non-client area. More...
 
#define MSG_NCRBUTTONDOWN   0x000F
 Right mouse button down message in the non-client area. More...
 
#define MSG_NCRBUTTONUP   0x0010
 Right mouse button up message in the non-client area. More...
 
#define MSG_NCRBUTTONDBLCLK   0x0011
 Right mouse button double clicked in the non-client area. More...
 
#define MSG_NCMBUTTONDOWN   0x0012
 Middle mouse button down message in the non-client area. More...
 
#define MSG_NCMBUTTONUP   0x0013
 Middle mouse button up message in the non-client area. More...
 
#define MSG_NCMBUTTONDBLCLK   0x0014
 Middle mouse button double clicked in the non-client area. More...
 
#define MSG_KEYDOWN   0x0015
 User presses a key down. More...
 
#define MSG_CHAR   0x0016
 A character translated from MSG_KEYDOWN message. More...
 
#define MSG_KEYUP   0x0017
 User releases up a key. More...
 
#define MSG_SYSKEYDOWN   0x0018
 User presses down a key when <Alt> key is down. More...
 
#define MSG_SYSCHAR   0x0019
 A system character translated from MSG_SYSKEYDOWN message. More...
 
#define MSG_SYSKEYUP   0x001A
 User releases up a key when <Alt> key is down. More...
 
#define MSG_KEYLONGPRESS   0x001B
 A key is long pressed. More...
 
#define MSG_KEYALWAYSPRESS   0x001C
 A key is always pressed. More...
 
#define MSG_KEYSYM   0x001D
 A key symbol translated from MSG_KEYDOWN messages. More...
 
#define MSG_UTF8CHAR   0x001E
 A character translated from MSG_KEYDOWN message. More...
 
#define DEF_LPRESS_TIME   200
 Default long pressed time of a key. More...
 
#define DEF_APRESS_TIME   1000
 Default always pressed time of a key. More...
 
#define DEF_INTERVAL_TIME   200
 Default send MSG_KEYLONGPRESS in interval value. More...
 
#define SetKeyLongPressTime(time)
 User set default long pressed time of a key. More...
 
#define SetKeyAlwaysPressTime(time)
 User set default always pressed time of a key. More...
 
#define SetIntervalTime(time)
 User set default interval time that MSG_KEYLONGPRESS is sent. More...
 
#define MSG_SETCURSOR   0x0020
 Set cursor shape in the client area. More...
 
#define MSG_NCHITTEST   0x0021
 Hit test in non-client area. This is an async message. More...
 
#define MSG_HITTEST   MSG_NCHITTEST
 Hit test in non-client area. More...
 
#define MSG_CHANGESIZE   0x0022
 Change window size. More...
 
#define MSG_QUERYCLIENTAREA   0x0024
 Query client area. More...
 
#define MSG_SIZECHANGING   0x0025
 Indicates the size of the window is being changed. More...
 
#define MSG_SIZECHANGED   0x0026
 Indicates the size of the window has been changed. More...
 
#define MSG_CSIZECHANGED   0x0027
 Indicates the size of the client area of the window has been changed. More...
 
#define MSG_SETFOCUS   0x0030
 Indicates that the window has gained the input focus. More...
 
#define MSG_KILLFOCUS   0x0031
 Indicates that the window has lost the input focus. More...
 
#define MSG_MOUSEACTIVE   0x0032
 Indicates that the window has gained the input focus because the user clicked the window. More...
 
#define MSG_ACTIVE   0x0033
 Indicates that the window has gained the input focus because the user clicked the window. More...
 
#define MSG_CHILDHIDDEN   0x0034
 Hide child window. More...
 
#define MSG_ACTIVEMENU   0x0040
 Indicates that the user activates the menu bar and tracks it. More...
 
#define MSG_DEACTIVEMENU   0x0041
 Indicates the end of the tracking of a menu bar or a popup menu. More...
 
#define SB_LINEUP   0x01a
 The SB_LINEUP notification message is sent when the user clicked the up arrow on the bar. More...
 
#define SB_LINEDOWN   0x02
 The SB_LINEDOWN notification message is sent when the user clicked the down arrow on the bar. More...
 
#define SB_LINELEFT   0x03
 The SB_LINELEFT notification message is sent when the user clicked the left arrow on the bar. More...
 
#define SB_LINERIGHT   0x04
 The SB_LINERIGHT notification message is sent when the user clicked the right arrow on the bar. More...
 
#define SB_PAGEUP   0x05
 The SB_PAGEUP notification message is sent when the user clicked the page up area on the bar. More...
 
#define SB_PAGEDOWN   0x06
 The SB_PAGEDOWN notification message is sent when the user clicked the page down area on the bar. More...
 
#define SB_PAGELEFT   0x07
 The SB_PAGELEFT notification message is sent when the user clicked the page left area on the bar. More...
 
#define SB_PAGERIGHT   0x08
 The SB_PAGERIGHT notification message is sent when the user clicked the page right area on the bar. More...
 
#define SB_THUMBPOSITION   0x09
 The SB_THUMBPOSITION notification message is sent when the user set a new thumb position. More...
 
#define SB_THUMBTRACK   0x0A
 The SB_THUMBTRACK notification message is sent when the user is draging and tracking the thumb. More...
 
#define SB_TOP   0x0B
 The SB_TOP notification message is sent when the user move thumb to minimum position. More...
 
#define SB_BOTTOM   0x0C
 The SB_BOTTOM notification message is sent when the user move thumb to maximum position. More...
 
#define SB_ENDSCROLL   0x0D
 The SB_ENDSCROLL notification message is sent when the thumb at the end of bar. More...
 
#define MSG_HSCROLL   0x0042
 Indicates that the user has clicked the horizontal scroll bar. More...
 
#define MSG_VSCROLL   0x0043
 Indicates that the user has clicked the vertical scroll bar. More...
 
#define MSG_NCSETCURSOR   0x0044
 Set cursor shape in the non-client area. More...
 
#define MSG_MOUSEMOVEIN   0x0050
 Indicates the mouse is moved in/out the area of the window. More...
 
#define MSG_WINDOWDROPPED   0x0051
 Indicates that user dropped window. server to client; (wParam, lParam): result rectangle. More...
 
#define MSG_CREATE   0x0060
 Indicates the window has been created, and gives you a chance to initialize your private objects. More...
 
#define MSG_NCCREATE   0x0061
 Indicates the window has been created, but has not registered to the system. More...
 
#define MSG_DESTROY   0x0064
 Indicates the window will be destroyed. More...
 
#define MSG_CLOSE   0x0066
 Indicates the user has clicked the closing box on the caption. More...
 
#define MSG_GESTURETEST   0x006B
 This message will be sent to a main window for gesture test. More...
 
#define MSG_EXIN_AXIS   0x0070
 Indicates an axis input event. More...
 
#define MSG_EXIN_BUTTONDOWN   0x0071
 Indicates the user has pressed a button on joystick or other input device. More...
 
#define MSG_EXIN_BUTTONUP   0x0072
 Indicates the user has released a button on joystick or other input device. More...
 
#define MSG_EXIN_TOUCH_DOWN   0x0073
 Indicates a touch down event. More...
 
#define MSG_EXIN_TOUCH_UP   0x0074
 Indicates a touch up event. More...
 
#define MSG_EXIN_TOUCH_MOTION   0x0075
 Indicates a touch move event. More...
 
#define MSG_EXIN_TOUCH_CANCEL   0x0076
 Indicates a cancelled touch event. More...
 
#define MSG_EXIN_TOUCH_FRAME   0x0077
 Indicates the end of a set of touchpoints at one device sample time. More...
 
#define MSG_EXIN_SWITCH_TOGGLE   0x007A
 Indicates the toggle event of a switch. More...
 
#define MSG_EXIN_GESTURE_SWIPE_BEGIN   0x0080
 Indicates the beginning of a swipe gesture. More...
 
#define MSG_EXIN_GESTURE_SWIPE_UPDATE   0x0081
 Indicates update of a swipe gesture. More...
 
#define MSG_EXIN_GESTURE_SWIPE_END   0x0082
 Indicates the end of a swipe gesture. More...
 
#define MSG_EXIN_GESTURE_PINCH_BEGIN   0x0083
 Indicates the beginning of a pinch gesture. More...
 
#define MSG_EXIN_GESTURE_PINCH_UPDATE   0x0084
 Indicates the beginning of a pinch gesture. More...
 
#define MSG_EXIN_GESTURE_PINCH_END   0x0085
 Indicates the end of a swipe gesture. More...
 
#define MSG_EXIN_END_CHANGES   0x008F
 Indicates the end of one or more parameter changes of one hardware event. More...
 
#define MSG_EXIN_TABLET_TOOL_AXIS   0x0090
 Indicates an axis of the tablet tool has changed state. More...
 
#define MSG_EXIN_TABLET_TOOL_PROXIMITY   0x0091
 Indicates that a tool has come in or out of proximity of the tablet. More...
 
#define MSG_EXIN_TABLET_TOOL_TIP   0x0092
 Indicates that a tool has come in contact with the surface of the tablet. More...
 
#define MSG_EXIN_TABLET_TOOL_BUTTON   0x0093
 Indicates that a tool has changed a logical button state on the tablet. More...
 
#define MSG_EXIN_TABLET_PAD_BUTTON   0x0094
 Indicates that a button pressed on the tablet pad. More...
 
#define MSG_EXIN_TABLET_PAD_RING   0x0095
 Indicates that a status change on the tablet ring. More...
 
#define MSG_EXIN_TABLET_PAD_STRIP   0x0096
 Indicates that a status change on the tablet strip. More...
 
#define MSG_EXIN_USER_BEGIN   0x009A
 Indicates that the beginning of a user-defined extra input event. More...
 
#define MSG_EXIN_USER_UPDATE   0x009B
 Indicates that the update of a user-defined extra input event. More...
 
#define MSG_EXIN_USER_END   0x009C
 Indicates that the end of a user-defined extra input event. More...
 
#define MSG_SHOWWINDOW   0x00A0
 Indicates that the window has been shown or hidden. More...
 
#define MSG_MOVEWINDOW   0x00A1
 Indicates that the window has been moved. More...
 
#define MSG_ERASEBKGND   0x00B0 /* this is an async message */
 Sent to the window to erase the background. More...
 
#define MSG_PAINT   0x00B1
 Sent to the window if the window contains an invalid region. More...
 
#define MSG_NCPAINT   0x00B2
 Indicates that paints non-client area. More...
 
#define MSG_NCACTIVATE   0x00B3
 Indicates that active non-client area of main window. More...
 
#define MSG_SYNCPAINT   0x00B4
 Indicates that actives and paints main window synchronously. More...
 
#define MSG_DT_LBUTTONDOWN   0x00D1
 Left mouse button down message on the desktop. More...
 
#define MSG_DT_LBUTTONUP   0x00D2
 Left mouse button up message on the desktop. More...
 
#define MSG_DT_LBUTTONDBLCLK   0x00D3
 Left mouse button double clicked message on the desktop. More...
 
#define MSG_DT_MOUSEMOVE   0x00D4
 The mouse moved message on the desktop. More...
 
#define MSG_DT_RBUTTONDOWN   0x00D5
 Right mouse button down message on the desktop. More...
 
#define MSG_DT_RBUTTONUP   0x00D6
 Right mouse button up message on the desktop. More...
 
#define MSG_DT_RBUTTONDBLCLK   0x00D7
 Right mouse button double clicked message on the desktop. More...
 
#define MSG_DT_MBUTTONDOWN   0x00D8
 Right mouse button down message on the desktop. More...
 
#define MSG_DT_MBUTTONUP   0x00D9
 Right mouse button up message on the desktop. More...
 
#define MSG_DT_MBUTTONDBLCLK   0x00DA
 Right mouse button double clicked message on the desktop. More...
 
#define MSG_DT_KEYDOWN   0x00E0
 User presses a key down on the desktop. More...
 
#define MSG_DT_KEYUP   0x00E2
 User releases up a key on the desktop. More...
 
#define MSG_COMMAND   0x0120
 The command message, indicates a notification message from child window, or the user has selected a menu item. More...
 
#define MSG_SYSCOMMAND   0x0121
 The system command message. More...
 
#define MSG_GETDLGCODE   0x0122
 Get dialog code. More...
 
#define MSG_INITDIALOG   0x0123
 Ready to initialize the controls in a dialog box. More...
 
#define MSG_DLG_GETDEFID   0x0126
 Get default push button ID first. More...
 
#define MSG_DLG_SETDEFID   0x0127
 Set default push button ID first. More...
 
#define MSG_ISDIALOG   0x0128
 Send to a window to query whether the window is a dialog window. More...
 
#define MSG_INITPAGE   0x0129
 Ready to initialize the controls in a property page. More...
 
#define MSG_SHOWPAGE   0x012A
 Indicates the page will be shown or hidden. More...
 
#define MSG_SHEETCMD   0x012B
 Indicates that a PSM_SHEETCMD message had been sent to the PropertySheet control. More...
 
#define MSG_INITCONTAINER   0x012C
 This message will be sent to the container window procedure after the container window is created. More...
 
#define MSG_SVCONTCMD   0x012D
 This message will be sent to the parent of the ScrollView control when the container of the ScrollView control reveived a MSG_COMMAND message. More...
 
#define MSG_FREEZECTRL   0x012E
 Send this message to freeze or thaw the paint action of the control. More...
 
#define MSG_FONTCHANGING   0x0130
 Indicates the user is trying to change the font of the window. More...
 
#define MSG_FONTCHANGED   0x0131
 Indicates the window font has been changed. More...
 
#define MSG_GETTEXTLENGTH   0x0132
 Send to the control or the main/virtual window to get the length of the text or caption. More...
 
#define MSG_GETTEXT   0x0133
 Send to the control to get the text, or send to the main/virtual window to get the caption. More...
 
#define MSG_SETTEXT   0x0134
 Send to the control to set the text, or send to the main/virtual window to set the caption. More...
 
#define MSG_ENABLE   0x0135
 Indicates the window is disabled/enabled. More...
 
#define MSG_NOTIFICATION   0x0136
 Indicate a notification message. More...
 
#define MSG_IDLE   0x0142
 Indicates the system enters idle loop. More...
 
#define MSG_TIMER   0x0144
 Indicates a timer has expired. More...
 
#define MSG_DOESNEEDIME   0x0150
 Send to a window to query whether the window needs to open IME window. More...
 
#define MSG_USER   0x0800
 The first user-defined message. More...
 
#define PM_NOREMOVE   0x0000
 
#define PM_REMOVE   0x0001
 
#define PM_NOYIELD   0x0002
 
#define WS_NONE   0x00000000L
 None style. More...
 
#define WS_MINIMIZEBOX   0x80000000L
 Creates a window with minimizing box on caption. More...
 
#define WS_MAXIMIZEBOX   0x40000000L
 Creates a window with maximizing box on caption. More...
 
#define WS_CAPTION   0x20000000L
 Creates a main window with caption. More...
 
#define WS_SYSMENU   0x10000000L
 Creates a main window with system menu. More...
 
#define WS_VISIBLE   0x08000000L
 Creates a window initially visible. More...
 
#define WS_DISABLED   0x04000000L
 Creates a window initially disabled. More...
 
#define WS_VSCROLL   0x02000000L
 Creates a window with vertical scroll bar. More...
 
#define WS_HSCROLL   0x01000000L
 Creates a window with horizontal scroll bar. More...
 
#define WS_DLGFRAME   0x00800000L
 The main window has a fixed frame, i.e. user can not drag the border of the window. More...
 
#define WS_THICKFRAME   0x00400000L
 Creates a main window with thick frame. More...
 
#define WS_THINFRAME   0x00200000L
 Creates a main window with thin frame. More...
 
#define WS_BORDER   0x00100000L
 Creates a window with border. More...
 
#define WS_CHILD   0x00080000L
 Indicates the window is a child. More...
 
#define WS_GROUP   0x00040000L
 Indicates the control is the leader of a group. More...
 
#define WS_TABSTOP   0x00020000L
 Indicates the user can set the input focus to the control by using Tab key. More...
 
#define WS_ALWAYSTOP   0x00010000L
 Indicates the main window is always on top of others. More...
 
#define WS_EX_NONE   0x00000000L
 No any extended window style. More...
 
#define WS_EX_CONTROL_MASK   0x0000000FL
 The extended style mask for control use. More...
 
#define WS_EX_WINTYPE_MASK   0x0000000FL
 The style mask for main window type. More...
 
#define WS_EX_WINTYPE_TOOLTIP   0x00000001L
 The type for a tooltip main window. More...
 
#define WS_EX_WINTYPE_GLOBAL   0x00000002L
 The type for a system/global main window. More...
 
#define WS_EX_WINTYPE_SCREENLOCK   0x00000003L
 The type for a main window in the screen lock level. More...
 
#define WS_EX_WINTYPE_DOCKER   0x00000004L
 The type for a main window in the docker level. More...
 
#define WS_EX_WINTYPE_HIGHER   0x00000005L
 The type for a main window in the higher level. More...
 
#define WS_EX_WINTYPE_NORMAL   0x00000006L
 The type for a main window in the normal level. More...
 
#define WS_EX_WINTYPE_LAUNCHER   0x00000007L
 The type for a main window in the launcher level. More...
 
#define WS_EX_TROUNDCNS   0x00000010L
 The window have round corners at top edge. More...
 
#define WS_EX_BROUNDCNS   0x00000020L
 The window have round corners at bottom edge. More...
 
#define WS_EX_USEPRIVATECDC   0x00000040L
 The window has its own private client device context. More...
 
#define WS_EX_NOTDRAGGABLE   0x00000080L
 A style controlling whether a main window can be dragged by using mouse. More...
 
#define WS_EX_USEPARENTFONT   0x00000100L
 The window uses the font of its parent as the default font. More...
 
#define WS_EX_USEPARENTCURSOR   0x00000200L
 The window uses the cursor of its parent as the default cursor. More...
 
#define WS_EX_USEPARENTRDR   0x00000400L
 The window use the same window renderer as parent. More...
 
#define WS_EX_NOPARENTNOTIFY   0x00000800L
 The window will not send any notification to the parent. More...
 
#define WS_EX_AUTOSECONDARYDC   0x00001000L
 The window creates its own secondary device context automatically. More...
 
#define WS_EX_TRANSPARENT   0x00002000L
 The window is transparent. More...
 
#define WS_EX_TOPMOST   0x00004000L
 The main window is in the higher level. More...
 
#define WS_EX_TOOLWINDOW   0x00008000L
 The main window is a tool window, which can not gain the input focus. More...
 
#define WS_EX_LEFTSCROLLBAR   0x00040000L
 The horizontal scroll bar of the window is located at left. More...
 
#define WS_EX_RIGHTSCROLLBAR   0x00000000L
 The horizontal scroll bar of the window is located at right (default). More...
 
#define WS_EX_DLGHIDE   0x00100000L
 The dialog won't show immediately after it is created. More...
 
#define WS_EX_AUTOPOSITION   0x00200000L
 The position of the main window will be determined by system. More...
 
#define WS_EX_NOCLOSEBOX   0x00400000L
 The main window has no closing box on its caption. More...
 
#define WS_EX_CLIPCHILDREN   0x00800000L
 When paint the window, the children areas will be clipped. More...
 
#define WS_EX_LFRDR_MASK   0x0F000000L
 The style mask for LF renderer internal usage. More...
 
#define WS_EX_LFRDR_CUSTOM1   0x01000000L
 The user-defined extended style. It's often used to process user-defined hotspot area. More...
 
#define WS_EX_LFRDR_CUSTOM2   0x02000000L
 The user-defined extended style. More...
 
#define WS_EX_LFRDR_CUSTOM3   0x04000000L
 The user-defined extended style. More...
 
#define WS_EX_LFRDR_CUSTOM4   0x08000000L
 The user-defined extended style. More...
 
#define WS_EX_INTERNAL_MASK   0xF0000000L
 The style mask for internal use. More...
 
#define WE_FONTS_NUMBER   4
 The number of window element font attributes. More...
 
#define WE_METRICS_NUMBER   6
 The number of window element metric attributes. More...
 
#define WE_COLORS_NUMBER   14
 The number of window element color attributes. More...
 
#define WE_ATTR_TYPE_RDR   0x5000
 The specific type for LF renderer. More...
 
#define SBS_DISABLED_LTUP   0x0100
 
#define SBS_DISABLED_BTDN   0x0200
 
#define SBS_HILITE_LTUP   0x0400
 
#define SBS_HILITE_BTDN   0x0800
 
#define SBS_HILITE_THUMB   0x0010
 
#define SBS_PRESSED_LTUP   0x0020
 
#define SBS_PRESSED_BTDN   0x0040
 
#define SBS_PRESSED_THUMB   0x0080
 
#define LEN_RENDERER_NAME   15
 The maximum length of a renderer name. More...
 
#define HWND_DESKTOP   __mg_hwnd_desktop
 Desktop window handle. More...
 
#define HWND_NULL   ((HWND)0)
 Null window handle. More...
 
#define HWND_INVALID   ((HWND)-1)
 Invalid window handle. More...
 
#define DefaultMainWinProc   (__mg_def_proc[0])
 Is the default main window callback procedure. More...
 
#define DefaultDialogProc   (__mg_def_proc[1])
 The default dialog box procedure. More...
 
#define DefaultControlProc   (__mg_def_proc[2])
 The default control callback procedure. More...
 
#define DefaultVirtualWinProc   (__mg_def_proc[3])
 The default window callback procedure for virtual windows. More...
 
#define SetFocus   SetFocusChild
 
#define GetFocus   GetFocusChild
 
#define GetForegroundWindow   GetActiveWindow
 
#define SetForegroundWindow   SetActiveWindow
 
#define GetWindowElementPixel(hWnd, iItem)   GetWindowElementPixelEx(hWnd, HDC_INVALID, iItem)
 Get window element pixel value. More...
 
#define GetSystemBitmapByHwnd(hWnd, id)   GetSystemBitmap ((hWnd), (id))
 An alias of GetSystemBitmap. More...
 
#define GetLargeSystemIcon(iItem)   GetLargeSystemIconEx(HWND_NULL, iItem)
 Retrieve a large (32x32) system icon by its identifier in default renderer. More...
 
#define GetSmallSystemIcon(iItem)   GetSmallSystemIconEx(HWND_NULL, iItem)
 Retrieve a small (16x16) system icon by its identifier in default renderer. More...
 
#define SB_ARROW_LTUP   0x0001
 
#define SB_ARROW_BTDN   0x0002
 
#define SB_ARROW_BOTH   (SB_ARROW_LTUP | SB_ARROW_BTDN)
 
#define SetTimer(hwnd, id, speed)   SetTimerEx(hwnd, id, speed, NULL)
 The backward compatibility version of SetTimerEx. More...
 
#define ResetTimer(hwnd, id, speed)   ResetTimerEx(hwnd, id, speed, (TIMERPROC)INV_PTR)
 The backward compatibility version of ResetTimerEx. More...
 
#define DLGC_WANTARROWS   0x0001
 Control wants arrow keys. More...
 
#define DLGC_WANTTAB   0x0002
 Control wants tab keys. More...
 
#define DLGC_WANTALLKEYS   0x0004
 Control wants all keys. More...
 
#define DLGC_WANTCHARS   0x0008
 Want MSG_CHAR messages. More...
 
#define DLGC_WANTENTER   0x0010
 Control wants enter keys. More...
 
#define DLGC_HASSETSEL   0x0080
 Understands EM_SETSEL message. More...
 
#define DLGC_DEFPUSHBUTTON   0x0100
 Default pushbutton. More...
 
#define DLGC_PUSHBUTTON   0x0200
 Non-default pushbutton. More...
 
#define DLGC_RADIOBUTTON   0x0400
 Radio button. More...
 
#define DLGC_3STATE   0x0800
 3 States button item. More...
 
#define DLGC_STATIC   0x1000
 Static item: don't include. More...
 
#define DLGC_BUTTON   0x2000
 Button item: can be checked. More...
 

Typedefs

typedef struct _MSG MSG
 
typedef int(* MSGHOOK) (void *context, HWND dst_wnd, UINT msg, WPARAM wparam, LPARAM lparam)
 Type of message hook function. More...
 
typedef LRESULT(* WNDPROC) (HWND, UINT, WPARAM, LPARAM)
 Type of the window callback procedure. More...
 
typedef void(* NOTIFPROC) (HWND hwnd, LINT id, int nc, DWORD add_data)
 Type of the notification callback procedure. More...
 
typedef struct _WINDOW_ELEMENT_ATTR WINDOW_ELEMENT_ATTR
 
typedef struct _LFSCROLLBARINFO LFSCROLLBARINFO
 
typedef struct _SCROLLBARDATA SCROLLBARDATA
 
typedef struct _LFRDR_WINSTYLEINFO LFRDR_WINSTYLEINFO
 
typedef struct _LFRDR_TRACKBARINFO LFRDR_TRACKBARINFO
 
typedef struct _WINDOW_ELEMENT_RENDERER WINDOW_ELEMENT_RENDERER
 
typedef struct _WINDOWINFO WINDOWINFO
 
typedef struct _MAINWINCREATE MAINWINCREATE
 
typedef struct _SCROLLINFO SCROLLINFO
 
typedef struct _WNDCLASS WNDCLASS
 
typedef BOOL(* TIMERPROC) (HWND, LINT, DWORD)
 Type of the timer callback procedure. More...
 
typedef struct _IME_TARGET_INFO IME_TARGET_INFO
 
typedef struct _MENUITEMINFO MENUITEMINFO
 
typedef struct _CTRLDATA CTRLDATA
 
typedef struct _DLGTEMPLATE DLGTEMPLATE
 

Enumerations

enum  emResType { ,
  RES_TYPE_IMAGE = 0, RES_TYPE_MYBITMAP, RES_TYPE_ICON, RES_TYPE_CURSOR,
  RES_TYPE_ETC , RES_TYPE_MEM_RES, RES_TYPE_FONT, RES_TYPE_USER
}
 

Functions

MG_EXPORT BOOL GUIAPI PeekMessageEx (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax, BOOL bWait, UINT uRemoveMsg)
 Peek a message from the message queue of a main window. More...
 
static BOOL GUIAPI GetMessage (PMSG pMsg, HWND hWnd)
 Get a message from the message queue of a main window. More...
 
MG_EXPORT BOOL GUIAPI WaitMessage (PMSG pMsg, HWND hMainWnd)
 Wait for a message from the message queue of a main window. More...
 
MG_EXPORT BOOL GUIAPI HavePendingMessage (HWND hMainWnd)
 Check if there is any pending message in the message queue of a main window. More...
 
static BOOL GUIAPI PeekMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax, UINT uRemoveMsg)
 Peek a message from the message queue of a main window. More...
 
MG_EXPORT BOOL GUIAPI PeekPostMessage (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax, UINT uRemoveMsg)
 Peek a post message from the message queue of a main window. More...
 
MG_EXPORT int GUIAPI PostMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Posts a message into the message queue of a window and returns immediatly. More...
 
MG_EXPORT LRESULT GUIAPI SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Send a message to a window and wait for the handling result. More...
 
MG_EXPORT void GUIAPI SetAutoRepeatMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 Set the auto-repeat message. More...
 
MG_EXPORT LRESULT GUIAPI PostSyncMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Post a synchronical message to a window which is in different thread. More...
 
MG_EXPORT LRESULT GUIAPI SendAsyncMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Send an asynchronical message to a window. More...
 
MG_EXPORT int GUIAPI SendNotifyMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Send a notification message to a window. More...
 
MG_EXPORT int GUIAPI SendPriorNotifyMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Send a prior notification message to a window. More...
 
MG_EXPORT int GUIAPI NotifyWindow (HWND hWnd, LINT id, int code, DWORD dwAddData)
 Send a notification message to a window. More...
 
MG_EXPORT int GUIAPI BroadcastMessage (UINT nMsg, WPARAM wParam, LPARAM lParam)
 Broadcast a message to all main windows on the desktop. More...
 
MG_EXPORT int GUIAPI BroadcastMessageInThisThread (UINT nMsg, WPARAM wParam, LPARAM lParam)
 Broadcast a message to all main/virtual windows in the current thread. More...
 
MG_EXPORT int GUIAPI PostQuitMessage (HWND hWnd)
 Puts a MSG_QUIT message into the message queue of a main window. More...
 
MG_EXPORT BOOL GUIAPI SetKeyboardLayout (const char *kbd_layout)
 Set a new keyboard layout. More...
 
MG_EXPORT BOOL GUIAPI TranslateMessage (PMSG pMsg)
 Translates key down and key up messages to MSG_CHAR message and post it into the message queue. More...
 
MG_EXPORT BOOL GUIAPI TranslateKeyMsgToChar (int message, WPARAM wParam, LPARAM lParam, WORD *ch)
 Translates a key down and key up message to a corresponding character. More...
 
MG_EXPORT LRESULT GUIAPI DispatchMessage (PMSG pMsg)
 Dispatches a message to the window's callback procedure. More...
 
MG_EXPORT int GUIAPI ThrowAwayMessages (HWND pMainWnd)
 Removes all messages in the message queue associated with a window. More...
 
MG_EXPORT BOOL GUIAPI EmptyMessageQueue (HWND hWnd)
 Empty a message queue. More...
 
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...
 
static const WINDOWINFO *GUIAPI GetWindowInfo (HWND hWnd)
 Get the handle of window information. More...
 
MG_EXPORT BOOL GUIAPI InitWindowElementAttrs (PWERENDERER rdr)
 
MG_EXPORT DWORD GUIAPI GetWindowElementAttr (HWND hwnd, int we_attr_id)
 Get a window element data. More...
 
MG_EXPORT DWORD GUIAPI SetWindowElementAttr (HWND hwnd, int we_attr_id, DWORD we_attr)
 Set a new window element data specified by we_attr_id. More...
 
MG_EXPORT gal_pixel GUIAPI GetWindowElementPixelEx (HWND hwnd, HDC hdc, int we_attr_id)
 Get the pixel value of a window element. More...
 
MG_EXPORT WINDOW_ELEMENT_RENDERER *GUIAPI GetWindowRendererFromName (const char *name)
 Get window renderer from name. More...
 
MG_EXPORT BOOL GUIAPI AddWindowElementRenderer (const char *name, const WINDOW_ELEMENT_RENDERER *we_rdr)
 Add a window element renderer to the system. More...
 
MG_EXPORT BOOL GUIAPI RemoveWindowElementRenderer (const char *name)
 Remove a window renderer from MiniGUI. More...
 
MG_EXPORT WINDOW_ELEMENT_RENDERER *GUIAPI GetDefaultWindowElementRenderer (void)
 Get the default window renderer. More...
 
const MG_EXPORT char *GUIAPI SetDefaultWindowElementRenderer (const char *name)
 Set a window element renderer as the default system renderer. More...
 
MG_EXPORT BOOL GUIAPI SetWindowElementRenderer (HWND hWnd, const char *werdr_name, const WINDOW_ELEMENT_ATTR *we_attrs)
 Set a window element renderer and window element attributes for window specified by hwnd. More...
 
MG_EXPORT BOOL InitRendererSystemIcon (const char *rdr_name, HICON *small_icon, HICON *large_icon)
 Initialize large and small system icons in the specified renderer rdr_name. More...
 
MG_EXPORT void TermRendererSystemIcon (HICON *small_icon, HICON *large_icon)
 Release large and small system icon resources. More...
 
MG_EXPORT BOOL GUIAPI RegisterResFromFile (HDC hdc, const char *file)
 Register a device-dependent bitmap from a file. More...
 
MG_EXPORT BOOL GUIAPI RegisterResFromMem (HDC hdc, const char *file, const unsigned char *data, size_t data_size)
 Register a device-dependent bitmap to bitmap cache from memory. More...
 
MG_EXPORT BOOL GUIAPI RegisterResFromBitmap (const char *file, const BITMAP *bmp)
 Register a device-dependent bitmap to bitmap cache. More...
 
const MG_EXPORT BITMAP *GUIAPI RetrieveRes (const char *file)
 Get a BITMAP object from cache according to the specified resource file name. More...
 
MG_EXPORT void GUIAPI UnregisterRes (const char *file)
 Unregister the BITMAP object from cache according to the specified resource file name. More...
 
MG_EXPORT BOOL GUIAPI RegisterSystemBitmap (HDC hdc, const char *rdr_name, const char *id)
 Register a device-dependent bitmap from id to BITMAP cache. More...
 
MG_EXPORT void GUIAPI UnregisterSystemBitmap (HDC hdc, const char *rdr_name, const char *id)
 Unregister a BITMAP object from the system BITMAP cache. More...
 
const MG_EXPORT char * GetResPath (void)
 Get the currrent user's resource path. More...
 
MG_EXPORT int SetResPath (const char *path)
 Set user's resource path into the search paths of resource manager. More...
 
MG_EXPORT int RegisterResType (int type, RES_TYPE_OPS *ops)
 Register a new user-defined type into resource manager, so that the LoadResource can load the special resource automatically. More...
 
MG_EXPORT int UnregisterResType (int type)
 Unregister a user-defined resource type. More...
 
MG_EXPORT void * LoadResource (const char *res_name, int type, DWORD usr_param)
 Load a resource from disk or memory. More...
 
MG_EXPORT void * GetResource (RES_KEY key)
 Retrieve and return a buffered resource by the key. More...
 
MG_EXPORT int AddResRef (RES_KEY key)
 Increase the reference count of a buffered resource. More...
 
MG_EXPORT int ReleaseRes (RES_KEY key)
 Release the buffered resource. It will decrease the reference count of the resource. If the reference count is less then 0, the resource will be released. More...
 
MG_EXPORT RES_KEY Str2Key (const char *str)
 Translate a string to an unsigned long (RES_KEY), which is used to find a resource in the resource manager. More...
 
MG_EXPORT BOOL GUIAPI GetThreadByWindow (HWND hWnd, pthread_t *thread)
 Get the thread identifier which a window belongs to. More...
 
MG_EXPORT BOOL GUIAPI IsWindowInThisThread (HWND hWnd)
 Determine whether a window was created in this thread. More...
 
MG_EXPORT BOOL GUIAPI VirtualWindowCleanup (HWND hVirtWnd)
 Cleanup the system resource associated with a virtual window. More...
 
MG_EXPORT HWND GUIAPI CreateVirtualWindow (HWND hHosting, WNDPROC WndProc, const char *spCaption, LINT id, DWORD dwAddData)
 Create a virtual window. More...
 
MG_EXPORT BOOL GUIAPI DestroyVirtualWindow (HWND hWnd)
 Destroy a virtual window. More...
 
static pthread_t GUIAPI GetMainWinThread (HWND hMainWnd)
 Get the thread identifier which main window belongs to. More...
 
MG_EXPORT int GUIAPI WaitMainWindowClose (HWND hWnd, void **returnval)
 Suspend execution of the calling thread which main window belongs to until the target thread terminates, unless the target thread has already terminated. More...
 
MG_EXPORT BOOL GUIAPI MainWindowCleanup (HWND hMainWnd)
 Cleans up system resource associated with a main window. More...
 
static BOOL MainWindowThreadCleanup (HWND hMainWnd)
 Cleanup the main window. More...
 
MG_EXPORT HWND GUIAPI CreateMainWindowEx2 (PMAINWINCREATE create_info, LINT id, const char *werdr_name, const WINDOW_ELEMENT_ATTR *we_attrs, unsigned int surf_flag, DWORD bkgnd_color, int compos_type, DWORD ct_arg)
 Creates a main window with specified compositing type and identifier. More...
 
static HWND GUIAPI CreateMainWindowEx (PMAINWINCREATE pCreateInfo, const char *werdr_name, const WINDOW_ELEMENT_ATTR *we_attrs, const char *window_name, const char *layer_name)
 Creates a main window. More...
 
static HWND GUIAPI CreateMainWindow (PMAINWINCREATE pCreateInfo)
 A simplified version of CreateMainWindowEx. More...
 
MG_EXPORT BOOL GUIAPI DestroyMainWindow (HWND hWnd)
 Destroys a main window. More...
 
MG_EXPORT BOOL GUIAPI SetWindowLocalData (HWND hwnd, const char *data_name, DWORD local_data, CB_FREE_LOCAL_DATA cb_free)
 Set the local data bound with a name for a window. More...
 
MG_EXPORT BOOL GUIAPI RemoveWindowLocalData (HWND hwnd, const char *data_name)
 Remove the local data bound with a name for a window. More...
 
MG_EXPORT BOOL GUIAPI SetWindowMask (HWND hWnd, const MYBITMAP *mask)
 Set window (a main window, or a child window which is also known as "control")'s Mask Rect with MYBITMAP data. More...
 
MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP *mask)
 Set window (a main window, or a child window which is also known as "control")'s Mask Rect with BITMAP data,. More...
 
MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet)
 Set or cancel a main window being always top. More...
 
MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags)
 Set the gesture flags of a main window. More...
 
BOOL GUIAPI SetWindowRegion (HWND hWnd, const CLIPRGN *region)
 Set window's Mask Rect with CLIPRGN data. More...
 
BOOL GUIAPI GetWindowRegion (HWND hWnd, CLIPRGN *region)
 The function obtains a copy of the window region of a window. More...
 
MG_EXPORT LRESULT GUIAPI DefaultWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 The default window callback procedure. More...
 
MG_EXPORT void GUIAPI UpdateWindow (HWND hWnd, BOOL bErase)
 Updates a window. More...
 
MG_EXPORT void GUIAPI UpdateInvalidClient (HWND hWnd, BOOL bErase)
 Updates the invalid client areas in a window. More...
 
MG_EXPORT BOOL GUIAPI ShowWindow (HWND hWnd, int iCmdShow)
 Shows or hides a window. More...
 
MG_EXPORT BOOL GUIAPI EnableWindow (HWND hWnd, BOOL fEnable)
 Enables of disables a window. More...
 
MG_EXPORT BOOL GUIAPI IsWindowEnabled (HWND hWnd)
 Determine whether the specified window is enabled for mouse and keyboard input. More...
 
MG_EXPORT BOOL GUIAPI GetClientRect (HWND hWnd, PRECT prc)
 Retrieve the client rectangle of a window. More...
 
MG_EXPORT gal_pixel GUIAPI DWORD2PixelByWindow (HWND hWnd, DWORD dwColor)
 Convert a DWORD color to gal_pixel for a window. More...
 
MG_EXPORT gal_pixel GUIAPI GetWindowBkColor (HWND hWnd)
 Returns the current background color of a window. More...
 
MG_EXPORT gal_pixel GUIAPI SetWindowBkColor (HWND hWnd, gal_pixel new_bkcolor)
 Set the background color of a window. More...
 
MG_EXPORT PLOGFONT GUIAPI GetWindowFont (HWND hWnd)
 Retrieve the default font of a window. More...
 
MG_EXPORT PLOGFONT GUIAPI SetWindowFont (HWND hWnd, PLOGFONT pLogFont)
 Set the default font of a window. More...
 
MG_EXPORT HCURSOR GUIAPI GetWindowCursor (HWND hWnd)
 Retrieve the current cursor of a window. More...
 
MG_EXPORT HCURSOR GUIAPI SetWindowCursor (HWND hWnd, HCURSOR hNewCursor)
 Set the current cursor of a window. More...
 
MG_EXPORT HICON GUIAPI GetWindowIcon (HWND hWnd)
 Retrieve the current icon of a window. More...
 
MG_EXPORT HICON GUIAPI SetWindowIcon (HWND hWnd, HICON hIcon, BOOL bRedraw)
 Set the current icon of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowStyle (HWND hWnd)
 Retrieve the style of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowExStyle (HWND hWnd)
 Retrieve the extended style of a window. More...
 
MG_EXPORT BOOL GUIAPI ExcludeWindowStyle (HWND hWnd, DWORD dwStyle)
 Removes the specific style of a window. More...
 
MG_EXPORT BOOL GUIAPI IncludeWindowStyle (HWND hWnd, DWORD dwStyle)
 Includes the specific style of a window. More...
 
MG_EXPORT BOOL GUIAPI ExcludeWindowExStyle (HWND hWnd, DWORD dwStyle)
 Removes the specific extended style of a window. More...
 
MG_EXPORT BOOL GUIAPI IncludeWindowExStyle (HWND hWnd, DWORD dwStyle)
 Includes the specific extended style of a window. More...
 
MG_EXPORT WNDPROC GUIAPI GetWindowCallbackProc (HWND hWnd)
 Retrieve the callback procedure of a window. More...
 
MG_EXPORT WNDPROC GUIAPI SetWindowCallbackProc (HWND hWnd, WNDPROC newProc)
 Set the callback procedure of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowAdditionalData (HWND hWnd)
 Retrieve the first additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI SetWindowAdditionalData (HWND hWnd, DWORD newData)
 Set the first additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowAdditionalData2 (HWND hWnd)
 Retrieve the second additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI SetWindowAdditionalData2 (HWND hWnd, DWORD newData)
 Set the second additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowClassAdditionalData (HWND hWnd)
 Retrieve the additional data of a control class. More...
 
MG_EXPORT DWORD GUIAPI SetWindowClassAdditionalData (HWND hWnd, DWORD newData)
 Set the additional data of a control class. More...
 
const MG_EXPORT char *GUIAPI GetWindowCaption (HWND hWnd)
 Retrieve the caption of a window. More...
 
MG_EXPORT BOOL GUIAPI SetWindowCaption (HWND hWnd, const char *spCaption)
 Set the caption of a window. More...
 
MG_EXPORT BOOL GUIAPI InvalidateRect (HWND hWnd, const RECT *prc, BOOL bEraseBkgnd)
 Makes a rectangle region in the client area of a window invalid. More...
 
MG_EXPORT BOOL GUIAPI InvalidateRegion (HWND hWnd, const CLIPRGN *pRgn, BOOL bErase)
 Invalidates the client area within the specified region. More...
 
MG_EXPORT BOOL GUIAPI ValidateRect (HWND hWnd, const RECT *rect)
 Validates the client area within a rectangle by removing the rectangle from the update region of the specified window. More...
 
MG_EXPORT BOOL GUIAPI ValidateRegion (HWND hWnd, const CLIPRGN *pRgn)
 Validates the client area within a region by removing the region from the current update region of the specified window. More...
 
MG_EXPORT HDC GUIAPI BeginPaint (HWND hWnd)
 Prepares a window for painting. More...
 
MG_EXPORT void GUIAPI EndPaint (HWND hWnd, HDC hdc)
 Marks the end of painting in a window. More...
 
MG_EXPORT BOOL GUIAPI GetUpdateRect (HWND hWnd, RECT *update_rect)
 Retrieve the bounding box of the update region of a window. More...
 
MG_EXPORT int GUIAPI GetUpdateRegion (HWND hWnd, PCLIPRGN pRgn)
 Copy the update region of a window to a region. More...
 
MG_EXPORT int GUIAPI ClientWidthToWindowWidthEx (DWORD dwStyle, int win_type, int cw)
 Calculates main window width from the width of the client area. More...
 
MG_EXPORT int GUIAPI ClientHeightToWindowHeightEx (DWORD dwStyle, int win_type, int ch, BOOL hasMenu)
 Calculates window height from the height of the client area. More...
 
MG_EXPORT BOOL GUIAPI AdjustWindowRectEx (RECT *pRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle)
 Calculates the required size of the window rectangle based on the desired size of the client rectangle. More...
 
MG_EXPORT void GUIAPI ClientToScreen (HWND hWnd, int *x, int *y)
 Converts the client coordinates of a point to screen coordinates. More...
 
MG_EXPORT void GUIAPI ScreenToClient (HWND hWnd, int *x, int *y)
 Converts the screen coordinates of a point to client coordinates. More...
 
MG_EXPORT void GUIAPI ClientToWindow (HWND hWnd, int *x, int *y)
 Converts the client coordinates to the window coordinates. More...
 
MG_EXPORT void GUIAPI WindowToClient (HWND hWnd, int *x, int *y)
 Converts the window coordinates to client coordinates. More...
 
MG_EXPORT void GUIAPI WindowToScreen (HWND hWnd, int *x, int *y)
 Converts the window coordinates of a point to screen coordinates. More...
 
MG_EXPORT void GUIAPI ScreenToWindow (HWND hWnd, int *x, int *y)
 Converts the screen coordinates of a point to window coordinates. More...
 
MG_EXPORT BOOL GUIAPI IsMainWindow (HWND hWnd)
 Determine whether a window is a main window. More...
 
MG_EXPORT BOOL GUIAPI IsVirtualWindow (HWND hWnd)
 Determine whether a window is a virtual window. More...
 
MG_EXPORT BOOL GUIAPI IsControl (HWND hWnd)
 Determine whether a window is a control. More...
 
MG_EXPORT BOOL GUIAPI IsWindow (HWND hWnd)
 Determine whether a window handle identifies an existing window. More...
 
MG_EXPORT BOOL GUIAPI IsDialog (HWND hWnd)
 Determine whether a window handle identifies a dialog window. More...
 
MG_EXPORT HWND GUIAPI GetParent (HWND hWnd)
 Retrieve the handle to a child window's parent window. More...
 
MG_EXPORT HWND GUIAPI GetMainWindowHandle (HWND hWnd)
 Retrieve the handle to the main window contains a window. More...
 
MG_EXPORT BOOL GUIAPI IsWindowVisible (HWND hWnd)
 Retrieve the visibility state of the specified window. More...
 
MG_EXPORT BOOL GUIAPI GetWindowRect (HWND hWnd, PRECT prc)
 Retrieve the dimensions of the bounding rectangle of a window. More...
 
MG_EXPORT HWND GUIAPI GetNextChild (HWND hWnd, HWND hChild)
 Retrieve the next control in a window. More...
 
MG_EXPORT HWND GUIAPI GetNextMainWindow (HWND hMainWnd)
 Retrieve the next main window in the system according to the zorder. More...
 
MG_EXPORT HWND GUIAPI GetHostedById (HWND hHosting, LINT lId, DWORD dwSearchFlags)
 Retrieve a hosted main window or virtual window by identifier. More...
 
MG_EXPORT LINT GUIAPI GetWindowId (HWND hWnd)
 Get the identifier of a window. More...
 
MG_EXPORT LINT GUIAPI SetWindowId (HWND hWnd, LINT lNewId)
 Set the identifier of a window. More...
 
MG_EXPORT HWND GUIAPI GetRootWindow (int *nrWins)
 Retrieve the root window of the current thread. More...
 
MG_EXPORT HWND GUIAPI GetHosting (HWND hWnd)
 Retrieve the hosting window of a main window or a virtual window. More...
 
MG_EXPORT HWND GUIAPI GetFirstHosted (HWND hHosting)
 Retrieve the first hosted window of a main window or a virtual window. More...
 
MG_EXPORT HWND GUIAPI GetNextHosted (HWND hHosting, HWND hHosted)
 Retrieve the next hosted window of a main window or a virtual window. More...
 
MG_EXPORT int GUIAPI GetWindowTextLength (HWND hWnd)
 Retrieve the length of a window's text. More...
 
MG_EXPORT int GUIAPI GetWindowText (HWND hWnd, char *spString, int nMaxLen)
 Copies the text of a window's into a buffer. More...
 
MG_EXPORT BOOL GUIAPI SetWindowText (HWND hWnd, const char *spString)
 Set the text of a window. More...
 
MG_EXPORT HWND GUIAPI GetFocusChild (HWND hParent)
 Retrieve the handle to the window's active child that has the keyboard focus. More...
 
MG_EXPORT HWND GUIAPI SetNullFocus (HWND hParent)
 Cancels the current active child and set the focus child to be null. More...
 
MG_EXPORT HWND GUIAPI SetFocusChild (HWND hWnd)
 Set the active child of a window. More...
 
MG_EXPORT HWND GUIAPI GetActiveWindow (void)
 Retrieve the main window handle of the active main window. More...
 
MG_EXPORT HWND GUIAPI SetActiveWindow (HWND hMainWnd)
 Set a main window to be the active main window. More...
 
MG_EXPORT HWND GUIAPI GetCapture (void)
 Retrieve the handle to the window (if any) that has captured the mouse. More...
 
MG_EXPORT HWND GUIAPI SetCapture (HWND hWnd)
 Set the mouse capture to the specified window. More...
 
MG_EXPORT void GUIAPI ReleaseCapture (void)
 Releases the mouse capture from a window and restores normal mouse input processing. More...
 
MG_EXPORT HWND GUIAPI GetWindowUnderCursor (void)
 Retrieve the handle to the window (if any) which is just beneath the mouse cursor. More...
 
MG_EXPORT HWND GUIAPI WindowFromPointEx (POINT pt, BOOL bRecursion)
 Retrieve a handle to the window that contains the specified point. More...
 
MG_EXPORT HWND GUIAPI ChildWindowFromPointEx (HWND hParent, POINT pt, UINT uFlags)
 Retrieve a handle to the child window that contains the speicified point and meets the certain criteria. More...
 
static HWND GUIAPI ChildWindowFromPoint (HWND hParent, POINT pt)
 Retrieve a handle to the child window that contains the speicified point. More...
 
MG_EXPORT BOOL GUIAPI MoveWindow (HWND hWnd, int x, int y, int w, int h, BOOL fPaint)
 Changes the position and dimensions of a window. More...
 
MG_EXPORT int GUIAPI ScrollWindowEx (HWND hWnd, int dx, int dy, const RECT *prcScroll, const RECT *prcClip, PCLIPRGN pRgnUpdate, PRECT prcUpdate, UINT flags)
 Scrolls the content of a window's client area. More...
 
static void GUIAPI ScrollWindow (HWND hWnd, int dx, int dy, const RECT *prcScroll, const RECT *prcClip)
 Scrolls the content of a window's client area. More...
 
const MG_EXPORT BITMAP *GUIAPI GetSystemBitmapEx2 (HDC hdc, const char *rdr_name, const char *id)
 Retrieve the system bitmap object by identifier. More...
 
static const BITMAP *GUIAPI GetSystemBitmapEx (const char *rdr_name, const char *id)
 Retrieve the system bitmap object by identifier. More...
 
const MG_EXPORT BITMAP *GUIAPI GetSystemBitmap (HWND hWnd, const char *id)
 Retrieve the system bitmap object by identifier. More...
 
MG_EXPORT void GUIAPI TermSystemBitmapEx (const char *id, const char *rdr_name, PBITMAP bmp)
 Release the system bitmap object by identifier. More...
 
MG_EXPORT void GUIAPI TermSystemBitmap (HWND hWnd, const char *id, PBITMAP bmp)
 Release the system bitmap object by identifier. More...
 
MG_EXPORT HICON GUIAPI LoadSystemIconEx (HDC hdc, const char *rdr_name, const char *szItemName, int which)
 Loads an icon from information defined in MiniGUI.cfg. More...
 
MG_EXPORT HICON GUIAPI LoadSystemIcon (const char *szItemName, int which)
 Uses default renderer and HDC_SCREEN to load an icon from information defined in MiniGUI.cfg. More...
 
MG_EXPORT HICON GUIAPI GetLargeSystemIconEx (HWND hWnd, int iItem)
 Retrieve a large system icon by its identifier in default renderer. More...
 
MG_EXPORT HICON GUIAPI GetSmallSystemIconEx (HWND hWnd, int iItem)
 Retrieve a small system icon by its identifier. More...
 
MG_EXPORT BOOL GUIAPI EnableScrollBar (HWND hWnd, int iSBar, BOOL bEnable)
 Enables or disables one scroll bar arrows. More...
 
MG_EXPORT BOOL GUIAPI GetScrollPos (HWND hWnd, int iSBar, int *pPos)
 Retrieve the current position of the scroll box (thumb) in the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI GetScrollRange (HWND hWnd, int iSBar, int *pMinPos, int *pMaxPos)
 Retrieve the minimum and maximum position values for the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollPos (HWND hWnd, int iSBar, int iNewPos)
 Set the position of the scroll box (thumb) of the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollRange (HWND hWnd, int iSBar, int iMinPos, int iMaxPos)
 Set the minimum and maximum position values for the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow)
 Shows or hides the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollInfo (HWND hWnd, int iSBar, const SCROLLINFO *lpsi, BOOL fRedraw)
 Set the parameters of a scroll bar. More...
 
MG_EXPORT BOOL GUIAPI GetScrollInfo (HWND hWnd, int iSBar, PSCROLLINFO lpsi)
 Retrieve the parameters of a scroll bar. More...
 
MG_EXPORT BOOL GUIAPI RegisterWindowClass (PWNDCLASS pWndClass)
 Registers a window class. More...
 
MG_EXPORT BOOL GUIAPI UnregisterWindowClass (const char *szClassName)
 Undoes the effect of RegisterWindowClass. More...
 
const MG_EXPORT char *GUIAPI GetClassName (HWND hWnd)
 Retrieve the name of the class to which the specified window belongs. More...
 
MG_EXPORT BOOL GUIAPI GetWindowClassInfo (PWNDCLASS pWndClass)
 Retrieve the information of the specified window class. More...
 
MG_EXPORT BOOL GUIAPI SetWindowClassInfo (const WNDCLASS *pWndClass)
 Set the information of the specified window class. More...
 
MG_EXPORT HWND GUIAPI CreateWindowEx2 (const char *spClassName, const char *spCaption, DWORD dwStyle, DWORD dwExStyle, LINT id, int x, int y, int w, int h, HWND hParentWnd, const char *werdr_name, const WINDOW_ELEMENT_ATTR *we_attrs, DWORD dwAddData)
 Creates a child window with extended style, renderer and attributes table. More...
 
static HWND GUIAPI CreateWindowEx (const char *spClassName, const char *spCaption, DWORD dwStyle, DWORD dwExStyle, LINT id, int x, int y, int w, int h, HWND hParentWnd, DWORD dwAddData)
 A shortcut version of CreateWindowEx2. More...
 
MG_EXPORT BOOL GUIAPI DestroyWindow (HWND hWnd)
 Destroys a specified control. More...
 
MG_EXPORT NOTIFPROC GUIAPI SetNotificationCallback (HWND hwnd, NOTIFPROC notif_proc)
 Set a new notification callback procedure for a window. More...
 
MG_EXPORT NOTIFPROC GUIAPI GetNotificationCallback (HWND hwnd)
 Get the notification callback procedure of a control. More...
 
MG_EXPORT BOOL GUIAPI SetTimerEx (HWND hWnd, LINT id, DWORD speed, TIMERPROC timer_proc)
 Creates a timer with the specified timeout value. More...
 
MG_EXPORT int GUIAPI KillTimer (HWND hWnd, LINT id)
 Destroys a timer. More...
 
MG_EXPORT BOOL GUIAPI ResetTimerEx (HWND hWnd, LINT id, DWORD speed, TIMERPROC timer_proc)
 Adjusts a timer with a different timeout value or different timer callback procedure. More...
 
MG_EXPORT BOOL GUIAPI IsTimerInstalled (HWND hWnd, LINT id)
 Determine whether a timer is installed. More...
 
MG_EXPORT BOOL GUIAPI HaveFreeTimer (void)
 Determine whether there is any free timer slot in the current thread. More...
 
MG_EXPORT int GUIAPI RegisterIMEWindow (HWND hWnd)
 Registers an IME window. More...
 
MG_EXPORT int GUIAPI UnregisterIMEWindow (HWND hWnd)
 Unregisters an IME window. More...
 
MG_EXPORT int GUIAPI GetIMEStatus (int StatusCode)
 Retrieve status of the current IME window. More...
 
MG_EXPORT int GUIAPI SetIMEStatus (int StatusCode, int Value)
 Set the status of the current IME window. More...
 
MG_EXPORT int GUIAPI GetIMETargetInfo (IME_TARGET_INFO *info)
 Retrieve the target info of the current IME window. More...
 
MG_EXPORT int GUIAPI SetIMETargetInfo (const IME_TARGET_INFO *info)
 Set the target info of the current IME window. More...
 
MG_EXPORT int GUIAPI GetIMEPos (POINT *pt)
 Retrieve the position of the current IME window. More...
 
MG_EXPORT HACCEL GUIAPI CopyAcceleratorTable (HACCEL hacc)
 Copies the specified accelerator table. More...
 
MG_EXPORT int GUIAPI DeleteAccelerators (HACCEL hacc, int key, DWORD keymask)
 Deletes an accelerator from the accelerator table. More...
 
MG_EXPORT int GUIAPI AddAccelerators (HACCEL hacc, int key, DWORD keymask, WPARAM wParam, LPARAM lParam)
 Adds an accelerator to the accelerator table. More...
 
MG_EXPORT int GUIAPI DestroyAcceleratorTable (HACCEL hacc)
 Destroys an accelerator table. More...
 
MG_EXPORT HACCEL GUIAPI CreateAcceleratorTable (HWND hWnd)
 Creates an empty accelerator table. More...
 
MG_EXPORT int GUIAPI TranslateAccelerator (HACCEL hAccel, PMSG pMsg)
 Translates an accelerator key message to MSG_COMMAND messge and sends it to the window procedure. More...
 
MG_EXPORT BOOL GUIAPI CreateCaret (HWND hWnd, PBITMAP pBitmap, int nWidth, int nHeight)
 Creates a new shape for the system caret and assigns ownership of the caret to the specified window. More...
 
MG_EXPORT BOOL GUIAPI ChangeCaretSize (HWND hWnd, int newWidth, int newHeight)
 Changes the size of the caret. More...
 
MG_EXPORT BOOL GUIAPI ActiveCaret (HWND hWnd)
 Activates the caret owned by a window. More...
 
MG_EXPORT UINT GUIAPI GetCaretBlinkTime (HWND hWnd)
 Returns the elapsed time, in milliseconds, required to invert the caret's pixels. More...
 
MG_EXPORT BOOL GUIAPI SetCaretBlinkTime (HWND hWnd, UINT uTime)
 Set the caret blink time to the specified number of milliseconds. More...
 
MG_EXPORT BOOL GUIAPI DestroyCaret (HWND hWnd)
 Destroys a caret. More...
 
static BOOL GUIAPI HideCaret (HWND hWnd)
 Hides a caret. More...
 
MG_EXPORT BOOL GUIAPI ShowCaretEx (HWND hWnd, BOOL ime)
 Shows a caret. More...
 
static BOOL GUIAPI ShowCaret (HWND hWnd)
 Shows a caret. More...
 
MG_EXPORT BOOL GUIAPI SetCaretPos (HWND hWnd, int x, int y)
 Moves the caret to a new position. More...
 
MG_EXPORT BOOL GUIAPI GetCaretPos (HWND hWnd, PPOINT pPt)
 Get the caret position. More...
 
MG_EXPORT HMENU GUIAPI CreateMenu (void)
 Creates an empty menu. More...
 
MG_EXPORT HMENU GUIAPI CreatePopupMenu (PMENUITEMINFO pmii)
 Creates a drop-down menu or submenu. More...
 
MG_EXPORT HMENU GUIAPI CreateSystemMenu (HWND hwnd, DWORD dwStyle)
 Creates a system menu. More...
 
MG_EXPORT int GUIAPI InsertMenuItem (HMENU hmnu, LINT item, UINT flag, PMENUITEMINFO pmii)
 Inserts a new menu item at the specified position in a menu. More...
 
MG_EXPORT int GUIAPI RemoveMenu (HMENU hmnu, LINT item, UINT flag)
 Deletes a menu item or detaches a submenu from the specified menu. More...
 
MG_EXPORT int GUIAPI DeleteMenu (HMENU hmnu, LINT item, UINT flag)
 Deletes an item from the specified menu. More...
 
MG_EXPORT int GUIAPI DestroyMenu (HMENU hmnu)
 Destroys the specified menu and frees any memory that the menu occupies. More...
 
MG_EXPORT int GUIAPI IsMenu (HMENU hmnu)
 Determine whether a handle is a menu handle. More...
 
MG_EXPORT HMENU GUIAPI SetMenu (HWND hwnd, HMENU hmnu)
 Assigns a new menu to the specified main window. More...
 
MG_EXPORT HMENU GUIAPI GetMenu (HWND hwnd)
 Retrieve the handle to the menu assigned to the given main window. More...
 
MG_EXPORT void GUIAPI DrawMenuBar (HWND hwnd)
 Redraws the menu bar of the specified main window. More...
 
MG_EXPORT int GUIAPI TrackMenuBar (HWND hwnd, int pos)
 Displays the specified submenu. More...
 
MG_EXPORT int GUIAPI TrackPopupMenu (HMENU hmnu, UINT uFlags, int x, int y, HWND hwnd)
 Displays and tracks a popup menu. More...
 
MG_EXPORT HMENU GUIAPI GetMenuBarItemRect (HWND hwnd, int pos, RECT *prc)
 Retrieve the rect of a menu bar item. More...
 
MG_EXPORT BOOL GUIAPI HiliteMenuBarItem (HWND hwnd, int pos, UINT flag)
 Draws the specified menubar item with 3D effect. More...
 
MG_EXPORT int GUIAPI GetMenuItemCount (HMENU hmnu)
 Determine the number of items in a menu. More...
 
MG_EXPORT LINT GUIAPI GetMenuItemID (HMENU hmnu, int pos)
 Retrieve the menu item identifier of a menu item at specified position in a menu. More...
 
MG_EXPORT int GUIAPI GetMenuItemInfo (HMENU hmnu, LINT item, UINT flag, PMENUITEMINFO pmii)
 Retrieve information about a menu item. More...
 
MG_EXPORT HMENU GUIAPI GetPopupSubMenu (HMENU hpppmnu)
 Retrieve the submenu of the specified popup menu. More...
 
MG_EXPORT HMENU GUIAPI StripPopupHead (HMENU hpppmnu)
 Strips the title of the popup menu. More...
 
MG_EXPORT HMENU GUIAPI GetSubMenu (HMENU hmnu, int pos)
 Retrieve the handle to the submenu activated by the specified menu item. More...
 
MG_EXPORT HMENU GUIAPI GetSystemMenu (HWND hwnd, BOOL flag)
 Allows the application to access the window menu (also known as the system menu) for copying and modifying. More...
 
MG_EXPORT UINT GUIAPI EnableMenuItem (HMENU hmnu, LINT item, UINT flag)
 Enables, disables, or grays the specified menu item. More...
 
MG_EXPORT int GUIAPI CheckMenuRadioItem (HMENU hmnu, LINT first, LINT last, LINT checkitem, UINT flag)
 Check a specified menu item and makes it a radio item. More...
 
MG_EXPORT int GUIAPI SetMenuItemBitmaps (HMENU hmnu, LINT item, UINT flag, PBITMAP hBmpUnchecked, PBITMAP hBmpChecked)
 Associates the specified bitmap with a menu item. More...
 
MG_EXPORT int GUIAPI SetMenuItemInfo (HMENU hmnu, LINT item, UINT flag, PMENUITEMINFO pmii)
 Changes information about a menu item. More...
 
MG_EXPORT HWND GUIAPI CreateMainWindowIndirectParamEx (PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC WndProc, LPARAM lParam, const char *werdr_name, WINDOW_ELEMENT_ATTR *we_attrs, const char *window_name, const char *layer_name)
 Uses a dialog template and other information to create a modeless main window and controls in it, and pass a parameter to the window procedure. More...
 
static HWND GUIAPI CreateMainWindowIndirectParam (PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC WndProc, LPARAM lParam)
 A simplified version of CreateMainWindowIndirectParamEx. More...
 
static HWND GUIAPI CreateMainWindowIndirect (PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC WndProc)
 A simplified version of CreateMainWindowIndirectParam. More...
 
MG_EXPORT BOOL GUIAPI DestroyMainWindowIndirect (HWND hMainWin)
 Destroys a main window created by CreateMainWindowIndirectParam. More...
 
MG_EXPORT int GUIAPI DialogBoxIndirectParamEx (PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC DlgProc, LPARAM lParam, const char *werdr_name, WINDOW_ELEMENT_ATTR *we_attrs, const char *window_name, const char *layer_name)
 Creates a modal dialog box from a dialog box template in memory and other information. More...
 
static int GUIAPI DialogBoxIndirectParam (PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC DlgProc, LPARAM lParam)
 A simplified version of DialogBoxIndirectParamEx. More...
 
MG_EXPORT BOOL GUIAPI EndDialog (HWND hDlg, int endCode)
 Destroys a modal dialog box, causing MiniGUI to end any processing for the dialog box. More...
 
MG_EXPORT void GUIAPI DestroyAllControls (HWND hWnd)
 Destroys all controls in a window. More...
 
MG_EXPORT HWND GUIAPI GetDlgDefPushButton (HWND hWnd)
 Get the default push button control in a window. More...
 
MG_EXPORT LINT GUIAPI GetDlgCtrlID (HWND hwndCtl)
 Get the integer identifier of a control. More...
 
MG_EXPORT HWND GUIAPI GetDlgItem (HWND hDlg, LINT nIDDlgItem)
 Retrieve the handle to a control in a dialog box. More...
 
MG_EXPORT UINT GUIAPI GetDlgItemInt (HWND hDlg, LINT nIDDlgItem, BOOL *lpTranslated, BOOL bSigned)
 Translates the text of a control in a dialog box into an integer value. More...
 
MG_EXPORT int GUIAPI GetDlgItemText (HWND hDlg, LINT nIDDlgItem, char *lpString, int nMaxCount)
 Retrieve the title or text associated with a control in a dialog box. More...
 
MG_EXPORT char *GUIAPI GetDlgItemText2 (HWND hDlg, LINT id, int *lenPtr)
 Retrieve the title or text associated with a control in a dialog box. More...
 
MG_EXPORT HWND GUIAPI GetNextDlgGroupItem (HWND hDlg, HWND hCtl, BOOL bPrevious)
 Retrieve the handle to the first control in a group of controls that precedes (or follows) the specified control in a dialog box. More...
 
MG_EXPORT HWND GUIAPI GetNextDlgTabItem (HWND hDlg, HWND hCtl, BOOL bPrevious)
 Retrieve the handle to the first control that has the WS_TABSTOP style that precedes (or follows) the specified control. More...
 
MG_EXPORT LRESULT GUIAPI SendDlgItemMessage (HWND hDlg, LINT nIDDlgItem, UINT message, WPARAM wParam, LPARAM lParam)
 Send a message to the specified control in a dialog box. More...
 
MG_EXPORT BOOL GUIAPI SetDlgItemInt (HWND hDlg, LINT nIDDlgItem, UINT uValue, BOOL bSigned)
 Set the text of a control in a dialog box to the string representation of a specified integer value. More...
 
MG_EXPORT void GUIAPI CheckDlgButton (HWND hDlg, LINT nIDDlgItem, int nCheck)
 Changes the check status of a button control. More...
 
MG_EXPORT void GUIAPI CheckRadioButton (HWND hDlg, LINT idFirstButton, LINT idLastButton, LINT idCheckButton)
 Adds a check mark to (checks) a specified radio button in a group and removes a check mark from (clears) all other radio buttons in the group. More...
 
MG_EXPORT int GUIAPI IsDlgButtonChecked (HWND hDlg, LINT idButton)
 Determine whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither. More...
 
MG_EXPORT int GUIAPI MessageBox (HWND hParentWnd, const char *pszText, const char *pszCaption, DWORD dwStyle)
 Displays a message box within one, two, or three push buttons. More...
 
MG_EXPORT void GUIAPI MessageBeep (DWORD dwBeep)
 Makes a sound of beep. More...
 

Variables

MG_EXPORT WNDPROC __mg_def_proc [4]
 The default window callback procedure array. More...
 

Detailed Description

This file includes windowing interfaces of MiniGUI.

Author
Wei Yongming vince.nosp@m.nt@m.nosp@m.inigu.nosp@m.i.or.nosp@m.g
Date
2002/01/26
   This file is part of MiniGUI, a mature cross-platform windowing
   and Graphics User Interface (GUI) support system for embedded systems
   and smart IoT devices.

   Copyright (C) 2002~2020, Beijing FMSoft Technologies Co., Ltd.
   Copyright (C) 1998~2002, WEI Yongming

   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/blog/minigui-licensing-policy/>.

Definition in file window.h.