MiniGUI API Reference (MiniGUI-Processes)
v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Go to the documentation of this file.
64 #ifndef _MGUI_WINDOW_H
65 #define _MGUI_WINDOW_H
72 #ifdef _MGHAVE_VIRTUAL_WINDOW
74 #include <semaphore.h>
91 #define MSG_NULLMSG 0x0000
92 #define MSG_SYNCMSG 0x0000
100 #define MSG_FIRSTMOUSEMSG 0x0001
124 #define MSG_LBUTTONDOWN 0x0001
145 #define MSG_LBUTTONUP 0x0002
166 #define MSG_LBUTTONDBLCLK 0x0003
187 #define MSG_MOUSEMOVE 0x0004
211 #define MSG_RBUTTONDOWN 0x0005
232 #define MSG_RBUTTONUP 0x0006
253 #define MSG_RBUTTONDBLCLK 0x0007
276 #define MSG_MBUTTONDOWN 0x0008
299 #define MSG_MBUTTONUP 0x0009
320 #define MSG_MBUTTONDBLCLK 0x000A
322 #define MSG_NCMOUSEOFF 0x000A
343 #define MSG_NCLBUTTONDOWN 0x000B
364 #define MSG_NCLBUTTONUP 0x000C
385 #define MSG_NCLBUTTONDBLCLK 0x000D
406 #define MSG_NCMOUSEMOVE 0x000E
427 #define MSG_NCRBUTTONDOWN 0x000F
448 #define MSG_NCRBUTTONUP 0x0010
469 #define MSG_NCRBUTTONDBLCLK 0x0011
490 #define MSG_NCMBUTTONDOWN 0x0012
511 #define MSG_NCMBUTTONUP 0x0013
532 #define MSG_NCMBUTTONDBLCLK 0x0014
534 #define MSG_LASTMOUSEMSG 0x0014
544 #define MSG_FIRSTKEYMSG 0x0015
568 #define MSG_KEYDOWN 0x0015
596 #define MSG_CHAR 0x0016
616 #define MSG_KEYUP 0x0017
636 #define MSG_SYSKEYDOWN 0x0018
656 #define MSG_SYSCHAR 0x0019
676 #define MSG_SYSKEYUP 0x001A
694 #define MSG_KEYLONGPRESS 0x001B
710 #define MSG_KEYALWAYSPRESS 0x001C
737 #define MSG_KEYSYM 0x001D
761 #define MSG_UTF8CHAR 0x001E
769 #define DEF_LPRESS_TIME 200
777 #define DEF_APRESS_TIME 1000
783 #define DEF_INTERVAL_TIME 200
785 extern DWORD __mg_key_longpress_time;
786 extern DWORD __mg_key_alwayspress_time;
787 extern DWORD __mg_interval_time;
793 #define SetKeyLongPressTime(time) \
795 __mg_key_longpress_time = time; \
802 #define SetKeyAlwaysPressTime(time) \
804 __mg_key_alwayspress_time = time; \
811 #define SetIntervalTime(time) \
813 __mg_interval_time = time; \
816 #define MSG_LASTKEYMSG 0x001F
826 #define MSG_FIRSTPOSTMSG 0x0020
852 #define MSG_SETCURSOR 0x0020
856 #define HT_UNKNOWN 0x00
858 #define HT_MENUBAR 0x02
859 #define HT_TRANSPARENT 0x03
861 #define HT_BORDER 0x04
862 #define HT_CLIENT 0x0C
864 #define HT_NEEDCAPTURE 0x10
866 #define HT_CLOSEBUTTON 0x15
867 #define HT_MAXBUTTON 0x16
868 #define HT_MINBUTTON 0x17
869 #define HT_HSCROLL 0x18
870 #define HT_VSCROLL 0x19
872 #define HT_DRAGGABLE 0x20
873 #define HT_CAPTION 0x20
876 #define HT_BORDER_MASK 0x28
877 #define HT_BORDER_TOP 0x28
878 #define HT_BORDER_BOTTOM 0x29
879 #define HT_BORDER_LEFT 0x2A
880 #define HT_BORDER_RIGHT 0x2B
883 #define HT_CORNER_MASK 0x2C
884 #define HT_CORNER_TL 0x2C
885 #define HT_CORNER_TR 0x2D
886 #define HT_CORNER_BL 0x2E
887 #define HT_CORNER_BR 0x2F
891 #define HT_SB_MASK 0x50
893 #define HT_SB_LEFTARROW 0x50
894 #define HT_SB_RIGHTARROW 0x51
895 #define HT_SB_LEFTSPACE 0x52
896 #define HT_SB_RIGHTSPACE 0x53
897 #define HT_SB_HTHUMB 0x54
899 #define HT_SB_VMASK 0x58
901 #define HT_SB_UPARROW 0x58
902 #define HT_SB_DOWNARROW 0x59
903 #define HT_SB_UPSPACE 0x5a
904 #define HT_SB_DOWNSPACE 0x5b
905 #define HT_SB_VTHUMB 0x5c
907 #define HT_SB_UNKNOWN 0x5f
910 #define HT_USER_MASK 0x80
918 #define MSG_NCHITTEST 0x0021
926 #define MSG_HITTEST MSG_NCHITTEST
932 #define MSG_CHANGESIZE 0x0022
935 #define MSG_QUERYNCRECT 0x0023
941 #define MSG_QUERYCLIENTAREA 0x0024
966 #define MSG_SIZECHANGING 0x0025
990 #define MSG_SIZECHANGED 0x0026
1008 #define MSG_CSIZECHANGED 0x0027
1020 #define MSG_SETFOCUS 0x0030
1032 #define MSG_KILLFOCUS 0x0031
1042 #define MSG_MOUSEACTIVE 0x0032
1052 #define MSG_ACTIVE 0x0033
1058 #define MSG_CHILDHIDDEN 0x0034
1059 #define RCTM_CLICK 1
1061 #define RCTM_MESSAGE 3
1062 #define RCTM_SHOWCTRL 4
1088 #define MSG_ACTIVEMENU 0x0040
1107 #define MSG_DEACTIVEMENU 0x0041
1119 #define SB_LINEUP 0x01a
1126 #define SB_LINEDOWN 0x02
1133 #define SB_LINELEFT 0x03
1140 #define SB_LINERIGHT 0x04
1147 #define SB_PAGEUP 0x05
1154 #define SB_PAGEDOWN 0x06
1161 #define SB_PAGELEFT 0x07
1168 #define SB_PAGERIGHT 0x08
1175 #define SB_THUMBPOSITION 0x09
1182 #define SB_THUMBTRACK 0x0A
1196 #define SB_BOTTOM 0x0C
1203 #define SB_ENDSCROLL 0x0D
1235 #define MSG_HSCROLL 0x0042
1265 #define MSG_VSCROLL 0x0043
1279 #define MSG_NCSETCURSOR 0x0044
1296 #define MSG_MOUSEMOVEIN 0x0050
1303 #define MSG_WINDOWDROPPED 0x0051
1305 #define MSG_LASTPOSTMSG 0x005F
1315 #define MSG_FIRSTCREATEMSG 0x0060
1352 #define MSG_CREATE 0x0060
1382 #define MSG_NCCREATE 0x0061
1385 #define MSG_INITPANES 0x0062
1386 #define MSG_DESTROYPANES 0x0063
1401 #define MSG_DESTROY 0x0064
1404 #define MSG_NCDESTROY 0x0065
1413 #define MSG_CLOSE 0x0066
1416 #define MSG_NCCALCSIZE 0x0067
1427 #define MSG_MAXIMIZE 0x0068
1438 #define MSG_MINIMIZE 0x0069
1449 #define MSG_HELP 0x006A
1460 #define MSG_GESTURETEST 0x006B
1462 #define MSG_LASTCREATEMSG 0x006F
1493 #define MSG_FIRSTEXTRAINPUTMSG 0x0070
1495 #define AXIS_SCROLL_INVALID 0
1496 #define AXIS_SCROLL_VERTICAL 1
1497 #define AXIS_SCROLL_HORIZONTAL 2
1499 #define AXIS_SOURCE_INVALID 0
1500 #define AXIS_SOURCE_WHEEL 1
1501 #define AXIS_SOURCE_FINGER 2
1502 #define AXIS_SOURCE_CONTINUOUS 3
1503 #define AXIS_SOURCE_WHEEL_TILT 4
1526 #define MSG_EXIN_AXIS 0x0070
1546 #define MSG_EXIN_BUTTONDOWN 0x0071
1566 #define MSG_EXIN_BUTTONUP 0x0072
1580 #define MSG_EXIN_TOUCH_DOWN 0x0073
1588 #define MSG_EXIN_TOUCH_UP 0x0074
1602 #define MSG_EXIN_TOUCH_MOTION 0x0075
1610 #define MSG_EXIN_TOUCH_CANCEL 0x0076
1630 #define MSG_EXIN_TOUCH_FRAME 0x0077
1632 #define SWITCH_INVALID 0
1633 #define SWITCH_LID 1
1634 #define SWITCH_TABLET_MODE 2
1636 #define SWITCH_STATE_INVALID 0
1637 #define SWITCH_STATE_ON 1
1638 #define SWITCH_STATE_OFF 2
1655 #define MSG_EXIN_SWITCH_TOGGLE 0x007A
1668 #define MSG_EXIN_GESTURE_SWIPE_BEGIN 0x0080
1685 #define MSG_EXIN_GESTURE_SWIPE_UPDATE 0x0081
1700 #define MSG_EXIN_GESTURE_SWIPE_END 0x0082
1718 #define MSG_EXIN_GESTURE_PINCH_BEGIN 0x0083
1741 #define MSG_EXIN_GESTURE_PINCH_UPDATE 0x0084
1761 #define MSG_EXIN_GESTURE_PINCH_END 0x0085
1775 #define MSG_EXIN_END_CHANGES 0x008F
1777 #define TABLET_TOOL_X 0
1778 #define TABLET_TOOL_Y 1
1779 #define TABLET_TOOL_PRESSURE 2
1780 #define TABLET_TOOL_DISTANCE 3
1781 #define TABLET_TOOL_TILT_X 4
1782 #define TABLET_TOOL_TILT_Y 5
1783 #define TABLET_TOOL_ROTATION 6
1784 #define TABLET_TOOL_SLIDER 7
1785 #define TABLET_TOOL_SIZE_MAJOR 8
1786 #define TABLET_TOOL_SIZE_MINOR 9
1787 #define TABLET_TOOL_WHEEL 10
1789 #define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
1790 #define TABLET_TOOL_PROXIMITY_STATE_OUT 1
1791 #define TABLET_TOOL_PROXIMITY_STATE_IN 2
1793 #define TABLET_TOOL_TIP_INVALID 0
1794 #define TABLET_TOOL_TIP_UP 1
1795 #define TABLET_TOOL_TIP_DOWN 2
1797 #define TABLET_BUTTON_STATE_INVALID 0
1798 #define TABLET_BUTTON_STATE_RELEASED 1
1799 #define TABLET_BUTTON_STATE_PRESSED 2
1849 #define MSG_EXIN_TABLET_TOOL_AXIS 0x0090
1872 #define MSG_EXIN_TABLET_TOOL_PROXIMITY 0x0091
1895 #define MSG_EXIN_TABLET_TOOL_TIP 0x0092
1912 #define MSG_EXIN_TABLET_TOOL_BUTTON 0x0093
1931 #define MSG_EXIN_TABLET_PAD_BUTTON 0x0094
1933 #define TABLET_PAD_RING_SOURCE_UNKNOWN 0
1934 #define TABLET_PAD_RING_SOURCE_FINGER 1
1959 #define MSG_EXIN_TABLET_PAD_RING 0x0095
1961 #define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
1962 #define TABLET_PAD_STRIP_SOURCE_FINGER 1
1986 #define MSG_EXIN_TABLET_PAD_STRIP 0x0096
2001 #define MSG_EXIN_USER_BEGIN 0x009A
2016 #define MSG_EXIN_USER_UPDATE 0x009B
2031 #define MSG_EXIN_USER_END 0x009C
2033 #define MSG_LASTEXTRAINPUTMSG 0x009F
2043 #define MSG_FIRSTPAINTMSG 0x00A0
2069 #define MSG_SHOWWINDOW 0x00A0
2092 #define MSG_MOVEWINDOW 0x00A1
2112 #define MSG_ERASEBKGND 0x00B0
2127 #define MSG_PAINT 0x00B1
2144 #define MSG_NCPAINT 0x00B2
2150 #define MSG_NCACTIVATE 0x00B3
2156 #define MSG_SYNCPAINT 0x00B4
2158 #define MSG_LASTPAINTMSG 0x00BF
2168 #define MSG_FIRSTSESSIONMSG 0x00C0
2170 #define MSG_STARTSESSION 0x00C0
2171 #define MSG_QUERYENDSESSION 0x00C1
2172 #define MSG_ENDSESSION 0x00C2
2173 #define MSG_REINITSESSION 0x00C3
2176 #define MSG_REINITDESKOPS 0x00C4
2178 #define MSG_ERASEDESKTOP 0x00CE
2179 #define MSG_PAINTDESKTOP 0x00CF
2181 #define MSG_DT_MOUSEOFF 0x00D0
2200 #define MSG_DT_LBUTTONDOWN 0x00D1
2219 #define MSG_DT_LBUTTONUP 0x00D2
2238 #define MSG_DT_LBUTTONDBLCLK 0x00D3
2257 #define MSG_DT_MOUSEMOVE 0x00D4
2277 #define MSG_DT_RBUTTONDOWN 0x00D5
2296 #define MSG_DT_RBUTTONUP 0x00D6
2315 #define MSG_DT_RBUTTONDBLCLK 0x00D7
2335 #define MSG_DT_MBUTTONDOWN 0x00D8
2354 #define MSG_DT_MBUTTONUP 0x00D9
2373 #define MSG_DT_MBUTTONDBLCLK 0x00DA
2375 #define MSG_DT_KEYOFF 0x00CB
2394 #define MSG_DT_KEYDOWN 0x00E0
2396 #define MSG_DT_CHAR 0x00E1
2414 #define MSG_DT_KEYUP 0x00E2
2416 #define MSG_DT_SYSKEYDOWN 0x00E3
2417 #define MSG_DT_SYSCHAR 0x00E4
2418 #define MSG_DT_SYSKEYUP 0x00E5
2420 #define MSG_DT_KEYLONGPRESS 0x00E6
2421 #define MSG_DT_KEYALWAYSPRESS 0x00E7
2423 #define MSG_LASTSESSIONMSG 0x00EF
2433 #define MSG_FIRSTWINDOWMSG 0x00F0
2435 #define MSG_ADDNEWMAINWIN 0x00F0
2436 #define MSG_REMOVEMAINWIN 0x00F1
2437 #define MSG_MOVETOTOPMOST 0x00F2
2438 #define MSG_SETACTIVEMAIN 0x00F3
2439 #define MSG_GETACTIVEMAIN 0x00F4
2440 #define MSG_SHOWMAINWIN 0x00F5
2441 #define MSG_HIDEMAINWIN 0x00F6
2442 #define MSG_MOVEMAINWIN 0x00F7
2443 #define MSG_SETCAPTURE 0x00F8
2444 #define MSG_GETCAPTURE 0x00F9
2446 #define MSG_ENDTRACKMENU 0x00FA
2447 #define MSG_TRACKPOPUPMENU 0x00FB
2448 #define MSG_CLOSEMENU 0x00FC
2449 #define MSG_SCROLLMAINWIN 0x00FD
2450 #define MSG_CARET_CREATE 0x00FE
2451 #define MSG_CARET_DESTROY 0x00FF
2453 #define MSG_ENABLEMAINWIN 0x0100
2454 #define MSG_ISENABLED 0x0101
2456 #define MSG_SETWINCURSOR 0x0102
2458 #define MSG_GETNEXTMAINWIN 0x0103
2461 #define MSG_SETALWAYSTOP 0x0104
2463 typedef struct _COMPOSITINGINFO {
2469 #define MSG_SETCOMPOSITING 0x0105
2472 #define MSG_DUMPZORDER 0x0106
2475 #define MSG_SETAUTOREPEAT 0x0107
2478 #define MSG_SETGESTUREFLAGS 0x0108
2480 #define MSG_SHOWGLOBALCTRL 0x010A
2481 #define MSG_HIDEGLOBALCTRL 0x010B
2483 typedef struct _DRAGINFO {
2489 #define MSG_STARTDRAGWIN 0x010C
2491 #define MSG_CANCELDRAGWIN 0x010D
2493 #define MSG_CHANGECAPTION 0x010E
2496 typedef struct _WINMASKINFO {
2498 struct _RECT4MASK* rcs;
2502 #define MSG_SETWINDOWMASK 0x010F
2504 #define MSG_LASTWINDOWMSG 0x010F
2514 #define MSG_FIRSTCONTROLMSG 0x0120
2547 #define MSG_COMMAND 0x0120
2553 #define MSG_SYSCOMMAND 0x0121
2559 #define MSG_GETDLGCODE 0x0122
2587 #define MSG_INITDIALOG 0x0123
2590 #define MSG_NEXTDLGCTRL 0x0124
2591 #define MSG_ENTERIDLE 0x0125
2597 #define MSG_DLG_GETDEFID 0x0126
2603 #define MSG_DLG_SETDEFID 0x0127
2613 #define MSG_ISDIALOG 0x0128
2632 #define MSG_INITPAGE 0x0129
2654 #define MSG_SHOWPAGE 0x012A
2675 #define MSG_SHEETCMD 0x012B
2696 #define MSG_INITCONTAINER 0x012C
2726 #define MSG_SVCONTCMD 0x012D
2746 #define MSG_FREEZECTRL 0x012E
2766 #define MSG_FONTCHANGING 0x0130
2776 #define MSG_FONTCHANGED 0x0131
2797 #define MSG_GETTEXTLENGTH 0x0132
2822 #define MSG_GETTEXT 0x0133
2846 #define MSG_SETTEXT 0x0134
2861 #define MSG_ENABLE 0x0135
2886 #define MSG_NOTIFICATION 0x0136
2888 #define MSG_LASTCONTROLMSG 0x013F
2898 #define MSG_FIRSTSYSTEMMSG 0x0140
2900 #define MSG_QUIT 0x0140
2909 #define MSG_IDLE 0x0142
2911 #define MSG_TIMEOUT 0x0143
2928 #define MSG_TIMER 0x0144
2930 #define MSG_CARETBLINK 0x0145
2963 #define MSG_FDEVENT 0x0146
2967 #ifdef _MGRM_PROCESSES
2982 #define MSG_SRVNOTIFY 0x0147
2984 #define MSG_UPDATECLIWIN 0x0148
2988 #define MSG_LAYERCHANGED 0x0149
2993 #define MSG_MANAGE_MSGTHREAD 0x014A
2994 #define MSGTHREAD_SIGNIN 0x00
2995 #define MSGTHREAD_SIGNOUT 0x01
2998 #define MSG_CALC_POSITION 0x014B
3001 #define MSG_WAKEUP_CLIENT 0x014C
3016 #define MSG_DOESNEEDIME 0x0150
3019 #define IME_STATUS_REGISTERED 0x0000
3020 #define IME_STATUS_ENABLED 0x0001
3021 #define IME_STATUS_AUTOTRACK 0x0002
3022 #define IME_STATUS_LANGUAGE 0x0003
3023 #define IME_LANGUAGE_UNKNOWN 0x0000
3024 #define IME_LANGUAGE_LATIN 0x0001
3025 #define IME_LANGUAGE_ZHCN 0x0002
3026 #define IME_LANGUAGE_ZHTW 0x0003
3027 #define IME_STATUS_ENCODING 0x0004
3028 #define IME_ENCODING_LOCAL 0x0000
3029 #define IME_ENCODING_UTF8 0x0001
3030 #define IME_STATUS_VERSION 0x0005
3031 #define IME_STATUS_USER_MIN 0x0006
3032 #define IME_STATUS_USER_MAX 0x0020
3035 #define IME_WINDOW_TYPE_NOT_EDITABLE 0x0000
3036 #define IME_WINDOW_TYPE_EDITABLE 0x0001
3037 #define IME_WINDOW_TYPE_READONLY 0x0002
3038 #define IME_WINDOW_TYPE_PASSWORD 0x0003
3041 #define MSG_IME_REGISTER 0x0151
3042 #define MSG_IME_UNREGISTER 0x0152
3043 #define MSG_IME_OPEN 0x0153
3044 #define MSG_IME_CLOSE 0x0154
3045 #define MSG_IME_SETSTATUS 0x0156
3046 #define MSG_IME_GETSTATUS 0x0157
3047 #define MSG_IME_SETTARGET 0x0158
3048 #define MSG_IME_GETTARGET 0x0159
3049 #define MSG_IME_SETPOS 0x015A
3050 #define MSG_IME_GETPOS 0x015B
3053 #define MSG_IME_SET_TARGET_INFO 0x015C
3054 #define MSG_IME_GET_TARGET_INFO 0x015D
3056 #define MSG_SHOWMENU 0x0160
3057 #define MSG_HIDEMENU 0x0161
3059 #define MSG_ADDTIMER 0x0162
3060 #define MSG_REMOVETIMER 0x0163
3061 #define MSG_RESETTIMER 0x0164
3063 #define MSG_WINDOWCHANGED 0x0165
3065 #define MSG_BROADCASTMSG 0x0166
3067 #define MSG_REGISTERWNDCLASS 0x0167
3068 #define MSG_UNREGISTERWNDCLASS 0x0168
3069 #define MSG_NEWCTRLINSTANCE 0x0169
3070 #define MSG_REMOVECTRLINSTANCE 0x016A
3071 #define MSG_GETCTRLCLASSINFO 0x016B
3072 #define MSG_CTRLCLASSDATAOP 0x016C
3073 #define CCDOP_GETCCI 0x01
3074 #define CCDOP_SETCCI 0x02
3076 #define MSG_REGISTERHOOKFUNC 0x016D
3077 #define MSG_REGISTERHOOKWIN 0x016E
3078 #define MSG_UNREGISTERHOOKWIN 0x016F
3080 #define MSG_LASTSYSTEMMSG 0x016F
3090 #define MSG_FIRSTMENUMSG 0x0170
3093 #define MSG_INITMENU 0x0170
3094 #define MSG_INITMENUPOPUP 0x0171
3095 #define MSG_MENUSELECT 0x0172
3096 #define MSG_MENUCHAR 0x0173
3097 #define MSG_ENTERMENULOOP 0x0174
3098 #define MSG_EXITMENULOOP 0x0175
3099 #define MSG_CONTEXTMENU 0x0176
3100 #define MSG_NEXTMENU 0x0177
3102 #define MSG_LASTMENUMSG 0x018F
3111 #define MSG_FIRSTUSERMSG 0x0800
3121 #define MSG_USER 0x0800
3123 #define MSG_LASTUSERMSG 0xEFFF
3163 #ifdef _MGHAVE_VIRTUAL_WINDOW
3175 #define PM_NOREMOVE 0x0000
3182 #define PM_REMOVE 0x0001
3189 #define PM_NOYIELD 0x0002
3219 UINT nMsgFilterMin,
UINT nMsgFilterMax,
3306 UINT nMsgFilterMax,
UINT uRemoveMsg)
3308 return PeekMessageEx (pMsg, hWnd, nMsgFilterMin, nMsgFilterMax,
3339 UINT nMsgFilterMax,
UINT uRemoveMsg);
3414 #ifdef _MGRM_PROCESSES
3416 #define CLIENTS_TOPMOST -1
3417 #define CLIENTS_ALL -2
3418 #define CLIENTS_EXCEPT_TOPMOST -3
3419 #define CLIENT_ACTIVE -4
3499 #ifdef _MGHAVE_VIRTUAL_WINDOW
3559 #define SendAsyncMessage SendMessage
3652 #ifdef _MGHAVE_VIRTUAL_WINDOW
3679 #define BroadcastMessageInThisThread BroadcastMessage
3697 #define KBD_LAYOUT_DEFAULT "default"
3698 #define KBD_LAYOUT_FRPC "frpc"
3699 #define KBD_LAYOUT_FR "fr"
3700 #define KBD_LAYOUT_DE "de"
3701 #define KBD_LAYOUT_DELATIN1 "delatin1"
3702 #define KBD_LAYOUT_IT "it"
3703 #define KBD_LAYOUT_ES "es"
3704 #define KBD_LAYOUT_ESCP850 "escp850"
3705 #define KBD_LAYOUT_HEBREW "hebrew"
3706 #define KBD_LAYOUT_ARABIC "arabic"
3747 #ifdef _MGCHARSET_UNICODE
3749 MG_EXPORT
int GUIAPI ToUnicode (
UINT keycode,
const BYTE* kbd_state,
3750 wchar_t* wcs,
int wcs_len,
const char* kbd_layout);
3752 MG_EXPORT
int GUIAPI ToAscii (
UINT keycode,
const BYTE* kbd_state,
3753 WORD* ch,
const char* kbd_layout);
3851 #ifdef _MGHAVE_MSG_STRING
3867 MG_EXPORT
const char* GUIAPI Message2Str (
UINT message);
3885 MG_EXPORT
void GUIAPI PrintMessage (FILE* fp,
HWND hWnd,
3924 #define MAX_NR_LISTEN_FD 4
3928 #define POLLIN 0x001
3932 #define POLLOUT 0x004
3936 #define POLLERR 0x008
3967 MG_EXPORT
BOOL GUIAPI RegisterListenFD (
int fd,
int type,
3968 HWND hwnd,
void* context);
3984 MG_EXPORT
BOOL GUIAPI UnregisterListenFD (
int fd);
3995 #define HOOK_OP_MASK 0x00FF
3996 #define HOOK_GOON 0x0000
3997 #define HOOK_STOP 0x0001
3999 #define HOOK_EVENT_MASK 0xFF00
4000 #define HOOK_EVENT_KEY 0x0100
4001 #define HOOK_EVENT_MOUSE 0x0200
4002 #define HOOK_EVENT_EXTRA 0x0400
4195 #ifndef _MGRM_THREADS
4248 #define WS_CTRLMASK 0x0000FFFFL
4254 #define WS_NONE 0x00000000L
4257 #define WS_CAPTIONBAR_MASK 0xF0000000L
4264 #define WS_MINIMIZEBOX 0x80000000L
4271 #define WS_MAXIMIZEBOX 0x40000000L
4277 #define WS_CAPTION 0x20000000L
4283 #define WS_SYSMENU 0x10000000L
4286 #define WS_STATUS_MASK 0x0F000000L
4292 #define WS_VISIBLE 0x08000000L
4298 #define WS_DISABLED 0x04000000L
4304 #define WS_VSCROLL 0x02000000L
4310 #define WS_HSCROLL 0x01000000L
4313 #define WS_BORDER_MASK 0x00F00000L
4320 #define WS_DLGFRAME 0x00800000L
4326 #define WS_THICKFRAME 0x00400000L
4332 #define WS_THINFRAME 0x00200000L
4338 #define WS_BORDER 0x00100000L
4342 #define WS_MISC_MASK 0x000F0000L
4348 #define WS_CHILD 0x00080000L
4355 #define WS_GROUP 0x00040000L
4363 #define WS_TABSTOP 0x00020000L
4366 #define WS_MINIMIZE 0x00040000L
4367 #define WS_MAXIMIZE 0x00020000L
4375 #define WS_ALWAYSTOP 0x00010000L
4378 #define WS_OVERLAPPED 0x00000000L
4379 #define WS_ABSSCRPOS 0x00000000L
4381 #define WS_MAINWIN_ONLY_MASK (WS_CAPTIONBAR_MASK | WS_ALWAYSTOP)
4382 #define WS_CONTROL_ONLY_MASK (WS_CTRLMASK)
4388 #define WS_EX_NONE 0x00000000L
4394 #define WS_EX_CONTROL_MASK 0x0000000FL
4449 #define WS_EX_WINTYPE_MASK 0x0000000FL
4464 #define WS_EX_WINTYPE_TOOLTIP 0x00000001L
4483 #define WS_EX_WINTYPE_GLOBAL 0x00000002L
4508 #define WS_EX_WINTYPE_SCREENLOCK 0x00000003L
4534 #define WS_EX_WINTYPE_DOCKER 0x00000004L
4551 #define WS_EX_WINTYPE_HIGHER 0x00000005L
4568 #define WS_EX_WINTYPE_NORMAL 0x00000006L
4594 #define WS_EX_WINTYPE_LAUNCHER 0x00000007L
4602 #define WS_EX_TROUNDCNS 0x00000010L
4608 #define WS_EX_BROUNDCNS 0x00000020L
4616 #define WS_EX_USEPRIVATECDC 0x00000040L
4622 #define WS_EX_NOTDRAGGABLE 0x00000080L
4623 #define WS_EX_DRAGGABLE 0x00000000L
4629 #define WS_EX_USEPARENTFONT 0x00000100L
4635 #define WS_EX_USEPARENTCURSOR 0x00000200L
4641 #define WS_EX_USEPARENTRDR 0x00000400L
4649 #define WS_EX_NOPARENTNOTIFY 0x00000800L
4657 #define WS_EX_AUTOSECONDARYDC 0x00001000L
4664 #define WS_EX_TRANSPARENT 0x00002000L
4682 #define WS_EX_TOPMOST 0x00004000L
4688 #define WS_EX_TOOLWINDOW 0x00008000L
4691 #define WS_EX_RIGHT 0x00010000L
4692 #define WS_EX_LEFT 0x00000000L
4693 #define WS_EX_RTLREADING 0x00020000L
4694 #define WS_EX_LTRREADING 0x00000000L
4700 #define WS_EX_LEFTSCROLLBAR 0x00040000L
4706 #define WS_EX_RIGHTSCROLLBAR 0x00000000L
4712 #define WS_EX_DLGHIDE 0x00100000L
4728 #define WS_EX_AUTOPOSITION 0x00200000L
4734 #define WS_EX_NOCLOSEBOX 0x00400000L
4740 #define WS_EX_CLIPCHILDREN 0x00800000L
4746 #define WS_EX_LFRDR_MASK 0x0F000000L
4753 #define WS_EX_LFRDR_CUSTOM1 0x01000000L
4761 #define WS_EX_LFRDR_CUSTOM2 0x02000000L
4769 #define WS_EX_LFRDR_CUSTOM3 0x04000000L
4777 #define WS_EX_LFRDR_CUSTOM4 0x08000000L
4780 #define WS_EX_IMECOMPOSE 0x00000000L
4788 #define WS_EX_INTERNAL_MASK 0xF0000000L
4806 #define WE_FONTS_NUMBER 4
4812 #define WE_METRICS_NUMBER 6
4818 #define WE_COLORS_NUMBER 14
4821 #define WE_ATTR_TYPE_MASK 0xF000
4822 #define WE_ATTR_TYPE_COLOR_MASK 0x0F00
4823 #define WE_ATTR_INDEX_MASK 0x00FF
4825 #define WE_ATTR_TYPE_FONT 0x1000
4826 #define WE_ATTR_TYPE_METRICS 0x2000
4828 #define WE_ATTR_TYPE_COLOR 0x3000
4829 #define WE_ATTR_TYPE_FGC 0x3000
4830 #define WE_ATTR_TYPE_BGCA 0x3100
4831 #define WE_ATTR_TYPE_BGCB 0x3200
4834 #define WE_CAPTION 0
4836 #define WE_MESSAGEBOX 2
4837 #define WE_TOOLTIP 3
4838 #define WE_WND_BORDER 4
4839 #define WE_SCROLLBAR 5
4840 #define WE_INACTIVE_CAPTION 6
4842 #define WE_THREED_BODY 8
4843 #define WE_SELECTED_ITEM 9
4844 #define WE_DISABLED_ITEM 10
4845 #define WE_HIGHLIGHT_ITEM 11
4846 #define WE_SIGNIFICANT_ITEM 12
4847 #define WE_DESKTOP 13
4852 #define WE_FONT_CAPTION (WE_CAPTION | WE_ATTR_TYPE_FONT)
4853 #define WE_METRICS_CAPTION (WE_CAPTION | WE_ATTR_TYPE_METRICS)
4854 #define WE_FGC_ACTIVE_CAPTION (WE_CAPTION | WE_ATTR_TYPE_FGC)
4855 #define WE_BGCA_ACTIVE_CAPTION (WE_CAPTION | WE_ATTR_TYPE_BGCA)
4856 #define WE_BGCB_ACTIVE_CAPTION (WE_CAPTION | WE_ATTR_TYPE_BGCB)
4859 #define WE_FONT_MENU (WE_MENU | WE_ATTR_TYPE_FONT)
4860 #define WE_METRICS_MENU (WE_MENU | WE_ATTR_TYPE_METRICS)
4861 #define WE_FGC_MENU (WE_MENU | WE_ATTR_TYPE_FGC)
4862 #define WE_BGC_MENU (WE_MENU | WE_ATTR_TYPE_BGCA)
4865 #define WE_FONT_MESSAGEBOX (WE_MESSAGEBOX | WE_ATTR_TYPE_FONT)
4866 #define WE_FGC_MESSAGEBOX (WE_MESSAGEBOX | WE_ATTR_TYPE_FGC)
4869 #define WE_FONT_TOOLTIP (WE_TOOLTIP | WE_ATTR_TYPE_FONT)
4870 #define WE_FGC_TOOLTIP (WE_TOOLTIP | WE_ATTR_TYPE_FGC)
4871 #define WE_BGC_TOOLTIP (WE_TOOLTIP | WE_ATTR_TYPE_BGCA)
4874 #define WE_METRICS_WND_BORDER (WE_WND_BORDER | WE_ATTR_TYPE_METRICS)
4875 #define WE_FGC_ACTIVE_WND_BORDER (WE_WND_BORDER | WE_ATTR_TYPE_FGC)
4876 #define WE_FGC_INACTIVE_WND_BORDER (WE_WND_BORDER | WE_ATTR_TYPE_BGCA)
4879 #define WE_METRICS_SCROLLBAR (WE_SCROLLBAR | WE_ATTR_TYPE_METRICS)
4882 #define WE_FGC_INACTIVE_CAPTION (WE_INACTIVE_CAPTION | WE_ATTR_TYPE_FGC)
4883 #define WE_BGCA_INACTIVE_CAPTION (WE_INACTIVE_CAPTION | WE_ATTR_TYPE_BGCA)
4884 #define WE_BGCB_INACTIVE_CAPTION (WE_INACTIVE_CAPTION | WE_ATTR_TYPE_BGCB)
4887 #define WE_FGC_WINDOW (WE_WINDOW | WE_ATTR_TYPE_FGC)
4888 #define WE_BGC_WINDOW (WE_WINDOW | WE_ATTR_TYPE_BGCA)
4891 #define WE_FGC_THREED_BODY (WE_THREED_BODY | WE_ATTR_TYPE_FGC)
4892 #define WE_MAINC_THREED_BODY (WE_THREED_BODY | WE_ATTR_TYPE_BGCA)
4895 #define WE_FGC_SELECTED_ITEM (WE_SELECTED_ITEM | WE_ATTR_TYPE_FGC)
4896 #define WE_BGC_SELECTED_ITEM (WE_SELECTED_ITEM | WE_ATTR_TYPE_BGCA)
4897 #define WE_BGC_SELECTED_LOSTFOCUS (WE_SELECTED_ITEM | WE_ATTR_TYPE_BGCB)
4900 #define WE_FGC_DISABLED_ITEM (WE_DISABLED_ITEM | WE_ATTR_TYPE_FGC)
4901 #define WE_BGC_DISABLED_ITEM (WE_DISABLED_ITEM | WE_ATTR_TYPE_BGCA)
4904 #define WE_FGC_HIGHLIGHT_ITEM (WE_HIGHLIGHT_ITEM | WE_ATTR_TYPE_FGC)
4905 #define WE_BGC_HIGHLIGHT_ITEM (WE_HIGHLIGHT_ITEM | WE_ATTR_TYPE_BGCA)
4908 #define WE_FGC_SIGNIFICANT_ITEM (WE_SIGNIFICANT_ITEM | WE_ATTR_TYPE_FGC)
4909 #define WE_BGC_SIGNIFICANT_ITEM (WE_SIGNIFICANT_ITEM | WE_ATTR_TYPE_BGCA)
4912 #define WE_BGC_DESKTOP (WE_DESKTOP | WE_ATTR_TYPE_BGCA)
4914 #define WE_ATTR_TYPE_ICON 0x4000
4915 #define WE_ATTR_TYPE_ICON_MASK 0x0F00
4916 #define WE_ATTR_TYPE_SMALLICON 0x4000
4917 #define WE_ATTR_TYPE_LARGEICON 0x4100
4919 #define WE_LARGEICON_APPLICATION (WE_ATTR_TYPE_LARGEICON | 0x00)
4920 #define WE_LARGEICON_HAND (WE_ATTR_TYPE_LARGEICON | 0x01)
4921 #define WE_LARGEICON_QUESTION (WE_ATTR_TYPE_LARGEICON | 0x02)
4922 #define WE_LARGEICON_EXCLAMATION (WE_ATTR_TYPE_LARGEICON | 0x03)
4923 #define WE_LARGEICON_ASTERISK (WE_ATTR_TYPE_LARGEICON | 0x04)
4924 #define WE_LARGEICON_STOP WE_LARGEICON_HAND
4925 #define WE_LARGEICON_INFORMATION WE_LARGEICON_ASTERISK
4927 #define WE_SMALLICON_APPLICATION (WE_ATTR_TYPE_SMALLICON | 0x00)
4928 #define WE_SMALLICON_HAND (WE_ATTR_TYPE_SMALLICON | 0x01)
4929 #define WE_SMALLICON_QUESTION (WE_ATTR_TYPE_SMALLICON | 0x02)
4930 #define WE_SMALLICON_EXCLAMATION (WE_ATTR_TYPE_SMALLICON | 0x03)
4931 #define WE_SMALLICON_ASTERISK (WE_ATTR_TYPE_SMALLICON | 0x04)
4932 #define WE_SMALLICON_STOP WE_SMALLICON_HAND
4933 #define WE_SMALLICON_INFORMATION WE_SMALLICON_ASTERISK
4939 #define WE_ATTR_TYPE_RDR 0x5000
4941 #define WE_LFFLAT_NUMBER 1
4942 #ifdef _MGLF_RDR_FLAT
4944 #define WE_LFFLAT_TAB_NRMLCLR (WE_ATTR_TYPE_RDR | 0)
4947 #define WE_LFSKIN_NUMBER 28
4948 #ifdef _MGLF_RDR_SKIN
4949 #define WE_LFSKIN_WND_BKGND (WE_ATTR_TYPE_RDR | 0)
4951 #define WE_LFSKIN_CAPTION (WE_ATTR_TYPE_RDR | 1)
4952 #define WE_LFSKIN_CAPTION_BTN (WE_ATTR_TYPE_RDR | 2)
4954 #define WE_LFSKIN_SCROLLBAR_VSHAFT (WE_ATTR_TYPE_RDR | 3)
4955 #define WE_LFSKIN_SCROLLBAR_VTHUMB (WE_ATTR_TYPE_RDR | 4)
4956 #define WE_LFSKIN_SCROLLBAR_HSHAFT (WE_ATTR_TYPE_RDR | 5)
4957 #define WE_LFSKIN_SCROLLBAR_HTHUMB (WE_ATTR_TYPE_RDR | 6)
4958 #define WE_LFSKIN_SCROLLBAR_ARROWS (WE_ATTR_TYPE_RDR | 7)
4960 #define WE_LFSKIN_BORDER_TOP (WE_ATTR_TYPE_RDR | 8)
4961 #define WE_LFSKIN_BORDER_BOTTOM (WE_ATTR_TYPE_RDR | 9)
4962 #define WE_LFSKIN_BORDER_LEFT (WE_ATTR_TYPE_RDR | 10)
4963 #define WE_LFSKIN_BORDER_RIGHT (WE_ATTR_TYPE_RDR | 11)
4965 #define WE_LFSKIN_ARROWS (WE_ATTR_TYPE_RDR | 12)
4966 #define WE_LFSKIN_ARROWS_SHELL (WE_ATTR_TYPE_RDR | 13)
4968 #define WE_LFSKIN_RADIOBUTTON (WE_ATTR_TYPE_RDR | 14)
4969 #define WE_LFSKIN_CHECKBUTTON (WE_ATTR_TYPE_RDR | 15)
4970 #define WE_LFSKIN_PUSHBUTTON (WE_ATTR_TYPE_RDR | 16)
4972 #define WE_LFSKIN_TREE (WE_ATTR_TYPE_RDR | 17)
4974 #define WE_LFSKIN_HEADER (WE_ATTR_TYPE_RDR | 18)
4975 #define WE_LFSKIN_TAB (WE_ATTR_TYPE_RDR | 19)
4977 #define WE_LFSKIN_PROGRESS_HCHUNK (WE_ATTR_TYPE_RDR | 20)
4978 #define WE_LFSKIN_PROGRESS_VCHUNK (WE_ATTR_TYPE_RDR | 21)
4979 #define WE_LFSKIN_PROGRESS_HTRACKBAR (WE_ATTR_TYPE_RDR | 22)
4980 #define WE_LFSKIN_PROGRESS_VTRACKBAR (WE_ATTR_TYPE_RDR | 23)
4982 #define WE_LFSKIN_TBSLIDER_H (WE_ATTR_TYPE_RDR | 24)
4983 #define WE_LFSKIN_TRACKBAR_VERT (WE_ATTR_TYPE_RDR | 25)
4984 #define WE_LFSKIN_TRACKBAR_HORZ (WE_ATTR_TYPE_RDR | 26)
4985 #define WE_LFSKIN_TBSLIDER_V (WE_ATTR_TYPE_RDR | 27)
5027 #define SBS_NORMAL 0x00
5028 #define SBS_DISABLED 0x01
5029 #define SBS_HIDE 0x02
5087 #define SBS_DISABLED_LTUP 0x0100
5090 #define SBS_DISABLED_BTDN 0x0200
5093 #define SBS_HILITE_LTUP 0x0400
5096 #define SBS_HILITE_BTDN 0x0800
5099 #define SBS_HILITE_THUMB 0x0010
5102 #define SBS_PRESSED_LTUP 0x0020
5105 #define SBS_PRESSED_BTDN 0x0040
5108 #define SBS_PRESSED_THUMB 0x0080
5111 #define LFRDR_WINTYPE_UNKNOWN 0
5112 #define LFRDR_WINTYPE_DIALOG 1
5113 #define LFRDR_WINTYPE_MAINWIN 2
5114 #define LFRDR_WINTYPE_CONTROL 3
5148 #define LFRDR_METRICS_MASK 0xFF00
5149 #define LFRDR_METRICS_BORDER 0x0100
5150 #define LFRDR_METRICS_CAPTION_H 0x0200
5151 #define LFRDR_METRICS_ICON_H 0x0300
5152 #define LFRDR_METRICS_ICON_W 0x0400
5153 #define LFRDR_METRICS_MENU_H 0x0500
5154 #define LFRDR_METRICS_VSCROLL_W 0x0600
5155 #define LFRDR_METRICS_HSCROLL_H 0x0700
5156 #define LFRDR_METRICS_MINWIN_WIDTH 0x0800
5157 #define LFRDR_METRICS_MINWIN_HEIGHT 0x0900
5159 #define LFRDR_SB_MINBARLEN 10
5165 #define LEN_RENDERER_NAME 15
5168 #define LFRDR_BTN_STATUS_MASK 0x03
5169 #define LFRDR_BTN_STATUS_NORMAL 0x00
5170 #define LFRDR_BTN_STATUS_HILITE 0x01
5171 #define LFRDR_BTN_STATUS_PRESSED 0x02
5172 #define LFRDR_BTN_STATUS_DISABLED 0x03
5175 #define LFRDR_BTN_STATUS_SELECTED 0x04
5178 #define LFRDR_BTN_STATUS_INACTIVE 0x08
5181 #define LFRDR_3DBOX_THICKFRAME 0x20
5184 #define LFRDR_3DBOX_FILLED 0x40
5187 #define LFRDR_MARK_SELECTED_MASK 0x05
5188 #define LFRDR_MARK_ALL_SELECTED 0x01
5189 #define LFRDR_MARK_HALF_SELECTED 0x04
5192 #define LFRDR_MARK_HAVESHELL 0x02
5195 #define LFRDR_ARROW_DIRECT_MASK 0x0F00
5196 #define LFRDR_ARROW_LEFT 0x0000
5197 #define LFRDR_ARROW_RIGHT 0x0100
5198 #define LFRDR_ARROW_UP 0x0200
5199 #define LFRDR_ARROW_DOWN 0x0300
5202 #define LFRDR_ARROW_NOFILL 0x1000
5203 #define LFRDR_ARROW_HAVESHELL 0x2000
5206 #define LFRDR_MENUITEMOFFY_MIN 4
5208 #define LFRDR_3DBOX_COLOR_LIGHTEST 0x01
5209 #define LFRDR_3DBOX_COLOR_DARKEST 0x02
5210 #define LFRDR_3DBOX_COLOR_LIGHTER 0x03
5211 #define LFRDR_3DBOX_COLOR_DARKER 0x04
5214 #define LFRDR_TAB_BOTTOM 0x0001
5215 #define LFRDR_TAB_ACTIVE 0x0010
5216 #define LFRDR_TAB_ICON 0x0100
5219 #define LFRDR_TREE_WITHICON 0x08
5220 #define LFRDR_TREE_FOLD 0x01
5223 #define LFRDR_TREE_CHILD 0x02
5224 #define LFRDR_TREE_NEXT 0x04
5226 #define SYSICO_ITEM_NUMBER 5
5339 int status,
int next);
5539 int nMax,
int nMin,
int nPos,
BOOL fVertical);
5602 unsigned char _padding1;
5603 unsigned char _padding2;
5604 unsigned short _padding3;
5837 HDC hdc,
int we_attr_id);
6001 const unsigned char* data,
size_t data_size);
6087 typedef DWORD RES_KEY;
6088 #define RES_KEY_INVALID 0
6091 typedef struct _INNER_RES {
6101 const void* additional;
6106 RES_TYPE_INVALID = 0xFF,
6126 #ifdef _MGHAVE_CURSOR
6171 RES_TYPE_USER_MAX = 0x7F
6175 typedef struct _MEM_RES {
6180 typedef struct _FONT_RES {
6191 #define REF_SRC_NOTYPE 0x00
6194 #define REF_SRC_FILE 0x01
6197 #define REF_SRC_INNER 0x02
6200 #define REF_SRC_SHARED 0x03
6203 #define REF_SRC_OUTSIDE 0x04
6206 #define REF_SRC_STREAM 0x05
6209 #define REF_SRC_LOGIC 0x06
6212 typedef struct _RESOURCE {
6222 typedef struct _RES_TYPE_OPS {
6229 void* (*get_res_data)(RESOURCE* res,
int src_type,
DWORD usr_param);
6232 void (*unload)(RESOURCE* res,
int src_type);
6238 RES_RET_INVALID_PARAM,
6239 RES_RET_NOT_EXIST_KEY,
6240 RES_RET_LOAD_FILE_FAILED,
6241 RES_RET_LOAD_MEM_FAILED,
6242 RES_RET_UNKNOWN_TYPE,
6243 RES_RET_NOT_IMPLEMENTED,
6286 MG_EXPORT
int AddInnerRes (INNER_RES* inner_res,
int count,
BOOL copy);
6291 MG_EXPORT
int AddSharedRes (
const char* shared_name);
6403 #define LoadMyBitmapFromRes(res_name, pal) \
6404 (MYBITMAP*)LoadResource(res_name, \
6405 RES_TYPE_MYBITMAP, (DWORD)(pal))
6407 #define GetMyBitmapFromRes(key) \
6408 (MYBITMAP*)GetResource(key)
6410 #define LoadBitmapFromRes(hdc, res_name) \
6411 (BITMAP*)LoadResource(res_name, RES_TYPE_IMAGE, (DWORD)hdc)
6413 #define GetBitmapFromRes(key) \
6414 (BITMAP*)GetResource(key)
6416 #define GetIconFromRes(key) \
6417 (HICON)GetResource(key)
6419 #ifndef _MGHAVE_CURSOR
6420 #define GetCursorFromRes(key) \
6421 (HCURSOR)GetResource(key)
6424 #define GetEtcFromRes(key) \
6425 (GHANDLE)GetResource(key)
6427 #define LoadLogicFontFromRes(font_name) \
6428 (PLOGFONT)LoadResource(font_name, RES_TYPE_FONT, 0)
6430 #define GetLogicFontFromRes(font_name) \
6431 (PLOGFONT)GetResource(Str2Key(font_name))
6433 #define ReleaseLogicFont(font) \
6434 ReleaseRes(((FONT_RES*)(font))->key)
6436 #define ReleaseLogicFontByName(font_name) \
6437 ReleaseRes(Str2Key(font_name))
6450 MG_EXPORT RES_KEY
Str2Key (
const char* str);
6453 #ifdef __TARGET_MSTUDIO__
6463 MG_EXPORT
int GUIAPI GetWindowZOrder(
HWND hWnd);
6474 MG_EXPORT
int GUIAPI SetWindowZOrder(
HWND hWnd,
int zorder);
6484 #ifdef _MGHAVE_VIRTUAL_WINDOW
6627 MG_EXPORT
int GUIAPI CreateThreadForMessaging (pthread_t* thread,
6628 pthread_attr_t* attr,
void * (*start_routine)(
void *),
void* arg,
6629 BOOL joinable,
size_t stack_size);
6705 const char* spCaption,
LINT id,
DWORD dwAddData);
6736 extern MG_EXPORT
HWND __mg_hwnd_desktop;
6742 #define HWND_DESKTOP __mg_hwnd_desktop
6748 #define HWND_NULL ((HWND)0)
6754 #define HWND_INVALID ((HWND)-1)
6756 #define HWND_OTHERPROC ((HWND)-1)
6802 #ifdef _MGRM_THREADS
6821 static inline int GUIAPI CreateThreadForMainWindow (pthread_t* thread,
6822 pthread_attr_t* attr,
void * (*start_routine)(
void *),
void* arg)
6824 return CreateThreadForMessaging (thread, attr, start_routine, arg,
6838 static inline pthread_t GUIAPI GetMainWinThread (
HWND hMainWnd)
6842 memset (&ret, 0,
sizeof (pthread_t));
6870 MG_EXPORT
int GUIAPI WaitMainWindowClose (
HWND hWnd,
void** returnval);
6914 #define ST_PIXEL_MASK 0x00FF
6915 #define ST_PIXEL_DEFAULT 0x0000
6916 #define ST_PIXEL_ARGB4444 0x0001
6917 #define ST_PIXEL_ARGB1555 0x0002
6918 #define ST_PIXEL_ARGB8888 0x0003
6923 #define ST_DEFAULT (ST_PIXEL_DEFAULT)
6925 #define CT_SYSTEM_MASK 0X0000FF
6926 #define CT_OPAQUE 0x000000
6927 #define CT_COLORKEY 0x000001
6928 #define CT_ALPHACHANNEL 0x000002
6929 #define CT_LOGICALPIXEL 0x000003
6930 #define CT_ALPHAPIXEL 0x000004
6931 #define CT_BLURRED 0x000005
6932 #define CT_MAX_VALUE 0xFFFFFF
6992 unsigned int surf_flag,
DWORD bkgnd_color,
6993 int compos_type,
DWORD ct_arg);
7030 const char* window_name,
const char* layer_name)
7033 ST_DEFAULT, 0xFFFFFFFFUL, CT_OPAQUE, 0);
7071 typedef void (*CB_FREE_LOCAL_DATA) (
DWORD local_data);
7100 DWORD local_data, CB_FREE_LOCAL_DATA cb_free);
7147 MG_EXPORT
BOOL GUIAPI GetWindowLocalData (
HWND hwnd,
const char* data_name,
7148 DWORD *local_data, CB_FREE_LOCAL_DATA* cb_free);
7201 #define GF_SWIPE_HORZ ZOF_GF_SWIPE_HORZ
7202 #define GF_SWIPE_VERT ZOF_GF_SWIPE_VERT
7234 #ifdef _MGSCHEMA_COMPOSITING
7288 int type,
DWORD arg);
7333 #ifdef _MGHAVE_VIRTUAL_WINDOW
7363 #ifdef _MGHAVE_VIRTUAL_WINDOW
7383 #define DefaultMainWinProc (__mg_def_proc[0])
7401 #define DefaultDialogProc (__mg_def_proc[1])
7416 #define DefaultControlProc (__mg_def_proc[2])
7418 #ifdef _MGHAVE_VIRTUAL_WINDOW
7432 #define DefaultVirtualWinProc (__mg_def_proc[3])
7436 MG_EXPORT
void GUIAPI DumpWindow (FILE* fp,
HWND hWnd);
7446 #define SW_HIDE 0x0000
7447 #define SW_SHOW 0x0010
7448 #define SW_SHOWNORMAL 0x0100
7998 const RECT* prc,
BOOL bEraseBkgnd);
8180 int win_type,
int cw);
8199 int win_type,
int ch,
BOOL hasMenu);
8201 #define ClientWidthToWindowWidth(dwStyle, cw) \
8202 ClientWidthToWindowWidthEx (dwStyle, LFRDR_WINTYPE_MAINWIN, cw)
8204 #define ClientHeightToWindowHeight(dwStyle, ch, hasMenu) \
8205 ClientHeightToWindowHeightEx (dwStyle, LFRDR_WINTYPE_MAINWIN, ch, hasMenu)
8354 #ifdef _MGHAVE_VIRTUAL_WINDOW
8531 #define WIN_SEARCH_METHOD_MASK 0xFF00
8532 #define WIN_SEARCH_METHOD_BFS 0x0000
8533 #define WIN_SEARCH_METHOD_DFS 0x0100
8535 #define WIN_SEARCH_FILTER_MASK 0x00FF
8536 #define WIN_SEARCH_FILTER_MAIN 0x0001
8537 #define WIN_SEARCH_FILTER_VIRT 0x0002
8800 #define SetFocus SetFocusChild
8806 #define GetFocus GetFocusChild
8840 #define GetForegroundWindow GetActiveWindow
8846 #define SetForegroundWindow SetActiveWindow
8924 #define WindowFromPoint(pt) WindowFromPointEx(pt, TRUE)
8926 #define CWP_ALL 0x0000
8927 #define CWP_SKIPINVISIBLE 0x0001
8928 #define CWP_SKIPDISABLED 0x0002
8929 #define CWP_SKIPTRANSPARENT 0x0004
9010 #define SW_INVALIDATE 0x01
9011 #define SW_ERASE 0x02
9012 #define SW_SCROLLCHILDREN 0x04
9086 const RECT *prcScroll,
const RECT *prcClip,
9110 const RECT* prcScroll,
const RECT* prcClip)
9113 NULL,
NULL, SW_ERASE | SW_INVALIDATE | SW_SCROLLCHILDREN);
9118 #define GetWindowElementColor(iItem) \
9119 GetWindowElementPixelEx(HWND_NULL, (HDC)-1, iItem)
9122 #define GetWindowElementColorEx(hWnd, iItem) \
9123 GetWindowElementPixelEx(hWnd, (HDC)-1, iItem)
9131 #define GetWindowElementPixel(hWnd, iItem) \
9132 GetWindowElementPixelEx(hWnd, HDC_INVALID, iItem)
9140 #define SYSBMP_RADIOBUTTON "radiobutton"
9141 #define SYSBMP_CHECKBUTTON "checkbutton"
9142 #define SYSBMP_BGPICTURE "bgpicture"
9143 #define SYSBMP_BGPICPOS "bgpicpos"
9146 #define SYSBMP_IMECTRLBTN "IMEctrlbtn"
9147 #define SYSBMP_LOGO "logo"
9180 const char* rdr_name,
const char*
id);
9236 #define GetSystemBitmapByHwnd(hWnd, id) GetSystemBitmap ((hWnd), (id))
9258 const char* rdr_name,
PBITMAP bmp);
9281 #define IDI_APPLICATION 0
9283 #define IDI_STOP IDI_HAND
9284 #define IDI_QUESTION 2
9285 #define IDI_EXCLAMATION 3
9286 #define IDI_ASTERISK 4
9287 #define IDI_INFORMATION IDI_ASTERISK
9289 #define SYSICON_FT_DIR "dir"
9290 #define SYSICON_FT_FILE "file"
9292 #define SYSICON_TREEFOLD "treefold"
9293 #define SYSICON_TREEUNFOLD "treeunfold"
9313 const char* rdr_name,
const char* szItemName,
int which);
9381 #define GetLargeSystemIcon(iItem) GetLargeSystemIconEx(HWND_NULL, iItem)
9389 #define GetSmallSystemIcon(iItem) GetSmallSystemIconEx(HWND_NULL, iItem)
9469 int* pMinPos,
int* pMaxPos);
9520 int iMinPos,
int iMaxPos);
9543 #define SIF_RANGE 0x0001
9544 #define SIF_PAGE 0x0002
9545 #define SIF_POS 0x0004
9546 #define SIF_DISABLENOSCROLL 0x0008
9547 #define SIF_TRACKPOS 0x0010
9548 #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
9551 #define SB_ARROW_LTUP 0x0001
9554 #define SB_ARROW_BTDN 0x0002
9557 #define SB_ARROW_BOTH (SB_ARROW_LTUP | SB_ARROW_BTDN)
9650 #define CS_VREDRAW 0x0001
9651 #define CS_HREDRAW 0x0002
9652 #define CS_KEYCVTWINDOW 0x0004
9653 #define CS_DBLCLKS 0x0008
9655 #define CS_OWNDC 0x0020
9656 #define CS_CLASSDC 0x0040
9657 #define CS_PARENTDC 0x0080
9659 #define CS_NOKEYCVT 0x0100
9660 #define CS_NOCLOSE 0x0200
9661 #define CS_SAVEBITS 0x0800
9663 #define CS_BYTEALIGNCLIENT 0x1000
9664 #define CS_BYTEALIGNWINDOW 0x2000
9665 #define CS_GLOBALCLASS 0x4000
9666 #define CS_IME 0x8000
9668 #define COP_STYLE 0x0001
9669 #define COP_HCURSOR 0x0002
9670 #define COP_BKCOLOR 0x0004
9671 #define COP_WINPROC 0x0008
9672 #define COP_ADDDATA 0x0010
9704 #ifndef _MGSCHEMA_COMPOSITING
9745 #define MAINWINCLASSNAME ("MAINWINDOW")
9746 #define VIRTWINCLASSNAME ("VIRTWINDOW")
9747 #define ROOTWINCLASSNAME ("ROOTWINDOW")
9877 const char* spCaption,
DWORD dwStyle,
DWORD dwExStyle,
9878 LINT id,
int x,
int y,
int w,
int h,
HWND hParentWnd,
9895 const char* spCaption,
DWORD dwStyle,
DWORD dwExStyle,
9896 LINT id,
int x,
int y,
int w,
int h,
HWND hParentWnd,
9900 id, x, y, w, h, hParentWnd,
NULL,
NULL, dwAddData);
9977 static inline HWND GUIAPI CreateWindow (
const char* spClassName,
9978 const char* spCaption,
DWORD dwStyle,
9979 LINT id,
int x,
int y,
int w,
int h,
HWND hParentWnd,
9983 id, x, y, w, h, hParentWnd,
NULL,
NULL, dwAddData);
10063 #define SetTimer(hwnd, id, speed) \
10064 SetTimerEx(hwnd, id, speed, NULL)
10116 #define ResetTimer(hwnd, id, speed) \
10117 ResetTimerEx(hwnd, id, speed, (TIMERPROC)INV_PTR)
10280 MG_EXPORT
int GUIAPI
SetIMEStatus (
int StatusCode,
int Value);
10349 MG_EXPORT
int GUIAPI SetIMEPos (
const POINT* pt);
10386 #define ACCEL_SHIFT KS_SHIFT
10387 #define ACCEL_ALT KS_ALT
10388 #define ACCEL_CTRL KS_CTRL
10489 int nWidth,
int nHeight);
10588 MG_EXPORT
BOOL GUIAPI HideCaretEx (
HWND hWnd,
BOOL ime);
10606 return HideCaretEx (hWnd,
TRUE);
10689 #define MF_INSERT 0x00000000L
10690 #define MF_CHANGE 0x00000080L
10691 #define MF_APPEND 0x00000100L
10692 #define MF_DELETE 0x00000200L
10693 #define MF_REMOVE 0x00001000L
10695 #define MF_BYCOMMAND 0x00000000L
10696 #define MF_BYPOSITION 0x00000400L
10698 #define MF_SEPARATOR 0x00000800L
10700 #define MF_ENABLED 0x00000000L
10701 #define MF_GRAYED 0x00000001L
10702 #define MF_DISABLED 0x00000002L
10704 #define MF_UNCHECKED 0x00000000L
10705 #define MF_CHECKED 0x00000008L
10706 #define MF_USECHECKBITMAPS 0x00000200L
10708 #define MF_STRING 0x00000000L
10709 #define MF_BITMAP 0x00000004L
10710 #define MF_OWNERDRAW 0x00000100L
10712 #define MF_POPUP 0x00000010L
10713 #define MF_MENUBARBREAK 0x00000020L
10714 #define MF_MENUBREAK 0x00000040L
10716 #define MF_UNHILITE 0x00000000L
10717 #define MF_HILITE 0x00000080L
10719 #define MF_DEFAULT 0x00001000L
10720 #define MF_SYSMENU 0x00002000L
10721 #define MF_HELP 0x00004000L
10722 #define MF_RIGHTJUSTIFY 0x00004000L
10724 #define MF_MOUSESELECT 0x00008000L
10725 #define MF_END 0x00000080L
10727 #define MFT_STRING MF_STRING
10728 #define MFT_BITMAP MF_BITMAP
10729 #define MFT_BMPSTRING 0x00010000L
10730 #define MFT_MENUBARBREAK MF_MENUBARBREAK
10731 #define MFT_MENUBREAK MF_MENUBREAK
10732 #define MFT_OWNERDRAW MF_OWNERDRAW
10733 #define MFT_RADIOCHECK 0x00000200L
10734 #define MFT_MARKCHECK 0x00000400L
10735 #define MFT_SEPARATOR MF_SEPARATOR
10737 #define MFT_RIGHTORDER 0x00002000L
10738 #define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY
10740 #define MFS_GRAYED 0x00000003L
10741 #define MFS_DISABLED MFS_GRAYED
10742 #define MFS_CHECKED MF_CHECKED
10743 #define MFS_HILITE MF_HILITE
10744 #define MFS_ENABLED MF_ENABLED
10745 #define MFS_UNCHECKED MF_UNCHECKED
10746 #define MFS_UNHILITE MF_UNHILITE
10747 #define MFS_DEFAULT MF_DEFAULT
10750 #define SC_SIZE 0xF000
10751 #define SC_MOVE 0xF010
10752 #define SC_MINIMIZE 0xF020
10753 #define SC_MAXIMIZE 0xF030
10754 #define SC_NEXTWINDOW 0xF040
10755 #define SC_PREVWINDOW 0xF050
10756 #define SC_CLOSE 0xF060
10757 #define SC_VSCROLL 0xF070
10758 #define SC_HSCROLL 0xF080
10759 #define SC_MOUSEMENU 0xF090
10760 #define SC_KEYMENU 0xF100
10761 #define SC_ARRANGE 0xF110
10762 #define SC_RESTORE 0xF120
10763 #define SC_TASKLIST 0xF130
10764 #define SC_SCREENSAVE 0xF140
10765 #define SC_HOTKEY 0xF150
10767 #define SC_DEFAULT 0xF160
10768 #define SC_MONITORPOWER 0xF170
10769 #define SC_CONTEXTHELP 0xF180
10770 #define SC_SEPARATOR 0xF00F
10773 #define MIIM_STATE 0x00000001
10774 #define MIIM_ID 0x00000002
10775 #define MIIM_SUBMENU 0x00000004
10776 #define MIIM_CHECKMARKS 0x00000008
10777 #define MIIM_TYPE 0x00000010
10778 #define MIIM_DATA 0x00000020
10779 #define MIIM_STRING 0x00000040
10780 #define MIIM_BITMAP 0x00000080
10781 #define MIIM_FTYPE 0x00000100
10785 #define TPM_LEFTBUTTON 0x0000L
10786 #define TPM_RIGHTBUTTON 0x0002L
10787 #define TPM_LEFTALIGN 0x0000L
10788 #define TPM_CENTERALIGN 0x0004L
10789 #define TPM_RIGHTALIGN 0x0008L
10790 #define TPM_TOPALIGN 0x0000L
10791 #define TPM_VCENTERALIGN 0x0010L
10792 #define TPM_BOTTOMALIGN 0x0020L
10794 #define TPM_HORIZONTAL 0x0000L
10795 #define TPM_VERTICAL 0x0040L
10796 #define TPM_NONOTIFY 0x0080L
10797 #define TPM_RETURNCMD 0x0100L
10799 #define TPM_DESTROY 0x1000L
10800 #define TPM_SYSCMD 0x2000L
10801 #define TPM_DEFAULT 0x0000L
10804 #define MNC_IGNORE 0
10805 #define MNC_CLOSE 1
10806 #define MNC_EXECUTE 2
10807 #define MNC_SELECT 3
11166 int x,
int y,
HWND hwnd);
11187 #define LFRDR_MENU_STATE_HILITE 0x01
11188 #define LFRDR_MENU_STATE_NORMAL 0x02
11189 #define LFRDR_MENU_STATE_DISABLED 0x04
11276 int GUIAPI GetMenuItemRect (
HWND hwnd,
HMENU hmnu,
11463 #define DLGC_WANTARROWS 0x0001
11468 #define DLGC_WANTTAB 0x0002
11473 #define DLGC_WANTALLKEYS 0x0004
11478 #define DLGC_WANTCHARS 0x0008
11484 #define DLGC_WANTENTER 0x0010
11489 #define DLGC_HASSETSEL 0x0080
11495 #define DLGC_DEFPUSHBUTTON 0x0100
11500 #define DLGC_PUSHBUTTON 0x0200
11505 #define DLGC_RADIOBUTTON 0x0400
11510 #define DLGC_3STATE 0x0800
11515 #define DLGC_STATIC 0x1000
11520 #define DLGC_BUTTON 0x2000
11616 const char* window_name,
const char* layer_name);
11704 const char* window_name,
const char* layer_name);
11833 BOOL *lpTranslated,
BOOL bSigned);
11858 char* lpString,
int nMaxCount);
11992 MG_EXPORT
BOOL GUIAPI SetDlgItemText (
HWND hDlg,
LINT nIDDlgItem,
11993 const char* lpString);
11995 #ifdef _MGCTRL_BUTTON
12045 LINT idFirstButton,
LINT idLastButton,
LINT idCheckButton);
12084 #if defined(_MGCTRL_STATIC) && defined (_MGCTRL_BUTTON)
12087 #define IDC_STATIC 0
12096 #define MINID_RESERVED 0xF001
12097 #define MAXID_RESERVED 0xFFFF
12099 #define MB_OK 0x00000000
12100 #define MB_OKCANCEL 0x00000001
12101 #define MB_YESNO 0x00000002
12102 #define MB_RETRYCANCEL 0x00000003
12103 #define MB_ABORTRETRYIGNORE 0x00000004
12104 #define MB_YESNOCANCEL 0x00000005
12105 #define MB_CANCELASBACK 0x00000008
12106 #define MB_TYPEMASK 0x00000007
12108 #define MB_ICONHAND 0x00000010
12109 #define MB_ICONQUESTION 0x00000020
12110 #define MB_ICONEXCLAMATION 0x00000030
12111 #define MB_ICONASTERISK 0x00000040
12112 #define MB_ICONMASK 0x000000F0
12114 #define MB_ICONINFORMATION MB_ICONASTERISK
12115 #define MB_ICONSTOP MB_ICONHAND
12117 #define MB_DEFBUTTON1 0x00000000
12118 #define MB_DEFBUTTON2 0x00000100
12119 #define MB_DEFBUTTON3 0x00000200
12120 #define MB_DEFMASK 0x00000F00
12126 #define MB_NOFOCUS 0x00008000
12128 #define MB_ALIGNCENTER 0x00000000
12129 #define MB_ALIGNTOPLEFT 0x00010000
12130 #define MB_ALIGNBTMLEFT 0x00020000
12131 #define MB_ALIGNTOPRIGHT 0x00030000
12132 #define MB_ALIGNBTMRIGHT 0x00040000
12133 #define MB_ALIGNMASK 0x00070000
12135 #define MB_BASEDONPARENT 0x00080000
12239 MG_EXPORT
int GUIAPI
MessageBox (
HWND hParentWnd,
const char* pszText,
12240 const char* pszCaption,
DWORD dwStyle);
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.
struct _LFRDR_TRACKBARINFO LFRDR_TRACKBARINFO
MG_EXPORT BOOL GUIAPI RegisterSystemBitmap(HDC hdc, const char *rdr_name, const char *id)
Register a device-dependent bitmap from id to BITMAP cache.
MG_EXPORT BOOL GUIAPI DestroyMainWindow(HWND hWnd)
Destroys a main window.
MG_EXPORT HWND GUIAPI GetRootWindow(int *nrWins)
Retrieve the root window of the current thread.
MG_EXPORT int GUIAPI ClientWidthToWindowWidthEx(DWORD dwStyle, int win_type, int cw)
Calculates main window width from the width of the client area.
MG_EXPORT int GUIAPI GetUpdateRegion(HWND hWnd, PCLIPRGN pRgn)
Copy the update region of a window to a region.
static HWND GUIAPI CreateMainWindowIndirect(PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC WndProc)
A simplified version of CreateMainWindowIndirectParam.
#define WE_COLORS_NUMBER
The number of window element color attributes.
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 (clea...
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.
MG_EXPORT void GUIAPI EndPaint(HWND hWnd, HDC hdc)
Marks the end of painting in a window.
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 criter...
#define NULL
A value indicates null pointer.
DWORD(* on_set_rdr_attr)(struct _WINDOW_ELEMENT_RENDERER *, int we_attr_id, DWORD we_attr, BOOL change)
MG_EXPORT HWND GUIAPI SetActiveWindow(HWND hMainWnd)
Set a main window to be the active main window.
WINDOW_ELEMENT_RENDERER * we_rdr
static HWND GUIAPI CreateMainWindow(PMAINWINCREATE pCreateInfo)
A simplified version of CreateMainWindowEx.
MG_EXPORT int AddResRef(RES_KEY key)
Increase the reference count of a buffered resource.
struct _SCROLLBARDATA SCROLLBARDATA
MG_EXPORT BOOL GUIAPI RemoveWindowElementRenderer(const char *name)
Remove a window renderer from MiniGUI.
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.
LRESULT(* MainWindowProc)(HWND, UINT, WPARAM, LPARAM)
MG_EXPORT DWORD GUIAPI GetWindowAdditionalData(HWND hWnd)
Retrieve the first additional data of a window.
MG_EXPORT int GUIAPI GetIMEStatus(int StatusCode)
Retrieve status of the current IME window.
MG_EXPORT HICON GUIAPI GetSmallSystemIconEx(HWND hWnd, int iItem)
Retrieve a small system icon by its identifier.
MG_EXPORT BOOL GUIAPI SetTimerEx(HWND hWnd, LINT id, DWORD speed, TIMERPROC timer_proc)
Creates a timer with the specified timeout value.
MG_EXPORT void GUIAPI WindowToScreen(HWND hWnd, int *x, int *y)
Converts the window coordinates of a point to screen coordinates.
struct _IME_TARGET_INFO IME_TARGET_INFO
int GUIAPI Send2Client(const MSG *msg, int cli)
Send a message to a client.
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
MG_EXPORT BOOL GUIAPI EndDialog(HWND hDlg, int endCode)
Destroys a modal dialog box, causing MiniGUI to end any processing for the dialog box.
MG_EXPORT BOOL GUIAPI RegisterEventHookWindow(HWND hwnd, DWORD flags)
Register an input event message hook window.
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.
const WINDOW_ELEMENT_ATTR * we_attrs
MG_EXPORT HWND GUIAPI GetNextMainWindow(HWND hMainWnd)
Retrieve the next main window in the system according to the zorder.
MG_EXPORT BOOL GUIAPI EnableWindow(HWND hWnd, BOOL fEnable)
Enables of disables a window.
GHANDLE HWND
Handle to main window or control.
LRESULT(* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Type of the window callback procedure.
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.
MG_EXPORT HWND GUIAPI SetCapture(HWND hWnd)
Set the mouse capture to the specified window.
GHANDLE HDC
Handle to device context.
MG_EXPORT int GUIAPI DeleteAccelerators(HACCEL hacc, int key, DWORD keymask)
Deletes an accelerator from the accelerator table.
void(* draw_checkmark)(HDC hdc, const RECT *pRect, DWORD color, int status)
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.
MG_EXPORT HWND GUIAPI RegisterMouseHookWindow(HWND hwnd, DWORD flag)
Registers a mouse message hook window.
LRESULT(* WinProc)(HWND, UINT, WPARAM, LPARAM)
struct _DLGTEMPLATE DLGTEMPLATE
MG_EXPORT WNDPROC __mg_def_proc[4]
The default window callback procedure array.
void(* draw_normal_menu_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
int(* on_click_hotspot)(HWND hWnd, int which)
MG_EXPORT gal_pixel GUIAPI DWORD2PixelByWindow(HWND hWnd, DWORD dwColor)
Convert a DWORD color to gal_pixel for a window.
MG_EXPORT HWND GUIAPI SetFocusChild(HWND hWnd)
Set the active child of a window.
static BOOL MainWindowThreadCleanup(HWND hMainWnd)
Cleanup the main window.
MG_EXPORT HICON GUIAPI SetWindowIcon(HWND hWnd, HICON hIcon, BOOL bRedraw)
Set the current icon of a window.
MG_EXPORT BOOL GUIAPI SetCaretBlinkTime(HWND hWnd, UINT uTime)
Set the caret blink time to the specified number of milliseconds.
int(* init)(PWERENDERER renderer)
MG_EXPORT HICON GUIAPI GetLargeSystemIconEx(HWND hWnd, int iItem)
Retrieve a large system icon by its identifier in default renderer.
struct _WNDCLASS WNDCLASS
struct _WINDOWINFO WINDOWINFO
BOOL GUIAPI Send2TopMostClients(UINT nMsg, WPARAM wParam, LPARAM lParam)
Send a message to all clients in the topmost layer.
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.
MG_EXPORT gal_pixel GUIAPI GetWindowElementPixelEx(HWND hwnd, HDC hdc, int we_attr_id)
Get the pixel value of a window element.
MG_EXPORT BOOL GUIAPI UnregisterEventHookWindow(HWND hwnd)
Unregister an input event message hook window.
MG_EXPORT int GUIAPI SetIMETargetInfo(const IME_TARGET_INFO *info)
Set the target info of the current IME window.
MG_EXPORT LRESULT GUIAPI SendAsyncMessage(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
Send an asynchronical message to a window.
MG_EXPORT void TermRendererSystemIcon(HICON *small_icon, HICON *large_icon)
Release large and small system icon resources.
MG_EXPORT HWND GUIAPI GetActiveWindow(void)
Retrieve the main window handle of the active main window.
MG_EXPORT void GUIAPI ClientToWindow(HWND hWnd, int *x, int *y)
Converts the client coordinates to the window coordinates.
int(* SRVEVTHOOK)(PMSG pMsg)
The type of the event hook.
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.
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...
UINT_PTR WPARAM
A type definition for the first message paramter.
void(* draw_fold)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color, int status, int next)
void(* draw_custom_hotspot)(HWND hWnd, HDC hdc, int ht_code, int state)
MG_EXPORT int SetResPath(const char *path)
Set user's resource path into the search paths of resource manager.
MG_EXPORT WNDPROC GUIAPI SetWindowCallbackProc(HWND hWnd, WNDPROC newProc)
Set the callback procedure of a window.
LONG_PTR LRESULT
Signed result of message processing.
unsigned int UINT
A type definition for unsigned integer.
unsigned char BYTE
A type definition for an 8-bit unsigned character (byte).
BOOL GUIAPI GetWindowRegion(HWND hWnd, CLIPRGN *region)
The function obtains a copy of the window region of a window.
MG_EXPORT void GUIAPI UpdateInvalidClient(HWND hWnd, BOOL bErase)
Updates the invalid client areas in a window.
MG_EXPORT BOOL GUIAPI HaveFreeTimer(void)
Determine whether there is any free timer slot in the current thread.
MG_EXPORT WINDOW_ELEMENT_RENDERER *GUIAPI GetDefaultWindowElementRenderer(void)
Get the default window renderer.
MG_EXPORT BOOL GUIAPI GetCaretPos(HWND hWnd, PPOINT pPt)
Get the caret position.
MG_EXPORT DWORD GUIAPI GetWindowElementAttr(HWND hwnd, int we_attr_id)
Get a window element data.
static const WINDOWINFO *GUIAPI GetWindowInfo(HWND hWnd)
Get the handle of window information.
LONG_PTR LINT
Signed integer which has pointer precision.
int(* hit_test)(HWND hWnd, int x, int y)
MG_EXPORT MSGHOOK GUIAPI RegisterEventHookFunc(int event_type, MSGHOOK hook, void *context)
Registers an input event message hook function.
MG_EXPORT HCURSOR GUIAPI SetWindowCursor(HWND hWnd, HCURSOR hNewCursor)
Set the current cursor of a window.
MG_EXPORT BOOL GUIAPI AddWindowElementRenderer(const char *name, const WINDOW_ELEMENT_RENDERER *we_rdr)
Add a window element renderer to the system.
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.
DWORD(* calc_3dbox_color)(DWORD color, int flag)
MG_EXPORT PLOGFONT GUIAPI SetWindowFont(HWND hWnd, PLOGFONT pLogFont)
Set the default font of a window.
MG_EXPORT void GUIAPI UpdateWindow(HWND hWnd, BOOL bErase)
Updates a window.
MG_EXPORT BOOL GUIAPI ExcludeWindowExStyle(HWND hWnd, DWORD dwStyle)
Removes the specific extended style of a window.
PLOGFONT we_fonts[WE_FONTS_NUMBER]
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.
MG_EXPORT HWND GUIAPI GetDlgDefPushButton(HWND hWnd)
Get the default push button control in a window.
GHANDLE HMENU
Handle to menu.
MG_EXPORT BOOL GUIAPI SetWindowClassInfo(const WNDCLASS *pWndClass)
Set the information of the specified window class.
MG_EXPORT void GUIAPI DestroyAllControls(HWND hWnd)
Destroys all controls in a window.
MG_EXPORT BOOL GUIAPI EmptyMessageQueue(HWND hWnd)
Empty a message queue.
void(* draw_hilite_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
MG_EXPORT int GUIAPI NotifyWindow(HWND hWnd, LINT id, int code, DWORD dwAddData)
Send a notification message to a window.
const MG_EXPORT char *GUIAPI GetClassName(HWND hWnd)
Retrieve the name of the class to which the specified window belongs.
#define FALSE
FALSE value, defined as 0 by MiniGUI.
MG_EXPORT BOOL GUIAPI InitWindowElementAttrs(PWERENDERER rdr)
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 ma...
MG_EXPORT int GUIAPI GetWindowText(HWND hWnd, char *spString, int nMaxLen)
Copies the text of a window's into a buffer.
MG_EXPORT BOOL GUIAPI DestroyVirtualWindow(HWND hWnd)
Destroy a virtual window.
MG_EXPORT BOOL GUIAPI GetThreadByWindow(HWND hWnd, pthread_t *thread)
Get the thread identifier which a window belongs to.
void(* draw_header)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
MG_EXPORT void GUIAPI ScreenToWindow(HWND hWnd, int *x, int *y)
Converts the screen coordinates of a point to window coordinates.
MG_EXPORT HWND GUIAPI SetNullFocus(HWND hParent)
Cancels the current active child and set the focus child to be null.
MG_EXPORT HCURSOR GUIAPI GetWindowCursor(HWND hWnd)
Retrieve the current cursor of a window.
MG_EXPORT void GUIAPI WindowToClient(HWND hWnd, int *x, int *y)
Converts the window coordinates to client coordinates.
MG_EXPORT BOOL GUIAPI ShowCaretEx(HWND hWnd, BOOL ime)
Shows a caret.
BOOL GUIAPI Send2ActiveWindow(const MG_Layer *layer, UINT nMsg, WPARAM wParam, LPARAM lParam)
Send a message to the active window in a layer.
MG_EXPORT int GUIAPI BroadcastMessageInThisThread(UINT nMsg, WPARAM wParam, LPARAM lParam)
Broadcast a message to all main/virtual windows in the current thread.
const MG_EXPORT char * GetResPath(void)
Get the currrent user's resource path.
MG_EXPORT BOOL GUIAPI SetKeyboardLayout(const char *kbd_layout)
Set a new keyboard layout.
GHANDLE HICON
Handle to icon.
MG_EXPORT BOOL GUIAPI SetWindowText(HWND hWnd, const char *spString)
Set the text of a window.
int(* calc_we_metrics)(HWND hWnd, LFRDR_WINSTYLEINFO *style_info, int which)
DWORD(* on_get_rdr_attr)(struct _WINDOW_ELEMENT_RENDERER *, int we_attr_id)
MG_EXPORT HWND GUIAPI GetWindowUnderCursor(void)
Retrieve the handle to the window (if any) which is just beneath the mouse cursor.
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 specif...
#define WE_METRICS_NUMBER
The number of window element metric attributes.
MG_EXPORT BOOL GUIAPI DestroyWindow(HWND hWnd)
Destroys a specified control.
MG_EXPORT BOOL GUIAPI IsWindowVisible(HWND hWnd)
Retrieve the visibility state of the specified window.
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,...
MG_EXPORT void * LoadResource(const char *res_name, int type, DWORD usr_param)
Load a resource from disk or memory.
MG_EXPORT DWORD GUIAPI GetWindowStyle(HWND hWnd)
Retrieve the style of a window.
MG_EXPORT int GUIAPI ClientHeightToWindowHeightEx(DWORD dwStyle, int win_type, int ch, BOOL hasMenu)
Calculates window height from the height of the client area.
MG_EXPORT HWND GUIAPI GetDlgItem(HWND hDlg, LINT nIDDlgItem)
Retrieve the handle to a control in a dialog box.
unsigned char Uint8
A type definition for an 8-bit unsigned character.
GHANDLE HACCEL
Handle to accelarator.
MG_EXPORT DWORD GUIAPI GetWindowClassAdditionalData(HWND hWnd)
Retrieve the additional data of a control class.
static MSGHOOK GUIAPI RegisterKeyMsgHook(void *context, MSGHOOK hook)
Register a key message hook function.
MG_EXPORT BOOL GUIAPI WaitMessage(PMSG pMsg, HWND hMainWnd)
Wait for a message from the message queue of a main window.
int(* deinit)(PWERENDERER renderer)
MG_EXPORT BOOL GUIAPI GetClientRect(HWND hWnd, PRECT prc)
Retrieve the client rectangle of a window.
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 BITMA...
const MG_EXPORT BITMAP *GUIAPI GetSystemBitmapEx2(HDC hdc, const char *rdr_name, const char *id)
Retrieve the system bitmap object by identifier.
void(* draw_3dbox)(HDC hdc, const RECT *pRect, DWORD color, DWORD flag)
int BOOL
A type definition for boolean value.
MG_EXPORT WINDOW_ELEMENT_RENDERER *GUIAPI GetWindowRendererFromName(const char *name)
Get window renderer from name.
void(* draw_tab)(HWND hWnd, HDC hdc, RECT *rect, char *title, DWORD color, int flag, HICON icon)
MG_EXPORT BOOL GUIAPI ActiveCaret(HWND hWnd)
Activates the caret owned by a window.
MG_EXPORT BOOL GUIAPI ChangeCaretSize(HWND hWnd, int newWidth, int newHeight)
Changes the size of the caret.
void(* draw_trackbar)(HWND hWnd, HDC hdc, LFRDR_TRACKBARINFO *info)
MG_EXPORT BOOL GUIAPI IsWindowEnabled(HWND hWnd)
Determine whether the specified window is enabled for mouse and keyboard input.
int(* calc_we_area)(HWND hWnd, int which, RECT *we_area)
MG_EXPORT DWORD GUIAPI SetWindowAdditionalData(HWND hWnd, DWORD newData)
Set the first additional data of a window.
const char name[LEN_RENDERER_NAME+1]
MG_EXPORT void GUIAPI UnregisterSystemBitmap(HDC hdc, const char *rdr_name, const char *id)
Unregister a BITMAP object from the system BITMAP cache.
const MG_EXPORT char *GUIAPI GetWindowCaption(HWND hWnd)
Retrieve the caption of a window.
MG_EXPORT int GUIAPI DestroyAcceleratorTable(HACCEL hacc)
Destroys an accelerator table.
void(* NOTIFPROC)(HWND hwnd, LINT id, int nc, DWORD add_data)
Type of the notification callback procedure.
void(* draw_radio_button)(HWND hWnd, HDC hdc, const RECT *pRect, int status)
static int GUIAPI DialogBoxIndirectParam(PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC DlgProc, LPARAM lParam)
A simplified version of DialogBoxIndirectParamEx.
MG_EXPORT void * GetResource(RES_KEY key)
Retrieve and return a buffered resource by the key.
MG_EXPORT BOOL GUIAPI HavePendingMessage(HWND hMainWnd)
Check if there is any pending message in the message queue of a main window.
MG_EXPORT HWND GUIAPI WindowFromPointEx(POINT pt, BOOL bRecursion)
Retrieve a handle to the window that contains the specified point.
static MSGHOOK GUIAPI RegisterMouseMsgHook(void *context, MSGHOOK hook)
Register a mouse message hook function.
MG_EXPORT BOOL GUIAPI DestroyCaret(HWND hWnd)
Destroys a caret.
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.
MG_EXPORT gal_pixel GUIAPI GetWindowBkColor(HWND hWnd)
Returns the current background color of a window.
MG_EXPORT int GUIAPI PostQuitMessage(HWND hWnd)
Puts a MSG_QUIT message into the message queue of a main window.
static HWND GUIAPI ChildWindowFromPoint(HWND hParent, POINT pt)
Retrieve a handle to the child window that contains the speicified point.
MG_EXPORT void GUIAPI SetAutoRepeatMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Set the auto-repeat message.
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.
void(* draw_caption_button)(HWND hwnd, HDC hdc, int ht_code, int state)
MG_EXPORT void GUIAPI ClientToScreen(HWND hWnd, int *x, int *y)
Converts the client coordinates of a point to screen coordinates.
MG_EXPORT HWND GUIAPI GetFirstHosted(HWND hHosting)
Retrieve the first hosted window of a main window or a virtual window.
MG_EXPORT BOOL GUIAPI ExcludeWindowStyle(HWND hWnd, DWORD dwStyle)
Removes the specific style of a window.
const MG_EXPORT char *GUIAPI SetDefaultWindowElementRenderer(const char *name)
Set a window element renderer as the default system renderer.
MG_EXPORT BOOL GUIAPI IncludeWindowExStyle(HWND hWnd, DWORD dwStyle)
Includes the specific extended style of a window.
MG_EXPORT HWND GUIAPI GetParent(HWND hWnd)
Retrieve the handle to a child window's parent window.
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.
DWORD we_colors[WE_COLORS_NUMBER][3]
void(* erase_background)(HWND hWnd, HDC hdc, const RECT *rect)
struct _CTRLDATA CTRLDATA
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 th...
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.
MG_EXPORT int GUIAPI GetIMEPos(POINT *pt)
Retrieve the position of the current IME window.
MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook(SRVEVTHOOK SrvEvtHook)
Set an event hook in the server of MiniGUI-Processes.
MG_EXPORT BOOL GUIAPI IsVirtualWindow(HWND hWnd)
Determine whether a window is a virtual window.
MG_EXPORT BOOL GUIAPI GetWindowRect(HWND hWnd, PRECT prc)
Retrieve the dimensions of the bounding rectangle of a window.
static BOOL GUIAPI HideCaret(HWND hWnd)
Hides a caret.
void(* draw_push_button)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color1, DWORD color2, int status)
MG_EXPORT BOOL GUIAPI IsControl(HWND hWnd)
Determine whether a window is a control.
MG_EXPORT int GUIAPI GetWindowTextLength(HWND hWnd)
Retrieve the length of a window's text.
MG_EXPORT UINT GUIAPI GetCaretBlinkTime(HWND hWnd)
Returns the elapsed time, in milliseconds, required to invert the caret's pixels.
MG_EXPORT LINT GUIAPI GetWindowId(HWND hWnd)
Get the identifier of a window.
MG_EXPORT BOOL GUIAPI IncludeWindowStyle(HWND hWnd, DWORD dwStyle)
Includes the specific style of a window.
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.
const MG_EXPORT BITMAP *GUIAPI RetrieveRes(const char *file)
Get a BITMAP object from cache according to the specified resource file name.
MG_EXPORT int GUIAPI UnregisterIMEWindow(HWND hWnd)
Unregisters an IME window.
MG_EXPORT HWND GUIAPI GetNextChild(HWND hWnd, HWND hChild)
Retrieve the next control in a window.
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 rectangl...
MG_EXPORT DWORD GUIAPI GetWindowAdditionalData2(HWND hWnd)
Retrieve the second additional data of a window.
MG_EXPORT PLOGFONT GUIAPI GetWindowFont(HWND hWnd)
Retrieve the default font of a window.
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...
MG_EXPORT int GUIAPI KillTimer(HWND hWnd, LINT id)
Destroys a timer.
struct _MAINWINCREATE MAINWINCREATE
MG_EXPORT void GUIAPI MessageBeep(DWORD dwBeep)
Makes a sound of beep.
struct _WINDOW_ELEMENT_RENDERER WINDOW_ELEMENT_RENDERER
void(* draw_checkbox)(HDC hdc, const RECT *pRect, DWORD color, int status)
MG_EXPORT BOOL GUIAPI SetWindowCaption(HWND hWnd, const char *spCaption)
Set the caption of a window.
void(* draw_normal_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
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.
void(* draw_border)(HWND hWnd, HDC hdc, BOOL is_active)
MG_EXPORT DWORD GUIAPI SetWindowClassAdditionalData(HWND hWnd, DWORD newData)
Set the additional data of a control class.
MG_EXPORT BOOL GUIAPI RemoveWindowLocalData(HWND hwnd, const char *data_name)
Remove the local data bound with a name for a window.
void(* draw_check_button)(HWND hWnd, HDC hdc, const RECT *pRect, int status)
MG_EXPORT gal_pixel GUIAPI SetWindowBkColor(HWND hWnd, gal_pixel new_bkcolor)
Set the background color of a window.
MG_EXPORT int ReleaseRes(RES_KEY key)
Release the buffered resource. It will decrease the reference count of the resource....
MG_EXPORT char *GUIAPI GetDlgItemText2(HWND hDlg, LINT id, int *lenPtr)
Retrieve the title or text associated with a control in a dialog box.
void(* calc_thumb_area)(HWND hWnd, BOOL vertical, LFSCROLLBARINFO *sb_info)
MG_EXPORT BOOL GUIAPI MainWindowCleanup(HWND hMainWnd)
Cleans up system resource associated with a main window.
MG_EXPORT BOOL GUIAPI VirtualWindowCleanup(HWND hVirtWnd)
Cleanup the system resource associated with a virtual window.
MG_EXPORT void GUIAPI UnregisterRes(const char *file)
Unregister the BITMAP object from cache according to the specified resource file name.
MG_EXPORT HWND GUIAPI GetHosting(HWND hWnd)
Retrieve the hosting window of a main window or a virtual window.
MG_EXPORT HACCEL GUIAPI CreateAcceleratorTable(HWND hWnd)
Creates an empty accelerator table.
MG_EXPORT BOOL GUIAPI DestroyMainWindowIndirect(HWND hMainWin)
Destroys a main window created by CreateMainWindowIndirectParam.
MG_EXPORT DWORD GUIAPI GetWindowExStyle(HWND hWnd)
Retrieve the extended style of a window.
void(* draw_radio)(HDC hdc, const RECT *pRect, DWORD color, int status)
This file includes macro definitions and typedefs that commonly used by MiniGUI.
MG_EXPORT int GUIAPI SendNotifyMessage(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
Send a notification message to a window.
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.
MG_EXPORT BOOL GUIAPI ShowWindow(HWND hWnd, int iCmdShow)
Shows or hides a window.
void(* draw_arrow)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color, int status)
#define LEN_RENDERER_NAME
The maximum length of a renderer name.
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.
void(* draw_disabled_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
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.
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.
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.
MG_EXPORT int GUIAPI GetIMETargetInfo(IME_TARGET_INFO *info)
Retrieve the target info of the current IME window.
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.
static HWND GUIAPI CreateMainWindowIndirectParam(PDLGTEMPLATE pDlgTemplate, HWND hOwner, WNDPROC WndProc, LPARAM lParam)
A simplified version of CreateMainWindowIndirectParamEx.
MG_EXPORT BOOL GUIAPI RegisterWindowClass(PWNDCLASS pWndClass)
Registers a window class.
MG_EXPORT void GUIAPI TermSystemBitmapEx(const char *id, const char *rdr_name, PBITMAP bmp)
Release the system bitmap object by identifier.
MG_EXPORT BOOL GUIAPI IsWindowInThisThread(HWND hWnd)
Determine whether a window was created in this thread.
MG_EXPORT LINT GUIAPI SetWindowId(HWND hWnd, LINT lNewId)
Set the identifier of a window.
MG_EXPORT NOTIFPROC GUIAPI GetNotificationCallback(HWND hwnd)
Get the notification callback procedure of a control.
MG_EXPORT BOOL GUIAPI InvalidateRect(HWND hWnd, const RECT *prc, BOOL bEraseBkgnd)
Makes a rectangle region in the client area of a window invalid.
void(* draw_significant_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
MG_EXPORT int UnregisterResType(int type)
Unregister a user-defined resource type.
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....
struct _LFRDR_WINSTYLEINFO LFRDR_WINSTYLEINFO
struct _LFSCROLLBARINFO LFSCROLLBARINFO
void(* disabled_text_out)(HWND hWnd, HDC hdc, const char *spText, PRECT rc, DWORD dt_fmt)
static BOOL GUIAPI ShowCaret(HWND hWnd)
Shows a caret.
MG_EXPORT int GUIAPI SetIMEStatus(int StatusCode, int Value)
Set the status of the current IME window.
int(* MSGHOOK)(void *context, HWND dst_wnd, UINT msg, WPARAM wparam, LPARAM lparam)
Type of message hook function.
MG_EXPORT void GUIAPI ReleaseCapture(void)
Releases the mouse capture from a window and restores normal mouse input processing.
MG_EXPORT void GUIAPI TermSystemBitmap(HWND hWnd, const char *id, PBITMAP bmp)
Release the system bitmap object by identifier.
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 MYBIT...
MG_EXPORT BOOL GUIAPI SetMainWindowCompositing(HWND hWnd, int type, DWORD arg)
Set the compositing type of a main window.
MG_EXPORT NOTIFPROC GUIAPI SetNotificationCallback(HWND hwnd, NOTIFPROC notif_proc)
Set a new notification callback procedure for a window.
MG_EXPORT BOOL GUIAPI IsWindow(HWND hWnd)
Determine whether a window handle identifies an existing window.
MG_EXPORT LINT GUIAPI GetDlgCtrlID(HWND hwndCtl)
Get the integer identifier of a control.
void(* draw_hilite_menu_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
MG_EXPORT void GUIAPI CheckDlgButton(HWND hDlg, LINT nIDDlgItem, int nCheck)
Changes the check status of a button control.
MG_EXPORT HWND GUIAPI GetMainWindowHandle(HWND hWnd)
Retrieve the handle to the main window contains a window.
#define WE_FONTS_NUMBER
The number of window element font attributes.
BOOL GUIAPI SetWindowRegion(HWND hWnd, const CLIPRGN *region)
Set window's Mask Rect with CLIPRGN data.
void(* draw_progress)(HWND hWnd, HDC hdc, int nMax, int nMin, int nPos, BOOL fVertical)
MG_EXPORT HACCEL GUIAPI CopyAcceleratorTable(HACCEL hacc)
Copies the specified accelerator table.
MG_EXPORT BOOL GUIAPI RegisterResFromFile(HDC hdc, const char *file)
Register a device-dependent bitmap from a file.
MG_EXPORT int GUIAPI BroadcastMessage(UINT nMsg, WPARAM wParam, LPARAM lParam)
Broadcast a message to all main windows on the desktop.
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.
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 ...
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.
MG_EXPORT HWND GUIAPI GetCapture(void)
Retrieve the handle to the window (if any) that has captured the mouse.
void(* draw_disabled_menu_item)(HWND hWnd, HDC hdc, const RECT *pRect, DWORD color)
#define TRUE
TRUE value, defined as 1 by MiniGUI.
MG_EXPORT BOOL GUIAPI IsMainWindow(HWND hWnd)
Determine whether a window is a main window.
MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop(HWND hWnd, BOOL fSet)
Set or cancel a main window being always top.
MG_EXPORT int GUIAPI RegisterIMEWindow(HWND hWnd)
Registers an IME window.
void(* draw_scrollbar)(HWND hWnd, HDC hdc, int sb_pos)
MG_EXPORT BOOL GUIAPI RegisterResFromBitmap(const char *file, const BITMAP *bmp)
Register a device-dependent bitmap to bitmap cache.
MG_EXPORT WNDPROC GUIAPI GetWindowCallbackProc(HWND hWnd)
Retrieve the callback procedure of a window.
UINT_PTR LPARAM
A type definition for the second message paramter.
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 contro...
BOOL(* TIMERPROC)(HWND, LINT, DWORD)
Type of the timer callback procedure.
MG_EXPORT BOOL GUIAPI GetUpdateRect(HWND hWnd, RECT *update_rect)
Retrieve the bounding box of the update region of a window.
static BOOL GUIAPI GetMessage(PMSG pMsg, HWND hWnd)
Get a message from the message queue of a main window.
struct _WINDOW_ELEMENT_ATTR WINDOW_ELEMENT_ATTR
MG_EXPORT HWND GUIAPI GetFocusChild(HWND hParent)
Retrieve the handle to the window's active child that has the keyboard focus.
MG_EXPORT BOOL GUIAPI UnregisterWindowClass(const char *szClassName)
Undoes the effect of RegisterWindowClass.
MG_EXPORT HICON GUIAPI GetWindowIcon(HWND hWnd)
Retrieve the current icon of a window.
MG_EXPORT int GUIAPI AddAccelerators(HACCEL hacc, int key, DWORD keymask, WPARAM wParam, LPARAM lParam)
Adds an accelerator to the accelerator table.
MG_EXPORT HWND GUIAPI CreateVirtualWindow(HWND hHosting, WNDPROC WndProc, const char *spCaption, LINT id, DWORD dwAddData)
Create a virtual window.
Uint32 gal_pixel
Data type of pixel value.
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.
static const BITMAP *GUIAPI GetSystemBitmapEx(const char *rdr_name, const char *id)
Retrieve the system bitmap object by identifier.
MG_EXPORT HWND GUIAPI RegisterKeyHookWindow(HWND hwnd, DWORD flag)
Register a key message hook window.
int we_metrics[WE_METRICS_NUMBER]
#define WS_EX_NONE
No any extended window style.
MG_EXPORT void GUIAPI ScreenToClient(HWND hWnd, int *x, int *y)
Converts the screen coordinates of a point to client coordinates.
MG_EXPORT BOOL GUIAPI SetCaretPos(HWND hWnd, int x, int y)
Moves the caret to a new position.
GHANDLE HCURSOR
Handle to cursor.
MG_EXPORT BOOL GUIAPI IsTimerInstalled(HWND hWnd, LINT id)
Determine whether a timer is installed.
#define HDC_SCREEN
Handle to the device context of the whole screen or the fake screen when MiniGUI is running under Min...
MG_EXPORT HWND GUIAPI GetHostedById(HWND hHosting, LINT lId, DWORD dwSearchFlags)
Retrieve a hosted main window or virtual window by identifier.
void(* draw_caption)(HWND hWnd, HDC hdc, BOOL is_active)
MG_EXPORT LRESULT GUIAPI DispatchMessage(PMSG pMsg)
Dispatches a message to the window's callback procedure.
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.
MG_EXPORT BOOL GUIAPI IsDialog(HWND hWnd)
Determine whether a window handle identifies a dialog window.
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.
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.
const void * private_info
MG_EXPORT DWORD GUIAPI SetWindowAdditionalData2(HWND hWnd, DWORD newData)
Set the second additional data of a window.
MG_EXPORT int GUIAPI SendPriorNotifyMessage(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
Send a prior notification message to a window.
const MG_EXPORT BITMAP *GUIAPI GetSystemBitmap(HWND hWnd, const char *id)
Retrieve the system bitmap object by identifier.
MG_EXPORT HWND GUIAPI GetNextHosted(HWND hHosting, HWND hHosted)
Retrieve the next hosted window of a main window or a virtual window.
void(* draw_focus_frame)(HDC hdc, const RECT *pRect, DWORD color)
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.
MG_EXPORT BOOL GUIAPI InvalidateRegion(HWND hWnd, const CLIPRGN *pRgn, BOOL bErase)
Invalidates the client area within the specified region.
MG_EXPORT LRESULT GUIAPI DefaultWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
The default window callback procedure.
void(* calc_trackbar_rect)(HWND hWnd, LFRDR_TRACKBARINFO *info, DWORD dwStyle, const RECT *rcClient, RECT *rcRuler, RECT *rcBar, RECT *rcBorder)
HICON we_icon[2][SYSICO_ITEM_NUMBER]
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.
MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags(HWND hWnd, DWORD dwFlags)
Set the gesture flags of a main window.
MG_EXPORT HDC GUIAPI BeginPaint(HWND hWnd)
Prepares a window for painting.
MG_EXPORT int GUIAPI ThrowAwayMessages(HWND pMainWnd)
Removes all messages in the message queue associated with a window.
WORD_HPTR WORD
A type definition for an unsigned integer (word).
MG_EXPORT BOOL GUIAPI GetWindowClassInfo(PWNDCLASS pWndClass)
Retrieve the information of the specified window class.