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

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

#include <stddef.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  _MSG
 
struct  _HOOKINFO
 
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_NCLBUTTONDOWN   0x0008
 Left mouse button down message in the non-client area. More...
 
#define MSG_NCLBUTTONUP   0x0009
 Left mouse button up message in the non-client area. More...
 
#define MSG_NCLBUTTONDBLCLK   0x000A
 Left mouse button double clicked in the non-client area. More...
 
#define MSG_NCMOUSEMOVE   0x000B
 Mouse moves in the non-client area. More...
 
#define MSG_NCRBUTTONDOWN   0x000C
 Right mouse button down message in the non-client area. More...
 
#define MSG_NCRBUTTONUP   0x000D
 Right mouse button up message in the non-client area. More...
 
#define MSG_NCRBUTTONDBLCLK   0x000E
 Right mouse button double clicked in the non-client area. More...
 
#define MSG_KEYDOWN   0x0010
 User presses a key down. More...
 
#define MSG_CHAR   0x0011
 A character translated from MSG_KEYDOWN message. More...
 
#define MSG_KEYUP   0x0012
 User releases up a key. More...
 
#define MSG_SYSKEYDOWN   0x0013
 User presses down a key when <Alt> key is down. More...
 
#define MSG_SYSCHAR   0x0014
 A system character translated from MSG_SYSKEYDOWN message. More...
 
#define MSG_SYSKEYUP   0x0015
 User releases up a key when <Alt> key is down. More...
 
#define MSG_KEYLONGPRESS   0x0016
 A key is long pressed. More...
 
#define MSG_KEYALWAYSPRESS   0x0017
 A key is always pressed. More...
 
#define MSG_KEYSYM   0x0018
 A key symbol translated from MSG_KEYDOWN messages. More...
 
#define MSG_UTF8CHAR   0x0019
 A character translated from MSG_KEYDOWN message. More...
 
#define DEF_LPRESS_TIME   500
 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
 Sets 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
 Sets 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_SHOWWINDOW   0x00A0
 Indicates that the window has been shown or hidden. 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   0x00E1
 Left mouse button down message on the desktop. More...
 
#define MSG_DT_LBUTTONUP   0x00E2
 Left mouse button up message on the desktop. More...
 
#define MSG_DT_LBUTTONDBLCLK   0x00E3
 Left mouse button double clicked message on the desktop. More...
 
#define MSG_DT_MOUSEMOVE   0x00E4
 The mouse moved message on the desktop. More...
 
#define MSG_DT_RBUTTONDOWN   0x00E5
 Right mouse button down message on the desktop. More...
 
#define MSG_DT_RBUTTONUP   0x00E6
 Right mouse button up message on the desktop. More...
 
#define MSG_DT_RBUTTONDBLCLK   0x00E7
 Right mouse button double clicked message on the desktop. More...
 
#define MSG_DT_KEYDOWN   0x00E8
 User presses a key down on the desktop. More...
 
#define MSG_DT_KEYUP   0x00EA
 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
 Sends 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
 You can 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
 Sent to the control to get the length of the text. More...
 
#define MSG_GETTEXT   0x0133
 Sent to the control to get the text. More...
 
#define MSG_SETTEXT   0x0134
 Sent to the control to set the text. More...
 
#define MSG_ENABLE   0x0135
 Indicates the window is disabled/enabled. More...
 
#define MSG_IDLE   0x0142
 Indicates the system enters idle loop. More...
 
#define MSG_TIMER   0x0144
 Indicates a timer has expired. More...
 
#define MSG_FDEVENT   0x0146
 Indicates an event of registered file descriptor occurred. More...
 
#define MSG_SRVNOTIFY   0x0147
 Indicates a notification from the server of MiniGUI-Processes. More...
 
#define MSG_DOESNEEDIME   0x0150
 Sends 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 SendAsyncMessage   SendMessage
 Is an alias of SendMessage for MiniGUI-Processes and MiniGUI-Standalone. More...
 
#define HOOK_GOON   0
 
#define HOOK_STOP   1
 
#define WS_NONE   0x00000000L
 None style. More...
 
#define WS_CHILD   0x40000000L
 Indicates the window is a child. 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_DLGFRAME   0x00800000L
 The window has a fixed frame, i.e. user can not drag the border of the window. More...
 
#define WS_BORDER   0x00400000L
 Creates a window with border. More...
 
#define WS_THICKFRAME   0x00200000L
 Creates a window with thick frame. More...
 
#define WS_THINFRAME   0x00100000L
 Creates a window with thin frame. More...
 
#define WS_VSCROLL   0x00080000L
 Creates a window with vertical scroll bar. More...
 
#define WS_HSCROLL   0x00040000L
 Creates a window with horizontal scroll bar. More...
 
#define WS_GROUP   0x00020000L
 Indicates the control is the leader of a group. More...
 
#define WS_TABSTOP   0x00010000L
 Indicates the user can set the input focus to the control by using Tab key. More...
 
#define WS_EX_CONTROL_MASK   0x0000000FL
 The extended style mask for control usage. More...
 
#define WS_EX_INTERNAL_MASK   0xF0000000L
 The extended style mask for internal usage. More...
 
#define WS_EX_NONE   0x00000000L
 No any extended window style. More...
 
#define WS_EX_TROUNDCNS   0x00000010L
 The window have round corners in top. More...
 
#define WS_EX_BROUNDCNS   0x00000020L
 The window have round corners at bottom. 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 a topmost (always on top) window. 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_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 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 MainWindowCleanup(hwnd)   MainWindowThreadCleanup(hwnd)
 Is an alias of MainWindowThreadCleanup. 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 SetFocus   SetFocusChild
 
#define GetFocus   GetFocusChild
 
#define GetForegroundWindow   GetActiveWindow
 
#define SetForegroundWindow   SetActiveWindow
 
#define GetWindowElementColor(iItem)   GetWindowElementPixelEx(HWND_NULL, (HDC)-1, iItem)
 Get window element color. More...
 
#define GetLargeSystemIcon(iItem)   GetLargeSystemIconEx(HWND_NULL, iItem)
 Retrives a large (32x32) system icon by its identifier in default renderer. More...
 
#define GetSmallSystemIcon(iItem)   GetSmallSystemIconEx(HWND_NULL, iItem)
 Retrives 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 CreateWindow(class_name, caption, style, id, x, y, w, h, parent, add_data)
 A simplified version of CreateWindowEx. More...
 
#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 struct _HOOKINFO HOOKINFO
 
typedef int(* SRVEVTHOOK) (PMSG pMsg)
 The type of the event hook. 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 LRESULT(* WNDPROC) (HWND, UINT, WPARAM, LPARAM)
 Type of the window callback procedure. More...
 
typedef struct _MAINWINCREATE MAINWINCREATE
 
typedef struct _SCROLLINFO SCROLLINFO
 
typedef struct _WNDCLASS WNDCLASS
 
typedef void(* NOTIFPROC) (HWND hwnd, LINT id, int nc, DWORD add_data)
 Type of the notification callback procedure. More...
 
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
 

Functions

MG_EXPORT BOOL GUIAPI PeekMessageEx (PMSG pMsg, HWND hWnd, UINT nMsgFilterMin, UINT nMsgFilterMax, BOOL bWait, UINT uRemoveMsg)
 Peeks a message from the message queue of a main window. More...
 
static BOOL GUIAPI GetMessage (PMSG pMsg, HWND hWnd)
 Gets a message from the message queue of a main window. More...
 
MG_EXPORT BOOL GUIAPI WaitMessage (PMSG pMsg, HWND hMainWnd)
 Waits for a message from the message queue of a main window. More...
 
MG_EXPORT BOOL GUIAPI HavePendingMessage (HWND hMainWnd)
 Checks 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)
 Peeks 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)
 Peeks 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)
 Sends a message to a window. More...
 
MG_EXPORT void GUIAPI SetAutoRepeatMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 Sets the auto-repeat message. More...
 
MG_EXPORT int GUIAPI SendNotifyMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
 Sends a notification message to a window. More...
 
MG_EXPORT int GUIAPI BroadcastMessage (UINT nMsg, WPARAM wParam, LPARAM lParam)
 Broadcasts a message to all main window on the desktop. 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)
 Sets 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)
 Empties a message queue. More...
 
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...
 
MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook)
 Sets an event hook in the server of MiniGUI-Processes. 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 a window element gal_pixel color. 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...
 
MG_EXPORT const 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...
 
MG_EXPORT const 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 BITMAP cache. More...
 
MG_EXPORT const 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 AddInnerRes (INNER_RES *inner_res, int count, BOOL copy)
 Add some incore resource into the resource manager in order to call LoadResource to get those resource. 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)
 Retrive 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 void GUIAPI MainWindowThreadCleanup (HWND hMainWnd)
 Cleans up system resource associated with a main window. More...
 
MG_EXPORT 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 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...
 
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 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)
 Determines whether the specified window is enabled for mouse and keyboard input. More...
 
MG_EXPORT BOOL GUIAPI GetClientRect (HWND hWnd, PRECT prc)
 Retrives the client rectangle of 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)
 Sets the background color of a window. More...
 
MG_EXPORT PLOGFONT GUIAPI GetWindowFont (HWND hWnd)
 Retrives the default font of a window. More...
 
MG_EXPORT PLOGFONT GUIAPI SetWindowFont (HWND hWnd, PLOGFONT pLogFont)
 Sets the default font of a window. More...
 
MG_EXPORT HCURSOR GUIAPI GetWindowCursor (HWND hWnd)
 Retrives the current cursor of a window. More...
 
MG_EXPORT HCURSOR GUIAPI SetWindowCursor (HWND hWnd, HCURSOR hNewCursor)
 Sets the current cursor of a window. More...
 
MG_EXPORT HICON GUIAPI GetWindowIcon (HWND hWnd)
 Retrives the current icon of a window. More...
 
MG_EXPORT HICON GUIAPI SetWindowIcon (HWND hWnd, HICON hIcon, BOOL bRedraw)
 Sets the current icon of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowStyle (HWND hWnd)
 Retrives the style of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowExStyle (HWND hWnd)
 Retrives 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)
 Retrives the callback procedure of a window. More...
 
MG_EXPORT WNDPROC GUIAPI SetWindowCallbackProc (HWND hWnd, WNDPROC newProc)
 Sets the callback procedure of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowAdditionalData (HWND hWnd)
 Retrives the first additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI SetWindowAdditionalData (HWND hWnd, DWORD newData)
 Sets the first additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowAdditionalData2 (HWND hWnd)
 Retrives the second additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI SetWindowAdditionalData2 (HWND hWnd, DWORD newData)
 Sets the second additional data of a window. More...
 
MG_EXPORT DWORD GUIAPI GetWindowClassAdditionalData (HWND hWnd)
 Retrives the additional data of a control class. More...
 
MG_EXPORT DWORD GUIAPI SetWindowClassAdditionalData (HWND hWnd, DWORD newData)
 Sets the additional data of a control class. More...
 
MG_EXPORT const char *GUIAPI GetWindowCaption (HWND hWnd)
 Retrives the caption of a window. More...
 
MG_EXPORT BOOL GUIAPI SetWindowCaption (HWND hWnd, const char *spCaption)
 Sets 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)
 Retrives 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)
 Determines whether a window is a main window. More...
 
MG_EXPORT BOOL GUIAPI IsControl (HWND hWnd)
 Determines whether a window is a control. More...
 
MG_EXPORT BOOL GUIAPI IsWindow (HWND hWnd)
 Determines whether a window handle identifies an existing window. More...
 
MG_EXPORT BOOL GUIAPI IsDialog (HWND hWnd)
 Determines whether a window handle identifies a dialog window. More...
 
MG_EXPORT HWND GUIAPI GetParent (HWND hWnd)
 Retrieves the handle to a child window's parent window. More...
 
MG_EXPORT HWND GUIAPI GetMainWindowHandle (HWND hWnd)
 Retrives the handle to the main window contains a window. More...
 
MG_EXPORT BOOL GUIAPI IsWindowVisible (HWND hWnd)
 Retrieves the visibility state of the specified window. More...
 
MG_EXPORT BOOL GUIAPI GetWindowRect (HWND hWnd, PRECT prc)
 Retrives the dimensions of the bounding rectangle of a window. More...
 
MG_EXPORT HWND GUIAPI GetNextChild (HWND hWnd, HWND hChild)
 Retrives the next control in a window. More...
 
MG_EXPORT HWND GUIAPI GetNextMainWindow (HWND hMainWnd)
 Retrives the next main window in the system according to the zorder. More...
 
MG_EXPORT HWND GUIAPI GetHosting (HWND hMainWnd)
 Retrives the hosting main window of a main window. More...
 
MG_EXPORT HWND GUIAPI GetFirstHosted (HWND hHosting)
 Retrives the first hosted main window of a main window. More...
 
MG_EXPORT HWND GUIAPI GetNextHosted (HWND hHosting, HWND hHosted)
 Retrives the next hosted main window of a main window. More...
 
MG_EXPORT int GUIAPI GetWindowTextLength (HWND hWnd)
 Retrieves 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)
 Sets the text of a window. More...
 
MG_EXPORT HWND GUIAPI GetFocusChild (HWND hParent)
 Retrieves 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)
 Sets the active child of a window. More...
 
MG_EXPORT HWND GUIAPI GetActiveWindow (void)
 Retrieves the main window handle to the active main window. More...
 
MG_EXPORT HWND GUIAPI SetActiveWindow (HWND hMainWnd)
 Sets a main window to be the active main window. More...
 
MG_EXPORT HWND GUIAPI GetCapture (void)
 Retrives the handle to the window (if any) that has captured the mouse. More...
 
MG_EXPORT HWND GUIAPI SetCapture (HWND hWnd)
 Sets 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)
 Retrives the handle to the window (if any) which is just beneath the mouse cursor. More...
 
MG_EXPORT HWND GUIAPI WindowFromPointEx (POINT pt, BOOL bRecursion)
 Retrieves a handle to the window that contains the specified point. More...
 
MG_EXPORT HWND GUIAPI ChildWindowFromPointEx (HWND hParent, POINT pt, UINT uFlags)
 Retrives 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)
 Retrives 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...
 
MG_EXPORT const BITMAP *GUIAPI GetSystemBitmapEx (const char *rdr_name, const char *id)
 Retrives the system bitmap object by identifier. More...
 
MG_EXPORT const BITMAP *GUIAPI GetSystemBitmapByHwnd (HWND hWnd, const char *id)
 Retrives the system bitmap object by identifier. More...
 
MG_EXPORT const BITMAP *GUIAPI GetSystemBitmap (HWND hWnd, const char *id)
 Retrives 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)
 Retrives a large system icon by its identifier in default renderer. More...
 
MG_EXPORT HICON GUIAPI GetSmallSystemIconEx (HWND hWnd, int iItem)
 Retrives 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)
 Retrieves 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)
 Retrives the minimum and maximum position values for the specified scroll bar. More...
 
MG_EXPORT BOOL GUIAPI SetScrollPos (HWND hWnd, int iSBar, int iNewPos)
 Sets 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)
 Sets 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)
 Sets the parameters of a scroll bar. More...
 
MG_EXPORT BOOL GUIAPI GetScrollInfo (HWND hWnd, int iSBar, PSCROLLINFO lpsi)
 Retrieves 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...
 
MG_EXPORT const char *GUIAPI GetClassName (HWND hWnd)
 Retrieves the name of the class to which the specified window belongs. More...
 
MG_EXPORT BOOL GUIAPI GetWindowClassInfo (PWNDCLASS pWndClass)
 Retrieves the information of the specified window class. More...
 
MG_EXPORT BOOL GUIAPI SetWindowClassInfo (const WNDCLASS *pWndClass)
 Sets 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)
 Sets a new notification callback procedure for a control. More...
 
MG_EXPORT NOTIFPROC GUIAPI GetNotificationCallback (HWND hwnd)
 Gets 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 DWORD GUIAPI GetTickCount (void)
 Retrieves the tick counts that have elapsed since MiniGUI was started. More...
 
MG_EXPORT BOOL GUIAPI IsTimerInstalled (HWND hWnd, LINT id)
 Determines whether a timer is installed. More...
 
MG_EXPORT BOOL GUIAPI HaveFreeTimer (void)
 Determines whether there is any free timer slot in the system. 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)
 Retrives status of the current IME window. More...
 
MG_EXPORT int GUIAPI SetIMEStatus (int StatusCode, int Value)
 Sets the status of the current IME window. More...
 
MG_EXPORT int GUIAPI GetIMETargetInfo (IME_TARGET_INFO *info)
 Retrives the target info of the current IME window. More...
 
MG_EXPORT int GUIAPI SetIMETargetInfo (const IME_TARGET_INFO *info)
 Sets the target info of the current IME window. More...
 
MG_EXPORT int GUIAPI GetIMEPos (POINT *pt)
 Retrives 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)
 Sets 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)
 Gets 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)
 Determines 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)
 Retrieves 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)
 Retrieves 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)
 Determines the number of items in a menu. More...
 
MG_EXPORT LINT GUIAPI GetMenuItemID (HMENU hmnu, int pos)
 Retrieves 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)
 Retrieves information about a menu item. More...
 
MG_EXPORT HMENU GUIAPI GetPopupSubMenu (HMENU hpppmnu)
 Retrieves 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)
 Retrieves 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)
 Checks 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)
 Gets the default push button control in a window. More...
 
MG_EXPORT LINT GUIAPI GetDlgCtrlID (HWND hwndCtl)
 Gets the integer identifier of a control. More...
 
MG_EXPORT HWND GUIAPI GetDlgItem (HWND hDlg, LINT nIDDlgItem)
 Retrives 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)
 Retrieves the title or text associated with a control in a dialog box. More...
 
MG_EXPORT char *GUIAPI GetDlgItemText2 (HWND hDlg, LINT id, int *lenPtr)
 Retrieves the title or text associated with a control in a dialog box. More...
 
MG_EXPORT HWND GUIAPI GetNextDlgGroupItem (HWND hDlg, HWND hCtl, BOOL bPrevious)
 Retrieves 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)
 Retrieves 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)
 Sends a message to the specified control in a dialog box. More...
 
MG_EXPORT BOOL GUIAPI SetDlgItemInt (HWND hDlg, LINT nIDDlgItem, UINT uValue, BOOL bSigned)
 Sets 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)
 Determines 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 [3]
 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~2018, 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/en/about/licensing-policy/>.

Definition in file window.h.